]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
--enable-64 for 64bit suncc build
authorMichael Jerris <mike@jerris.com>
Thu, 15 Nov 2007 21:02:53 +0000 (21:02 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 15 Nov 2007 21:02:53 +0000 (21:02 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6288 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/libresample/configure.in
libs/pcre/configure.ac
libs/sqlite/configure.ac
libs/srtp/configure.in

index d97edc16e1cb42a5d447a0e40a7460816eed5ab9..7891b0427348996d319f44c5b6f0f9c834986228 100644 (file)
@@ -94,6 +94,17 @@ case "$host" in
                         DYNAMIC_LIB_EXTEN="so"
                 ;;
 esac
+
+#  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"])
+
+if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then
+    if test "${enable_64}" = "yes"; then
+        new_AM_CFLAGS="$new_AM_CFLAGS -m64"
+    fi
+fi
+
 AC_SUBST(new_AM_CFLAGS)
 AC_SUBST(new_AM_LDFLAGS)
 AC_SUBST(SOLINK)
index 6a318c17ff5872b9b99fc7ccd5c5cbc34e10583f..c3793cd47fde124de23d8bf94cd761d1aeaa7d68 100644 (file)
@@ -1,3 +1,4 @@
+
 dnl Process this file with autoconf to produce a configure script.
 
 dnl This configure.in file has been hacked around quite a lot as a result of
@@ -86,6 +87,35 @@ CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD:-'$(CXXFLAGS)'}
 BUILD_EXEEXT=${BUILD_EXEEXT:-'$(EXEEXT)'}
 BUILD_OBJEXT=${BUILD_OBJEXT:-'$(OBJEXT)'}
 
+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
+ ])
+])
+
+AX_COMPILER_VENDOR
+
+#  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"])
+
+if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then
+    if test "${enable_64}" = "yes"; then
+        CFLAGS="$CFLAGS -m64"
+        CXXFLAGS="$CXXFLAGS -m64"
+    fi
+fi
+
 dnl Checks for header files.
 
 AC_HEADER_STDC
index 39870cde9cab2fa2f3b7c2f95321f62ce0166f82..cf84cef0f837f61d70a013af5cbcbaee5e08f1e2 100644 (file)
@@ -180,6 +180,24 @@ if test "$hints" != ""; then
   . $hints
 fi
 
+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
+ ])
+])
+
+AX_COMPILER_VENDOR
+
 #########
 # Locate a compiler for the build machine.  This compiler should
 # generate command-line programs that run on the build machine.
@@ -213,6 +231,11 @@ AC_SUBST(BUILD_CC)
 AC_SUBST(BUILD_CFLAGS)
 AC_SUBST(BUILD_LIBS)
 
+
+#  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"])
+
 ##########
 # Locate a compiler that converts C code into *.o files that run on
 # the target machine.
@@ -230,6 +253,11 @@ if test "$config_TARGET_CFLAGS" != ""; then
 else
   TARGET_CFLAGS=$BUILD_CFLAGS
 fi
+if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then
+    if test "${enable_64}" = "yes"; then
+        TARGET_CFLAGS="$TARGET_CFLAGS -m64"
+    fi
+fi
 AC_MSG_RESULT($TARGET_CFLAGS)
 AC_MSG_CHECKING([target linker])
 if test "$config_TARGET_LINK" = ""; then
index 99a43dd87222ef289f74725568b4e742f0a1fc70..35388642680df8cbbf2ae68c30ffbd694a7152f1 100644 (file)
@@ -31,6 +31,7 @@ if test "${enable_debug}" = "yes"; then
         AX_CFLAGS_WARN_ALL_ANSI
 fi
 
+
 AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
 
 
@@ -85,6 +86,17 @@ case "$host" in
                         DYNAMIC_LIB_EXTEN="so"
                 ;;
 esac
+
+#  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"])
+
+if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then
+    if test "${enable_64}" = "yes"; then
+        new_AM_CFLAGS="$new_AM_CFLAGS -m64"
+    fi
+fi
+
 AC_SUBST(new_AM_CFLAGS)
 AC_SUBST(new_AM_LDFLAGS)
 AC_SUBST(SOLINK)