diff options
author | Gary V. Vaughan <gary@gnu.org> | 2003-06-11 17:07:39 +0000 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2007-10-05 21:58:31 -0600 |
commit | 1af1427564eb3112c3398ed9265507ebb14983ac (patch) | |
tree | 09c9a2e670ca9c81f14197072c31f921b9fb6e70 | |
parent | 6cceb57a3ded5e5d85684676c3facd725d9ed898 (diff) | |
download | m4-1af1427564eb3112c3398ed9265507ebb14983ac.tar.gz |
Getting rid of the annoying bug with configure --enable-debug,
which spewed -e: command not found errors. This was an interaction
between libtool-1.5's LT_AC_COMPILER_OPTION, and config/debug.m4.
You'll need to re-bootstrap the m4 tree with cvs libtool (HEAD or
branch-1-5) to get the full fix.
* config/debug.m4 (M4_AC_CHECK_DEBUGGING): Require libtools version
of AC_LIBTOOL_COMPILER_OPTION (which now requires LT_AC_PROG_SED),
and then use the probed value of $SED.
(AC_LIBTOOL_COMPILER_OPTION): Removed. Don't conditionally define
this, it messes up the AC_REQUIRE stack.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | config/debug.m4 | 44 |
2 files changed, 19 insertions, 39 deletions
@@ -1,3 +1,17 @@ +2003-06-11 Gary V. Vaughan <gary@gnu.org> + + Getting rid of the annoying bug with configure --enable-debug, + which spewed -e: command not found errors. This was an interaction + between libtool-1.5's LT_AC_COMPILER_OPTION, and config/debug.m4. + You'll need to re-bootstrap the m4 tree with cvs libtool (HEAD or + branch-1-5) to get the full fix. + + * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Require libtools version + of AC_LIBTOOL_COMPILER_OPTION (which now requires LT_AC_PROG_SED), + and then use the probed value of $SED. + (AC_LIBTOOL_COMPILER_OPTION): Removed. Don't conditionally define + this, it messes up the AC_REQUIRE stack. + 2003-06-10 Gary V. Vaughan <gary@gnu.org> * m4/symtab.c (m4_symbol_popdef): Need to pass the hash address to diff --git a/config/debug.m4 b/config/debug.m4 index c109bd5f..766323ed 100644 --- a/config/debug.m4 +++ b/config/debug.m4 @@ -20,48 +20,14 @@ ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ## Boston, MA 02111-1307, USA. -# serial 5 - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -ifdef([AC_LIBTOOL_COMPILER_OPTION], [], -[AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], - [AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $3" - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - else - $2=yes - fi - fi - $rm conftest* - CFLAGS="$save_CFLAGS" - ]) - - if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) - else - ifelse([$6], , :, [$6]) - fi - ]) -])# AC_LIBTOOL_COMPILER_OPTION - +# serial 6 # M4_AC_CHECK_DEBUGGING # --------------------- # Debugging Support AC_DEFUN([M4_AC_CHECK_DEBUGGING], [AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_LIBTOOL_COMPILER_OPTION]) AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug], [build for debugging [default=no]])]) AC_MSG_CHECKING(for compilation debug mode) @@ -77,7 +43,7 @@ if test "X$enable_debug" = Xyes; then [Define this to enable additional runtime debugging]) if test "$GCC" = yes; then case "$CFLAGS" in - *-O* ) CFLAGS=`echo $CFLAGS | sed 's/-O[[^ ]]* / /;s/-O[[^ ]]*$//'` ;; + *-O* ) CFLAGS=`echo $CFLAGS | $SED 's/-O[[^ ]]* / /;s/-O[[^ ]]*$//'` ;; esac case "$CFLAGS" in *-g* ) ;; @@ -110,12 +76,12 @@ else AC_ENABLE_SHARED case "$CFLAGS" in *-g* ) CFLAGS=`echo "$CFLAGS" |\ - sed -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'` + $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'` ;; esac case "$CXXFLAGS" in *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\ - sed -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'` + $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'` ;; esac fi |