]> 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 01:45:29 +0000 (01:45 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 Nov 2007 01:45:29 +0000 (01:45 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6294 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/codec/g726/configure.in
libs/codec/g7xx/configure.in
libs/codec/gsm/configure.in
libs/codec/ilbc/configure.in
libs/codec/lpc10/configure.ac
libs/speex/configure.ac
libs/speex/configure.gnu

index 564dcf71b073f8b6a9cebf0ed2e322b4ab04f31d..62eb825907186e12e379fcaf457dd2e845d325e8 100644 (file)
@@ -85,6 +85,15 @@ 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 b2a3fb0b42bcf0a51d8c8f1f86a554d7991c5539..4c7aceb0d7a36c54fa3868f8d4890bb38a5d2adf 100644 (file)
@@ -88,6 +88,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 0a95896b9d1d7dc9d831bd1faac2b499bc2a0ce8..6904854dc72c841a3c5380dfd5e241b790fc3402 100644 (file)
@@ -12,6 +12,35 @@ AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
 AC_PROG_INSTALL
 
+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
+
 # Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
index 3bff3e66dadfe7d35e67cd526ec196483c6c2e40..22cae1e2ed1df1d6befecd9edeb0da30bfecac9a 100644 (file)
@@ -91,6 +91,15 @@ 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 ac059528078f1f9c7d241d2a873ce81267361d07..68361435f60aecb993e8a3044fe71f50f483000f 100644 (file)
@@ -83,6 +83,15 @@ 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 6f12e55e2397b5ff805df922b3e213d9ae40406d..faa449bc178f88ab2865f2abaef4744874106966 100644 (file)
@@ -185,6 +185,36 @@ fi
 AC_SUBST(SIZE16)
 AC_SUBST(SIZE32)
 
+
+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
+
 AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
            include/Makefile include/speex/Makefile speex.pc
            win32/Makefile win32/libspeex/Makefile win32/speexenc/Makefile
index dd7048bd676da55cf27367f66b9d29251bdb6cb9..1a6d134a9f11dd6189e1551e0e88b5e6a91e7330 100644 (file)
@@ -1,2 +1,2 @@
 #! /bin/sh
-./configure "$@" --disable-shared --with-pic
+./configure "$@" --disable-shared --with-pic --disable-oggtest