diff --git a/config.in b/config.in index 78e0042..4d84aa0 100644 --- a/config.in +++ b/config.in @@ -6,7 +6,7 @@ bindir = @bindir@ libdir = @libdir@ INSTALL= @INSTALL@ -MAKE= @MAKE@ +@SET_MAKE@ BUILD= _build COMPILER=heptc @@ -19,4 +19,4 @@ STDLIB_DIR=@stdlib_dir@ OCAMLBUILD=STDLIB=$(STDLIB_DIR) @OCAMLBUILD@ TARGET=byte -ENABLE_SIMULATOR=@enable_simulator@ \ No newline at end of file +ENABLE_SIMULATOR=@enable_simulator@ diff --git a/configure b/configure index 8019bde..fe907f0 100755 --- a/configure +++ b/configure @@ -584,6 +584,7 @@ OCAMLOPT OCAMLLIB OCAMLVERSION OCAMLC +SET_MAKE INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -1800,6 +1801,38 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + # Check whether --enable-simulator was given. if test "${enable_simulator+set}" = set; then : enableval=$enable_simulator; diff --git a/configure.in b/configure.in index 1ce0da2..739ffdf 100644 --- a/configure.in +++ b/configure.in @@ -2,6 +2,8 @@ AC_INIT(heptagon,1.0) AC_PROG_INSTALL +AC_PROG_MAKE_SET + AC_ARG_ENABLE(simulator, [ --enable-simulator enable the graphical simulator],, enable_simulator=no)