1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

configure: make the cpp -P detection not clobber CPPFLAGS

CPPPFLAGS is now CPPPFLAG. Fixes CURL_CHECK_DEF.

Fixes #958
This commit is contained in:
Craig Davison 2016-08-11 21:37:13 -06:00 committed by Daniel Stenberg
parent 4b86113f5e
commit 46398941e4

View File

@ -32,8 +32,8 @@ dnl actually be a single double-quoted string concatenating all them.
AC_DEFUN([CURL_CHECK_DEF], [ AC_DEFUN([CURL_CHECK_DEF], [
AC_REQUIRE([CURL_CPP_P])dnl AC_REQUIRE([CURL_CPP_P])dnl
OLDCPPFLAGS=$CPPFLAGS OLDCPPFLAGS=$CPPFLAGS
# CPPPFLAGS comes from CURL_CPP_P # CPPPFLAG comes from CURL_CPP_P
CPPFLAGS="$CPPPFLAGS" CPPFLAGS="$CPPFLAGS $CPPPFLAG"
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])dnl AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])dnl
if test -z "$SED"; then if test -z "$SED"; then
@ -3187,12 +3187,15 @@ TEST EINVAL TEST
if test "x$cpp_p" = "xno"; then if test "x$cpp_p" = "xno"; then
AC_MSG_WARN([failed to figure out cpp -P alternative]) AC_MSG_WARN([failed to figure out cpp -P alternative])
# without -P # without -P
CPPPFLAGS=$OLDCPPFLAGS CPPPFLAG=""
else else
# with -P # with -P
CPPPFLAGS=$CPPFLAGS CPPPFLAG="-P"
fi fi
dnl restore CPPFLAGS dnl restore CPPFLAGS
CPPFLAGS=$OLDCPPFLAGS CPPFLAGS=$OLDCPPFLAGS
else
# without -P
CPPPFLAG=""
fi fi
]) ])