From: Monty Taylor Date: Sat, 2 Jan 2010 04:59:12 +0000 (-0800) Subject: Updated pandora-build. X-Git-Tag: 0.37~32^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=67963332cea8f21f2134da6e72fdb7a696cb1ac9;p=awesomized%2Flibmemcached Updated pandora-build. --- 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/pandora_visibility.m4 b/m4/pandora_visibility.m4 new file mode 100644 index 00000000..cb68644d --- /dev/null +++ b/m4/pandora_visibility.m4 @@ -0,0 +1,57 @@ +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. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl MacOS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN([PANDORA_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([PANDORA_PLATFORM]) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + AS_IF([test -n "$GCC"],[ + AC_MSG_CHECKING([for simple visibility declarations]) + AC_CACHE_VAL([gl_cv_cc_visibility], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + AC_TRY_COMPILE( + [extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void);], + [], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_visibility]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + 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], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) 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 diff --git a/m4/visibility.m4 b/m4/visibility.m4 deleted file mode 100644 index 70bca564..00000000 --- a/m4/visibility.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# visibility.m4 serial 2 (gettext-0.18) -dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc. -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. - -dnl From Bruno Haible. - -dnl Tests whether the compiler supports the command-line option -dnl -fvisibility=hidden and the function and variable attributes -dnl __attribute__((__visibility__("hidden"))) and -dnl __attribute__((__visibility__("default"))). -dnl Does *not* test for __visibility__("protected") - which has tricky -dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -dnl MacOS X. -dnl Does *not* test for __visibility__("internal") - which has processor -dnl dependent semantics. -dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -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_REQUIRE([AC_PROG_CC]) - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL([gl_cv_cc_visibility], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - AC_TRY_COMPILE( - [extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void);], - [], - [gl_cv_cc_visibility=yes], - [gl_cv_cc_visibility=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - AC_SUBST([CFLAG_VISIBILITY]) - AC_SUBST([HAVE_VISIBILITY]) - AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], - [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -])