From 40b601fbb774cd2be2f6cbe7155570340fc475a2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 21 Mar 2012 16:33:57 +0000 Subject: Use autoconf macro for testing compiler options with empty input. --- aclocal.m4 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'aclocal.m4') 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 -- cgit v1.1