]> git.donarmstrong.com Git - lilypond.git/commitdiff
Autoconf: fix CFLAGS/CXXFLAGS recognition
authorPatrick McCarty <pnorcks@gmail.com>
Mon, 10 Aug 2009 21:10:31 +0000 (14:10 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Wed, 16 Sep 2009 18:33:40 +0000 (11:33 -0700)
For Autoconf 2.64, we require a workaround to preserve correct M4 macro
nesting, yet still keep the correct CFLAGS and CXXFLAGS.

This fixes --disable-optimising, for example.

I've also tested Autoconf 2.63 and 2.62.
(cherry picked from commit 8ec48683a3a5b78433e10de70951b4f417c6f725)

configure.in
stepmake/aclocal.m4

index 3e4286d767e0632cdcb8984208db543fad90ad6b..b067305f9dcf38c807099c986524dd54bd279cec 100644 (file)
@@ -11,9 +11,6 @@ AC_CONFIG_AUX_DIR([stepmake/bin])
 # For stepmake package:
 # AC_CONFIG_AUX_DIR(bin)
 
-# must expand this at top-level for autoconf>=2.64
-AC_PROG_CC
-
 
 STEPMAKE_INIT
 
index 3786968be37961ffde0fdf15a9a6aa21b4dd50ab..83c07c3a2ddc549c012917841ce641fc9a0122fe 100644 (file)
@@ -163,8 +163,7 @@ AC_DEFUN(STEPMAKE_BISON, [
     fi
 ])
 
-
-AC_DEFUN(STEPMAKE_COMPILE, [
+AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [
     # -O is necessary to get inlining
     CFLAGS=${CFLAGS-""}
     CXXFLAGS=${CXXFLAGS-$CFLAGS}
@@ -204,7 +203,13 @@ AC_DEFUN(STEPMAKE_COMPILE, [
     if test $debug_b = yes; then
        OPTIMIZE="$OPTIMIZE -g"
     fi
+])
+
+AC_DEFUN(STEPMAKE_COMPILE, [
+
+    AC_REQUIRE([STEPMAKE_COMPILE_BEFORE])
+    AC_REQUIRE([AC_PROG_CC])
+
     STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
     LD='$(CC)'
     AC_SUBST(LD)