mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
debianize the posgres backend build
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4134 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
54
configure.in
54
configure.in
@@ -56,12 +56,15 @@ AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h)
|
||||
|
||||
DL_LIB=
|
||||
AC_CHECK_FUNCS(dlopen,,[
|
||||
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
|
||||
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
|
||||
AC_CHECK_FUNCS(dlopen, DL_LIB="",
|
||||
AC_MSG_ERROR(Dynamic linking is not available on this platform. Some apps,
|
||||
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
|
||||
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
|
||||
AC_CHECK_FUNCS(dlopen, DL_LIB="",
|
||||
AC_MSG_ERROR(Dynamic linking is not available on this platform. Some apps,
|
||||
like panel, will not run properly.))
|
||||
])])])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
oLIBS="$LIBS"
|
||||
LIBS="$LIBS $DL_LIB"
|
||||
AC_CHECK_FUNCS(dlerror,,)
|
||||
@@ -158,13 +161,48 @@ AC_ARG_ENABLE( profile,
|
||||
|
||||
### --------------------------------------------------------------------------
|
||||
### SQL
|
||||
# Check to see if the user wants to have Postgres support
|
||||
|
||||
AC_ARG_ENABLE( sql,
|
||||
[ --enable-sql compile with sql support],
|
||||
SQL_DIR=sql)
|
||||
[
|
||||
if test "x$enableval" != "xno" ; then
|
||||
AC_CHECK_HEADERS(pgsql/libpq-fe.h postgresql/libpq-fe.h)
|
||||
if test "x$ac_cv_header_pgsql_libpq_fe_h$ac_cv_header_postgresql_libpq_fe_h" == xnono; then
|
||||
AC_MSG_ERROR([Cannot find PosgreSQL headers; won't build sql backend])
|
||||
else
|
||||
if test "x$ac_cv_header_pgsql_libpq_fe_h" != xno; then
|
||||
CFLAGS="${CFLAGS} -I/usr/include/pgsql"
|
||||
fi
|
||||
if test "x$ac_cv_header_postgresql_libpq_fe_h" != xno; then
|
||||
CFLAGS="${CFLAGS} -I/usr/include/postgresql"
|
||||
fi
|
||||
|
||||
saved_LIBS="$LIBS"
|
||||
LIBS="-lpq $LIBS"
|
||||
AC_MSG_CHECKING(for libpq)
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#include <libpq-fe.h>
|
||||
],
|
||||
[
|
||||
PQconnectdb("asdf");
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
SQL_DIR=sql
|
||||
],
|
||||
[
|
||||
AC_MSG_ERROR([Cannot find PosgreSQL libraries; won't build sql backend])
|
||||
]
|
||||
)
|
||||
fi
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_SUBST(SQL_DIR)
|
||||
|
||||
|
||||
### --------------------------------------------------------------------------
|
||||
### RPC
|
||||
AC_ARG_ENABLE( rpc,
|
||||
@@ -355,7 +393,7 @@ AC_CHECK_LIB(ghttp, ghttp_request_new,
|
||||
|
||||
AC_CHECK_LIB(ghttp, ghttp_enable_ssl,
|
||||
AC_DEFINE(HAVE_OPENSSL),
|
||||
AC_MSG_WARN([ghttp does not have SSL support.]),
|
||||
AC_MSG_WARN([****** ghttp does not have SSL support.]),
|
||||
$GHTTP_LIBS)
|
||||
|
||||
AC_SUBST(GTKHTML_LIBS)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <pgsql/libpq-fe.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "AccountP.h"
|
||||
#include "Backend.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#ifndef __POSTGRES_BACKEND_H__
|
||||
#define __POSTGRES_BACKEND_H__
|
||||
|
||||
#include <pgsql/libpq-fe.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "Group.h"
|
||||
#include "guid.h"
|
||||
|
||||
@@ -17,9 +17,11 @@ Postgres Install Instructions
|
||||
have a GUI to ask for your password yet)
|
||||
|
||||
5) (optional) enable TCPIP connections to remote hosts. To do this:
|
||||
edit the file /var/lib/pgsql/pg_hba.conf on the remote host to
|
||||
configure and allow access from other hosts. See 'man pg_hba.conf'
|
||||
for details. Also create users. Be sure to set a password.
|
||||
edit the file pg_hba.conf on the remote host to configure and allow
|
||||
access from other hosts. See 'man pg_hba.conf' for details.
|
||||
RedHat: /var/lib/pgsql/pg_hba.conf
|
||||
Debian: /etc/postgresql/pg_hba.conf
|
||||
Also create users. Be sure to set a password.
|
||||
(there appears to be no way to pass an empty password to postgres)
|
||||
Note also the user must have 'createuser' permissions in order to
|
||||
lock tables (this is a bug in postgres 6.5 and maybe later ???)
|
||||
@@ -54,7 +56,9 @@ using root privileges. After step 1 above, perform the following:
|
||||
|
||||
GnuCash Build Instructions
|
||||
--------------------------
|
||||
Same as usual, but you want to specify the flag '--enable-sql' i.e.
|
||||
Same as usual, but you must specify the flag '--enable-sql' in order
|
||||
to build in Postrges support.
|
||||
i.e.
|
||||
./configure --enable-sql
|
||||
and then 'make'.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <pgsql/libpq-fe.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "Account.h"
|
||||
#include "AccountP.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <pgsql/libpq-fe.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "Backend.h"
|
||||
#include "BackendP.h"
|
||||
|
||||
Reference in New Issue
Block a user