From 9435c35e401468a5380378acd8ebeb1ad757e982 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 22 Jun 2007 17:15:33 +0000 Subject: [PATCH] added support for using Sun CC to link shared libraries under Linux too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/aclocal/bakefile.m4 | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/build/aclocal/bakefile.m4 b/build/aclocal/bakefile.m4 index a06c7e0f84..e35ca5426f 100644 --- a/build/aclocal/bakefile.m4 +++ b/build/aclocal/bakefile.m4 @@ -309,27 +309,17 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD], ;; *-*-linux* ) - if test "x$GCC" != "xyes"; then - AC_CACHE_CHECK([for Intel compiler], bakefile_cv_prog_icc, - [ - AC_TRY_COMPILE([], - [ - #ifndef __INTEL_COMPILER - This is not ICC - #endif - ], - bakefile_cv_prog_icc=yes, - bakefile_cv_prog_icc=no - ) - ]) - if test "$bakefile_cv_prog_icc" = "yes"; then - PIC_FLAG="-KPIC" - fi + if test "$INTELCC" = "yes"; then + PIC_FLAG="-KPIC" + elif test "x$SUNCXX" = "xyes"; then + SHARED_LD_CC="${CC} -G -o" + SHARED_LD_CXX="${CXX} -G -o" + PIC_FLAG="-KPIC" fi ;; *-*-solaris2* ) - if test "x$GCC" != xyes ; then + if test "x$SUNCXX" = xyes ; then SHARED_LD_CC="${CC} -G -o" SHARED_LD_CXX="${CXX} -G -o" PIC_FLAG="-KPIC" @@ -500,7 +490,11 @@ AC_DEFUN([AC_BAKEFILE_SHARED_VERSIONS], case "${BAKEFILE_HOST}" in *-*-linux* | *-*-freebsd* | *-*-k*bsd*-gnu ) - SONAME_FLAG="-Wl,-soname," + if test "x$SUNCXX" = "xyes"; then + SONAME_FLAG="-h " + else + SONAME_FLAG="-Wl,-soname," + fi USE_SOVERSION=1 USE_SOVERLINUX=1 USE_SOSYMLINKS=1 -- 2.45.2