]> git.sur5r.net Git - bacula/bacula/commitdiff
Add PostgreSQL support droppped in revision 1.88.
authorDan Langille <dan@langille.org>
Fri, 19 Dec 2003 00:18:13 +0000 (00:18 +0000)
committerDan Langille <dan@langille.org>
Fri, 19 Dec 2003 00:18:13 +0000 (00:18 +0000)
While here, add a "checking for embedded SQL" so we don't see just a "no".

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@903 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/configure

index 9b32d15504f158514f7508e1e0d056f574834794..3cdefd088bb6fe9001541a82872c3298b4592d80 100755 (executable)
@@ -7005,14 +7005,86 @@ fi;
 
 
 
+db_found=no
+echo "$as_me:$LINENO: checking for PostgreSQL support" >&5
+echo $ECHO_N "checking for PostgreSQL support... $ECHO_C" >&6
 
+# Check whether --with-postgresql was given.
+if test "${with_postgresql+set}" = set; then
+  withval="$with_postgresql"
 
+  if test "$withval" != "no"; then
+        if test "$withval" = "yes"; then
+                if test -f /usr/local/postgresql/include/postgresql/libpq-fe.h; then
+                        POSTGRESQL_INCDIR=/usr/local/postgresql/include/postgresql
+                        POSTGRESQL_LIBDIR=/usr/local/postgresql/lib/postgresql
+                        POSTGRESQL_BINDIR=/usr/local/postgresql/bin
+                elif test -f /usr/include/postgresql/libpq-fe.h; then
+                        POSTGRESQL_INCDIR=/usr/include/postgresql
+                        POSTGRESQL_LIBDIR=/usr/lib/postgresql
+                        POSTGRESQL_BINDIR=/usr/bin
+                elif test -f /usr/include/libpq-fe.h; then
+                        POSTGRESQL_INCDIR=/usr/include
+                        POSTGRESQL_LIBDIR=/usr/lib
+                        POSTGRESQL_BINDIR=/usr/bin
+                elif test -f /usr/local/include/postgresql/libpq-fe.h; then
+                        POSTGRESQL_INCDIR=/usr/local/include/postgresql
+                        POSTGRESQL_LIBDIR=/usr/local/lib/postgresql
+                        POSTGRESQL_BINDIR=/usr/local/bin
+                elif test -f /usr/local/include/libpq-fe.h; then
+                        POSTGRESQL_INCDIR=/usr/local/include
+                        POSTGRESQL_LIBDIR=/usr/local/lib
+                        POSTGRESQL_BINDIR=/usr/local/bin
+                else
+                   echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+                   { { echo "$as_me:$LINENO: error: Unable to find libpq-fe.h in standard locations" >&5
+echo "$as_me: error: Unable to find libpq-fe.h in standard locations" >&2;}
+   { (exit 1); exit 1; }; }
+                fi
+        else
+                if test -f $withval/include/postgresql/libpq-fe.h; then
+                        POSTGRESQL_INCDIR=$withval/include/postgresql
+                        POSTGRESQL_LIBDIR=$withval/lib/postgresql
+                        POSTGRESQL_BINDIR=$withval/bin
+                elif test -f $withval/include/libpq-fe.h; then
+                        POSTGRESQL_INCDIR=$withval/include
+                        POSTGRESQL_LIBDIR=$withval/lib
+                        POSTGRESQL_BINDIR=$withval/bin
+                else
+                   echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+                   { { echo "$as_me:$LINENO: error: Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval" >&5
+echo "$as_me: error: Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval" >&2;}
+   { (exit 1); exit 1; }; }
+                fi
+        fi
+    SQL_INCLUDE=-I$POSTGRESQL_INCDIR
+    SQL_LFLAGS="-L$POSTGRESQL_LIBDIR -lpq -lz"
+    SQL_BINDIR=$POSTGRESQL_BINDIR
 
-# ------------------------------------------------
-# Bacula check for various SQL database engines
-# ------------------------------------------------
-BA_CHECK_POSTGRESQL_DB
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSTGRESQL 1
+_ACEOF
 
+    echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+    db_found=yes
+    support_postgresql=yes
+    db_name=PostgreSQL
+    DB_NAME=postgresql
+
+  else
+        echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  fi
+
+else
+
+    echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi;
 
 db_found=no
 echo "$as_me:$LINENO: checking for MySQL support" >&5
@@ -7104,6 +7176,9 @@ echo "${ECHO_T}no" >&6
 fi;
 
 
+echo "$as_me:$LINENO: checking for embedded MySQL support" >&5
+echo $ECHO_N "checking for embedded MySQL support... $ECHO_C" >&6
+
 # Check whether --with-embedded-mysql or --without-embedded-mysql was given.
 if test "${with_embedded_mysql+set}" = set; then
   withval="$with_embedded_mysql"