summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-08-08 18:33:05 +0200
committerYang Tse <yangsita@gmail.com>2011-08-08 18:33:05 +0200
commita94b4e53d1b18cd15a9c27808b71ab665ebfad2d (patch)
tree276ebb200f579410b5f9f0c3291c503e15d4dee0 /m4
parenta8f62e82bf99b07668804d5e65c7dde746f6583e (diff)
downloadc-ares-a94b4e53d1b18cd15a9c27808b71ab665ebfad2d.tar.gz
c-ares-a94b4e53d1b18cd15a9c27808b71ab665ebfad2d.tar.bz2
c-ares-a94b4e53d1b18cd15a9c27808b71ab665ebfad2d.zip
cares-compilers.m4: CARES_CONVERT_INCLUDE_TO_ISYSTEM adjustments
Add CARES_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.
Diffstat (limited to 'm4')
-rw-r--r--m4/cares-compilers.m464
1 files changed, 34 insertions, 30 deletions
diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4
index 309405c..5d3035c 100644
--- a/m4/cares-compilers.m4
+++ b/m4/cares-compilers.m4
@@ -15,7 +15,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 66
+# serial 67
dnl CARES_CHECK_COMPILER
@@ -418,35 +418,39 @@ dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CARES_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
- tmp_has_include="no"
- tmp_chg_FLAGS="$CFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
- CFLAGS="$tmp_chg_FLAGS"
- squeeze CFLAGS
- fi
- tmp_has_include="no"
- tmp_chg_FLAGS="$CPPFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- 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
+ AC_REQUIRE([CARES_CHECK_COMPILER])dnl
+ if test "$compiler_id" = "GNU_C" ||
+ test "$compiler_id" = "CLANG"; then
+ tmp_has_include="no"
+ tmp_chg_FLAGS="$CFLAGS"
+ for word1 in $tmp_chg_FLAGS; do
+ case "$word1" in
+ -I*)
+ tmp_has_include="yes"
+ ;;
+ esac
+ done
+ if test "$tmp_has_include" = "yes"; then
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+ CFLAGS="$tmp_chg_FLAGS"
+ squeeze CFLAGS
+ fi
+ tmp_has_include="no"
+ tmp_chg_FLAGS="$CPPFLAGS"
+ for word1 in $tmp_chg_FLAGS; do
+ case "$word1" in
+ -I*)
+ tmp_has_include="yes"
+ ;;
+ esac
+ done
+ if test "$tmp_has_include" = "yes"; then
+ 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
])