[Libreoffice-commits] .: configure.in connectivity/source
configure.in |6 +++- connectivity/source/drivers/postgresql/makefile.mk | 28 + 2 files changed, 16 insertions(+), 18 deletions(-) New commits: commit d1a1585c30c31dec38d32571e9c2bbee4d03 Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Mon Dec 12 04:51:49 2011 +0100 Some more postgresql fixes 1. The --enable-extension-integration affects only packaging 2. OUTDIR_FOR_BUILD is for native build in case of crosscompiling diff --git a/configure.in b/configure.in index 26e2fd8..59cb7fb 100644 --- a/configure.in +++ b/configure.in @@ -5432,8 +5432,10 @@ dnl === dnl Check for PostgreSQL stuff dnl === -if test x$enable_ext_postgresql_sdbc = xyes -a x$enable_extension_integration != xno; then -SCPDEFS=$SCPDEFS -DWITH_EXTENSION_POSTGRESQL +if test x$enable_ext_postgresql_sdbc = xyes; then +if test x$enable_extension_integration = xyes; then + SCPDEFS=$SCPDEFS -DWITH_EXTENSION_POSTGRESQL +fi AC_MSG_CHECKING([PostgreSQL C interface]) if test $with_system_postgresql = yes; then diff --git a/connectivity/source/drivers/postgresql/makefile.mk b/connectivity/source/drivers/postgresql/makefile.mk index 91184d8..29f2029 100644 --- a/connectivity/source/drivers/postgresql/makefile.mk +++ b/connectivity/source/drivers/postgresql/makefile.mk @@ -77,6 +77,18 @@ PQ_SDBC_MINOR=8 PQ_SDBC_MICRO=2 PQ_SDBC_VERSION=$(PQ_SDBC_MAJOR).$(PQ_SDBC_MINOR).$(PQ_SDBC_MICRO) +.IF $(SYSTEM_POSTGRESQL)==YES +LIBPQ_LINK=-lpq +.ELSE #SYSTEM_POSTGRESQL==NO +.IF $(GUI)$(COM)==WNTMSC +LIBPQ_LINK=$(OUTDIR)/lib/libpq.lib ws2_32.lib secur32.lib advapi32.lib shell32.lib +.ELSE +LIBPQ_LINK=$(OUTDIR)/lib/libpq.a +.ENDIF +POSTGRESQL_INC=-I$(OUTDIR)/inc/postgresql +POSTGRESQL_LIB= +.ENDIF + CFLAGS+=$(POSTGRESQL_INC) \ -DPQ_SDBC_MAJOR=$(PQ_SDBC_MAJOR) \ -DPQ_SDBC_MINOR=$(PQ_SDBC_MINOR) \ @@ -97,22 +109,6 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) SHL1VERSIONMAP=$(SOLARENV)$/src$/reg-component.map -# use the static version on Windows? -# LEM 17/11/2011: removed everything except libpq proper; -# as per instructions in libpq documentation. -# If it turns out the rest was needed, reenable it. -.IF $(SYSTEM_POSTGRESQL)==YES -LIBPQ_LINK=-lpq -.ELSE #SYSTEM_POSTGRESQL==NO -.IF $(GUI)$(COM)==WNTMSC -LIBPQ_LINK=$(OUTDIR_FOR_BUILD)/lib/libpq.lib ws2_32.lib secur32.lib advapi32.lib shell32.lib -.ELSE -LIBPQ_LINK=$(OUTDIR_FOR_BUILD)/lib/libpq.a -.ENDIF -POSTGRESQL_INC=-I$(OUTDIR_FOR_BUILD)/inc/postgresql -POSTGRESQL_LIB= -.ENDIF - SHL2TARGET=postgresql-sdbc-impl.uno LIB2TARGET=$(SLB)$/$(SHL2TARGET).lib LIB2OBJFILES= \ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: configure.in connectivity/source
configure.in | 10 +- connectivity/source/drivers/postgresql/makefile.mk |9 + 2 files changed, 10 insertions(+), 9 deletions(-) New commits: commit 05b53b1b8e500b31bef1db737303725a168379da Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Nov 30 21:09:43 2011 +0100 postgresql-sdbc: review build rules diff --git a/configure.in b/configure.in index a47725f..e2b9ea3 100644 --- a/configure.in +++ b/configure.in @@ -5400,7 +5400,7 @@ dnl === dnl Check for PostgreSQL stuff dnl === -if test x$enable_ext_postgresql_sdbc = xyes; then +if test x$enable_ext_postgresql_sdbc = xyes -a x$enable_extension_integration != xno; then SCPDEFS=$SCPDEFS -DWITH_EXTENSION_POSTGRESQL AC_MSG_CHECKING([for PostgreSQL prerequisites]) @@ -5412,12 +5412,12 @@ if test x$enable_ext_postgresql_sdbc = xyes; then AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH]) fi POSTGRESQL_INC=-I$(pg_config --includedir) -POSTGRESQL_LIB=-L$(pg_config --libdir) -lpq +POSTGRESQL_LIB=-L$(pg_config --libdir) else SYSTEM_POSTGRESQL=NO if test -n $with_libpq_path; then AC_MSG_RESULT([external libpq]) -POSTGRESQL_LIB=-L${with_libpq_path}/lib/ -lpq +POSTGRESQL_LIB=-L${with_libpq_path}/lib/ POSTGRESQL_INC=-I${with_libpq_path}/include/ else AC_MSG_ERROR([not given. Please specify either --with-system-postgresql or --with-libpq-path]) @@ -5427,8 +5427,8 @@ if test x$enable_ext_postgresql_sdbc = xyes; then save_CFLAGS=$CFLAGS save_CPPFLAGS=$CPPFLAGS save_LIBS=$LIBS -CPPFLAGS=${POSTGRESQL_INC} -LIBS=${POSTGRESQL_LIB} +CPPFLAGS=${CPPFLAGS} ${POSTGRESQL_INC} +LIBS=${LIBS} ${POSTGRESQL_LIB} AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], []) AC_CHECK_LIB(pq, PQconnectdbParams, [], [AC_MSG_ERROR(libpq not found or too old. Need = 9.0)], []) diff --git a/connectivity/source/drivers/postgresql/makefile.mk b/connectivity/source/drivers/postgresql/makefile.mk index 4f2dffd..e498981 100644 --- a/connectivity/source/drivers/postgresql/makefile.mk +++ b/connectivity/source/drivers/postgresql/makefile.mk @@ -97,14 +97,14 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) SHL1VERSIONMAP=$(SOLARENV)$/src$/reg-component.map -# use the static version +# use the static version on Windows? # LEM 17/11/2011: removed everything except libpq proper; # as per instructions in libpq documentation. # If it turns out the rest was needed, reenable it. .IF $(GUI)==WNT -POSTGRESQL_LIB=libpq.lib #wsock32.lib advapi32.lib +LIBPQ_LINK=libpq.lib #wsock32.lib advapi32.lib .ELSE -POSTGRESQL_LIB=-lpq #-lcrypt +LIBPQ_LINK=-lpq #-lcrypt .ENDIF SHL2TARGET=postgresql-sdbc-impl.uno LIB2TARGET=$(SLB)$/$(SHL2TARGET).lib @@ -148,7 +148,8 @@ SHL2STDLIBS= \ $(CPPUHELPERLIB) \ $(SALLIB) \ $(SALHELPERLIB)\ -$(POSTGRESQL_LIB) +$(POSTGRESQL_LIB) \ +$(LIBPQ_LINK) SHL2LIBS= $(LIB2TARGET) SHL2DEF= $(MISC)$/$(SHL2TARGET).def ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: configure.in connectivity/source set_soenv.in
configure.in | 52 --- connectivity/source/drivers/postgresql/makefile.mk | 28 ++ connectivity/source/drivers/postgresql/pq_driver.hxx |8 -- set_soenv.in |2 4 files changed, 54 insertions(+), 36 deletions(-) New commits: commit 7bab4645ce08e9cb41b38a983c57a514358b71ec Author: Lionel Elie Mamane lio...@mamane.lu Date: Thu Nov 17 23:17:21 2011 +0100 Implement --with-sytem-postgreql and --with-libq-path; cleanup unused #define diff --git a/configure.in b/configure.in index a628175..995 100644 --- a/configure.in +++ b/configure.in @@ -1090,7 +1090,8 @@ AC_ARG_WITH(lucene-analyzers-jar, AC_ARG_WITH(system-mysql, AS_HELP_STRING([--with-system-mysql], [Use MySQL libraries already on system, for building the MySQL Connector/LibreOffice - extension. Requires MYSQLCONFIG to point to the mysql_config executable.]),, + extension. If the the mysql_config executable is not in PATH, use MYSQLCONFIG to + point to it.]),, [with_system_mysql=$with_system_libs]) AC_ARG_WITH(libmysql-path, @@ -1108,6 +1109,22 @@ AC_ARG_WITH(system-mysql-cppconn, [Use MySQL C++ Connector libraries already on system.]),, [with_system_mysql_cppconn=$with_system_libs]) +AC_ARG_WITH(system-postgresql, +AS_HELP_STRING([--with-system-postgresql], +[Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC + extension. If pg_config is not in PATH, use PGCONFIG to point to it.]),, +[with_system_postgresql=$with_system_libs]) + +AC_ARG_WITH(libpq-path, +AS_HELP_STRING([--with-libpq-path], +[Use this PostgreSQL C interface (libpq) installation for building + the PostgreSQL-SDBC extension.]) +[ + Usage: --with-libpq-path=absolute path to + your libq installation +], +,) + AC_ARG_WITH(system-hsqldb, AS_HELP_STRING([--with-system-hsqldb], [Use hsqldb already on system.]),, @@ -5218,7 +5235,7 @@ if test $ENABLE_MYSQLC = YES; then dnl === dnl Check for system MySQL dnl === -AC_MSG_CHECKING([for mysql pre-requisites]) +AC_MSG_CHECKING([for MySQL prerequisites]) if test $with_system_mysql = yes; then AC_MSG_RESULT([external MySQL]) SYSTEM_MYSQL=YES @@ -5365,23 +5382,44 @@ dnl Check for PostgreSQL stuff dnl === if test x$enable_ext_postgresql_sdbc = xyes; then -AC_PATH_PROG(PGCONFIG, pg_config) -if test -z $PGCONFIG; then -AC_MSG_ERROR([pg_config needed]) +AC_MSG_CHECKING([for PostgreSQL prerequisites]) +if test $with_system_postgresql = yes; then +AC_MSG_RESULT([external PostgreSQL]) +SYSTEM_POSTGRESQL=YES +AC_PATH_PROG(PGCONFIG, pg_config) +if test -z $PGCONFIG; then + AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH]) +fi +POSTGRESQL_INC=-I$(pg_config --includedir) +POSTGRESQL_LIB=-L$(pg_config --libdir) -lpq +else +SYSTEM_POSTGRESQL=NO +if test -n $with_libpq_path; then +AC_MSG_RESULT([external libpq]) +POSTGRESQL_LIB=-L${with_libpq_path}/lib/ -lpq +POSTGRESQL_INC=-I${with_libpq_path}/include/ +else +AC_MSG_ERROR([not given. Please specify either --with-system-postgresql or --with-libpq-path]) +fi fi +AC_MSG_CHECKING([for PostgreSQL C interface]) save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS save_LIBS=$LIBS -CFLAGS=-I`pg_config --includedir` +CPPFLAGS=${POSTGRESQL_INC} +LIBS=${POSTGRESQL_LIB} AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], []) AC_CHECK_LIB(pq, PQconnectdbParams, [], [AC_MSG_ERROR(libpq not found or too old. Need = 9.0)], []) CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS LIBS=$save_LIBS BUILD_POSTGRESQL_SDBC=YES -SYSTEM_POSTGRESQL=YES # only option atm :-) fi AC_SUBST(BUILD_POSTGRESQL_SDBC) AC_SUBST(SYSTEM_POSTGRESQL) +AC_SUBST(POSTGRESQL_INC) +AC_SUBST(POSTGRESQL_LIB) dnl === dnl Check for system beanshell diff --git a/connectivity/source/drivers/postgresql/makefile.mk b/connectivity/source/drivers/postgresql/makefile.mk index 8c8c022..8b02689 100644 --- a/connectivity/source/drivers/postgresql/makefile.mk +++ b/connectivity/source/drivers/postgresql/makefile.mk @@ -39,9 +39,6 @@ NO_DEFAULT_STL=TRUE .IF $(BUILD_POSTGRESQL_SDBC) == YES -.IF $(SYSTEM_POSTGRESQL) != YES -.INCLUDE : $(SOLARINCDIR)$/postgresql/postgresql-version.mk -.ENDIF