Commit e089737f authored by Keith Packard's avatar Keith Packard

Add AC_LANG_SOURCE wrappers around configure.ac code fragments

Current autoconf versions are very unhappy when code fragments are not
wrapped in AC_LANG_SOURCE macros, generating errors like:

configure.ac:723: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:723: the top level
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent afb1fe69
......@@ -723,7 +723,7 @@ case $host_os in
AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -framework Carbon"
AC_LINK_IFELSE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}],
AC_LINK_IFELSE([AC_LANG_SOURCE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}])],
[xorg_cv_Carbon_framework=yes],
[xorg_cv_Carbon_framework=no])
LDFLAGS=$save_LDFLAGS])
......@@ -874,12 +874,12 @@ AC_DEFINE_UNQUOTED([USE_SIGIO_BY_DEFAULT], [$USE_SIGIO_BY_DEFAULT_VALUE],
[Use SIGIO handlers for input device events by default])
AC_MSG_CHECKING([for glibc...])
AC_PREPROC_IFELSE([
AC_PREPROC_IFELSE([AC_LANG_SOURCE([
#include <features.h>
#ifndef __GLIBC__
#error
#endif
], glibc=yes, glibc=no)
])], glibc=yes, glibc=no)
AC_MSG_RESULT([$glibc])
AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
......@@ -903,7 +903,7 @@ if ! test "x$have_clock_gettime" = xno; then
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
fi
AC_RUN_IFELSE([
AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <time.h>
int main(int argc, char *argv[[]]) {
......@@ -914,7 +914,7 @@ int main(int argc, char *argv[[]]) {
else
return 1;
}
], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
[MONOTONIC_CLOCK="cross compiling"])
LIBS="$LIBS_SAVE"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment