fixed test in Makefiles for LIBTOOL for the case where it doesn't exist
[mmh] / mts / smtp / Makefile.in
index 7d197d5..85ea7ea 100644 (file)
@@ -24,6 +24,8 @@ INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
 LORDER  = @LORDER@
 TSORT   = @TSORT@
 RANLIB  = @RANLIB@
+LIBTOOL = @LIBTOOL@
+GNU_LIBTOOL = @GNU_LIBTOOL@
 
 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
 
@@ -54,8 +56,12 @@ all: libsmtp.a
 
 libsmtp.a: $(OBJS)
        rm -f $@
-       ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)`
-       $(RANLIB) $@
+       if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
+         $(LIBTOOL) -static -c $(OBJS) -o $@  ; \
+       else \
+         ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)`  ; \
+         $(RANLIB) $@  ; \
+       fi 
 
 install: