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
dnl Macro: PANDORA_64BIT
dnl ---------------------------------------------------------------------------
AC_DEFUN([PANDORA_64BIT],[
+ AC_BEFORE([$0], [AC_LIB_PREFIX])
+
AC_ARG_ENABLE([64bit],[
AS_HELP_STRING([--disable-64bit],
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
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
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)
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}"
--- /dev/null
+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 <libpq-fe.h>
+ ], [
+ 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}]))
+])