summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2014-05-12 15:31:47 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2014-05-12 15:31:47 +0000
commit8d65f368d22cdb30dfba744e4fc5d2ceb79705d5 (patch)
tree4ef9b61a35738561cf6e9399f0e2103292bc7a1f
parentc7efc250fb51966a2885cd9abc579bbf4c500cc6 (diff)
downloadmpc-8d65f368d22cdb30dfba744e4fc5d2ceb79705d5.tar.gz
Correct extraction of CC and CFLAGS from gmp.h, fixes #17410.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1451 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--m4/mpc.m416
1 files changed, 6 insertions, 10 deletions
diff --git a/m4/mpc.m4 b/m4/mpc.m4
index 1204c3b..78a080e 100644
--- a/m4/mpc.m4
+++ b/m4/mpc.m4
@@ -1,6 +1,6 @@
# mpc.m4
#
-# Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA
+# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014 INRIA
#
# This file is part of GNU MPC.
#
@@ -126,10 +126,11 @@ AC_DEFUN([MPC_C_CHECK_WARNINGCFLAGS], [
#
AC_DEFUN([MPC_GMP_CC_CFLAGS], [
AC_MSG_CHECKING(for CC and CFLAGS in gmp.h)
+ GMP_CC=
+ GMP_CFLAGS=
# AC_PROG_CPP triggers the search for a C compiler; use hack instead
- for cpp in /lib/cpp gcc cc c99
+ for cpp in "$CPP" cpp "gcc -E" /lib/cpp "cc -E" "c99 -E"
do
- test $cpp = /lib/cpp || cpp="$cpp -E"
echo foo > conftest.c
if $cpp $CPPFLAGS conftest.c > /dev/null 2> /dev/null ; then
# Get CC
@@ -144,16 +145,11 @@ AC_DEFUN([MPC_GMP_CC_CFLAGS], [
fi
done
- if test "x$GMP_CFLAGS" = "x__GMP_CFLAGS" -o "x$GMP_CC" = "x__GMP_CC" ; then
+ if test -z "$GMP_CC$GMP_CFLAGS" ; then
AC_MSG_RESULT(no)
- GMP_CC=
- GMP_CFLAGS=
else
AC_MSG_RESULT(yes [CC=$GMP_CC CFLAGS=$GMP_CFLAGS])
- fi
-
- # Check for validity of CC and CFLAGS obtained from gmp.h
- if test -n "$GMP_CC$GMP_CFLAGS" ; then
+ # Check for validity of CC and CFLAGS obtained from gmp.h
AC_MSG_CHECKING(for CC=$GMP_CC and CFLAGS=$GMP_CFLAGS)
echo "int main (void) { return 0; }" > conftest.c
if $GMP_CC $GMP_CFLAGS -o conftest conftest.c 2> /dev/null ; then