fi
# might be cross-compiling.
-if test "x$HOSTCXX" = "x"; then
- HOSTCXX="$CXX"
+# NP: BUILDCXXFLAGS defined at the end of configure after CXXFLAGS fully known.
+AC_ARG_VAR([BUILDCXX],[path to compiler for building compile-time tools. e.g. cf_gen])
+if test "x$HOSTCXX" != "x" -a "x$BUILDCXX" = "x"; then
+ AC_MSG_WARN([Cross-compiling with HOSTCXX is deprecated. Uses BUILDCXX instead.])
+ BUILDCXX="$HOSTCXX"
+fi
+if test "x$BUILDCXX" = "x"; then
+ BUILDCXX="$CXX"
if test "x$squid_cv_check_marchnative" = "xyes"; then
CXXFLAGS="$CXXFLAGS -march=native"
fi
fi
-if test "x$squid_cv_check_marchnative" = "xyes"; then
- # always valid for the Host compiler.
- HOSTCXX="$HOSTCXX -march=native"
-fi
-AC_SUBST(HOSTCXX)
+AC_SUBST(BUILDCXX)
AC_MSG_CHECKING([simplified host os])
simple_host_os=`echo $host_os|sed 's/[0-9].*//g;s/-.*//g'`
AC_SUBST(SQUID_CFLAGS)
AC_SUBST(SQUID_CXXFLAGS)
+AC_ARG_VAR([BUILDCXXFLAGS],[C++ compiler flags for building compile-time tools. e.g. cf_gen])
+if test "x$BUILDCXXFLAGS" = "x"; then
+ # if we are NOT cross-compiling, use the default build flags for cf_gen and friends
+ # otherwise rely on the user-provided value
+ if test "x$squid_cv_check_marchnative" = "xyes"; then
+ # always valid for the Build compiler.
+ BUILDCXXFLAGS="-march-native"
+ fi
+ BUILDCXXFLAGS="$BUILDCXXFLAGS $CXXFLAGS"
+fi
+AC_SUBST(BUILDCXXFLAGS)
+
AC_MSG_NOTICE([BUILD LIBRARIES: $LIBS])
AC_MSG_NOTICE([BUILD EXTRA LIBRARIES: $XTRA_LIBS])
AC_MSG_NOTICE([BUILD OBJECTS: $OBJS])
AC_MSG_NOTICE([BUILD EXTRA C FLAGS: $SQUID_CFLAGS])
AC_MSG_NOTICE([BUILD C++ FLAGS: $CXXFLAGS])
AC_MSG_NOTICE([BUILD EXTRA C++ FLAGS: $SQUID_CXXFLAGS])
+AC_MSG_NOTICE([BUILD Tools C++ FLAGS: $BUILDCXXFLAGS])
dnl Clean up after OSF/1 core dump bug
rm -f core
<descrip>
<p><em>There are no new ./configure options in Squid-3.5.</em>
+ <tag>BUILDCXX=</tag>
+ <p>Used when cross-compiling Squid.
+ <p>The path and name of a compiler for building cf_gen and related
+ tools used in the compile process.
+
+ <tag>BUILDCXXFLAGS=</tag>
+ <p>Used when cross-compiling Squid.
+ <p>C++ compiler flags used for building cf_gen and related
+ tools used in the compile process.
+
<tag>--without-gnutls</tag>
<p>New option to explicitly disable use of GnuTLS encryption library.
Use of this library is auto-enabled if v3.1.5 or later is available.
# cf_gen builds the configuration files.
cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci
- $(HOSTCXX) -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src
+ $(BUILDCXX) $(BUILDCXXFLAGS) -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src
# squid.conf.default is built by cf_gen when making cf_parser.cci
squid.conf.default squid.conf.documented: cf_parser.cci