fixed test in Makefiles for LIBTOOL for the case where it doesn't exist
[mmh] / sbr / Makefile.in
index 9aad677..10fb56c 100644 (file)
@@ -19,6 +19,8 @@ AWK    = @AWK@
 LORDER = @LORDER@
 TSORT  = @TSORT@
 RANLIB = @RANLIB@
+LIBTOOL = @LIBTOOL@
+GNU_LIBTOOL = @GNU_LIBTOOL@
 
 LIBOBJS = @LIBOBJS@
 
@@ -91,9 +93,13 @@ sigmsg.h: sigmsg.awk
 pidstatus.o: sigmsg.h
 
 libmh.a: $(OBJS)
-       rm -f libmh.a
-       ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT)`
-       $(RANLIB) libmh.a
+       rm -f $@
+       if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
+         $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
+       else \
+         ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT)`  ; \
+         $(RANLIB) libmh.a  ; \
+       fi 
 
 install: