From: Brian Aker Date: Sat, 6 Oct 2012 23:35:12 +0000 (-0400) Subject: Remove another chunck of Pandora. X-Git-Tag: 1.0.12~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=8e04e2a97ba16fce9ebf7d47a944de2dc40ba453;p=m6w6%2Flibmemcached Remove another chunck of Pandora. --- diff --git a/configure.ac b/configure.ac index 3827735a..dc7b8ca7 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,3 @@ -#!/usr/bin/env bash # LibmemcacheD # Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ # Copyright (C) 2006-2010 Brian Aker, Monty Taylor, Trond Norbye @@ -8,28 +7,20 @@ # the COPYING file in this directory for full text. AC_INIT([libmemcached],[1.0.12],[http://libmemcached.org/]) - AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_TARGET +AC_ARG_PROGRAM +AC_USE_SYSTEM_EXTENSIONS -AM_INIT_AUTOMAKE - -AC_CANONICAL_HOST -AC_CANONICAL_BUILD +AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar]) AC_PREREQ([2.61]) -AC_CONFIG_MACRO_DIR([m4]) - AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS. - AC_CONFIG_SRCDIR([libmemcached/memcached.cc]) -PANDORA_CANONICAL_TARGET -AC_CHECK_PROGS([YACC], ['bison'], [:]) -AC_CHECK_PROGS([LEX], ['flex'], [:]) - #shared library versioning MEMCACHED_UTIL_LIBRARY_VERSION=2:0:0 MEMCACHED_PROTOCAL_LIBRARY_VERSION=0:0:0 @@ -48,20 +39,20 @@ AC_SUBST(MEMCACHED_UTIL_LIBRARY_VERSION) AC_SUBST(MEMCACHED_PROTOCAL_LIBRARY_VERSION) AC_SUBST(MEMCACHED_LIBRARY_VERSION) - HASHKIT_LIBRARY_VERSION=2:0:0 AC_SUBST(HASHKIT_LIBRARY_VERSION) LT_PREREQ([2.2]) LT_INIT LT_LANG([C++]) -LT_LANG([C]) gl_VISIBILITY +PANDORA_PLATFORM +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AX_CXX_HEADER_STDCXX_98 - if test "$ax_cv_cxx_stdcxx_98" = no; then - AC_MSG_ERROR([Your system lacks a new enough C++ compiler]) - fi +AS_IF([ test "$ax_cv_cxx_stdcxx_98" = no ],[ + AC_MSG_ERROR([Your system lacks a new enough C++ compiler]) + ]) # Adding support for libtest m4_include([libtest/yatl.m4]) @@ -77,9 +68,6 @@ AC_DEFINE([HAVE_LIBMEMCACHED], [1], [Enables libmemcached Support]) AM_CONDITIONAL([BUILDING_GEARMAN], [false]) -AC_SEARCH_LIBS(getopt_long, gnugetopt) -AC_SEARCH_LIBS(gethostbyname, nsl) - dnl Specialty checks AX_CXX_CINTTYPES CONFIG_EXTRA @@ -93,18 +81,45 @@ PROTOCOL_BINARY_TEST ENABLE_DEPRECATED # Checks for programs. +AC_CHECK_PROGS([LEX], ['flex'], [:]) +AC_CHECK_PROGS([YACC], ['bison'], [:]) AX_PROG_SPHINX_BUILD # Checks for libraries. +AC_SEARCH_LIBS(getopt_long, gnugetopt) +AC_SEARCH_LIBS(gethostbyname, nsl) # Checks for header files. +AC_CHECK_HEADERS([arpa/inet.h]) +AC_CHECK_HEADERS([errno.h]) +AC_CHECK_HEADERS([dlfcn.h]) +AC_CHECK_HEADERS([execinfo.h]) +AC_CHECK_HEADERS([fcntl.h]) +AC_CHECK_HEADERS([inttypes.h]) +AC_CHECK_HEADERS([libintl.h]) +AC_CHECK_HEADERS([limits.h]) +AC_CHECK_HEADERS([malloc.h]) +AC_CHECK_HEADERS([math.h]) +AC_CHECK_HEADERS([netdb.h]) +AC_CHECK_HEADERS([netinet/in.h]) +AC_CHECK_HEADERS([netinet/tcp.h]) +AC_CHECK_HEADERS([pthread.h]) +AC_CHECK_HEADERS([stdarg.h]) +AC_CHECK_HEADERS([stddef.h]) +AC_CHECK_HEADERS([stdio.h]) +AC_CHECK_HEADERS([stdlib.h]) +AC_CHECK_HEADERS([sys/socket.h]) +AC_CHECK_HEADERS([sys/sysctl.h]) +AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_HEADERS([time.h]) +AC_CHECK_HEADERS([unistd.h]) +AC_HEADER_TIME # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_CHECK_FUNCS([alarm]) -AC_CHECK_FUNCS([clock_gettime]) AC_CHECK_FUNCS([dup2]) AC_CHECK_FUNCS([getline]) AC_CHECK_FUNCS([gettimeofday]) @@ -123,29 +138,12 @@ AC_CHECK_FUNCS([strerror]) AC_CHECK_FUNCS([strtol]) AC_CHECK_FUNCS([strtoul]) AC_CHECK_FUNCS([strtoull]) - -AC_CHECK_HEADERS([arpa/inet.h]) -AC_CHECK_HEADERS([errno.h]) -AC_CHECK_HEADERS([execinfo.h]) -AC_CHECK_HEADERS([fcntl.h]) -AC_CHECK_HEADERS([inttypes.h]) -AC_CHECK_HEADERS([libintl.h]) -AC_CHECK_HEADERS([limits.h]) -AC_CHECK_HEADERS([malloc.h]) -AC_CHECK_HEADERS([math.h]) -AC_CHECK_HEADERS([netdb.h]) -AC_CHECK_HEADERS([netinet/in.h]) -AC_CHECK_HEADERS([pthread.h]) -AC_CHECK_HEADERS([stdarg.h]) -AC_CHECK_HEADERS([stddef.h]) -AC_CHECK_HEADERS([stdlib.h]) -AC_CHECK_HEADERS([sys/time.h]) -AC_CHECK_HEADERS([unistd.h]) -AC_CHECK_HEADERS([cxxabi.h], - AC_DEFINE([HAVE_CXXABI_H], [1], [Have cxxabi.h]), - AC_DEFINE([HAVE_CXXABI_H], [0], [Have cxxabi.h])) - -AC_CHECK_HEADERS([sys/sysctl.h]) +AC_FUNC_ALLOCA +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_FUNC_STRERROR_R AC_CHECK_HEADER(umem.h, [ AC_DEFINE([HAVE_UMEM_H], 1, @@ -157,12 +155,6 @@ AM_CONDITIONAL([BUILD_CACHE], [test "x$build_cache" = "xyes"]) AX_COMPILER_VENDOR -AC_FUNC_ALLOCA -AC_FUNC_ERROR_AT_LINE -AC_FUNC_FORK -AC_FUNC_MALLOC -AC_FUNC_REALLOC -AC_FUNC_STRERROR_R AC_HEADER_STDBOOL AC_TYPE_INT16_T AC_TYPE_INT32_T @@ -194,16 +186,23 @@ AS_IF([test "x$ac_enable_sasl" = "xyes"], [ ],[ LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0" ]) AC_SUBST(LIBMEMCACHED_WITH_SASL_SUPPORT) -AC_CHECK_LIB([rt], [clock_gettime], - [ +AC_CHECK_LIB([rt], [clock_gettime], [ RT_LIB="-lrt" AC_SUBST(RT_LIB) - AC_DEFINE([HAVE_LIBRT], [ 1 ], [Have clock_gettime]) - ], - [ - AC_DEFINE([HAVE_LIBRT], [ 0 ], [Have clock_gettime]) + AC_DEFINE([HAVE_CLOCK_GETTIME], [ 1 ], [Have clock_gettime]) + ],[ + AC_DEFINE([HAVE_CLOCK_GETTIME], [ 0 ], [Have clock_gettime]) ]) +# Check for the ability to call dlopen +AC_CHECK_LIB([dl], [dlopen],[ + DL_LIB="-ldl" + AC_SUBST(DL_LIB) + AC_DEFINE([HAVE_LIBDL], [ 1 ], [Have dlopen]) + ],[ + AC_DEFINE([HAVE_LIBDL], [ 0 ], [Have dlopen]) + ]) + AC_CHECK_LIB([m], [floor]) AC_CHECK_FUNCS([sigignore]) @@ -261,6 +260,7 @@ AX_UUID_GENERATE_TIME_SAFE AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])]) AX_PTHREAD_TIMEDJOIN_NP +PANDORA_ENABLE_DTRACE AX_ENDIAN AX_HEX_VERSION AX_ASSERT diff --git a/libmemcached/backtrace.cc b/libmemcached/backtrace.cc index 871f27af..81cfddef 100644 --- a/libmemcached/backtrace.cc +++ b/libmemcached/backtrace.cc @@ -39,107 +39,64 @@ #include #include +#include #ifdef HAVE_EXECINFO_H -#include +# include #endif -#ifdef HAVE_CXXABI_H -#include +#ifdef HAVE_GCC_ABI_DEMANGLE +# include +#endif + +#ifdef HAVE_DLFCN_H +# include #endif #ifdef HAVE_GCC_ABI_DEMANGLE -#define USE_DEMANGLE 1 +# define USE_DEMANGLE 1 #else -#define USE_DEMANGLE 0 +# define USE_DEMANGLE 0 #endif +const int MAX_DEPTH= 50; + void custom_backtrace(void) { #ifdef HAVE_EXECINFO_H - void *array[50]; + void *array[MAX_DEPTH]; - int size= backtrace(array, 50); - char **strings= backtrace_symbols(array, size); + int backtrace_size= backtrace(array, MAX_DEPTH); + fprintf(stderr, "Number of stack frames obtained: %d\n", backtrace_size); - if (strings == NULL) - { - return; - } - - fprintf(stderr, "Number of stack frames obtained: %d\n", size); - - char *named_function= (char *)std::realloc(NULL, 1024); - - if (named_function == NULL) - { - std::free(strings); - return; - } +#ifdef HAVE_DLFCN_H + Dl_info dlinfo; +#endif - for (int x= 1; x < size; x++) - { - if (USE_DEMANGLE) + for (int x= 0; x < backtrace_size; ++x) + { +#ifdef HAVE_DLFCN_H + if (dladdr(array[x], &dlinfo) == 0) { - size_t sz= 200; - char *named_function_ptr= (char *)std::realloc(named_function, sz); - if (named_function_ptr == NULL) - { - continue; - } - named_function= named_function_ptr; + continue; + } +#endif - char *begin_name= 0; - char *begin_offset= 0; - char *end_offset= 0; + const char* symname= dlinfo.dli_sname; - for (char *j= strings[x]; *j; ++j) - { - if (*j == '(') - { - begin_name= j; - } - else if (*j == '+') - { - begin_offset= j; - } - else if (*j == ')' and begin_offset) - { - end_offset= j; - break; - } - } + int status; + char* demangled= abi::__cxa_demangle(symname, NULL, 0, &status); + if (status == 0 and demangled) + { + symname= demangled; + } - if (begin_name and begin_offset and end_offset and begin_name < begin_offset) - { - *begin_name++= '\0'; - *begin_offset++= '\0'; - *end_offset= '\0'; + printf("object: %s, function: %s\n", dlinfo.dli_fname, symname); - int status; - char *ret= abi::__cxa_demangle(begin_name, named_function, &sz, &status); - if (ret) // realloc()'ed string - { - named_function= ret; - fprintf(stderr, " %s : %s()+%s\n", strings[x], begin_name, begin_offset); - } - else - { - fprintf(stderr, " %s : %s()+%s\n", strings[x], begin_name, begin_offset); - } - } - else - { - fprintf(stderr, " %s\n", strings[x]); - } - } - else + if (demangled) { - fprintf(stderr, " unmangled: %s\n", strings[x]); + free(demangled); } - } - - std::free(named_function); - std::free(strings); + } #endif // HAVE_EXECINFO_H } diff --git a/libmemcached/common.h b/libmemcached/common.h index a3e4ea90..5c86eb16 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -45,28 +45,48 @@ #include #ifdef __cplusplus -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include #else -#include -#include -#include -#include -#include -#include +# ifdef HAVE_STDLIB_H +# include +# endif +# ifdef HAVE_STDLIB_H +# include +# endif +# include +# include +# ifdef HAVE_ERRNO_H +# include +# endif +# ifdef HAVE_LIMITS_H +# include +# endif #endif -#include -#include -#include +#ifdef HAVE_FCNTL_H +# include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_STRINGS_H -#include +# include +#endif + +#ifdef HAVE_DLFCN_H +# include #endif #include @@ -77,9 +97,9 @@ #include #ifdef HAVE_POLL_H -#include +# include #else -#include "poll/poll.h" +# include "poll/poll.h" #endif #ifdef __cplusplus diff --git a/libmemcached/include.am b/libmemcached/include.am index bfa2f140..13304e62 100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@ -115,6 +115,7 @@ libmemcached_libmemcached_la_DEPENDENCIES= libmemcached_libmemcached_la_LIBADD= libmemcached_libmemcached_la_LDFLAGS= libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION} +libmemcached_libmemcached_la_LDFLAGS+= $(DL_LIB) if HAVE_SASL libmemcached_libmemcached_la_CXXFLAGS+= $(LIBSASL_CPPFLAGS) diff --git a/libmemcached/io.cc b/libmemcached/io.cc index 866830aa..019eafb6 100644 --- a/libmemcached/io.cc +++ b/libmemcached/io.cc @@ -39,6 +39,10 @@ #include +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + void initialize_binary_request(org::libmemcached::Instance* server, protocol_binary_request_header& header) { server->request_id++; @@ -708,7 +712,7 @@ void memcached_io_close(org::libmemcached::Instance* ptr) } /* in case of death shutdown to avoid blocking at close() */ - if (shutdown(ptr->fd, SHUT_RDWR) == SOCKET_ERROR && get_socket_errno() != ENOTCONN) + if (shutdown(ptr->fd, SHUT_RDWR) == SOCKET_ERROR and get_socket_errno() != ENOTCONN) { WATCHPOINT_NUMBER(ptr->fd); WATCHPOINT_ERRNO(get_socket_errno()); diff --git a/libtest/include.am b/libtest/include.am index 3dd6982a..14ce1d20 100644 --- a/libtest/include.am +++ b/libtest/include.am @@ -136,6 +136,7 @@ libtest_libtest_la_CXXFLAGS+= $(CURL_CFLAGS) libtest_libtest_la_LIBADD+= $(PTHREAD_LIBS) libtest_libtest_la_LIBADD+= $(CURL_LIBS) +libtest_libtest_la_LIBADD+= $(RT_LIB) libtest_libtest_la_DEPENDENCIES+= libtest_tmp_dir libtest_libtest_la_DEPENDENCIES+=libtest/abort diff --git a/libtest/test.hpp b/libtest/test.hpp index 53db247a..76760487 100644 --- a/libtest/test.hpp +++ b/libtest/test.hpp @@ -42,6 +42,17 @@ #include #include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #include #include diff --git a/libtest/timer.hpp b/libtest/timer.hpp index 28ec4741..eac51940 100644 --- a/libtest/timer.hpp +++ b/libtest/timer.hpp @@ -44,6 +44,7 @@ # include # include #else +# include # include #endif @@ -122,8 +123,24 @@ private: mach_port_deallocate(mach_task_self(), _clock_serv); ts.tv_sec= _mach_timespec.tv_sec; ts.tv_nsec= _mach_timespec.tv_nsec; +#elif defined(HAVE_CLOCK_GETTIME) && HAVE_CLOCK_GETTIME + int ret; + do + { + ret= clock_gettime(CLOCK_REALTIME, &ts); + } while (ret == -1); +#elif defined(HAVE_GETTIMEOFDAY) && HAVE_GETTIMEOFDAY + struct timeval tv; + int ret; + do + { + ret= gettimeofday(&tv, NULL) + } while (ret == -1); + /* Convert from timeval to timespec */ + ts.tv_sec= tv.tv_sec; + ts.tv_nsec= tv.tv_usec * 1000; #else - clock_gettime(CLOCK_REALTIME, &ts); + memset(&ts, 0, sizeof(struct timespec)); #endif } diff --git a/m4/ax_debug.m4 b/m4/ax_debug.m4 index 2f78b711..41d3fa02 100644 --- a/m4/ax_debug.m4 +++ b/m4/ax_debug.m4 @@ -64,4 +64,5 @@ AC_DEFUN([AX_DEBUG],[ AC_MSG_CHECKING([for debug]) AC_MSG_RESULT([$ax_enable_debug]) + AM_CONDITIONAL([DEBUG_BUILD], [test "x$ax_enable_debug" = "xyes"]) ]) diff --git a/m4/pandora_canonical.m4 b/m4/pandora_canonical.m4 deleted file mode 100644 index a9e4fa78..00000000 --- a/m4/pandora_canonical.m4 +++ /dev/null @@ -1,175 +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 Which version of the canonical setup we're using -AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.175]) - -AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[ - AS_IF([test "x${prefix}" = "x"],[ - AC_MSG_ERROR([--prefix requires an argument]) - ]) -]) - -dnl The standard setup for how we build Pandora projects -AC_DEFUN([PANDORA_CANONICAL_TARGET],[ - ifdef([m4_define],,[define([m4_define], defn([define]))]) - ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))]) - m4_define([PCT_ALL_ARGS],[$*]) - m4_define([PCT_REQUIRE_CXX],[no]) - m4_define([PCT_FORCE_GCC42],[no]) - m4_define([PCT_DONT_SUPPRESS_INCLUDE],[no]) - m4_define([PCT_NO_VC_CHANGELOG],[no]) - m4_define([PCT_USE_VISIBILITY],[yes]) - m4_foreach([pct_arg],[$*],[ - m4_case(pct_arg, - [require-cxx], [ - m4_undefine([PCT_REQUIRE_CXX]) - m4_define([PCT_REQUIRE_CXX],[yes]) - ], - [force-gcc42], [ - m4_undefine([PCT_FORCE_GCC42]) - m4_define([PCT_FORCE_GCC42],[yes]) - ], - [skip-visibility], [ - m4_undefine([PCT_USE_VISIBILITY]) - m4_define([PCT_USE_VISIBILITY],[no]) - ], - [dont-suppress-include], [ - m4_undefine([PCT_DONT_SUPPRESS_INCLUDE]) - m4_define([PCT_DONT_SUPPRESS_INCLUDE],[yes]) - ]) - ]) - - PANDORA_BLOCK_BAD_OPTIONS - - # We need to prevent canonical target - # from injecting -O2 into CFLAGS - but we won't modify anything if we have - # set CFLAGS on the command line, since that should take ultimate precedence - AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"], - [CFLAGS=""]) - AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"], - [CXXFLAGS=""]) - - AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar]) - - m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - - m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[ - gl_EARLY - ],[ - PANDORA_EXTENSIONS - ]) - - AC_REQUIRE([AC_PROG_CC]) - m4_if(PCT_FORCE_GCC42, [yes], [ - AC_REQUIRE([PANDORA_ENSURE_GCC_VERSION]) - ]) - AC_REQUIRE([PANDORA_64BIT]) - - m4_if(PCT_NO_VC_CHANGELOG,yes,[ - vc_changelog=no - ],[ - vc_changelog=yes - ]) - - dnl Once we can use a modern autoconf, we can use this - dnl AC_PROG_CC_C99 - AC_REQUIRE([AC_PROG_CXX]) - PANDORA_EXTENSIONS - AM_PROG_CC_C_O - - - - PANDORA_PLATFORM - - dnl autoconf doesn't automatically provide a fail-if-no-C++ macro - dnl so we check c++98 features and fail if we don't have them, mainly - dnl for that reason - m4_if(PCT_REQUIRE_CXX, [yes], [ - AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[ - AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98]) - ]) - ]) - - m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[ - gl_INIT - AC_CONFIG_LIBOBJ_DIR([gnulib]) - ]) - - PANDORA_CHECK_CXX_VERSION - - AC_HEADER_TIME - AC_STRUCT_TM - AC_TYPE_SIZE_T - AC_SYS_LARGEFILE - PANDORA_CLOCK_GETTIME - - AC_CHECK_HEADERS(sys/socket.h) - - # off_t is not a builtin type - AC_CHECK_SIZEOF(off_t, 4) - AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[ - AC_MSG_ERROR("${PACKAGE} needs an off_t type.") - ]) - - AC_CHECK_SIZEOF(size_t) - AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[ - AC_MSG_ERROR("${PACKAGE} needs an size_t type.") - ]) - - AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()]) - AC_CHECK_SIZEOF(long long) - AC_DEFINE_UNQUOTED([SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long],[Size of long long as computed by sizeof()]) - AC_CACHE_CHECK([if time_t is unsigned], [ac_cv_time_t_unsigned],[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[ -#include - ]], - [[ - int array[(((time_t)-1) > 0) ? 1 : -1]; - ]]) - ],[ - ac_cv_time_t_unsigned=yes - ],[ - ac_cv_time_t_unsigned=no - ]) - ]) - AS_IF([test "$ac_cv_time_t_unsigned" = "yes"],[ - AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned]) - ]) - - AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)]) - AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)]) - - - - PANDORA_OPTIMIZE - - PANDORA_HAVE_GCC_ATOMICS - - PANDORA_WARNINGS(PCT_ALL_ARGS) - - PANDORA_ENABLE_DTRACE - - AC_LIB_PREFIX - PANDORA_HAVE_BETTER_MALLOC - - m4_if(m4_substr(m4_esyscmd(test -d src && echo 0),0,1),0,[ - AM_CPPFLAGS="-I\$(top_srcdir)/src -I\$(top_builddir)/src ${AM_CPPFLAGS}" - ],[ - AM_CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${AM_CPPFLAGS}" - ]) - - PANDORA_USE_PIPE - - AM_CFLAGS="-std=c99 ${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}" - AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}" - - AC_SUBST([AM_CFLAGS]) - AC_SUBST([AM_CXXFLAGS]) - AC_SUBST([AM_CPPFLAGS]) - AC_SUBST([AM_LDFLAGS]) - -]) diff --git a/m4/pandora_platform.m4 b/m4/pandora_platform.m4 index ee361c71..2372e0d6 100644 --- a/m4/pandora_platform.m4 +++ b/m4/pandora_platform.m4 @@ -10,6 +10,8 @@ dnl dnl From Monty Taylor AC_DEFUN([PANDORA_PLATFORM],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_CANONICAL_TARGET]) dnl Canonicalize the configuration name.