diff --git a/libs/js/Makefile.in b/libs/js/Makefile.in index a249170f0c..48d1c0b9bd 100644 --- a/libs/js/Makefile.in +++ b/libs/js/Makefile.in @@ -159,7 +159,7 @@ $(LIB_NAME): $(LIB_OBJS) @$(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 @@ src/jsautocfg.h: jscpucfg 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 diff --git a/libs/js/configure.ac b/libs/js/configure.ac index 52664bd37f..381a0711d0 100644 --- a/libs/js/configure.ac +++ b/libs/js/configure.ac @@ -174,6 +174,35 @@ if test ".$ac_cv_with_nspr" = ".yes"; then 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) diff --git a/libs/js/nsprpub/configure.in b/libs/js/nsprpub/configure.in index 74c2fa5e15..b86dd72711 100644 --- a/libs/js/nsprpub/configure.in +++ b/libs/js/nsprpub/configure.in @@ -223,6 +223,14 @@ AC_ARG_ENABLE(64bit, 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 @@ cygwin*|msvc*|mks*) ;; esac + dnl ======================================================== dnl Substitution of found variables. dnl ========================================================