cvs: /php4/ext/pgsql Makefile.am config.m4 pgsql.c

From: Date: Fri, 03 Sep 1999 14:58:53 +0000
Subject: cvs: /php4/ext/pgsql Makefile.am config.m4 pgsql.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-4044@lists.php.net to get a copy of this message
gorgo Fri Sep 3 10:58:53 1999 EDT Modified files: /php4/ext/pgsql Makefile.am config.m4 pgsql.c Log: Enabled shared build of pgsql module Index: php4/ext/pgsql/Makefile.am diff -u php4/ext/pgsql/Makefile.am:1.1 php4/ext/pgsql/Makefile.am:1.2 --- php4/ext/pgsql/Makefile.am:1.1 Wed Apr 21 22:48:24 1999 +++ php4/ext/pgsql/Makefile.am Fri Sep 3 10:58:51 1999 @@ -1,6 +1,16 @@ -# $Id: Makefile.am,v 1.1 1999/04/22 02:48:24 ssb Exp $ +# $Id: Makefile.am,v 1.2 1999/09/03 14:58:51 gorgo Exp $ -INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend -noinst_LIBRARIES=libphpext_pgsql.a -libphpext_pgsql_a_SOURCES=pgsql.c +phplibdir=$(libdir)/php + +SRC=pgsql.c +INCLUDES=@INCLUDES@ @PGSQL_INCLUDE@ -I@top_srcdir@ -I@top_srcdir@/libzend +noinst_LIBRARIES=@PGSQL_STATIC@ +EXTRA_LIBRARIES=libphpext_pgsql.a +libphpext_pgsql_a_SOURCES=$(SRC) +phplib_LTLIBRARIES=@PGSQL_SHARED@ +EXTRA_LTLIBRARIES=pgsql.la +pgsql_la_SOURCES=$(SRC) +pgsql_la_LIBADD=@PGSQL_LFLAGS@ @PGSQL_LIBS@ +pgsql_la_LDFLAGS=-avoid-version -module -rpath $(phplibdir) +EXTRA_LIBS= Index: php4/ext/pgsql/config.m4 diff -u php4/ext/pgsql/config.m4:1.3 php4/ext/pgsql/config.m4:1.4 --- php4/ext/pgsql/config.m4:1.3 Wed Jul 21 10:43:12 1999 +++ php4/ext/pgsql/config.m4 Fri Sep 3 10:58:51 1999 @@ -1,10 +1,25 @@ -dnl $Id: config.m4,v 1.3 1999/07/21 14:43:12 ssb Exp $ +dnl $Id: config.m4,v 1.4 1999/09/03 14:58:51 gorgo Exp $ AC_MSG_CHECKING(for PostgresSQL support) AC_ARG_WITH(pgsql, [ --with-pgsql[=DIR] Include PostgresSQL support. DIR is the PostgresSQL - base install directory, defaults to /usr/local/pgsql.], + base install directory, defaults to /usr/local/pgsql. + Set DIR to "shared" to build as a dl, or "shared,DIR" + to build as a dl and still specify DIR.], [ + case $withval in + shared) + shared=yes + withval=yes + ;; + shared,*) + shared=yes + withval=echo $withval | sed -e 's/^shared,//' + ;; + *) + shared=no + ;; + esac if test "$withval" != "no"; then if test "$withval" = "yes"; then PGSQL_INCDIR=/usr/local/pgsql/include @@ -19,21 +34,32 @@ PGSQL_INCLUDE=-I$PGSQL_INCDIR PGSQL_LFLAGS=-L$PGSQL_LIBDIR PGSQL_LIBS=-lpq - AC_ADD_LIBRARY_WITH_PATH(pq, $PGSQL_LIBDIR) - AC_ADD_INCLUDE($PGSQL_INCDIR) old_CFLAGS=$CFLAGS; old_LDFLAGS=$LDFLAGS; old_LIBS=$LIBS CFLAGS="$CFLAGS $PGSQL_INCLUDE" LDFLAGS="$LDFLAGS $PGSQL_LFLAGS" LIBS="$LIBS $PGSQL_LIBS" AC_DEFINE(HAVE_PGSQL) - AC_MSG_RESULT(yes) + if test "$shared" = "yes"; then + AC_MSG_RESULT(yes (shared)) + PGSQL_SHARED="pgsql.la" + else + AC_MSG_RESULT(yes (static)) + AC_ADD_LIBRARY_WITH_PATH(pq, $PGSQL_LIBDIR) + AC_ADD_INCLUDE($PGSQL_INCDIR) + PGSQL_STATIC="libphpext_pgsql.a" + fi AC_CHECK_FUNC(PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES)) CFLAGS=$old_CFLAGS; LDFLAGS=$old_LDFLAGS; LIBS=$old_LIBS - PHP_EXTENSION(pgsql) + PHP_EXTENSION(pgsql,$shared) else AC_MSG_RESULT(no) fi ],[ AC_MSG_RESULT(no) ]) +AC_SUBST(PGSQL_LIBS) +AC_SUBST(PGSQL_LFLAGS) +AC_SUBST(PGSQL_INCLUDE) +AC_SUBST(PGSQL_STATIC) +AC_SUBST(PGSQL_SHARED) Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.15 php4/ext/pgsql/pgsql.c:1.16 --- php4/ext/pgsql/pgsql.c:1.15 Sun Aug 29 11:07:54 1999 +++ php4/ext/pgsql/pgsql.c Fri Sep 3 10:58:51 1999 @@ -17,9 +17,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.15 1999/08/29 15:07:54 eschmid Exp $ */ +/* $Id: pgsql.c,v 1.16 1999/09/03 14:58:51 gorgo Exp $ */ #include <stdlib.h> + +#ifdef PIC +# define COMPILE_DL 1 +#endif #include "php.h" #include "php3_pgsql.h"

« previous php.version4 (#4044) next »