diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-01-05 00:57:53 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2004-01-05 00:57:53 +0000 |
commit | b397269f1b981df735bb98eec94adb142de0a868 (patch) | |
tree | 5d433a2628fc39b28ca701acfc212ae9937c3bd9 /source3/aclocal.m4 | |
parent | 612a97f84535c2d2b397f7a1b3941f7f6f602b27 (diff) | |
download | samba-b397269f1b981df735bb98eec94adb142de0a868.tar.gz samba-b397269f1b981df735bb98eec94adb142de0a868.tar.bz2 samba-b397269f1b981df735bb98eec94adb142de0a868.zip |
Merge commit to 3_0: add pdb_pgsql
(This used to be commit 61cbd5c9be1962d0c33c28ff472a2f82d3aa2a80)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r-- | source3/aclocal.m4 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index 96f265daf2..6de11953b4 100644 --- a/source3/aclocal.m4 +++ b/source3/aclocal.m4 @@ -484,6 +484,51 @@ AC_ARG_WITH(mysql-exec-prefix,[ --with-mysql-exec-prefix=PFX Exec prefix where AC_SUBST(MYSQL_LIBS) ]) +# ========================================================================= +# AM_PATH_PGSQL : pgSQL library + +dnl AM_PATH_PGSQL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for PGSQL, and define PGSQL_CFLAGS and PGSQL_LIBS +dnl +AC_DEFUN(AM_PATH_PGSQL, +[dnl +dnl Get the cflags and libraries from the pg_config script +dnl +AC_ARG_WITH(pgsql-prefix,[ --with-pgsql-prefix=PFX Prefix where PostgreSQL is installed (optional)], + pgsql_prefix="$withval", pgsql_prefix="") +AC_ARG_WITH(pgsql-exec-prefix,[ --with-pgsql-exec-prefix=PFX Exec prefix where PostgreSQL is installed (optional)], + pgsql_exec_prefix="$withval", pgsql_exec_prefix="") + + if test x$pgsql_exec_prefix != x ; then + if test x${PGSQL_CONFIG+set} != xset ; then + PGSQL_CONFIG=$pgsql_exec_prefix/bin/pg_config + fi + fi + if test x$pgsql_prefix != x ; then + if test x${PGSQL_CONFIG+set} != xset ; then + PGSQL_CONFIG=$pgsql_prefix/bin/pg_config + fi + fi + + AC_REQUIRE([AC_CANONICAL_TARGET]) + AC_PATH_PROG(PGSQL_CONFIG, pg_config, no, [$PATH:/usr/lib/postgresql/bin]) + AC_MSG_CHECKING(for PGSQL) + no_pgsql="" + if test "$PGSQL_CONFIG" = "no" ; then + PGSQL_CFLAGS="" + PGSQL_LIBS="" + AC_MSG_RESULT(no) + ifelse([$2], , :, [$2]) + else + PGSQL_CFLAGS=-I`$PGSQL_CONFIG --includedir` + PGSQL_LIBS="-lpq -L`$PGSQL_CONFIG --libdir`" + AC_MSG_RESULT(yes) + ifelse([$1], , :, [$1]) + fi + AC_SUBST(PGSQL_CFLAGS) + AC_SUBST(PGSQL_LIBS) +]) + dnl Removes -I/usr/include/? from given variable AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[ ac_new_flags="" |