summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-24 16:12:23 +0000
committerYang Tse <yangsita@gmail.com>2009-11-24 16:12:23 +0000
commit4bc98ca85c13378cf9d53cf7516c4c9cfa0d03e1 (patch)
treef3e79598b59f9b078ae3e6b78e92cb406d1058c9 /configure.ac
parent85df26919c344ecf1cff70964fa8f7714b511a8f (diff)
downloadc-ares-4bc98ca85c13378cf9d53cf7516c4c9cfa0d03e1.tar.gz
c-ares-4bc98ca85c13378cf9d53cf7516c4c9cfa0d03e1.tar.bz2
c-ares-4bc98ca85c13378cf9d53cf7516c4c9cfa0d03e1.zip
When using icc, compile with -fpic and link with intel dynamic libraries.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 20 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 7321677..667141d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,6 +114,17 @@ case $host in
;;
esac
+AC_MSG_CHECKING([if compiler is icc (to build with PIC)])
+case $CC in
+ icc | */icc)
+ AC_MSG_RESULT([yes])
+ with_pic=yes
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+esac
+
dnl libtool setup
AC_PROG_LIBTOOL
@@ -146,27 +157,17 @@ CARES_SET_COMPILER_DEBUG_OPTS
CARES_SET_COMPILER_OPTIMIZE_OPTS
CARES_SET_COMPILER_WARNING_OPTS
-case $host in
+if test "$compiler_id" = "INTEL_UNIX_C"; then
#
- x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
- #
- if test "$compiler_id" = "INTEL_UNIX_C"; then
- #
- if test "$compiler_num" -ge "900" &&
- test "$compiler_num" -lt "1000"; then
- dnl icc 9.X specific
- CFLAGS="$CFLAGS -i-dynamic"
- fi
- #
- if test "$compiler_num" -ge "1000"; then
- dnl icc 10.X or later
- CFLAGS="$CFLAGS -shared-intel"
- fi
- #
- fi
- ;;
+ if test "$compiler_num" -ge "1000"; then
+ dnl icc 10.X or later
+ CFLAGS="$CFLAGS -shared-intel"
+ elif test "$compiler_num" -ge "900"; then
+ dnl icc 9.X specific
+ CFLAGS="$CFLAGS -i-dynamic"
+ fi
#
-esac
+fi
CARES_CHECK_COMPILER_HALT_ON_ERROR
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE