From 6452f12b33c5c20818b8a7b97989bcf0d526b8a4 Mon Sep 17 00:00:00 2001 From: Brian West Date: Wed, 19 Mar 2014 11:41:36 +0000 Subject: [PATCH] FS-6375: now withless for the dev to remember --- configure.ac | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5fbef7b333..c37368d7ea 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,29 @@ switch_builddir=`pwd` AC_SUBST(switch_srcdir) AC_SUBST(switch_builddir) +# +# --enable-64 has been moved up higher prior to AC_PROG_CC so that we can tuck in the -m64 flag +# so devs on with Solaris wanting to build 64bit can not bother with adding any additional +# flags on the ./configure line. User friendly. +# + +# 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 + case "$host" in + *-solaris2*) + # All three have to have -m64 for AC_PROG_CC to pick the right libtool + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64" + CXXFLAGS="$CXXFLAGS -m64" + ;; + *) + ;; + esac +fi + # Whether to follow FHS AC_ARG_ENABLE([fhs], [AS_HELP_STRING([--enable-fhs], @@ -262,10 +285,6 @@ fi AC_MSG_RESULT([using libtool library extension... ${LIBTOOL_LIB_EXTEN}]) -# 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"]) - # tweak compiler specific flags if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then APR_ADDTO(SWITCH_AM_CFLAGS, -KPIC)