aboutsummaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-03-21 16:33:57 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-03-21 16:33:57 +0000
commit40b601fbb774cd2be2f6cbe7155570340fc475a2 (patch)
tree79ec38289fe7e9a56059c8c69e8b212eb218e3f0 /aclocal.m4
parent1a4ac776ebc9bb07287f59f63e473db531318dff (diff)
downloadglibc-40b601fbb774cd2be2f6cbe7155570340fc475a2.zip
glibc-40b601fbb774cd2be2f6cbe7155570340fc475a2.tar.gz
glibc-40b601fbb774cd2be2f6cbe7155570340fc475a2.tar.bz2
Use autoconf macro for testing compiler options with empty input.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index fb546e4..e899932 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -128,6 +128,12 @@ AS_IF([AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest
[$2], [$3])
rm -f conftest*])
+dnl Test a compiler option or options with an empty input file.
+dnl LIBC_TRY_CC_OPTION([options], [action-if-true], [action-if-false])
+AC_DEFUN([LIBC_TRY_CC_OPTION],
+[AS_IF([AC_TRY_COMMAND([${CC-cc} $1 -xc /dev/null -S -o /dev/null])],
+ [$2], [$3])])
+
dnl Find and source sysdeps/*/preconfigure.
dnl LIBC_PRECONFIGURE([$srcdir], [for])
AC_DEFUN([LIBC_PRECONFIGURE], [dnl