From e10e0258106df1d93e60b046c9ef51770d8997fd Mon Sep 17 00:00:00 2001 From: James O'Gorman Date: Mon, 2 May 2011 11:25:49 +0000 Subject: Finally unbreak build on Solaris! * Add code to configure to detect whether we should compile with -m32 or -m64. GCC on Solaris defaults to 32-bit even of the OS is running in 64-bit mode. (Solaris only) * Change the CFLAGS, CXXFLAGS and LDFLAGS definitions to be append rather than set. This allows passing them at compile-time to make(1). --- configure.ac | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e4b4dda4..7a7c8332 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,16 @@ if test "x$ac_cv_cxx_exceptions" != "xyes" || \ AC_MSG_ERROR([[basic compile checks failed, the C++ compiler is broken]]) fi +case $build_os in +solaris*) + isa_bits=`isainfo -b` + AC_MSG_NOTICE([setting compiler to use -m$isa_bits on Solaris]) + CFLAGS="$CFLAGS -m$isa_bits" + CXXFLAGS="$CXXFLAGS -m$isa_bits" + LDFLAGS="$LDFLAGS -m$isa_bits" + ;; +esac + if test "x$GXX" = "xyes"; then # Use -Wall if we have gcc. This gives better warnings AC_SUBST([CXXFLAGS_STRICT], ['-Wall -Wundef']) @@ -411,7 +421,7 @@ fi cat parcels.txt | sed -e 's/#.*//' | while read cmd subdir configure_args; do if test "$cmd" = "subdir"; then echo - export CC CXX CXXFLAGS LDFLAGS LIBS + export CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS args="$configure_args --target=$target_alias" echo "Configuring $subdir with: $args" -- cgit v1.2.3