[
AC_CACHE_CHECK([for variable-length arrays],
ac_cv_c_vararrays,
- [AC_EGREP_CPP([defined],
- [#ifdef __STDC_NO_VLA__
- defined
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[[ #ifndef __STDC_NO_VLA__
+ #error __STDC_NO_VLA__ not defined
#endif
- ],
+]])],
[ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
# Some definitions of getloadavg require that the program be installed setgid.
AC_CACHE_CHECK(whether getloadavg requires setgid,
ac_cv_func_getloadavg_setgid,
-[AC_EGREP_CPP([Yowza Am I SETGID yet],
-[#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
-#ifdef LDAV_PRIVILEGED
-Yowza Am I SETGID yet
-@%:@endif],
+[AC_PREPROC_IFELSE([AC_LANG_SOURCE(
+[[#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
+#ifndef LDAV_PRIVILEGED
+#error setgid not needed
+@%:@endif]])],
ac_cv_func_getloadavg_setgid=yes,
ac_cv_func_getloadavg_setgid=no)])
if test $ac_cv_func_getloadavg_setgid = yes; then
m4_define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
[AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
ac_cv_sys_tiocgwinsz_in_termios_h,
-[AC_EGREP_CPP([yes],
- [#include <sys/types.h>
-#include <termios.h>
-#ifdef TIOCGWINSZ
- yes
-#endif
-],
+[AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[AC_INCLUDES_DEFAULT
+[#include <termios.h>
+const int tiocgwinsz = TIOCGWINSZ;
+]])],
ac_cv_sys_tiocgwinsz_in_termios_h=yes,
ac_cv_sys_tiocgwinsz_in_termios_h=no)])
])# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
m4_define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
[AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
ac_cv_sys_tiocgwinsz_in_sys_ioctl_h,
-[AC_EGREP_CPP([yes],
- [#include <sys/types.h>
-#include <sys/ioctl.h>
-#ifdef TIOCGWINSZ
- yes
-#endif
-],
+[AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[AC_INCLUDES_DEFAULT
+[#include <sys/ioctl.h>
+const int tiocgwinsz = TIOCGWINSZ;
+]])],
ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes,
ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no)])
])# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL