diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-01-04 21:09:42 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2004-01-04 21:09:42 +0000 |
commit | 65ad2c02fd2bf36d535c279ad290ab81e39f6816 (patch) | |
tree | 93efe3d431f4f44789e7f751b3822fd338635b91 /source/aclocal.m4 | |
parent | 3ce6c9f27368cfb278007fe660a0e44a84d67f8f (diff) | |
download | samba-65ad2c02fd2bf36d535c279ad290ab81e39f6816.tar.gz samba-65ad2c02fd2bf36d535c279ad290ab81e39f6816.tar.xz samba-65ad2c02fd2bf36d535c279ad290ab81e39f6816.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
Diffstat (limited to 'source/aclocal.m4')
-rw-r--r-- | source/aclocal.m4 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/source/aclocal.m4 b/source/aclocal.m4 index 96f265daf26..6de11953b44 100644 --- a/source/aclocal.m4 +++ b/source/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="" |