summaryrefslogtreecommitdiff
path: root/source3/aclocal.m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-01-04 21:09:42 +0000
committerJelmer Vernooij <jelmer@samba.org>2004-01-04 21:09:42 +0000
commit430f9abd5f1d2537eab17c7c51a9e9b09f415989 (patch)
treeb0feef1b65e19c6f85303ab390e77b93671fda68 /source3/aclocal.m4
parentfd35232584d34c3250094572393b3a64fc87cef9 (diff)
downloadsamba-430f9abd5f1d2537eab17c7c51a9e9b09f415989.tar.gz
samba-430f9abd5f1d2537eab17c7c51a9e9b09f415989.tar.bz2
samba-430f9abd5f1d2537eab17c7c51a9e9b09f415989.zip
- Put functions for generating SQL queries in pdb_sql.c
- Add pgSQL backend (based on patch by Hamish Friedlander) - Use query generate functions from pdb_mysql and pdb_pgsql - Only pdb_pgsql.c needs to be changed whenever the fields in SAM_ACCOUNT change (This used to be commit 65ad2c02fd2bf36d535c279ad290ab81e39f6816)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r--source3/aclocal.m445
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=""