* acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Allow an empty value
for --enable and --with args.
+ (AC_CACHE_CHECK): New macro.
+ * acspecific.m4: Use it where possible.
Tue Jun 27 13:29:54 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
* New configure options --bindir, --libdir, --datadir, etc., with
corresponding output variables.
+* New macro: AC_CACHE_CHECK.
* config.log contains the command being run as well as any output from it.
* AC_CHECK_LIB can check for libraries with "." or "/" in their name.
* AC_PROG_INSTALL doesn't cache a path to install-sh, for sharing caches.
and so does AC_CONFIG_HEADER when autoconf is run.
------------------------------------------------------------------------------
-
-On Sun, 18 Jun 1995 12:59:01 -0400, Richard Stallman <rms@gnu.ai.mit.edu> said:
-
-> When a configure script includes nonstandard tests,
-> is there an easy way to arrange to cache the result?
-
-Yes, such a shorthand macro is possible. Here's a definition for it.
-
-dnl AC_CHECK_CACHE(cache-var, message, check)
-AC_DEFUN([AC_CHECK_CACHE],
-[AC_MSG_CHECKING($2)
-AC_CACHE_VAL($1, $3)
-AC_MSG_RESULT([$]$1)])
-
-------------------------------------------------------------------------------
fi
])
+dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
+define(AC_CACHE_CHECK,
+[AC_MSG_CHECKING([$1])
+AC_CACHE_VAL([$2], [$3])
+AC_MSG_RESULT([$]$2)])
+
dnl ### Defining symbols
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_CHECK_PROG(CC, gcc, gcc, cc)
-AC_MSG_CHECKING(whether we are using GNU C)
-AC_CACHE_VAL(ac_cv_prog_gcc,
+AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
cat > conftest.c <<EOF
#ifdef __GNUC__
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
-fi])dnl
-AC_MSG_RESULT($ac_cv_prog_gcc)
+fi])
if test $ac_cv_prog_gcc = yes; then
GCC=yes
if test "${CFLAGS+set}" != set; then
- AC_MSG_CHECKING(whether ${CC-cc} accepts -g)
-AC_CACHE_VAL(ac_cv_prog_gcc_g,
+ AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_gcc_g,
[echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_gcc_g=yes
ac_cv_prog_gcc_g=no
fi
rm -f conftest*
-])dnl
- AC_MSG_RESULT($ac_cv_prog_gcc_g)
+])
if test $ac_cv_prog_gcc_g = yes; then
CFLAGS="-g -O"
else
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx, gcc)
-AC_MSG_CHECKING(whether we are using GNU C++)
-AC_CACHE_VAL(ac_cv_prog_gxx,
+AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
cat > conftest.C <<EOF
#ifdef __GNUC__
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
-fi])dnl
-AC_MSG_RESULT($ac_cv_prog_gxx)
+fi])
if test $ac_cv_prog_gxx = yes; then
GXX=yes
if test "${CXXFLAGS+set}" != set; then
- AC_MSG_CHECKING(whether ${CXX-g++} accepts -g)
-AC_CACHE_VAL(ac_cv_prog_gxx_g,
+ AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_gxx_g,
[echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_gxx_g=yes
fi
rm -f conftest*
])dnl
- AC_MSG_RESULT($ac_cv_prog_gxx_g)
if test $ac_cv_prog_gxx_g = yes; then
CXXFLAGS="-g -O"
else
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
if test $ac_cv_prog_gcc = yes; then
- AC_MSG_CHECKING(whether ${CC-cc} needs -traditional)
-AC_CACHE_VAL(ac_cv_prog_gcc_traditional,
+ AC_CACHE_CHECK(whether ${CC-cc} needs -traditional,
+ ac_cv_prog_gcc_traditional,
[ ac_pattern="Autoconf.*'x'"
AC_EGREP_CPP($ac_pattern, [#include <sgtty.h>
Autoconf TIOCGETP],
AC_EGREP_CPP($ac_pattern, [#include <termio.h>
Autoconf TCGETA],
ac_cv_prog_gcc_traditional=yes)
- fi])dnl
- AC_MSG_RESULT($ac_cv_prog_gcc_traditional)
+ fi])
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
AC_DEFUN(AC_DECL_YYTEXT,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([AC_PROG_LEX])dnl
-AC_MSG_CHECKING(lex output file root)
-AC_CACHE_VAL(ac_cv_prog_lex_root,
+AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root,
[# The minimal lex program is just a single line: %%. But some broken lexes
# (Solaris, I think it was) want two %% lines, so accommodate them.
echo '%%
ac_cv_prog_lex_root=lexyy
else
AC_MSG_ERROR(cannot find output from $LEX; giving up)
-fi])dnl
+fi])
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-AC_MSG_RESULT($ac_cv_prog_lex_root)
AC_SUBST(LEX_OUTPUT_ROOT)dnl
-AC_MSG_CHECKING(whether yytext is a pointer)
-AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer,
+AC_CACHE_CHECK(whether yytext is a pointer, ac_cv_prog_lex_yytext_pointer,
[# POSIX says lex can declare yytext either as a pointer or an array; the
# default is implementation-dependent. Figure out which it is, since
# not all implementations provide the %pointer and %array declarations.
AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes)
LIBS="$ac_save_LIBS"
rm -f "${LEX_OUTPUT_ROOT}.c"])dnl
-AC_MSG_RESULT($ac_cv_prog_lex_yytext_pointer)
if test $ac_cv_prog_lex_yytext_pointer = yes; then
AC_DEFINE(YYTEXT_POINTER)
fi
AC_DEFUN(AC_HEADER_STDC,
[AC_REQUIRE_CPP()dnl
-AC_MSG_CHECKING(for ANSI C header files)
-AC_CACHE_VAL(ac_cv_header_stdc,
+AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
[AC_TRY_CPP([#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
], , ac_cv_header_stdc=no, ac_cv_header_stdc=no)
-fi])dnl
-AC_MSG_RESULT($ac_cv_header_stdc)
+fi])
if test $ac_cv_header_stdc = yes; then
AC_DEFINE(STDC_HEADERS)
fi
])
AC_DEFUN(AC_HEADER_MAJOR,
-[AC_MSG_CHECKING(whether sys/types.h defines makedev)
-AC_CACHE_VAL(ac_cv_header_sys_types_h_makedev,
+[AC_CACHE_CHECK(whether sys/types.h defines makedev,
+ ac_cv_header_sys_types_h_makedev,
[AC_TRY_LINK([#include <sys/types.h>], [return makedev(0, 0);],
ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no)
-])dnl
-AC_MSG_RESULT($ac_cv_header_sys_types_h_makedev)
+])
if test $ac_cv_header_sys_types_h_makedev = no; then
AC_CHECK_HEADER(sys/mkdev.h, [AC_DEFINE(MAJOR_IN_MKDEV)])
ndir.h) AC_DEFINE(NDIR) ;;
esac
-AC_MSG_CHECKING(whether closedir returns void)
-AC_CACHE_VAL(ac_cv_func_closedir_void,
+AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
-AC_MSG_RESULT($ac_cv_func_closedir_void)
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(VOID_CLOSEDIR)
fi
])
AC_DEFUN(AC_HEADER_STAT,
-[AC_MSG_CHECKING(whether stat file-mode macros are broken)
-AC_CACHE_VAL(ac_cv_header_stat_broken,
+[AC_CACHE_CHECK(whether stat file-mode macros are broken,
+ ac_cv_header_stat_broken,
[AC_EGREP_CPP([You lose], [#include <sys/types.h>
#include <sys/stat.h>
You lose.
# endif
#endif
-], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])dnl
-AC_MSG_RESULT($ac_cv_header_stat_broken)
+], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])
if test $ac_cv_header_stat_broken = yes; then
AC_DEFINE(STAT_MACROS_BROKEN)
fi
])
AC_DEFUN(AC_DECL_SYS_SIGLIST,
-[AC_MSG_CHECKING([for sys_siglist declaration in signal.h or unistd.h])
-AC_CACHE_VAL(ac_cv_decl_sys_siglist,
+[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
+ ac_cv_decl_sys_siglist,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif], [char *msg = *(sys_siglist + 1);],
- ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])dnl
-AC_MSG_RESULT($ac_cv_decl_sys_siglist)
+ ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])
if test $ac_cv_decl_sys_siglist = yes; then
AC_DEFINE(SYS_SIGLIST_DECLARED)
fi
])
AC_DEFUN(AC_HEADER_SYS_WAIT,
-[AC_MSG_CHECKING([for sys/wait.h that is POSIX.1 compatible])
-AC_CACHE_VAL(ac_cv_header_sys_wait_h,
+[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
+ ac_cv_header_sys_wait_h,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
#endif], [int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;],
-ac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)])dnl
-AC_MSG_RESULT($ac_cv_header_sys_wait_h)
+ac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)])
if test $ac_cv_header_sys_wait_h = yes; then
AC_DEFINE(HAVE_SYS_WAIT_H)
fi
AC_DEFUN(AC_TYPE_GETGROUPS,
[AC_REQUIRE([AC_TYPE_UID_T])dnl
-AC_MSG_CHECKING(type of array argument to getgroups)
-AC_CACHE_VAL(ac_cv_type_getgroups,
+AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
[AC_TRY_RUN(
changequote(<<, >>)dnl
<<
dnl Old systems without prototypes probably use int.
AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
-fi])dnl
-AC_MSG_RESULT($ac_cv_type_getgroups)
+fi])
AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
])
AC_DEFUN(AC_TYPE_UID_T,
-[AC_MSG_CHECKING(for uid_t in sys/types.h)
-AC_CACHE_VAL(ac_cv_type_uid_t,
+[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
[AC_EGREP_HEADER(uid_t, sys/types.h,
- ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])dnl
-AC_MSG_RESULT($ac_cv_type_uid_t)
+ ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
if test $ac_cv_type_uid_t = no; then
AC_DEFINE(uid_t, int)
AC_DEFINE(gid_t, int)
dnl Note that identifiers starting with SIG are reserved by ANSI C.
AC_DEFUN(AC_TYPE_SIGNAL,
-[AC_MSG_CHECKING([return type of signal handlers])
-AC_CACHE_VAL(ac_cv_type_signal,
+[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <signal.h>
#ifdef signal
extern "C"
#endif
void (*signal ()) ();],
-[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl
-AC_MSG_RESULT($ac_cv_type_signal)
+[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])
AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal)
])
AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
-AC_MSG_CHECKING(whether closedir returns void)
-AC_CACHE_VAL(ac_cv_func_closedir_void,
+AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
-AC_MSG_RESULT($ac_cv_func_closedir_void)
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID)
fi
])
AC_DEFUN(AC_FUNC_MMAP,
-[AC_MSG_CHECKING(for working mmap)
-AC_CACHE_VAL(ac_cv_func_mmap,
+[AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap,
[AC_TRY_RUN([
/* Thanks to Mike Haertel and Jim Avera for this test. */
#include <sys/types.h>
exit(1);
exit(0);
}
-], ac_cv_func_mmap=yes, ac_cv_func_mmap=no, ac_cv_func_mmap=no)])dnl
-AC_MSG_RESULT($ac_cv_func_mmap)
+], ac_cv_func_mmap=yes, ac_cv_func_mmap=no, ac_cv_func_mmap=no)])
if test $ac_cv_func_mmap = yes; then
AC_DEFINE(HAVE_MMAP)
fi
])
AC_DEFUN(AC_FUNC_GETPGRP,
-[AC_MSG_CHECKING(whether getpgrp takes no argument)
-AC_CACHE_VAL(ac_cv_func_getpgrp_void,
+[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
[AC_TRY_RUN([
/*
* If this system has a BSD-style getpgrp(),
], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no,
AC_MSG_ERROR(cannot check getpgrp if cross compiling))
])
-AC_MSG_RESULT($ac_cv_func_getpgrp_void)
if test $ac_cv_func_getpgrp_void = yes; then
AC_DEFINE(GETPGRP_VOID)
fi
AC_DEFUN(AC_FUNC_VFORK,
[AC_REQUIRE([AC_TYPE_PID_T])dnl
AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
-AC_MSG_CHECKING(for working vfork)
-AC_CACHE_VAL(ac_cv_func_vfork,
+AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork,
[AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <sys/types.h>
|| fstat(fileno(stdout), &st) != 0
);
}
-}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no, ac_cv_func_vfork=no)])dnl
-AC_MSG_RESULT($ac_cv_func_vfork)
+}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no, ac_cv_func_vfork=no)])
if test $ac_cv_func_vfork = no; then
AC_DEFINE(vfork, fork)
fi
])
AC_DEFUN(AC_FUNC_WAIT3,
-[AC_MSG_CHECKING(for wait3 that fills in rusage)
-AC_CACHE_VAL(ac_cv_func_wait3,
+[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3,
[AC_TRY_RUN([#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
}
-}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])dnl
-AC_MSG_RESULT($ac_cv_func_wait3)
+}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])
if test $ac_cv_func_wait3 = yes; then
AC_DEFINE(HAVE_WAIT3)
fi
[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-AC_MSG_CHECKING([for working alloca.h])
-AC_CACHE_VAL(ac_cv_header_alloca_h,
+AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
- ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl
-AC_MSG_RESULT($ac_cv_header_alloca_h)
+ ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
if test $ac_cv_header_alloca_h = yes; then
AC_DEFINE(HAVE_ALLOCA_H)
fi
-AC_MSG_CHECKING([for alloca])
-AC_CACHE_VAL(ac_cv_func_alloca,
+AC_CACHE_CHECK([for alloca], ac_cv_func_alloca,
[AC_TRY_LINK([
#ifdef __GNUC__
# define alloca __builtin_alloca
# endif
#endif
], [char *p = (char *) alloca(1);],
- ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])dnl
-AC_MSG_RESULT($ac_cv_func_alloca)
+ ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])
if test $ac_cv_func_alloca = yes; then
AC_DEFINE(HAVE_ALLOCA)
fi
ALLOCA=alloca.o
AC_DEFINE(C_ALLOCA)
-AC_MSG_CHECKING(whether alloca needs Cray hooks)
-AC_CACHE_VAL(ac_cv_os_cray,
+AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
[AC_EGREP_CPP(webecray,
[#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
-], ac_cv_os_cray=yes, ac_cv_os_cray=no)])dnl
-AC_MSG_RESULT($ac_cv_os_cray)
+], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
done
fi
-AC_MSG_CHECKING(stack direction for C alloca)
-AC_CACHE_VAL(ac_cv_c_stack_direction,
+AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
[AC_TRY_RUN([find_stack_direction ()
{
static char *addr = 0;
{
exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
- ac_cv_c_stack_direction=0)])dnl
-AC_MSG_RESULT($ac_cv_c_stack_direction)
+ ac_cv_c_stack_direction=0)])
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
fi
AC_SUBST(ALLOCA)dnl
AC_CHECK_HEADER(nlist.h,
[AC_DEFINE(NLIST_STRUCT)
- AC_MSG_CHECKING([for n_un in struct nlist])
- AC_CACHE_VAL(ac_cv_struct_nlist_n_un,
+ AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
[AC_TRY_COMPILE([#include <nlist.h>],
[struct nlist n; n.n_un.n_name = 0;],
- ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl
- AC_MSG_RESULT($ac_cv_struct_nlist_n_un)
+ ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
if test $ac_cv_struct_nlist_n_un = yes; then
AC_DEFINE(NLIST_NAME_UNION)
fi
# Some definitions of getloadavg require that the program be installed setgid.
dnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory.
-AC_MSG_CHECKING(whether getloadavg requires setgid)
-AC_CACHE_VAL(ac_cv_func_getloadavg_setgid,
+AC_CACHE_CHECK(whether getloadavg requires setgid,
+ ac_cv_func_getloadavg_setgid,
[AC_EGREP_CPP([Yowza Am I SETGID yet],
[#include "$srcdir/getloadavg.c"
#ifdef LDAV_PRIVILEGED
Yowza Am I SETGID yet
#endif],
- ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl
-AC_MSG_RESULT($ac_cv_func_getloadavg_setgid)
+ ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])
if test $ac_cv_func_getloadavg_setgid = yes; then
NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
else
AC_SUBST(NEED_SETGID)dnl
if test $ac_cv_func_getloadavg_setgid = yes; then
- AC_MSG_CHECKING(group of /dev/kmem)
-AC_CACHE_VAL(ac_cv_group_kmem,
+ AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem,
[changequote(, )dnl
# On Solaris, /dev/kmem is a symlink. Get info on the real file.
ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
/ /s/.* //;p;'`
changequote([, ])dnl
-])dnl
+])
KMEM_GROUP=$ac_cv_group_kmem
- AC_MSG_RESULT($KMEM_GROUP)
fi
AC_SUBST(KMEM_GROUP)dnl
])
AC_DEFUN(AC_FUNC_UTIME_NULL,
-[AC_MSG_CHECKING(whether utime accepts a null argument)
-AC_CACHE_VAL(ac_cv_func_utime_null,
+[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
[rm -f conftestdata; > conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
AC_TRY_RUN([#include <sys/types.h>
&& t.st_mtime - s.st_mtime < 120));
}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no,
ac_cv_func_utime_null=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($ac_cv_func_utime_null)
+rm -f core core.* *.core])
if test $ac_cv_func_utime_null = yes; then
AC_DEFINE(HAVE_UTIME_NULL)
fi
])
AC_DEFUN(AC_FUNC_STRCOLL,
-[AC_MSG_CHECKING(for strcoll)
-AC_CACHE_VAL(ac_cv_func_strcoll,
+[AC_CACHE_CHECK(for strcoll, ac_cv_func_strcoll,
[AC_TRY_RUN([#include <string.h>
main ()
{
exit (strcoll ("abc", "def") >= 0 ||
strcoll ("ABC", "DEF") >= 0 ||
strcoll ("123", "456") >= 0);
-}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no, ac_cv_func_strcoll=no)])dnl
-AC_MSG_RESULT($ac_cv_func_strcoll)
+}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no, ac_cv_func_strcoll=no)])
if test $ac_cv_func_strcoll = yes; then
AC_DEFINE(HAVE_STRCOLL)
fi
])
AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
-[AC_MSG_CHECKING(whether setvbuf arguments are reversed)
-AC_CACHE_VAL(ac_cv_func_setvbuf_reversed,
+[AC_CACHE_CHECK(whether setvbuf arguments are reversed,
+ ac_cv_func_setvbuf_reversed,
[AC_TRY_RUN([#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
main () {
putc('\r', stdout);
exit(0); /* Non-reversed systems segv here. */
}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($ac_cv_func_setvbuf_reversed)
+rm -f core core.* *.core])
if test $ac_cv_func_setvbuf_reversed = yes; then
AC_DEFINE(SETVBUF_REVERSED)
fi
AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])])
AC_DEFUN(AC_FUNC_MEMCMP,
-[AC_MSG_CHECKING(for 8-bit clean memcmp)
-AC_CACHE_VAL(ac_cv_func_memcmp,
+[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp,
[AC_TRY_RUN([
main()
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
-], ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no, ac_cv_func_memcmp=no)])dnl
-AC_MSG_RESULT($ac_cv_func_memcmp)
+], ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no, ac_cv_func_memcmp=no)])
test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o"
AC_SUBST(LIBOBJS)dnl
])
AC_DEFUN(AC_HEADER_TIME,
-[AC_MSG_CHECKING([whether time.h and sys/time.h may both be included])
-AC_CACHE_VAL(ac_cv_header_time,
+[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
+ ac_cv_header_time,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/time.h>
#include <time.h>],
-[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl
-AC_MSG_RESULT($ac_cv_header_time)
+[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])
if test $ac_cv_header_time = yes; then
AC_DEFINE(TIME_WITH_SYS_TIME)
fi
])
AC_DEFUN(AC_STRUCT_TM,
-[AC_MSG_CHECKING([whether struct tm is in sys/time.h or time.h])
-AC_CACHE_VAL(ac_cv_struct_tm,
+[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
+ ac_cv_struct_tm,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <time.h>],
[struct tm *tp; tp->tm_sec;],
- ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl
-AC_MSG_RESULT($ac_cv_struct_tm)
+ ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])
if test $ac_cv_struct_tm = sys/time.h; then
AC_DEFINE(TM_IN_SYS_TIME)
fi
AC_DEFUN(AC_STRUCT_TIMEZONE,
[AC_REQUIRE([AC_STRUCT_TM])dnl
-AC_MSG_CHECKING([for tm_zone in struct tm])
-AC_CACHE_VAL(ac_cv_struct_tm_zone,
+AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
- ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_tm_zone)
+ ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
if test "$ac_cv_struct_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE)
else
- AC_MSG_CHECKING([for tzname])
-AC_CACHE_VAL(ac_cv_var_tzname,
+ AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
[AC_TRY_LINK(
changequote(<<, >>)dnl
<<#include <time.h>
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif>>,
changequote([, ])dnl
-[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])dnl
- AC_MSG_RESULT($ac_cv_var_tzname)
+[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
if test $ac_cv_var_tzname = yes; then
AC_DEFINE(HAVE_TZNAME)
fi
])
AC_DEFUN(AC_STRUCT_ST_BLOCKS,
-[AC_MSG_CHECKING([for st_blocks in struct stat])
-AC_CACHE_VAL(ac_cv_struct_st_blocks,
+[AC_CACHE_CHECK([for st_blocks in struct stat], ac_cv_struct_st_blocks,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blocks;],
-ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_st_blocks)
+ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])
if test $ac_cv_struct_st_blocks = yes; then
AC_DEFINE(HAVE_ST_BLOCKS)
else
])
AC_DEFUN(AC_STRUCT_ST_BLKSIZE,
-[AC_MSG_CHECKING([for st_blksize in struct stat])
-AC_CACHE_VAL(ac_cv_struct_st_blksize,
+[AC_CACHE_CHECK([for st_blksize in struct stat], ac_cv_struct_st_blksize,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blksize;],
-ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_st_blksize)
+ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])
if test $ac_cv_struct_st_blksize = yes; then
AC_DEFINE(HAVE_ST_BLKSIZE)
fi
])
AC_DEFUN(AC_STRUCT_ST_RDEV,
-[AC_MSG_CHECKING([for st_rdev in struct stat])
-AC_CACHE_VAL(ac_cv_struct_st_rdev,
+[AC_CACHE_CHECK([for st_rdev in struct stat], ac_cv_struct_st_rdev,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_rdev;],
-ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_st_rdev)
+ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])
if test $ac_cv_struct_st_rdev = yes; then
AC_DEFINE(HAVE_ST_RDEV)
fi
AC_DEFUN(AC_C_CROSS,
[# If we cannot run a trivial program, we must be cross compiling.
-AC_MSG_CHECKING(whether cross-compiling)
-AC_CACHE_VAL(ac_cv_c_cross,
+AC_CACHE_CHECK(whether cross-compiling, ac_cv_c_cross,
[AC_TRY_RUN([main(){return(0);}],
- ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])dnl
+ ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])
cross_compiling=$ac_cv_c_cross
-AC_MSG_RESULT($ac_cv_c_cross)
])
AC_DEFUN(AC_C_CHAR_UNSIGNED,
-[AC_MSG_CHECKING(whether char is unsigned)
-AC_CACHE_VAL(ac_cv_c_char_unsigned,
+[AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned,
[if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
AC_EGREP_CPP(yes,
main() {
volatile char c = 255; exit(c < 0);
}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
-fi])dnl
-AC_MSG_RESULT($ac_cv_c_char_unsigned)
+fi])
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
AC_DEFINE(__CHAR_UNSIGNED__)
fi
])
AC_DEFUN(AC_C_LONG_DOUBLE,
-[AC_MSG_CHECKING(for long double)
-AC_CACHE_VAL(ac_cv_c_long_double,
+[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
else
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
exit(sizeof(long double) < sizeof(double)); }],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
-fi])dnl
-AC_MSG_RESULT($ac_cv_c_long_double)
+fi])
if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE)
fi
])
AC_DEFUN(AC_C_BIGENDIAN,
-[AC_MSG_CHECKING(whether byte ordering is bigendian)
-AC_CACHE_VAL(ac_cv_c_bigendian,
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
AC_TRY_COMPILE([#include <sys/types.h>
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)
-fi])dnl
-AC_MSG_RESULT($ac_cv_c_bigendian)
+fi])
if test $ac_cv_c_bigendian = yes; then
AC_DEFINE(WORDS_BIGENDIAN)
fi
dnl Otherwise define inline to __inline__ or __inline if one of those work,
dnl otherwise define inline to be empty.
AC_DEFUN(AC_C_INLINE,
-[AC_MSG_CHECKING([for inline])
-AC_CACHE_VAL(ac_cv_c_inline,
+[AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
done
-])dnl
-AC_MSG_RESULT($ac_cv_c_inline)
+])
case "$ac_cv_c_inline" in
inline | yes) ;;
no) AC_DEFINE(inline, ) ;;
AC_DEFUN(AC_C_CONST,
[dnl This message is consistent in form with the other checking messages,
dnl and with the result message.
-AC_MSG_CHECKING([for working const])
-AC_CACHE_VAL(ac_cv_c_const,
+AC_CACHE_CHECK([for working const], ac_cv_c_const,
[AC_TRY_COMPILE(,
changequote(<<, >>)dnl
<<
}
>>,
changequote([, ])dnl
-ac_cv_c_const=yes, ac_cv_c_const=no)])dnl
-AC_MSG_RESULT($ac_cv_c_const)
+ac_cv_c_const=yes, ac_cv_c_const=no)])
if test $ac_cv_c_const = no; then
AC_DEFINE(const, )
fi
AC_DEFUN(AC_SYS_INTERPRETER,
[# Pull the hash mark out of the macro call to avoid m4 problems.
ac_msg="whether #! works in shell scripts"
-AC_MSG_CHECKING($ac_msg)
-AC_CACHE_VAL(ac_cv_sys_interpreter,
+AC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter,
[echo '#! /bin/cat
exit 69
' > conftest
else
ac_cv_sys_interpreter=no
fi
-rm -f conftest])dnl
-AC_MSG_RESULT($ac_cv_sys_interpreter)
+rm -f conftest])
])
define(AC_HAVE_POUNDBANG,
])m4exit(4)])
AC_DEFUN(AC_SYS_LONG_FILE_NAMES,
-[AC_MSG_CHECKING(for long file names)
-AC_CACHE_VAL(ac_cv_sys_long_file_names,
+[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names,
[ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
# . the current directory, where building will happen
break
fi
rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
-done])dnl
-AC_MSG_RESULT($ac_cv_sys_long_file_names)
+done])
if test $ac_cv_sys_long_file_names = yes; then
AC_DEFINE(HAVE_LONG_FILE_NAMES)
fi
])
AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
-[AC_MSG_CHECKING(for restartable system calls)
-AC_CACHE_VAL(ac_cv_sys_restartable_syscalls,
+[AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
[AC_TRY_RUN(
[/* Exit 0 (true) if wait returns something other than -1,
i.e. the pid of the child, which means that wait was restarted
if (status == -1) wait(&i);
exit (status == -1);
}
-], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])dnl
-AC_MSG_RESULT($ac_cv_sys_restartable_syscalls)
+], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])
if test $ac_cv_sys_restartable_syscalls = yes; then
AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
fi
Variable Names}, for how to choose the name of the @var{cache-id} variable.
@end defmac
+@defmac AC_CACHE_CHECK (@var{message}, @var{cache-id}, @var{commands})
+@maindex CACHE_CHECK
+A wrapper for @code{AC_CACHE_VAL} that takes care of printing the
+messages. This macro provides a convenient shorthand for the most
+common way to use these macros. It calls @code{AC_MSG_CHECKING} for
+@var{message}, then @code{AC_CACHE_VAL} with the @var{cache-id} and
+@var{commands} arguments, and @code{AC_MSG_RESULT} with @var{cache-id}.
+@end defmac
+
@menu
* Cache Variable Names:: Shell variables used in caches.
* Cache Files:: Files @code{configure} uses for caching.
Variable Names}, for how to choose the name of the @var{cache-id} variable.
@end defmac
+@defmac AC_CACHE_CHECK (@var{message}, @var{cache-id}, @var{commands})
+@maindex CACHE_CHECK
+A wrapper for @code{AC_CACHE_VAL} that takes care of printing the
+messages. This macro provides a convenient shorthand for the most
+common way to use these macros. It calls @code{AC_MSG_CHECKING} for
+@var{message}, then @code{AC_CACHE_VAL} with the @var{cache-id} and
+@var{commands} arguments, and @code{AC_MSG_RESULT} with @var{cache-id}.
+@end defmac
+
@menu
* Cache Variable Names:: Shell variables used in caches.
* Cache Files:: Files @code{configure} uses for caching.
fi
])
+dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
+define(AC_CACHE_CHECK,
+[AC_MSG_CHECKING([$1])
+AC_CACHE_VAL([$2], [$3])
+AC_MSG_RESULT([$]$2)])
+
dnl ### Defining symbols
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_CHECK_PROG(CC, gcc, gcc, cc)
-AC_MSG_CHECKING(whether we are using GNU C)
-AC_CACHE_VAL(ac_cv_prog_gcc,
+AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
cat > conftest.c <<EOF
#ifdef __GNUC__
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
-fi])dnl
-AC_MSG_RESULT($ac_cv_prog_gcc)
+fi])
if test $ac_cv_prog_gcc = yes; then
GCC=yes
if test "${CFLAGS+set}" != set; then
- AC_MSG_CHECKING(whether ${CC-cc} accepts -g)
-AC_CACHE_VAL(ac_cv_prog_gcc_g,
+ AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_gcc_g,
[echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_gcc_g=yes
ac_cv_prog_gcc_g=no
fi
rm -f conftest*
-])dnl
- AC_MSG_RESULT($ac_cv_prog_gcc_g)
+])
if test $ac_cv_prog_gcc_g = yes; then
CFLAGS="-g -O"
else
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx, gcc)
-AC_MSG_CHECKING(whether we are using GNU C++)
-AC_CACHE_VAL(ac_cv_prog_gxx,
+AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
cat > conftest.C <<EOF
#ifdef __GNUC__
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
-fi])dnl
-AC_MSG_RESULT($ac_cv_prog_gxx)
+fi])
if test $ac_cv_prog_gxx = yes; then
GXX=yes
if test "${CXXFLAGS+set}" != set; then
- AC_MSG_CHECKING(whether ${CXX-g++} accepts -g)
-AC_CACHE_VAL(ac_cv_prog_gxx_g,
+ AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_gxx_g,
[echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_gxx_g=yes
fi
rm -f conftest*
])dnl
- AC_MSG_RESULT($ac_cv_prog_gxx_g)
if test $ac_cv_prog_gxx_g = yes; then
CXXFLAGS="-g -O"
else
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
if test $ac_cv_prog_gcc = yes; then
- AC_MSG_CHECKING(whether ${CC-cc} needs -traditional)
-AC_CACHE_VAL(ac_cv_prog_gcc_traditional,
+ AC_CACHE_CHECK(whether ${CC-cc} needs -traditional,
+ ac_cv_prog_gcc_traditional,
[ ac_pattern="Autoconf.*'x'"
AC_EGREP_CPP($ac_pattern, [#include <sgtty.h>
Autoconf TIOCGETP],
AC_EGREP_CPP($ac_pattern, [#include <termio.h>
Autoconf TCGETA],
ac_cv_prog_gcc_traditional=yes)
- fi])dnl
- AC_MSG_RESULT($ac_cv_prog_gcc_traditional)
+ fi])
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
AC_DEFUN(AC_DECL_YYTEXT,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([AC_PROG_LEX])dnl
-AC_MSG_CHECKING(lex output file root)
-AC_CACHE_VAL(ac_cv_prog_lex_root,
+AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root,
[# The minimal lex program is just a single line: %%. But some broken lexes
# (Solaris, I think it was) want two %% lines, so accommodate them.
echo '%%
ac_cv_prog_lex_root=lexyy
else
AC_MSG_ERROR(cannot find output from $LEX; giving up)
-fi])dnl
+fi])
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-AC_MSG_RESULT($ac_cv_prog_lex_root)
AC_SUBST(LEX_OUTPUT_ROOT)dnl
-AC_MSG_CHECKING(whether yytext is a pointer)
-AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer,
+AC_CACHE_CHECK(whether yytext is a pointer, ac_cv_prog_lex_yytext_pointer,
[# POSIX says lex can declare yytext either as a pointer or an array; the
# default is implementation-dependent. Figure out which it is, since
# not all implementations provide the %pointer and %array declarations.
AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes)
LIBS="$ac_save_LIBS"
rm -f "${LEX_OUTPUT_ROOT}.c"])dnl
-AC_MSG_RESULT($ac_cv_prog_lex_yytext_pointer)
if test $ac_cv_prog_lex_yytext_pointer = yes; then
AC_DEFINE(YYTEXT_POINTER)
fi
AC_DEFUN(AC_HEADER_STDC,
[AC_REQUIRE_CPP()dnl
-AC_MSG_CHECKING(for ANSI C header files)
-AC_CACHE_VAL(ac_cv_header_stdc,
+AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
[AC_TRY_CPP([#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
], , ac_cv_header_stdc=no, ac_cv_header_stdc=no)
-fi])dnl
-AC_MSG_RESULT($ac_cv_header_stdc)
+fi])
if test $ac_cv_header_stdc = yes; then
AC_DEFINE(STDC_HEADERS)
fi
])
AC_DEFUN(AC_HEADER_MAJOR,
-[AC_MSG_CHECKING(whether sys/types.h defines makedev)
-AC_CACHE_VAL(ac_cv_header_sys_types_h_makedev,
+[AC_CACHE_CHECK(whether sys/types.h defines makedev,
+ ac_cv_header_sys_types_h_makedev,
[AC_TRY_LINK([#include <sys/types.h>], [return makedev(0, 0);],
ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no)
-])dnl
-AC_MSG_RESULT($ac_cv_header_sys_types_h_makedev)
+])
if test $ac_cv_header_sys_types_h_makedev = no; then
AC_CHECK_HEADER(sys/mkdev.h, [AC_DEFINE(MAJOR_IN_MKDEV)])
ndir.h) AC_DEFINE(NDIR) ;;
esac
-AC_MSG_CHECKING(whether closedir returns void)
-AC_CACHE_VAL(ac_cv_func_closedir_void,
+AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
-AC_MSG_RESULT($ac_cv_func_closedir_void)
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(VOID_CLOSEDIR)
fi
])
AC_DEFUN(AC_HEADER_STAT,
-[AC_MSG_CHECKING(whether stat file-mode macros are broken)
-AC_CACHE_VAL(ac_cv_header_stat_broken,
+[AC_CACHE_CHECK(whether stat file-mode macros are broken,
+ ac_cv_header_stat_broken,
[AC_EGREP_CPP([You lose], [#include <sys/types.h>
#include <sys/stat.h>
You lose.
# endif
#endif
-], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])dnl
-AC_MSG_RESULT($ac_cv_header_stat_broken)
+], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])
if test $ac_cv_header_stat_broken = yes; then
AC_DEFINE(STAT_MACROS_BROKEN)
fi
])
AC_DEFUN(AC_DECL_SYS_SIGLIST,
-[AC_MSG_CHECKING([for sys_siglist declaration in signal.h or unistd.h])
-AC_CACHE_VAL(ac_cv_decl_sys_siglist,
+[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
+ ac_cv_decl_sys_siglist,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif], [char *msg = *(sys_siglist + 1);],
- ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])dnl
-AC_MSG_RESULT($ac_cv_decl_sys_siglist)
+ ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])
if test $ac_cv_decl_sys_siglist = yes; then
AC_DEFINE(SYS_SIGLIST_DECLARED)
fi
])
AC_DEFUN(AC_HEADER_SYS_WAIT,
-[AC_MSG_CHECKING([for sys/wait.h that is POSIX.1 compatible])
-AC_CACHE_VAL(ac_cv_header_sys_wait_h,
+[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
+ ac_cv_header_sys_wait_h,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
#endif], [int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;],
-ac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)])dnl
-AC_MSG_RESULT($ac_cv_header_sys_wait_h)
+ac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)])
if test $ac_cv_header_sys_wait_h = yes; then
AC_DEFINE(HAVE_SYS_WAIT_H)
fi
AC_DEFUN(AC_TYPE_GETGROUPS,
[AC_REQUIRE([AC_TYPE_UID_T])dnl
-AC_MSG_CHECKING(type of array argument to getgroups)
-AC_CACHE_VAL(ac_cv_type_getgroups,
+AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
[AC_TRY_RUN(
changequote(<<, >>)dnl
<<
dnl Old systems without prototypes probably use int.
AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
-fi])dnl
-AC_MSG_RESULT($ac_cv_type_getgroups)
+fi])
AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
])
AC_DEFUN(AC_TYPE_UID_T,
-[AC_MSG_CHECKING(for uid_t in sys/types.h)
-AC_CACHE_VAL(ac_cv_type_uid_t,
+[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
[AC_EGREP_HEADER(uid_t, sys/types.h,
- ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])dnl
-AC_MSG_RESULT($ac_cv_type_uid_t)
+ ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
if test $ac_cv_type_uid_t = no; then
AC_DEFINE(uid_t, int)
AC_DEFINE(gid_t, int)
dnl Note that identifiers starting with SIG are reserved by ANSI C.
AC_DEFUN(AC_TYPE_SIGNAL,
-[AC_MSG_CHECKING([return type of signal handlers])
-AC_CACHE_VAL(ac_cv_type_signal,
+[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <signal.h>
#ifdef signal
extern "C"
#endif
void (*signal ()) ();],
-[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl
-AC_MSG_RESULT($ac_cv_type_signal)
+[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])
AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal)
])
AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
-AC_MSG_CHECKING(whether closedir returns void)
-AC_CACHE_VAL(ac_cv_func_closedir_void,
+AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
-AC_MSG_RESULT($ac_cv_func_closedir_void)
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID)
fi
])
AC_DEFUN(AC_FUNC_MMAP,
-[AC_MSG_CHECKING(for working mmap)
-AC_CACHE_VAL(ac_cv_func_mmap,
+[AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap,
[AC_TRY_RUN([
/* Thanks to Mike Haertel and Jim Avera for this test. */
#include <sys/types.h>
exit(1);
exit(0);
}
-], ac_cv_func_mmap=yes, ac_cv_func_mmap=no, ac_cv_func_mmap=no)])dnl
-AC_MSG_RESULT($ac_cv_func_mmap)
+], ac_cv_func_mmap=yes, ac_cv_func_mmap=no, ac_cv_func_mmap=no)])
if test $ac_cv_func_mmap = yes; then
AC_DEFINE(HAVE_MMAP)
fi
])
AC_DEFUN(AC_FUNC_GETPGRP,
-[AC_MSG_CHECKING(whether getpgrp takes no argument)
-AC_CACHE_VAL(ac_cv_func_getpgrp_void,
+[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
[AC_TRY_RUN([
/*
* If this system has a BSD-style getpgrp(),
], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no,
AC_MSG_ERROR(cannot check getpgrp if cross compiling))
])
-AC_MSG_RESULT($ac_cv_func_getpgrp_void)
if test $ac_cv_func_getpgrp_void = yes; then
AC_DEFINE(GETPGRP_VOID)
fi
AC_DEFUN(AC_FUNC_VFORK,
[AC_REQUIRE([AC_TYPE_PID_T])dnl
AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
-AC_MSG_CHECKING(for working vfork)
-AC_CACHE_VAL(ac_cv_func_vfork,
+AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork,
[AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <sys/types.h>
|| fstat(fileno(stdout), &st) != 0
);
}
-}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no, ac_cv_func_vfork=no)])dnl
-AC_MSG_RESULT($ac_cv_func_vfork)
+}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no, ac_cv_func_vfork=no)])
if test $ac_cv_func_vfork = no; then
AC_DEFINE(vfork, fork)
fi
])
AC_DEFUN(AC_FUNC_WAIT3,
-[AC_MSG_CHECKING(for wait3 that fills in rusage)
-AC_CACHE_VAL(ac_cv_func_wait3,
+[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3,
[AC_TRY_RUN([#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
}
-}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])dnl
-AC_MSG_RESULT($ac_cv_func_wait3)
+}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])
if test $ac_cv_func_wait3 = yes; then
AC_DEFINE(HAVE_WAIT3)
fi
[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-AC_MSG_CHECKING([for working alloca.h])
-AC_CACHE_VAL(ac_cv_header_alloca_h,
+AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
- ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl
-AC_MSG_RESULT($ac_cv_header_alloca_h)
+ ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
if test $ac_cv_header_alloca_h = yes; then
AC_DEFINE(HAVE_ALLOCA_H)
fi
-AC_MSG_CHECKING([for alloca])
-AC_CACHE_VAL(ac_cv_func_alloca,
+AC_CACHE_CHECK([for alloca], ac_cv_func_alloca,
[AC_TRY_LINK([
#ifdef __GNUC__
# define alloca __builtin_alloca
# endif
#endif
], [char *p = (char *) alloca(1);],
- ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])dnl
-AC_MSG_RESULT($ac_cv_func_alloca)
+ ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])
if test $ac_cv_func_alloca = yes; then
AC_DEFINE(HAVE_ALLOCA)
fi
ALLOCA=alloca.o
AC_DEFINE(C_ALLOCA)
-AC_MSG_CHECKING(whether alloca needs Cray hooks)
-AC_CACHE_VAL(ac_cv_os_cray,
+AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
[AC_EGREP_CPP(webecray,
[#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
-], ac_cv_os_cray=yes, ac_cv_os_cray=no)])dnl
-AC_MSG_RESULT($ac_cv_os_cray)
+], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
done
fi
-AC_MSG_CHECKING(stack direction for C alloca)
-AC_CACHE_VAL(ac_cv_c_stack_direction,
+AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
[AC_TRY_RUN([find_stack_direction ()
{
static char *addr = 0;
{
exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
- ac_cv_c_stack_direction=0)])dnl
-AC_MSG_RESULT($ac_cv_c_stack_direction)
+ ac_cv_c_stack_direction=0)])
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
fi
AC_SUBST(ALLOCA)dnl
AC_CHECK_HEADER(nlist.h,
[AC_DEFINE(NLIST_STRUCT)
- AC_MSG_CHECKING([for n_un in struct nlist])
- AC_CACHE_VAL(ac_cv_struct_nlist_n_un,
+ AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
[AC_TRY_COMPILE([#include <nlist.h>],
[struct nlist n; n.n_un.n_name = 0;],
- ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl
- AC_MSG_RESULT($ac_cv_struct_nlist_n_un)
+ ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
if test $ac_cv_struct_nlist_n_un = yes; then
AC_DEFINE(NLIST_NAME_UNION)
fi
# Some definitions of getloadavg require that the program be installed setgid.
dnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory.
-AC_MSG_CHECKING(whether getloadavg requires setgid)
-AC_CACHE_VAL(ac_cv_func_getloadavg_setgid,
+AC_CACHE_CHECK(whether getloadavg requires setgid,
+ ac_cv_func_getloadavg_setgid,
[AC_EGREP_CPP([Yowza Am I SETGID yet],
[#include "$srcdir/getloadavg.c"
#ifdef LDAV_PRIVILEGED
Yowza Am I SETGID yet
#endif],
- ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl
-AC_MSG_RESULT($ac_cv_func_getloadavg_setgid)
+ ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])
if test $ac_cv_func_getloadavg_setgid = yes; then
NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
else
AC_SUBST(NEED_SETGID)dnl
if test $ac_cv_func_getloadavg_setgid = yes; then
- AC_MSG_CHECKING(group of /dev/kmem)
-AC_CACHE_VAL(ac_cv_group_kmem,
+ AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem,
[changequote(, )dnl
# On Solaris, /dev/kmem is a symlink. Get info on the real file.
ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
/ /s/.* //;p;'`
changequote([, ])dnl
-])dnl
+])
KMEM_GROUP=$ac_cv_group_kmem
- AC_MSG_RESULT($KMEM_GROUP)
fi
AC_SUBST(KMEM_GROUP)dnl
])
AC_DEFUN(AC_FUNC_UTIME_NULL,
-[AC_MSG_CHECKING(whether utime accepts a null argument)
-AC_CACHE_VAL(ac_cv_func_utime_null,
+[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
[rm -f conftestdata; > conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
AC_TRY_RUN([#include <sys/types.h>
&& t.st_mtime - s.st_mtime < 120));
}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no,
ac_cv_func_utime_null=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($ac_cv_func_utime_null)
+rm -f core core.* *.core])
if test $ac_cv_func_utime_null = yes; then
AC_DEFINE(HAVE_UTIME_NULL)
fi
])
AC_DEFUN(AC_FUNC_STRCOLL,
-[AC_MSG_CHECKING(for strcoll)
-AC_CACHE_VAL(ac_cv_func_strcoll,
+[AC_CACHE_CHECK(for strcoll, ac_cv_func_strcoll,
[AC_TRY_RUN([#include <string.h>
main ()
{
exit (strcoll ("abc", "def") >= 0 ||
strcoll ("ABC", "DEF") >= 0 ||
strcoll ("123", "456") >= 0);
-}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no, ac_cv_func_strcoll=no)])dnl
-AC_MSG_RESULT($ac_cv_func_strcoll)
+}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no, ac_cv_func_strcoll=no)])
if test $ac_cv_func_strcoll = yes; then
AC_DEFINE(HAVE_STRCOLL)
fi
])
AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
-[AC_MSG_CHECKING(whether setvbuf arguments are reversed)
-AC_CACHE_VAL(ac_cv_func_setvbuf_reversed,
+[AC_CACHE_CHECK(whether setvbuf arguments are reversed,
+ ac_cv_func_setvbuf_reversed,
[AC_TRY_RUN([#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
main () {
putc('\r', stdout);
exit(0); /* Non-reversed systems segv here. */
}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($ac_cv_func_setvbuf_reversed)
+rm -f core core.* *.core])
if test $ac_cv_func_setvbuf_reversed = yes; then
AC_DEFINE(SETVBUF_REVERSED)
fi
AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])])
AC_DEFUN(AC_FUNC_MEMCMP,
-[AC_MSG_CHECKING(for 8-bit clean memcmp)
-AC_CACHE_VAL(ac_cv_func_memcmp,
+[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp,
[AC_TRY_RUN([
main()
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
-], ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no, ac_cv_func_memcmp=no)])dnl
-AC_MSG_RESULT($ac_cv_func_memcmp)
+], ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no, ac_cv_func_memcmp=no)])
test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o"
AC_SUBST(LIBOBJS)dnl
])
AC_DEFUN(AC_HEADER_TIME,
-[AC_MSG_CHECKING([whether time.h and sys/time.h may both be included])
-AC_CACHE_VAL(ac_cv_header_time,
+[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
+ ac_cv_header_time,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/time.h>
#include <time.h>],
-[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl
-AC_MSG_RESULT($ac_cv_header_time)
+[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])
if test $ac_cv_header_time = yes; then
AC_DEFINE(TIME_WITH_SYS_TIME)
fi
])
AC_DEFUN(AC_STRUCT_TM,
-[AC_MSG_CHECKING([whether struct tm is in sys/time.h or time.h])
-AC_CACHE_VAL(ac_cv_struct_tm,
+[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
+ ac_cv_struct_tm,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <time.h>],
[struct tm *tp; tp->tm_sec;],
- ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl
-AC_MSG_RESULT($ac_cv_struct_tm)
+ ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])
if test $ac_cv_struct_tm = sys/time.h; then
AC_DEFINE(TM_IN_SYS_TIME)
fi
AC_DEFUN(AC_STRUCT_TIMEZONE,
[AC_REQUIRE([AC_STRUCT_TM])dnl
-AC_MSG_CHECKING([for tm_zone in struct tm])
-AC_CACHE_VAL(ac_cv_struct_tm_zone,
+AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
- ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_tm_zone)
+ ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
if test "$ac_cv_struct_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE)
else
- AC_MSG_CHECKING([for tzname])
-AC_CACHE_VAL(ac_cv_var_tzname,
+ AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
[AC_TRY_LINK(
changequote(<<, >>)dnl
<<#include <time.h>
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif>>,
changequote([, ])dnl
-[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])dnl
- AC_MSG_RESULT($ac_cv_var_tzname)
+[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
if test $ac_cv_var_tzname = yes; then
AC_DEFINE(HAVE_TZNAME)
fi
])
AC_DEFUN(AC_STRUCT_ST_BLOCKS,
-[AC_MSG_CHECKING([for st_blocks in struct stat])
-AC_CACHE_VAL(ac_cv_struct_st_blocks,
+[AC_CACHE_CHECK([for st_blocks in struct stat], ac_cv_struct_st_blocks,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blocks;],
-ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_st_blocks)
+ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])
if test $ac_cv_struct_st_blocks = yes; then
AC_DEFINE(HAVE_ST_BLOCKS)
else
])
AC_DEFUN(AC_STRUCT_ST_BLKSIZE,
-[AC_MSG_CHECKING([for st_blksize in struct stat])
-AC_CACHE_VAL(ac_cv_struct_st_blksize,
+[AC_CACHE_CHECK([for st_blksize in struct stat], ac_cv_struct_st_blksize,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blksize;],
-ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_st_blksize)
+ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])
if test $ac_cv_struct_st_blksize = yes; then
AC_DEFINE(HAVE_ST_BLKSIZE)
fi
])
AC_DEFUN(AC_STRUCT_ST_RDEV,
-[AC_MSG_CHECKING([for st_rdev in struct stat])
-AC_CACHE_VAL(ac_cv_struct_st_rdev,
+[AC_CACHE_CHECK([for st_rdev in struct stat], ac_cv_struct_st_rdev,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_rdev;],
-ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_st_rdev)
+ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])
if test $ac_cv_struct_st_rdev = yes; then
AC_DEFINE(HAVE_ST_RDEV)
fi
AC_DEFUN(AC_C_CROSS,
[# If we cannot run a trivial program, we must be cross compiling.
-AC_MSG_CHECKING(whether cross-compiling)
-AC_CACHE_VAL(ac_cv_c_cross,
+AC_CACHE_CHECK(whether cross-compiling, ac_cv_c_cross,
[AC_TRY_RUN([main(){return(0);}],
- ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])dnl
+ ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])
cross_compiling=$ac_cv_c_cross
-AC_MSG_RESULT($ac_cv_c_cross)
])
AC_DEFUN(AC_C_CHAR_UNSIGNED,
-[AC_MSG_CHECKING(whether char is unsigned)
-AC_CACHE_VAL(ac_cv_c_char_unsigned,
+[AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned,
[if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
AC_EGREP_CPP(yes,
main() {
volatile char c = 255; exit(c < 0);
}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
-fi])dnl
-AC_MSG_RESULT($ac_cv_c_char_unsigned)
+fi])
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
AC_DEFINE(__CHAR_UNSIGNED__)
fi
])
AC_DEFUN(AC_C_LONG_DOUBLE,
-[AC_MSG_CHECKING(for long double)
-AC_CACHE_VAL(ac_cv_c_long_double,
+[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
else
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
exit(sizeof(long double) < sizeof(double)); }],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
-fi])dnl
-AC_MSG_RESULT($ac_cv_c_long_double)
+fi])
if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE)
fi
])
AC_DEFUN(AC_C_BIGENDIAN,
-[AC_MSG_CHECKING(whether byte ordering is bigendian)
-AC_CACHE_VAL(ac_cv_c_bigendian,
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
AC_TRY_COMPILE([#include <sys/types.h>
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)
-fi])dnl
-AC_MSG_RESULT($ac_cv_c_bigendian)
+fi])
if test $ac_cv_c_bigendian = yes; then
AC_DEFINE(WORDS_BIGENDIAN)
fi
dnl Otherwise define inline to __inline__ or __inline if one of those work,
dnl otherwise define inline to be empty.
AC_DEFUN(AC_C_INLINE,
-[AC_MSG_CHECKING([for inline])
-AC_CACHE_VAL(ac_cv_c_inline,
+[AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
done
-])dnl
-AC_MSG_RESULT($ac_cv_c_inline)
+])
case "$ac_cv_c_inline" in
inline | yes) ;;
no) AC_DEFINE(inline, ) ;;
AC_DEFUN(AC_C_CONST,
[dnl This message is consistent in form with the other checking messages,
dnl and with the result message.
-AC_MSG_CHECKING([for working const])
-AC_CACHE_VAL(ac_cv_c_const,
+AC_CACHE_CHECK([for working const], ac_cv_c_const,
[AC_TRY_COMPILE(,
changequote(<<, >>)dnl
<<
}
>>,
changequote([, ])dnl
-ac_cv_c_const=yes, ac_cv_c_const=no)])dnl
-AC_MSG_RESULT($ac_cv_c_const)
+ac_cv_c_const=yes, ac_cv_c_const=no)])
if test $ac_cv_c_const = no; then
AC_DEFINE(const, )
fi
AC_DEFUN(AC_SYS_INTERPRETER,
[# Pull the hash mark out of the macro call to avoid m4 problems.
ac_msg="whether #! works in shell scripts"
-AC_MSG_CHECKING($ac_msg)
-AC_CACHE_VAL(ac_cv_sys_interpreter,
+AC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter,
[echo '#! /bin/cat
exit 69
' > conftest
else
ac_cv_sys_interpreter=no
fi
-rm -f conftest])dnl
-AC_MSG_RESULT($ac_cv_sys_interpreter)
+rm -f conftest])
])
define(AC_HAVE_POUNDBANG,
])m4exit(4)])
AC_DEFUN(AC_SYS_LONG_FILE_NAMES,
-[AC_MSG_CHECKING(for long file names)
-AC_CACHE_VAL(ac_cv_sys_long_file_names,
+[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names,
[ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
# . the current directory, where building will happen
break
fi
rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
-done])dnl
-AC_MSG_RESULT($ac_cv_sys_long_file_names)
+done])
if test $ac_cv_sys_long_file_names = yes; then
AC_DEFINE(HAVE_LONG_FILE_NAMES)
fi
])
AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
-[AC_MSG_CHECKING(for restartable system calls)
-AC_CACHE_VAL(ac_cv_sys_restartable_syscalls,
+[AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
[AC_TRY_RUN(
[/* Exit 0 (true) if wait returns something other than -1,
i.e. the pid of the child, which means that wait was restarted
if (status == -1) wait(&i);
exit (status == -1);
}
-], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])dnl
-AC_MSG_RESULT($ac_cv_sys_restartable_syscalls)
+], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])
if test $ac_cv_sys_restartable_syscalls = yes; then
AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
fi