forked from Mirrors/freeswitch
add --enable-64 configure flag to build 64 bit with suncc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6299 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c5765d0c61
commit
29176defca
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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 ========================================================
|
||||
|
Loading…
Reference in New Issue
Block a user