1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 17:31:46 -05:00

When using icc, compile with -fpic and link with intel dynamic libraries.

This commit is contained in:
Yang Tse 2009-11-24 16:12:22 +00:00
parent e20f3ecd7e
commit 19f79e5a79
2 changed files with 40 additions and 38 deletions

View File

@ -114,6 +114,17 @@ case $host in
;; ;;
esac 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 dnl libtool setup
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
@ -146,27 +157,17 @@ CARES_SET_COMPILER_DEBUG_OPTS
CARES_SET_COMPILER_OPTIMIZE_OPTS CARES_SET_COMPILER_OPTIMIZE_OPTS
CARES_SET_COMPILER_WARNING_OPTS CARES_SET_COMPILER_WARNING_OPTS
case $host in
#
x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
#
if test "$compiler_id" = "INTEL_UNIX_C"; then 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 if test "$compiler_num" -ge "1000"; then
dnl icc 10.X or later dnl icc 10.X or later
CFLAGS="$CFLAGS -shared-intel" CFLAGS="$CFLAGS -shared-intel"
elif test "$compiler_num" -ge "900"; then
dnl icc 9.X specific
CFLAGS="$CFLAGS -i-dynamic"
fi fi
# #
fi fi
;;
#
esac
CARES_CHECK_COMPILER_HALT_ON_ERROR CARES_CHECK_COMPILER_HALT_ON_ERROR
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE

View File

@ -180,6 +180,17 @@ case $host in
;; ;;
esac 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 dnl libtool setup
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
@ -244,27 +255,17 @@ CURL_SET_COMPILER_DEBUG_OPTS
CURL_SET_COMPILER_OPTIMIZE_OPTS CURL_SET_COMPILER_OPTIMIZE_OPTS
CURL_SET_COMPILER_WARNING_OPTS CURL_SET_COMPILER_WARNING_OPTS
case $host in
#
x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
#
if test "$compiler_id" = "INTEL_UNIX_C"; then 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 if test "$compiler_num" -ge "1000"; then
dnl icc 10.X or later dnl icc 10.X or later
CFLAGS="$CFLAGS -shared-intel" CFLAGS="$CFLAGS -shared-intel"
elif test "$compiler_num" -ge "900"; then
dnl icc 9.X specific
CFLAGS="$CFLAGS -i-dynamic"
fi fi
# #
fi fi
;;
#
esac
CURL_CHECK_COMPILER_HALT_ON_ERROR CURL_CHECK_COMPILER_HALT_ON_ERROR
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE