[Freeswitch-trunk] [commit] r6297 - in freeswitch/trunk/libs/xmlrpc-c: . lib/expat/gennmtab src
Freeswitch SVN
mikej at freeswitch.org
Thu Nov 15 23:26:00 EST 2007
Author: mikej
Date: Thu Nov 15 23:26:00 2007
New Revision: 6297
Modified:
freeswitch/trunk/libs/xmlrpc-c/Makefile.common
freeswitch/trunk/libs/xmlrpc-c/Makefile.config.in
freeswitch/trunk/libs/xmlrpc-c/configure.in
freeswitch/trunk/libs/xmlrpc-c/lib/expat/gennmtab/Makefile
freeswitch/trunk/libs/xmlrpc-c/src/xmlrpc_builddecomp.c
Log:
add --enable-64 configure flag to build 64 bit with suncc
Modified: freeswitch/trunk/libs/xmlrpc-c/Makefile.common
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/Makefile.common (original)
+++ freeswitch/trunk/libs/xmlrpc-c/Makefile.common Thu Nov 15 23:26:00 2007
@@ -23,11 +23,15 @@
GCC_CXX_WARNINGS = $(GCC_WARNINGS) -Woverloaded-virtual -Wsynth
ifeq ($(C_COMPILER_GNU),yes)
- CFLAGS_COMMON = $(GCC_C_WARNINGS) -fno-common -g
+ CFLAGS_COMMON = $(GCC_C_WARNINGS) $(COMPILER_CFLAGS) -fno-common -g
+else
+ CFLAGS_COMMON = $(COMPILER_CFLAGS)
endif
ifeq ($(CXX_COMPILER_GNU),yes)
- CXXFLAGS_COMMON = $(GCC_CXX_WARNINGS)
+ CXXFLAGS_COMMON = $(GCC_CXX_WARNINGS) $(COMPILER_CXXFLAGS)
+else
+ CXXFLAGS_COMMON = $(COMPILER_CXXFLAGS)
endif
DISTDIR = $(BUILDDIR)/$(PACKAGE)-$(VERSION)/$(SUBDIR)
Modified: freeswitch/trunk/libs/xmlrpc-c/Makefile.config.in
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/Makefile.config.in (original)
+++ freeswitch/trunk/libs/xmlrpc-c/Makefile.config.in Thu Nov 15 23:26:00 2007
@@ -57,6 +57,8 @@
C_COMPILER_GNU = @C_COMPILER_GNU@
CXX_COMPILER_GNU = @CXX_COMPILER_GNU@
+COMPILER_CFLAGS = @COMPILER_CFLAGS@
+COMPILER_CXXFLAGS = @COMPILER_CXXFLAGS@
# Here are the commands 'make install' uses to install various kinds of files:
Modified: freeswitch/trunk/libs/xmlrpc-c/configure.in
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/configure.in (original)
+++ freeswitch/trunk/libs/xmlrpc-c/configure.in Thu Nov 15 23:26:00 2007
@@ -633,6 +633,40 @@
BUILDDIR=`pwd`
AC_SUBST(BUILDDIR)
+
+
+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
+ COMPILER_CFLAGS=-m64
+ COMPILER_CXXFLAGS=-m64
+ fi
+fi
+
+AC_SUBST(COMPILER_CFLAGS)
+AC_SUBST(COMPILER_CXXFLAGS)
+
dnl =======================================================================
dnl Libtool
dnl =======================================================================
Modified: freeswitch/trunk/libs/xmlrpc-c/lib/expat/gennmtab/Makefile
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/lib/expat/gennmtab/Makefile (original)
+++ freeswitch/trunk/libs/xmlrpc-c/lib/expat/gennmtab/Makefile Thu Nov 15 23:26:00 2007
@@ -40,6 +40,6 @@
$(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES)
gennmtab:%:%.o
- $(LINK) -o $@ $(LDFLAGS) $^
+ $(LINK) -o $@ $(LDFLAGS) $(CFLAGS) $^
include Makefile.depend
Modified: freeswitch/trunk/libs/xmlrpc-c/src/xmlrpc_builddecomp.c
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/src/xmlrpc_builddecomp.c (original)
+++ freeswitch/trunk/libs/xmlrpc-c/src/xmlrpc_builddecomp.c Thu Nov 15 23:26:00 2007
@@ -27,8 +27,12 @@
#if VA_LIST_IS_ARRAY
#define VA_LIST_COPY(dest,src) memcpy((dest), (src), sizeof(va_list))
#else
+#if __sun
+#define VA_LIST_COPY(dest,src) (*(dest) = *(src))
+#else
#define VA_LIST_COPY(dest,src) ((dest) = (src))
#endif
+#endif
/*=========================================================================
** Creating XML-RPC values.
More information about the Freeswitch-trunk
mailing list