From: Brian Aker Date: Thu, 11 Oct 2012 06:34:58 +0000 (-0400) Subject: Remove dead pandora files. X-Git-Tag: 1.0.13~6^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=f1ed1535de64141a6a911cc18a9109f0f9c55c80;p=m6w6%2Flibmemcached Remove dead pandora files. --- diff --git a/configure.ac b/configure.ac index ee2d417c..98c29e89 100644 --- a/configure.ac +++ b/configure.ac @@ -45,8 +45,10 @@ AC_SUBST(HASHKIT_LIBRARY_VERSION) LT_PREREQ([2.2]) LT_INIT LT_LANG([C++]) + +AX_PLATFORM + gl_VISIBILITY -PANDORA_PLATFORM m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AX_CXX_HEADER_STDCXX_98 @@ -196,12 +198,12 @@ AC_CHECK_LIB([rt], [clock_gettime], [ ]) # Check for the ability to call dlopen -AC_CHECK_LIB([dl], [dlopen],[ +AC_CHECK_LIB([dl], [dlopen], [ DL_LIB="-ldl" - AC_SUBST(DL_LIB) - AC_DEFINE([HAVE_LIBDL], [ 1 ], [Have dlopen]) + AC_SUBST([DL_LIB]) + AC_DEFINE([HAVE_LIBDL],[1],[Have dlopen]) ],[ - AC_DEFINE([HAVE_LIBDL], [ 0 ], [Have dlopen]) + AC_DEFINE([HAVE_LIBDL], [0], [Have dlopen]) ]) AC_CHECK_LIB([m], [floor]) @@ -209,8 +211,8 @@ AC_CHECK_FUNCS([sigignore]) AC_CHECK_HEADERS([atomic.h]) AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[ - AC_CHECK_FUNCS(atomic_add_64) - AC_CHECK_FUNCS(atomic_add_32) + AC_CHECK_FUNCS([atomic_add_64]) + AC_CHECK_FUNCS([atomic_add_32]) AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],[ AC_DEFINE([USE_ATOMIC_H], [1], @@ -232,8 +234,8 @@ dnl If you want to add support for other platforms you should check for dnl your requirements, define HAVE_DROP_PRIVILEGES, and make sure you add dnl the source file containing the implementation into memcached_SOURCE dnl in Makefile.am -AC_CHECK_FUNCS(setppriv, [ - AC_CHECK_HEADER(priv.h, [ +AC_CHECK_FUNCS([setppriv], [ + AC_CHECK_HEADER([priv.h], [ AC_DEFINE([HAVE_DROP_PRIVILEGES], 1, [Define this if you have an implementation of drop_privileges()]) build_solaris_privs=yes diff --git a/m4/ax_platform.m4 b/m4/ax_platform.m4 new file mode 100644 index 00000000..c1403b8c --- /dev/null +++ b/m4/ax_platform.m4 @@ -0,0 +1,66 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PLATFORM +# +# DESCRIPTION +# +# Provide target and host defines. +# +# LICENSE +# +# Copyright (c) 2012 Brian Aker +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 1 + AC_DEFUN([AX_PLATFORM],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_CANONICAL_TARGET]) + + AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System]) + AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System]) + AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System]) + + AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System]) + AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System]) + AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System]) + + AS_CASE([$target_os],[ + *mingw32*],[ + AC_DEFINE([TARGET_OS_WINDOWS], [1], [Whether we are building for Windows]) + AC_DEFINE([WINVER], [WindowsXP], [Version of Windows]) + AC_DEFINE([_WIN32_WINNT], [0x0501], [Magical number to make things work]) + AC_DEFINE([EAI_SYSTEM], [11], [Another magical number]) + AH_BOTTOM([ +#ifndef HAVE_SYS_SOCKET_H +# define SHUT_RD SD_RECEIVE +# define SHUT_WR SD_SEND +# define SHUT_RDWR SD_BOTH +#endif + ]) + ],[ + *freebsd*],[ + AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD]) + AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers]) + ],[ + *solaris*],[ + AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) + ],[ + *darwin*],[ + AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX]) + ],[ + *linux*],[ + AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) + ]) + + AM_CONDITIONAL(BUILD_WIN32, [test "x${TARGET_WINDOWS}" = "xtrue"]) + AM_CONDITIONAL(TARGET_OSX, [test "x${TARGET_OSX}" = "xtrue"]) + AM_CONDITIONAL(TARGET_LINUX, [test "x${TARGET_LINUX}" = "xtrue"]) + ]) diff --git a/m4/pandora_64bit.m4 b/m4/pandora_64bit.m4 deleted file mode 100644 index 5d9983b8..00000000 --- a/m4/pandora_64bit.m4 +++ /dev/null @@ -1,60 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystems, Inc. -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl --------------------------------------------------------------------------- -dnl Macro: PANDORA_64BIT -dnl --------------------------------------------------------------------------- -AC_DEFUN([PANDORA_64BIT],[ - AC_BEFORE([$0], [AC_LIB_PREFIX]) - - AC_ARG_ENABLE([64bit], - [AS_HELP_STRING([--disable-64bit], - [Build 64 bit binary @<:@default=on@:>@])], - [ac_enable_64bit="$enableval"], - [ac_enable_64bit="yes"]) - - AC_CHECK_PROGS(ISAINFO, [isainfo], [no]) - AS_IF([test "x$ISAINFO" != "xno"], - [isainfo_b=`${ISAINFO} -b`], - [isainfo_b="x"]) - - AS_IF([test "$isainfo_b" != "x" -a "$isainfo_b" != "32"],[ - - isainfo_k=`${ISAINFO} -k` - DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}" - - AS_IF([test "x$ac_enable_64bit" = "xyes"],[ - - AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ - LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}" - ]) - - AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ - dnl The user hasn't overridden the default libdir, so we'll - dnl the dir suffix to match solaris 32/64-bit policy - libdir="${libdir}/${isainfo_k}" - ]) - - AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[ - CFLAGS="${CFLAGS} -m64" - ac_cv_env_CFLAGS_set=set - ac_cv_env_CFLAGS_value='-m64' - ]) - AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ - CXXFLAGS="${CXXFLAGS} -m64" - ac_cv_env_CXXFLAGS_set=set - ac_cv_env_CXXFLAGS_value='-m64' - ]) - - AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[ - AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}" - AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}" - ]) - ]) - ]) -]) -dnl --------------------------------------------------------------------------- -dnl End Macro: PANDORA_64BIT -dnl --------------------------------------------------------------------------- diff --git a/m4/pandora_check_compiler_version.m4 b/m4/pandora_check_compiler_version.m4 deleted file mode 100644 index f490ef27..00000000 --- a/m4/pandora_check_compiler_version.m4 +++ /dev/null @@ -1,41 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystems, Inc. -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - - -AC_DEFUN([PANDORA_CHECK_C_VERSION],[ - - dnl Print version of C compiler - AC_MSG_CHECKING("C Compiler version--$GCC") - AS_IF([test "$GCC" = "yes"],[ - CC_VERSION=`$CC --version | sed 1q` ],[ - test "$SUNCC" = "yes"],[ - CC_VERSION=`$CC -V 2>&1 | sed 1q` ],[ - test "$CLANG" = "yes"],[ - CC_VERSION=`$CC --version 2>&1 | sed 1q` ],[ - CC_VERSION="" - ]) - AC_MSG_RESULT("$CC_VERSION") - AC_SUBST(CC_VERSION) - ]) - - -AC_DEFUN([PANDORA_CHECK_CXX_VERSION], [ - - dnl Check C version while at it - AC_REQUIRE([PANDORA_CHECK_C_VERSION]) - - dnl Print version of CXX compiler - AC_MSG_CHECKING("C++ Compiler version") - AS_IF([test "$GCC" = "yes"],[ - CXX_VERSION=`$CXX --version | sed 1q` ],[ - test "$SUNCC" = "yes"],[ - CXX_VERSION=`$CXX -V 2>&1 | sed 1q` ],[ - test "$CLANG" = "yes"],[ - CXX_VERSION=`$CXX --version 2>&1 | sed 1q` ],[ - CXX_VERSION="" - ]) - AC_MSG_RESULT("$CXX_VERSION") -AC_SUBST(CXX_VERSION) - ]) diff --git a/m4/pandora_ensure_gcc_version.m4 b/m4/pandora_ensure_gcc_version.m4 deleted file mode 100644 index 9d2f65d3..00000000 --- a/m4/pandora_ensure_gcc_version.m4 +++ /dev/null @@ -1,62 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystems, Inc. -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([_PANDORA_TRY_GCC],[ - pushdef([Name],[translit([$1],[./-], [___])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - AC_CHECK_PROGS([CC]NAME,[gcc$1]) - AC_CHECK_PROGS([CXX]NAME,[g++$1]) - AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CC_set}" = "x"], - [CC="${CC]NAME[}"]) - AS_IF([test "x${CXX]NAME[}" != "x" -a "x${ac_cv_env_CCX_set}" = "x"], - [CXX="${CXX]NAME[}"]) - AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CPP_set}" = "x"], - [CPP="${CC]NAME[} -E"]) -]) - -dnl If the user is on a Mac and didn't ask for a specific compiler -dnl You're gonna get 4.2. -AC_DEFUN([PANDORA_MAC_GCC42], - [AS_IF([test "$GCC" = "yes"],[ - AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[ - host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'` - AS_IF([test "$host_os_version" -lt 10],[ - _PANDORA_TRY_GCC([-4.2]) - ]) - ]) - ]) -]) - -dnl If the user is on CentOS or RHEL and didn't ask for a specific compiler -dnl You're gonna get 4.4 (forward compatible with 4.5) -AC_DEFUN([PANDORA_RH_GCC44], - [AS_IF([test "$GCC" = "yes"],[ - AS_IF([test "x${ac_cv_env_CC_set}" = "x"],[ - _PANDORA_TRY_GCC([44]) - _PANDORA_TRY_GCC([45]) - ]) - ]) -]) - -dnl -AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[ - AC_REQUIRE([PANDORA_MAC_GCC42]) - AC_REQUIRE([PANDORA_RH_GCC44]) - AS_IF([test "$GCC" = "yes"],[ - AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 2)) -# error GCC is Too Old! -#endif - ]])], - [ac_cv_gcc_recent=yes], - [ac_cv_gcc_recent=no])]) - AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"], - AC_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required on OSX. You may need to install a version of XCode >= 3.1.2])) - AS_IF([test "$ac_cv_gcc_recent" = "no"], - AC_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required. On RHEL/CentOS systems this is found in the gcc44 and gcc44-c++ packages.])) - ]) -]) diff --git a/m4/pandora_extensions.m4 b/m4/pandora_extensions.m4 deleted file mode 100644 index b2720eff..00000000 --- a/m4/pandora_extensions.m4 +++ /dev/null @@ -1,16 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystems, Inc. -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([PANDORA_EXTENSIONS],[ - - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - -]) - -AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],[ - AC_REQUIRE([PANDORA_EXTENSIONS]) -]) diff --git a/m4/pandora_have_better_malloc.m4 b/m4/pandora_have_better_malloc.m4 deleted file mode 100644 index c984cbaf..00000000 --- a/m4/pandora_have_better_malloc.m4 +++ /dev/null @@ -1,66 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystems, Inc. -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[ - AC_REQUIRE([AC_LIB_PREFIX]) - - AC_ARG_ENABLE([umem], - [AS_HELP_STRING([--enable-umem], - [Enable linking with libumem @<:@default=off@:>@])], - [ac_enable_umem="$enableval"],[ - case "$target_os" in - *solaris*) - ac_enable_umem="yes" - ;; - *) - ac_enable_umem="no" - ;; - esac - ]) - - AC_ARG_ENABLE([tcmalloc], - [AS_HELP_STRING([--enable-tcmalloc], - [Enable linking with tcmalloc @<:@default=off@:>@])], - [ac_enable_tcmalloc="$enableval"], - [ac_enable_tcmalloc="no"]) - - AC_ARG_ENABLE([mtmalloc], - [AS_HELP_STRING([--disable-mtmalloc], - [Enable linking with mtmalloc @<:@default=on@:>@])], - [ac_enable_mtmalloc="$enableval"], - [ac_enable_mtmalloc="yes"]) - - save_LIBS="${LIBS}" - LIBS= - AS_IF([test "x$ac_enable_umem" = "xyes"],[ - AC_CHECK_LIB(umem,malloc,[],[]) - ],[ - case "$target_os" in - *linux*) - AS_IF([test "x$ac_enable_tcmalloc" != "xno"],[ - AC_CHECK_LIB(tcmalloc-minimal,malloc,[],[]) - AS_IF([test "x$ac_cv_lib_tcmalloc_minimal_malloc" != "xyes"],[ - AC_CHECK_LIB(tcmalloc,malloc,[],[]) - ]) - ]) - ;; - *solaris*) - AS_IF([test "x$ac_enable_mtmalloc" != "xno"],[ - AC_CHECK_LIB(mtmalloc,malloc,[],[]) - ]) - ;; - esac - ]) - BETTER_MALLOC_LIBS="${LIBS}" - LIBS="${save_LIBS}" - AC_SUBST([BETTER_MALLOC_LIBS]) - -]) - -AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[ - AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC]) - LIBS="${LIBS} ${BETTER_MALLOC_LIBS}" -]) - diff --git a/m4/pandora_optimize.m4 b/m4/pandora_optimize.m4 deleted file mode 100644 index dcee0648..00000000 --- a/m4/pandora_optimize.m4 +++ /dev/null @@ -1,73 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystems, Inc. -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([PANDORA_OPTIMIZE],[ - dnl Build optimized or debug version ? - dnl First check for gcc and g++ - AS_IF([test "$GCC" = "yes" -a "$INTELCC" = "no"],[ - - dnl The following is required for portable results of floating point - dnl calculations on PowerPC. The same must also be done for IA-64, but - dnl this options is missing in the IA-64 gcc backend. - case "$target_cpu" in - *ppc* | *powerpc*) - AM_CFLAGS="-mno-fused-madd ${AM_CFLAGS}" - AM_CXXFLAGS="-mno-fused-madd ${AM_CXXFLAGS}" - ;; - esac - - AM_CPPFLAGS="-ggdb ${AM_CPPFLAGS}" - - DEBUG_CFLAGS="-O0" - DEBUG_CXXFLAGS="-O0" - - OPTIMIZE_CFLAGS="-O2" - OPTIMIZE_CXXFLAGS="-O2" - ]) - AS_IF([test "$INTELCC" = "yes"],[ - AM_CPPFLAGS="-g ${AM_CPPFLAGS}" - - DEBUG_CFLAGS="-O0" - DEBUG_CXXFLAGS="-O0" - - OPTIMIZE_CFLAGS="-xHOST -O2 -no-prec-div -static" - OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}" - - ]) - AS_IF([test "$SUNCC" = "yes"],[ - dnl Once we can use a modern autoconf, we can replace the -xc99=all here - dnl with using AC_CC_STD_C99 above - CC="${CC} -xc99=all" - CXX="${CXX} -xlang=c99" - - AM_CFLAGS="-g -mt -xstrconst -Xa ${AM_CFLAGS}" - AM_CXXFLAGS="-mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${AM_CXXFLAGS}" - - DEBUG_CXXFLAGS="-g" - - dnl TODO: Make a test for -xO4 usability here - OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend -xbuiltin" - OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS}" - OPTIMIZE_CXXFLAGS="-g0 ${OPTIMIZE_FLAGS}" - - ]) - - AC_ARG_WITH([debug], - [AS_HELP_STRING([--with-debug], - [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])], - [with_debug=$withval], - [with_debug=no]) - AS_IF([test "$with_debug" = "yes"],[ - # Debugging. No optimization. - AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG" - AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG" - AC_DEFINE(DEBUG, [ 1 ], [Define to 1 to enable debugging code.]) - ],[ - # Optimized version. No debug - AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}" - AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}" - AC_DEFINE(DEBUG, [ 0 ], [Define to 1 to enable debugging code.]) - ]) -]) diff --git a/m4/pandora_platform.m4 b/m4/pandora_platform.m4 deleted file mode 100644 index 2372e0d6..00000000 --- a/m4/pandora_platform.m4 +++ /dev/null @@ -1,122 +0,0 @@ -dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- -dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: -dnl -dnl pandora-build: A pedantic build system -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystems -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl From Monty Taylor - -AC_DEFUN([PANDORA_PLATFORM],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_CANONICAL_TARGET]) - - dnl Canonicalize the configuration name. - - AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System]) - AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System]) - AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System]) - - AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System]) - AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System]) - AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System]) - - - case "$host_os" in - *solaris*) - AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ - CPPFLAGS="${CPPFLAGS} -I/usr/local/include" - ]) - - AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ - LDFLAGS="${LDFLAGS} -L/usr/local/lib" - ]) - ;; - *freebsd*) - AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ - CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include" - ]) - - AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ - LDFLAGS="${LDFLAGS} -L/usr/local/lib" - ]) - ;; - esac - - PANDORA_OPTIMIZE_BITFIELD=1 - - case "$target_os" in - *linux*) - TARGET_LINUX="true" - AC_SUBST(TARGET_LINUX) - AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) - ;; - *darwin*) - TARGET_OSX="true" - AC_SUBST(TARGET_OSX) - AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX]) - ;; - *solaris*) - TARGET_SOLARIS="true" - PANDORA_OPTIMIZE_BITFIELD=0 - AS_IF([test "x${USE_NLS}" = "xyes"],[LIBS="${LIBS} -lintl"]) - AC_SUBST(TARGET_SOLARIS) - AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) - ;; - *freebsd*) - TARGET_FREEBSD="true" - AC_SUBST(TARGET_FREEBSD) - AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD]) - AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers]) - ;; - *mingw32*) - TARGET_WINDOWS="true" - AC_SUBST(TARGET_WINDOWS) - AC_DEFINE([TARGET_OS_WINDOWS], [1], [Whether we are building for Windows]) - AC_DEFINE([WINVER], [WindowsXP], [Version of Windows]) - AC_DEFINE([_WIN32_WINNT], [0x0501], [Magical number to make things work]) - AC_DEFINE([EAI_SYSTEM], [11], [Another magical number]) - AH_BOTTOM([ -#ifndef HAVE_SYS_SOCKET_H -# define SHUT_RD SD_RECEIVE -# define SHUT_WR SD_SEND -# define SHUT_RDWR SD_BOTH -#endif - ]) - - LIBS="$LIBS -lwsock32 -lws2_32" - AM_CFLAGS="${AM_CFLAGS} -I\${top_srcdir}/win32/mingw -I\${top_builddir}/win32/mingw -I\${top_srcdir}/win32 -I\${top_builddir}/win32" - ;; - esac - AM_CONDITIONAL(BUILD_WIN32, [test "x${TARGET_WINDOWS}" = "xtrue"]) - AM_CONDITIONAL(TARGET_OSX, [test "x${TARGET_OSX}" = "xtrue"]) - AM_CONDITIONAL(TARGET_LINUX, [test "x${TARGET_LINUX}" = "xtrue"]) - - AC_SUBST(PANDORA_OPTIMIZE_BITFIELD) - - AC_CHECK_DECL([__clang__], [CLANG="yes"], [CLANG="no"]) - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) - AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) - - AS_IF([test "$INTELCC" = "yes"], [enable_rpath=no]) - - dnl By default, Sun Studio grabs special versions of limits.h and string.h - dnl when you use and . By setting this define, we can - dnl disable that and cause those to wrap the standard headers instead. - dnl http://www.stlport.com/doc/configure.html - AS_IF([test "$SUNCC" = "yes"],[ - AC_DEFINE([_STLP_NO_NEW_C_HEADERS],[1], - [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_stack_direction.m4 b/m4/pandora_stack_direction.m4 deleted file mode 100644 index 635586a5..00000000 --- a/m4/pandora_stack_direction.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems -dnl This file is free software; Sun Microsystems -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -#-------------------------------------------------------------------- -# Check what direction the stack runs in -#-------------------------------------------------------------------- - -AC_DEFUN([PANDORA_STACK_DIRECTION],[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - AC_CACHE_CHECK([stack direction], [ac_cv_c_stack_direction],[ - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include - int find_stack_direction () - { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; - } - ]],[[ - exit (find_stack_direction() < 0); - ]])],[ - ac_cv_c_stack_direction=1 - ],[ - ac_cv_c_stack_direction=-1 - ]) - ]) - AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) -]) - - - diff --git a/m4/pandora_swig.m4 b/m4/pandora_swig.m4 deleted file mode 100644 index 89f12dd6..00000000 --- a/m4/pandora_swig.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- -dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: -dnl -dnl pandora-build: A pedantic build system -dnl Copyright (C) 2009 Sun Microsystems, Inc. -dnl This file is free software; Sun Microsystem -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl From Monty Taylor - -AC_DEFUN([PANDORA_SWIG],[ - - AC_PROG_SWIG(1.3.31) - - AC_DEFINE_UNQUOTED([SWIG_TYPE_TABLE], - [$PACKAGE], - [Type Table name for SWIG symbol table]) - - dnl Have to hard-code /usr/local/include and /usr/include into the path. - dnl I hate this. Why is swig sucking me - SWIG="$SWIG \${DEFS} -I\${top_srcdir} -I\${top_builddir} -I/usr/local/include -I/usr/include" - AC_SUBST([SWIG]) - - -]) - -AC_DEFUN([PANDORA_SWIG_PYTHON3],[ - AC_REQUIRE([PANDORA_SWIG]) - AS_IF([test "x$SWIG" != "x"],[ - AC_CACHE_CHECK([if swig supports Python3], - [ac_cv_swig_has_python3_], - [ - AS_IF([$SWIG -python -help 2>&1 | grep py3 > /dev/null], - [ac_cv_swig_has_python3_=yes], - [ac_cv_swig_has_python3_=no]) - ]) - ]) -])