[Freeswitch-svn] [commit] r6299 - in freeswitch/trunk/libs/js: . nsprpub

Freeswitch SVN mikej at freeswitch.org
Fri Nov 16 00:07:35 EST 2007


Author: mikej
Date: Fri Nov 16 00:07:35 2007
New Revision: 6299

Modified:
   freeswitch/trunk/libs/js/Makefile.in
   freeswitch/trunk/libs/js/configure.ac
   freeswitch/trunk/libs/js/nsprpub/configure.in

Log:
add --enable-64 configure flag to build 64 bit with suncc

Modified: freeswitch/trunk/libs/js/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/js/Makefile.in	(original)
+++ freeswitch/trunk/libs/js/Makefile.in	Fri Nov 16 00:07:35 2007
@@ -159,7 +159,7 @@
 	@$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) -version-info 1:6
 
 $(CLI_NAME): $(CLI_OBJS) $(LIB_NAME)
-	@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(CLI_LDFLAGS) -o $(CLI_NAME) $(CLI_OBJS) $(LIB_NAME) $(LIBS) $(CLI_LIBS)
+	@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(CLI_LDFLAGS) $(CFLAGS) -o $(CLI_NAME) $(CLI_OBJS) $(LIB_NAME) $(LIBS) $(CLI_LIBS)
 src/js.o: src/js.c
 	$(CC) $(CPPFLAGS) $(CLI_CPPFLAGS) $(CFLAGS) $(CLI_CFLAGS) -o $@ -c $<
 src/perlconnect/jsperl.o: src/perlconnect/jsperl.c
@@ -172,7 +172,7 @@
 jscpucfg.o: src/jscpucfg.c
 	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
 jscpucfg: jscpucfg.o
-	@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o jscpucfg jscpucfg.o $(LIBS)
+	@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(CFLAGS) -o jscpucfg jscpucfg.o $(LIBS)
 src/jsopcode.h src/jsopcode.c: src/jsopcode.tbl
 
 .PHONY: install

Modified: freeswitch/trunk/libs/js/configure.ac
==============================================================================
--- freeswitch/trunk/libs/js/configure.ac	(original)
+++ freeswitch/trunk/libs/js/configure.ac	Fri Nov 16 00:07:35 2007
@@ -174,6 +174,35 @@
     LIBPATH="LD_LIBRARY_PATH=./nsprpub/dist/lib DYLD_LIBRARY_PATH=./nsprpub/dist/lib" 
 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
+
 AC_SUBST(CLI_CFLAGS)
 AC_SUBST(CLI_CPPFLAGS)
 AC_SUBST(CLI_LDFLAGS)

Modified: freeswitch/trunk/libs/js/nsprpub/configure.in
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/configure.in	(original)
+++ freeswitch/trunk/libs/js/nsprpub/configure.in	Fri Nov 16 00:07:35 2007
@@ -223,6 +223,14 @@
 	    USE_64=1
       fi ])
 
+#  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 "${enable_64}" = "yes"; then
+    USE_64=1
+fi
+
 AC_ARG_ENABLE(mdupdate,
     [  --enable-mdupdate       Enable use of certain compilers' mdupdate feature],
     [ if test "$enableval" = "yes"; then
@@ -2660,6 +2668,7 @@
     ;;
 esac
 
+
 dnl ========================================================
 dnl Substitution of found variables.
 dnl ========================================================



More information about the Freeswitch-svn mailing list