]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add --enable-64 configure flag to build 64 bit with suncc
authorMichael Jerris <mike@jerris.com>
Fri, 16 Nov 2007 03:35:07 +0000 (03:35 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 Nov 2007 03:35:07 +0000 (03:35 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6296 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/curl/configure.ac
libs/curl/lib/config.h.in
libs/iax/configure.in
libs/iksemel/configure.ac
libs/libdingaling/configure.in
libs/libsndfile/configure.ac
libs/sofia-sip/configure.ac

index ce112fbcf50f6068563f54237a55e2e0a0d33d70..179dc91f2653d31a47d54e12dddbf745bc1dc8b9 100644 (file)
@@ -2043,6 +2043,34 @@ if test "x$ws2" = "xyes"; then
   LIBS="$LIBS -lws2_32"
 
 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
+
+#  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
 
 AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
 
index 8602189707771fc5967cc202d5692b079195dda1..4bc60b0df18042938b2435bfe78e445fc9ee644c 100644 (file)
 /* Define to the function return type for send. */
 #undef SEND_TYPE_RETV
 
-/* The size of `curl_off_t', as computed by sizeof. */
+/* The size of `curl_off_t', as computed by sizeof. */
 #undef SIZEOF_CURL_OFF_T
 
-/* The size of `long', as computed by sizeof. */
+/* The size of `long', as computed by sizeof. */
 #undef SIZEOF_LONG
 
-/* The size of `size_t', as computed by sizeof. */
+/* The size of `size_t', as computed by sizeof. */
 #undef SIZEOF_SIZE_T
 
-/* The size of `time_t', as computed by sizeof. */
+/* The size of `time_t', as computed by sizeof. */
 #undef SIZEOF_TIME_T
 
 /* Define to 1 if you have the ANSI C header files. */
 /* type to use in place of in_addr_t if not defined */
 #undef in_addr_t
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
 
 /* type to use in place of socklen_t if not defined */
index 010a6bce47ce5e6ffd5d370655e8fbd3b4a34ebc..affe9cca141da096de6911eddd5598e5a7711841 100644 (file)
@@ -99,6 +99,17 @@ case "$host" in
                         IN_LINE=inline
                ;;
 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 fe1d3699239b1beba2d2a47b3ad2a75fb20d5361..8a6f93cd16b3e98f566a4c3d26ead86a3acf4377 100644 (file)
@@ -55,6 +55,35 @@ if test "x$GCC" = "xyes"; then
   fi
 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
+
+#  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 Generating makefiles
 AC_CONFIG_FILES([
 Makefile
index e7d3d3bf18ed84547fa62a31e1514c464d58155a..3179e460c70dbcd2a024b7f61c5887dc4f920ecd 100755 (executable)
@@ -105,6 +105,17 @@ case "$host" in
                         DYNAMIC_LIB_EXTEN="so"
                         IN_LINE=inline
 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 96b6aa0d421813dcc5300b3144ba3da5a604cdaa..180c6031733420d460c5e72c9f7d64dda645b9fb 100644 (file)
@@ -460,6 +460,35 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
        AC_DEFINE_UNQUOTED([GCC_MAJOR_VERSION],${GCC_MAJOR_VERSION}, [Major version of GCC or 3 otherwise.])
        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
+
+#  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"
+    fi
+fi
+
+
 CFLAGS="$CFLAGS $OS_SPECIFIC_CFLAGS"
 
 if test x"$CFLAGS" = x ; then
index 3d03a4dc0a1ae2fffa2ddc19101a042b30a4061b..513881ebeadeba1edbf46496cbe64c0cc20b9e86 100644 (file)
@@ -230,6 +230,35 @@ AC_TYPE_SIZE_T
 
 AC_SYS_SA_LEN
 
+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
+        SOFIA_CFLAGS="$SOFIA_CFLAGS -m64"
+    fi
+fi
+
+
 ### checks for library functions
 ### ----------------------------