From: Monty Taylor Date: Sat, 18 Jul 2009 18:11:25 +0000 (-0700) Subject: pandora-build v0.22 X-Git-Tag: 0.32~7^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=62bb06e730fcf5a5112f9886790a28cf8eabb1cc;p=m6w6%2Flibmemcached pandora-build v0.22 --- diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 1c4d68cb..bab0cb7f 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -183,18 +183,13 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. - AC_MSG_CHECKING([if buildling 64-bit app]) - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([ - ], [ - return sizeof(void*) == 8 ? 0 : 1; - ]) - ], [ - gl_cv_solaris_64bit=yes - ], [ - gl_cv_solaris_64bit=no - ]) - AC_MSG_RESULT([$gl_cv_solaris_64bit]) + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_RUN_IFELSE([ + AC_LANG_PROGRAM([], [[ + return sizeof(void*) == 8 ? 0 : 1; + ]]) + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in diff --git a/m4/pandora_64bit.m4 b/m4/pandora_64bit.m4 index 44ec4c00..99db56e0 100644 --- a/m4/pandora_64bit.m4 +++ b/m4/pandora_64bit.m4 @@ -7,6 +7,8 @@ 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], diff --git a/m4/pandora_canonical.m4 b/m4/pandora_canonical.m4 index 65e1d128..90ea6da8 100644 --- a/m4/pandora_canonical.m4 +++ b/m4/pandora_canonical.m4 @@ -4,7 +4,7 @@ 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.20]) +AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.22]) AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ dnl Force dependency tracking on for Sun Studio builds @@ -59,6 +59,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([PANDORA_MAC_GCC42]) + AC_REQUIRE([PANDORA_64BIT]) dnl Once we can use a modern autoconf, we can use this dnl AC_PROG_CC_C99 @@ -66,6 +67,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ AC_PROG_CPP AM_PROG_CC_C_O + gl_USE_SYSTEM_EXTENSIONS m4_if(PCT_FORCE_GCC42, [yes], [ AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION) @@ -111,7 +113,6 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ PANDORA_CHECK_CXX_VERSION PANDORA_OPTIMIZE - PANDORA_64BIT dnl We need to inject error into the cflags to test if visibility works or not save_CFLAGS="${CFLAGS}" diff --git a/m4/pandora_have_libpq.m4 b/m4/pandora_have_libpq.m4 new file mode 100644 index 00000000..86ccb495 --- /dev/null +++ b/m4/pandora_have_libpq.m4 @@ -0,0 +1,31 @@ +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. + +AC_DEFUN([_PANDORA_SEARCH_LIBPQ],[ + AC_REQUIRE([AC_LIB_PREFIX]) + + dnl -------------------------------------------------------------------- + dnl Check for libpq + dnl -------------------------------------------------------------------- + + AC_LIB_HAVE_LINKFLAGS(pq,,[ + #include + ], [ + PGconn *conn; + conn = PQconnectdb(NULL); + ]) + + AM_CONDITIONAL(HAVE_LIBPQ, [test "x${ac_cv_libpq}" = "xyes"]) +]) + +AC_DEFUN([PANDORA_HAVE_LIBPQ],[ + AC_REQUIRE([_PANDORA_SEARCH_LIBPQ]) +]) + +AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[ + AC_REQUIRE([PANDORA_HAVE_LIBPQ]) + AS_IF([test x$ac_cv_libpq = xno], + AC_MSG_ERROR([libpq is required for ${PACKAGE}])) +])