Permalink
Browse files

configure for non-GNU make

  • Loading branch information...
1 parent 0db1cc2 commit 0ba1635eeffbed8fea2def7add1fb739a4cdd631 @rurban rurban committed Mar 8, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 configure
View
@@ -1,3 +1,11 @@
#!/bin/sh
-test -f config.inc && mv config.inc config.bak
-make -f config.mak $*
+test -f config.inc && mv config.inc config.inc.bak
+test -f core/config.h && mv core/config.h core/config.h.bak
+if make --version 2>/dev/null | grep GNU
+then
+ make -f config.mak $@
+else
+ sed -e's, ?= , = ,;s,-lm -ldl,-lm,;s,config.mak,config.mk,g;s,makefile-gmake,makefile-bsdmake,;' config.mak > config.mk
+ sed -e's, ?= , = ,;s,config.mak,config.mk,g;' Makefile > BSDmakefile
+ make -f config.mk $@
+fi

0 comments on commit 0ba1635

Please sign in to comment.