1
0
mirror of https://github.com/moparisthebest/curl synced 2025-01-04 18:38:03 -05:00

curl-compilers.m4: CURL_CONVERT_INCLUDE_TO_ISYSTEM adjustments:

Add CURL_CHECK_COMPILER as a requirement.

Ensure macro does nothing unless GNU_C or CLANG compiler is used.

This should allow usage of this macro in unforeseen placements.
This commit is contained in:
Yang Tse 2011-08-08 17:50:16 +02:00
parent 3dcc0df5cc
commit 56ef3e295f

View File

@ -423,35 +423,39 @@ dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [ AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
tmp_has_include="no" AC_REQUIRE([CURL_CHECK_COMPILER])dnl
tmp_chg_FLAGS="$CFLAGS" if test "$compiler_id" = "GNU_C" ||
for word1 in $tmp_chg_FLAGS; do test "$compiler_id" = "CLANG"; then
case "$word1" in tmp_has_include="no"
-I*) tmp_chg_FLAGS="$CFLAGS"
tmp_has_include="yes" for word1 in $tmp_chg_FLAGS; do
;; case "$word1" in
esac -I*)
done tmp_has_include="yes"
if test "$tmp_has_include" = "yes"; then ;;
tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'` esac
tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'` done
CFLAGS="$tmp_chg_FLAGS" if test "$tmp_has_include" = "yes"; then
squeeze CFLAGS tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
fi tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
tmp_has_include="no" CFLAGS="$tmp_chg_FLAGS"
tmp_chg_FLAGS="$CPPFLAGS" squeeze CFLAGS
for word1 in $tmp_chg_FLAGS; do fi
case "$word1" in tmp_has_include="no"
-I*) tmp_chg_FLAGS="$CPPFLAGS"
tmp_has_include="yes" for word1 in $tmp_chg_FLAGS; do
;; case "$word1" in
esac -I*)
done tmp_has_include="yes"
if test "$tmp_has_include" = "yes"; then ;;
tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'` esac
tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'` done
CPPFLAGS="$tmp_chg_FLAGS" if test "$tmp_has_include" = "yes"; then
squeeze CPPFLAGS tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
CPPFLAGS="$tmp_chg_FLAGS"
squeeze CPPFLAGS
fi
fi fi
]) ])