]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
start adding solaris suncc 64 bit support native in the build system
authorMichael Jerris <mike@jerris.com>
Thu, 15 Nov 2007 20:07:34 +0000 (20:07 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 15 Nov 2007 20:07:34 +0000 (20:07 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6287 d0543943-73ff-0310-b7d9-9358b9ac24b2

configure.in
libs/apr/build/ax_compiler_vendor.m4 [new file with mode: 0644]
libs/apr/configure.in

index adac18b1eb2ee5c757aa2cf148426dbb0e21baa9..367aa61f044d54c3a00db5168a508be75a37dc89 100644 (file)
@@ -138,7 +138,6 @@ if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then
     APR_ADDTO(SWITCH_AM_LDFLAGS, -R${prefix}/lib)
     if test "${enable_64}" = "yes"; then
         APR_ADDTO(SWITCH_AM_CFLAGS, -m64)
-        APR_ADDTO(SWITCH_AM_LDFLAGS, -L/opt/csw/lib/amd64)
     fi
 elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
     APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
diff --git a/libs/apr/build/ax_compiler_vendor.m4 b/libs/apr/build/ax_compiler_vendor.m4
new file mode 100644 (file)
index 0000000..a24a58d
--- /dev/null
@@ -0,0 +1,15 @@
+AC_DEFUN([AX_COMPILER_VENDOR],
+[
+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
+  # note: don't check for gcc first since some other compilers define __GNUC__
+  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+#if !($vencpp)
+      thisisanerror;
+#endif
+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
+  done
+ ])
+])
index 04bde9f5fff7113a71c031f4cda032cf6fa93308..84406ccb19ab30039fcd9457b6f7ff46cc243df1 100644 (file)
@@ -116,6 +116,9 @@ dnl can only be used once within a configure script, so this prevents a
 dnl preload section from invoking the macro to get compiler info.
 AC_PROG_CC
 
+#Check for compiler vendor
+AX_COMPILER_VENDOR
+
 dnl Preload
 APR_PRELOAD
 
@@ -254,6 +257,18 @@ AC_ARG_ENABLE(debug,[  --enable-debug          Turn on debugging and compile tim
    fi
 ])dnl
 
+#  Enable 64 bit build
+AC_ARG_ENABLE(64,
+[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"])
+# tweak compiler specific flags
+if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then
+    if test "${enable_64}" = "yes"; then
+        APR_ADDTO(CFLAGS, -m64)
+    fi
+fi
+
+
+
 AC_ARG_ENABLE(maintainer-mode,[  --enable-maintainer-mode  Turn on debugging and compile time warnings],
   [APR_ADDTO(CFLAGS,-g)
    if test "$GCC" = "yes"; then