From: Patrick McCarty Date: Mon, 10 Aug 2009 21:10:31 +0000 (-0700) Subject: Autoconf: fix CFLAGS/CXXFLAGS recognition X-Git-Tag: release/2.12.3-1~8 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=0c77902e90b113823f3ea0004d7dfaf8aed218a8;p=lilypond.git Autoconf: fix CFLAGS/CXXFLAGS recognition 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) --- diff --git a/configure.in b/configure.in index 3e4286d767..b067305f9d 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 3786968be3..83c07c3a2d 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -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)