autoconf: Changed Results
1
1 18.5.4 Changed Results
1 ----------------------
1
1 If you were checking the results of previous tests by examining the
1 shell variable `DEFS', you need to switch to checking the values of the
1 cache variables for those tests. `DEFS' no longer exists while
1 `configure' is running; it is only created when generating output
1 files. This difference from version 1 is because properly quoting the
1 contents of that variable turned out to be too cumbersome and
11 inefficient to do every time `AC_DEFINE' is called. ⇒Cache
Variable Names.
1
1 For example, here is a `configure.ac' fragment written for Autoconf
1 version 1:
1
1 AC_HAVE_FUNCS(syslog)
1 case "$DEFS" in
1 *-DHAVE_SYSLOG*) ;;
1 *) # syslog is not in the default libraries. See if it's in some other.
1 saved_LIBS="$LIBS"
1 for lib in bsd socket inet; do
1 AC_CHECKING(for syslog in -l$lib)
1 LIBS="-l$lib $saved_LIBS"
1 AC_HAVE_FUNCS(syslog)
1 case "$DEFS" in
1 *-DHAVE_SYSLOG*) break ;;
1 *) ;;
1 esac
1 LIBS="$saved_LIBS"
1 done ;;
1 esac
1
1 Here is a way to write it for version 2:
1
1 AC_CHECK_FUNCS([syslog])
1 if test "x$ac_cv_func_syslog" = xno; then
1 # syslog is not in the default libraries. See if it's in some other.
1 for lib in bsd socket inet; do
1 AC_CHECK_LIB([$lib], [syslog], [AC_DEFINE([HAVE_SYSLOG])
1 LIBS="-l$lib $LIBS"; break])
1 done
1 fi
1
1 If you were working around bugs in `AC_DEFINE_UNQUOTED' by adding
1 backslashes before quotes, you need to remove them. It now works
1 predictably, and does not treat quotes (except back quotes) specially.
1 ⇒Setting Output Variables.
1
1 All of the Boolean shell variables set by Autoconf macros now use
1 `yes' for the true value. Most of them use `no' for false, though for
1 backward compatibility some use the empty string instead. If you were
1 relying on a shell variable being set to something like 1 or `t' for
1 true, you need to change your tests.
1