summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-10-03 11:23:16 -0700
committerKeith Packard <keithp@keithp.com>2011-10-03 11:23:16 -0700
commite089737fb13868bd3a72b7ac4799d502d188f03e (patch)
tree4b17f79d690e58f1a97f29b489dff73683019651
parentafb1fe695d197187a301c19863a128a65389b15c (diff)
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 <keithp@keithp.com>
-rw-r--r--configure.ac10
1 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index b0d26435a..60ebbcbb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"