/[m4]/m4/config/debug.m4
ViewVC logotype

Diff of /m4/config/debug.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by gary, Mon Sep 3 22:58:35 2001 UTC revision 1.5 by gary, Wed Jun 11 17:07:39 2003 UTC
# Line 20  Line 20 
20  ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,  ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  ## Boston, MA 02111-1307, USA.  ## Boston, MA 02111-1307, USA.
22    
23  # serial 5  # serial 6
   
 # 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  
   
24    
25  # M4_AC_CHECK_DEBUGGING  # M4_AC_CHECK_DEBUGGING
26  # ---------------------  # ---------------------
27  # Debugging Support  # Debugging Support
28  AC_DEFUN([M4_AC_CHECK_DEBUGGING],  AC_DEFUN([M4_AC_CHECK_DEBUGGING],
29  [AC_REQUIRE([AC_PROG_CC])  [AC_REQUIRE([AC_PROG_CC])
30    AC_REQUIRE([AC_LIBTOOL_COMPILER_OPTION])
31  AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug],  AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug],
32                             [build for debugging [default=no]])])                             [build for debugging [default=no]])])
33  AC_MSG_CHECKING(for compilation debug mode)  AC_MSG_CHECKING(for compilation debug mode)
# Line 77  if test "X$enable_debug" = Xyes; then Line 43  if test "X$enable_debug" = Xyes; then
43        [Define this to enable additional runtime debugging])        [Define this to enable additional runtime debugging])
44    if test "$GCC" = yes; then    if test "$GCC" = yes; then
45      case "$CFLAGS" in      case "$CFLAGS" in
46        *-O* ) CFLAGS=`echo $CFLAGS | sed 's/-O[[^ ]]* / /;s/-O[[^ ]]*$//'` ;;        *-O* ) CFLAGS=`echo $CFLAGS | $SED 's/-O[[^ ]]* / /;s/-O[[^ ]]*$//'` ;;
47      esac      esac
48      case "$CFLAGS" in      case "$CFLAGS" in
49          *-g* ) ;;          *-g* ) ;;
# Line 110  else Line 76  else
76    AC_ENABLE_SHARED    AC_ENABLE_SHARED
77    case "$CFLAGS" in    case "$CFLAGS" in
78      *-g* ) CFLAGS=`echo "$CFLAGS" |\      *-g* ) CFLAGS=`echo "$CFLAGS" |\
79                 sed -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`                 $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
80             ;;             ;;
81    esac    esac
82    case "$CXXFLAGS" in    case "$CXXFLAGS" in
83      *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\      *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
84                 sed -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`                 $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
85             ;;             ;;
86    esac    esac
87  fi  fi

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26