From 19f79e5a79d405b88a28e3410336e1ddef43708a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 24 Nov 2009 16:12:22 +0000 Subject: When using icc, compile with -fpic and link with intel dynamic libraries. --- configure.ac | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7f051d637..4cd76f631 100644 --- a/configure.ac +++ b/configure.ac @@ -180,6 +180,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 @@ -244,27 +255,17 @@ CURL_SET_COMPILER_DEBUG_OPTS CURL_SET_COMPILER_OPTIMIZE_OPTS CURL_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 CURL_CHECK_COMPILER_HALT_ON_ERROR CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE -- cgit v1.2.1