From 67963332cea8f21f2134da6e72fdb7a696cb1ac9 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 1 Jan 2010 20:59:12 -0800 Subject: [PATCH] Updated pandora-build. --- m4/pandora_canonical.m4 | 15 +++++++++++++-- m4/pandora_drizzle_build.m4 | 14 +++++++++++++- m4/pandora_optimize.m4 | 2 +- m4/pandora_platform.m4 | 8 ++++++++ m4/{visibility.m4 => pandora_visibility.m4} | 13 +++++++++---- m4/pandora_warnings.m4 | 4 ++-- m4/pandora_with_python.m4 | 13 +++++++++++-- m4/pandora_with_python3.m4 | 2 +- 8 files changed, 58 insertions(+), 13 deletions(-) rename m4/{visibility.m4 => pandora_visibility.m4} (89%) diff --git a/m4/pandora_canonical.m4 b/m4/pandora_canonical.m4 index 0542e3d3..cc945c1b 100644 --- a/m4/pandora_canonical.m4 +++ b/m4/pandora_canonical.m4 @@ -4,13 +4,23 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Which version of the canonical setup we're using -AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.86]) +AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.91]) AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ + AC_ARG_ENABLE([fat-binaries], + [AS_HELP_STRING([--enable-fat-binaries], + [Enable fat binary support on OSX @<:@default=off@:>@])], + [ac_enable_fat_binaries="$enableval"], + [ac_enable_fat_binaries="no"]) + dnl Force dependency tracking on for Sun Studio builds AS_IF([test "x${enable_dependency_tracking}" = "x"],[ enable_dependency_tracking=yes ]) + dnl If we're building OSX Fat Binaries, we have to turn off -M options + AS_IF([test "x${ac_enable_fat_binaries}" = "xyes"],[ + enable_dependency_tracking=no + ]) ]) dnl The standard setup for how we build Pandora projects @@ -195,7 +205,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ dnl We need to inject error into the cflags to test if visibility works or not save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -Werror" - gl_VISIBILITY + PANDORA_VISIBILITY CFLAGS="${save_CFLAGS}" ]) @@ -232,5 +242,6 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_CXXFLAGS]) AC_SUBST([AM_CPPFLAGS]) + AC_SUBST([AM_LDFLAGS]) ]) diff --git a/m4/pandora_drizzle_build.m4 b/m4/pandora_drizzle_build.m4 index 35f27161..fa132cca 100644 --- a/m4/pandora_drizzle_build.m4 +++ b/m4/pandora_drizzle_build.m4 @@ -75,11 +75,23 @@ AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ #ifndef __CONFIG_H__ #define __CONFIG_H__ +#include "config/top.h" +]) + mkdir -p config + cat > config/top.h.stamp </dev/null 2>&1 || mv config/top.h.stamp config/top.h + rm -f config/top.h.stamp + + AH_BOTTOM([ #if defined(__cplusplus) # include CSTDINT_H diff --git a/m4/pandora_optimize.m4 b/m4/pandora_optimize.m4 index 17b636bf..65f9cdc8 100644 --- a/m4/pandora_optimize.m4 +++ b/m4/pandora_optimize.m4 @@ -51,7 +51,7 @@ AC_DEFUN([PANDORA_OPTIMIZE],[ CXX="${CXX} -xlang=c99" AM_CFLAGS="-g -mt -xstrconst -Xa ${AM_CFLAGS}" - AM_CXXFLAGS="-mt -compat=5 -library=stlport4 -template=no%extdef ${AM_CXXFLAGS}" + AM_CXXFLAGS="-mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${AM_CXXFLAGS}" DEBUG_CXXFLAGS="-g" diff --git a/m4/pandora_platform.m4 b/m4/pandora_platform.m4 index 678b51ea..4e54562d 100644 --- a/m4/pandora_platform.m4 +++ b/m4/pandora_platform.m4 @@ -74,4 +74,12 @@ AC_DEFUN([PANDORA_PLATFORM],[ [Cause Sun Studio to not be quite so strict with standards conflicts]) ]) + AS_IF([test "x$TARGET_OSX" = "xtrue"],[ + AS_IF([test "x$ac_enable_fat_binaries" = "xyes"],[ + AM_CFLAGS="-arch i386 -arch x86_64 -arch ppc" + AM_CXXFLAGS="-arch i386 -arch x86_64 -arch ppc" + AM_LDFLAGS="-arch i386 -arch x86_64 -arch ppc" + ]) + ]) + ]) diff --git a/m4/visibility.m4 b/m4/pandora_visibility.m4 similarity index 89% rename from m4/visibility.m4 rename to m4/pandora_visibility.m4 index 70bca564..cb68644d 100644 --- a/m4/visibility.m4 +++ b/m4/pandora_visibility.m4 @@ -1,5 +1,5 @@ -# visibility.m4 serial 2 (gettext-0.18) dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc. +dnl Copyright (C) 2009 Monty Taylor dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -20,12 +20,13 @@ dnl "really only recommended for legacy code". dnl Set the variable CFLAG_VISIBILITY. dnl Defines and sets the variable HAVE_VISIBILITY. -AC_DEFUN([gl_VISIBILITY], +AC_DEFUN([PANDORA_VISIBILITY], [ AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([PANDORA_PLATFORM]) CFLAG_VISIBILITY= HAVE_VISIBILITY=0 - if test -n "$GCC"; then + AS_IF([test -n "$GCC"],[ AC_MSG_CHECKING([for simple visibility declarations]) AC_CACHE_VAL([gl_cv_cc_visibility], [ gl_save_CFLAGS="$CFLAGS" @@ -44,7 +45,11 @@ AC_DEFUN([gl_VISIBILITY], CFLAG_VISIBILITY="-fvisibility=hidden" HAVE_VISIBILITY=1 fi - fi + ]) + AS_IF([test "x$SUNCC" = "xyes"],[ + CFLAG_VISIBILITY="-xldscope=hidden" + HAVE_VISIBILITY=1 + ]) AC_SUBST([CFLAG_VISIBILITY]) AC_SUBST([HAVE_VISIBILITY]) AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], diff --git a/m4/pandora_warnings.m4 b/m4/pandora_warnings.m4 index b26b860e..eb0f7b4c 100644 --- a/m4/pandora_warnings.m4 +++ b/m4/pandora_warnings.m4 @@ -329,8 +329,8 @@ inline const EnumDescriptor* GetEnumDescriptor() { CXX_WARNINGS_FULL="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint" ]) - CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}" - CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL}" + CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL} ${CFLAG_VISIBILITY}" + CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL} ${CFLAG_VISIBILITY}" PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit" NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED" NO_WERROR="-errwarn=%none" diff --git a/m4/pandora_with_python.m4 b/m4/pandora_with_python.m4 index 348e7edd..5b28c8ed 100644 --- a/m4/pandora_with_python.m4 +++ b/m4/pandora_with_python.m4 @@ -15,8 +15,12 @@ AC_DEFUN([PANDORA_WITH_PYTHON], [ AC_ARG_WITH([python], [AS_HELP_STRING([--with-python], [Build Python Bindings @<:@default=yes@:>@])], - [with_python=$withval], - [with_python=yes]) + [with_python=$withval + python_requested=$withval + ], + [with_python=yes + python_requested=no + ]) AS_IF([test "x$with_python" != "xno"],[ AS_IF([test "x$with_python" != "xyes"],[PYTHON=$with_python]) @@ -24,5 +28,10 @@ AC_DEFUN([PANDORA_WITH_PYTHON], [ AC_PYTHON_DEVEL() AS_IF([test "x$pythonexists" = "xno"],[with_python="no"]) ]) + AS_IF([test "x$with_python" = "xno" -a "$python_requested" = "yes"],[ + AC_MSG_ERROR([Python support was explicity requested, but Python support + was not found. Please correct your build environment and try + again]) + ]) AM_CONDITIONAL(BUILD_PYTHON, [test "$with_python" = "yes"]) ]) diff --git a/m4/pandora_with_python3.m4 b/m4/pandora_with_python3.m4 index 4ad67a9b..0119ed94 100644 --- a/m4/pandora_with_python3.m4 +++ b/m4/pandora_with_python3.m4 @@ -17,7 +17,7 @@ AC_DEFUN([PANDORA_WITH_PYTHON3], [ [AS_HELP_STRING([--with-python3], [Build Python3 Bindings @<:@default=yes@:>@])],[ with_python3=$withval - python3_requested=yes + python3_requested=$withval ],[ with_python3=yes python3_requested=no -- 2.30.2