diff options
author | Zack Weinberg <zackw@panix.com> | 2023-04-02 22:17:55 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2023-04-02 23:01:50 -0400 |
commit | e25dfa75e18295d28de67747b4ff9d65f65c4f06 (patch) | |
tree | abee9d95bc48de1b25d4244f9057cadc522cf79e /lib/autoconf/functions.m4 | |
parent | a7dc6d83c7d12b8409c512c3c10ad29f01e6c164 (diff) | |
download | autoconf-e25dfa75e18295d28de67747b4ff9d65f65c4f06.tar.gz |
Remove the last few internal uses of AC_EGREP_CPP.
Most of the remaining uses were converted to AC_COMPILE_IFELSE.
The use in AC_FUNC_LOADAVG becomes an AC_PREPROC_IFELSE because
we can’t be sure getloadavg.c can be _compiled_ at this point in
the build. The use in AC_C_VARARRAYS could be either _PREPROC_ or
_COMPILE_; we use _COMPILE_ because, _PREPROC_ is never used, then
we don’t have to do the “checking how to run the C preprocessor” test.
* lib/autoconf/c.m4 (AC_C_VARARRAYS): Use AC_COMPILE_IFELSE instead of
AC_EGREP_CPP.
* lib/autoconf/headers.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H)
(_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL_H): Likewise.
* lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use AC_PREPROC_IFELSE
instead of AC_EGREP_CPP.
Diffstat (limited to 'lib/autoconf/functions.m4')
-rw-r--r-- | lib/autoconf/functions.m4 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 74512e97..499e4c02 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -842,11 +842,11 @@ AC_CHECK_FUNCS(getloadavg, [], # 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 |