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
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}"
])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_CPPFLAGS])
+ AC_SUBST([AM_LDFLAGS])
])
#ifndef __CONFIG_H__
#define __CONFIG_H__
+#include "config/top.h"
+])
+ mkdir -p config
+ cat > config/top.h.stamp <<EOF_CONFIG_TOP
+
#if defined(i386) && !defined(__i386__)
#define __i386__
#endif
- ])
+#if defined(_FILE_OFFSET_BITS)
+# undef _FILE_OFFSET_BITS
+#endif
+EOF_CONFIG_TOP
+ diff config/top.h.stamp config/top.h >/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
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"
[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"
+ ])
+ ])
+
])
--- /dev/null
+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.])
+])
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"
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])
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"])
])
[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
+++ /dev/null
-# 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.])
-])