GNU Info

Info Node: (autoconf.info)Changed Results

(autoconf.info)Changed Results


Next: Changed Macro Writing Prev: Invoking autoupdate Up: Upgrading
Enter node , (file) or (file)node

Changed Results
===============

   If you were checking the results of previous tests by examining the
shell variable `DEFS', you need to switch to checking the values of the
cache variables for those tests.  `DEFS' no longer exists while
`configure' is running; it is only created when generating output
files.  This difference from version 1 is because properly quoting the
contents of that variable turned out to be too cumbersome and
inefficient to do every time `AC_DEFINE' is called.  Note: Cache
Variable Names.

   For example, here is a `configure.in' fragment written for Autoconf
version 1:

     AC_HAVE_FUNCS(syslog)
     case "$DEFS" in
     *-DHAVE_SYSLOG*) ;;
     *) # syslog is not in the default libraries.  See if it's in some other.
       saved_LIBS="$LIBS"
       for lib in bsd socket inet; do
         AC_CHECKING(for syslog in -l$lib)
         LIBS="$saved_LIBS -l$lib"
         AC_HAVE_FUNCS(syslog)
         case "$DEFS" in
         *-DHAVE_SYSLOG*) break ;;
         *) ;;
         esac
         LIBS="$saved_LIBS"
       done ;;
     esac

   Here is a way to write it for version 2:

     AC_CHECK_FUNCS(syslog)
     if test $ac_cv_func_syslog = no; then
       # syslog is not in the default libraries.  See if it's in some other.
       for lib in bsd socket inet; do
         AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG)
           LIBS="$LIBS $lib"; break])
       done
     fi

   If you were working around bugs in `AC_DEFINE_UNQUOTED' by adding
backslashes before quotes, you need to remove them.  It now works
predictably, and does not treat quotes (except backquotes) specially.
Note: Setting Output Variables.

   All of the boolean shell variables set by Autoconf macros now use
`yes' for the true value.  Most of them use `no' for false, though for
backward compatibility some use the empty string instead.  If you were
relying on a shell variable being set to something like 1 or `t' for
true, you need to change your tests.


automatically generated by info2www version 1.2.2.9