Index: ossp-pkg/uuid/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/Makefile.in,v rcsdiff -q -kk '-r1.37' '-r1.38' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/Makefile.in,v' 2>/dev/null --- Makefile.in 2005/09/02 18:16:13 1.37 +++ Makefile.in 2006/01/12 20:31:50 1.38 @@ -59,6 +59,7 @@ POD2MAN = pod2man PERL = @PERL@ PHP = @PHP@ +PG_CONFIG = @PG_CONFIG@ LIB_NAME = libuuid.la LIB_OBJS = uuid.lo uuid_md5.lo uuid_sha1.lo uuid_prng.lo uuid_mac.lo uuid_ui64.lo uuid_str.lo @@ -80,13 +81,17 @@ PHP_NAME = $(S)/php/modules/uuid.so PHP_OBJS = $(S)/php/uuid.c -TARGETS = $(LIB_NAME) @DCE_NAME@ @CXX_NAME@ $(PRG_NAME) @PERL_NAME@ @PHP_NAME@ +PGSQL_NAME = $(S)/pgsql/libuuid.so +PGSQL_OBJS = $(S)/pgsql/uuid.c + +TARGETS = $(LIB_NAME) @DCE_NAME@ @CXX_NAME@ $(PRG_NAME) @PERL_NAME@ @PHP_NAME@ @PGSQL_NAME@ WITH_DCE = @WITH_DCE@ WITH_CXX = @WITH_CXX@ WITH_PERL = @WITH_PERL@ WITH_PERL_COMPAT = @WITH_PERL_COMPAT@ WITH_PHP = @WITH_PHP@ +WITH_PGSQL = @WITH_PGSQL@ .SUFFIXES: .SUFFIXES: .c .cc .o .lo @@ -128,6 +133,10 @@ @cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local PHP=$(PHP) @touch $(PHP_NAME) +$(PGSQL_NAME): $(PGSQL_OBJS) $(LIB_NAME) + @cd $(S)/pgsql && $(MAKE) $(MFLAGS) PG_CONFIG=$(PG_CONFIG) + @touch $(PGSQL_NAME) + uuid.lo: $(S)/uuid.c uuid.h $(S)/uuid_md5.h $(S)/uuid_sha1.h $(S)/uuid_prng.h $(S)/uuid_mac.h $(S)/uuid_ui64.h $(S)/uuid_str.h $(S)/uuid_bm.h $(S)/uuid_ac.h uuid_mac.lo: $(S)/uuid_mac.c $(S)/uuid_mac.h uuid_md5.lo: $(S)/uuid_md5.c $(S)/uuid_md5.h @@ -205,6 +214,10 @@ echo "==== PHP bindings to C API"; \ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local test PHP=$(PHP)); \ fi + -@if [ ".$(WITH_PGSQL)" = .yes ]; then \ + echo "==== PGSQL bindings to C API"; \ + (cd $(S)/pgsql && $(MAKE) $(MFLAGS) test PG_CONFIG=$(PG_CONFIG)); \ + fi install: $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) @@ -245,6 +258,9 @@ -@if [ ".$(WITH_PHP)" = .yes ]; then \ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local install EXTDIR=$(prefix)/lib/php PHP=$(PHP) DESTDIR=$(DESTDIR)); \ fi + -@if [ ".$(WITH_PGSQL)" = .yes ]; then \ + (cd $(S)/pgsql && $(MAKE) $(MFLAGS) install DESTDIR=$(DESTDIR) PG_CONFIG=$(PG_CONFIG)); \ + fi uninstall: -$(RM) $(DESTDIR)$(mandir)/man1/uuid.1 @@ -301,6 +317,9 @@ -@if [ ".$(WITH_PHP)" = .yes ]; then \ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local clean || true); \ fi + -@if [ ".$(WITH_PGSQL)" = .yes ]; then \ + (cd $(S)/pgsql && $(MAKE) $(MFLAGS) clean PG_CONFIG=$(PG_CONFIG) || true); \ + fi distclean: clean -$(RM) config.log config.status config.cache @@ -312,6 +331,9 @@ -@if [ ".$(WITH_PHP)" = .yes ]; then \ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local distclean || true); \ fi + -@if [ ".$(WITH_PGSQL)" = .yes ]; then \ + (cd $(S)/pgsql && $(MAKE) $(MFLAGS) distclean PG_CONFIG=$(PG_CONFIG) || true); \ + fi realclean: distclean -$(RM) uuid.3 uuid.1 @@ -324,4 +346,7 @@ -@if [ ".$(WITH_PHP)" = .yes ]; then \ (cd $(S)/php && $(MAKE) $(MFLAGS) -f Makefile.local realclean || true); \ fi + -@if [ ".$(WITH_PGSQL)" = .yes ]; then \ + (cd $(S)/pgsql && $(MAKE) $(MFLAGS) realclean PG_CONFIG=$(PG_CONFIG) || true); \ + fi Index: ossp-pkg/uuid/devtool.conf RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/devtool.conf,v rcsdiff -q -kk '-r1.23' '-r1.24' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/devtool.conf,v' 2>/dev/null --- devtool.conf 2006/01/07 08:11:40 1.23 +++ devtool.conf 2006/01/12 20:31:50 1.24 @@ -22,6 +22,7 @@ --with-perl \ --with-perl-compat \ --with-php \ + --with-pgsql \ "$@" %version Index: ossp-pkg/uuid/pgsql/Makefile RCS File: /v/ossp/cvs/ossp-pkg/uuid/pgsql/Attic/Makefile,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/uuid/pgsql/Attic/Makefile,v' 2>/dev/null --- Makefile 2006/01/12 20:00:23 1.1 +++ Makefile 2006/01/12 20:31:51 1.2 @@ -12,7 +12,8 @@ # DSO. Hence we fiddle around with the Makefiles which "PGXS" uses # itself ourself. -PGXS := $(shell pg_config --pgxs) +PG_CONFIG ?= pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) top_builddir := $(dir $(PGXS))../.. include $(top_builddir)/src/Makefile.global @@ -48,3 +49,7 @@ rm -f $(OBJS) rm -f uuid.sql +realclean: distclean + +test: + Index: ossp-pkg/uuid/uuid.ac RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.ac,v rcsdiff -q -kk '-r1.18' '-r1.19' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.ac,v' 2>/dev/null --- uuid.ac 2005/09/02 14:32:40 1.18 +++ uuid.ac 2006/01/12 20:31:50 1.19 @@ -156,5 +156,28 @@ if test ".$ac_cv_with_php" = ".yes"; then (cd php && make -f Makefile.local config PHP=$PHP) fi + + dnl # configure option --with-pgsql + AC_ARG_WITH([pgsql], + AS_HELP_STRING([--with-pgsql], [build PostgreSQL bindings to C API]), + [ac_cv_with_pgsql=$withval], [ac_cv_with_pgsql=no]) + AC_CACHE_CHECK([whether to build PostgreSQL bindings to C API], [ac_cv_with_pgsql], [ac_cv_with_pgsql=no]) + if test ".$ac_cv_with_pgsql" = ".yes"; then + AC_DEFINE(WITH_PGSQL, 1, [whether to build PostgreSQL bindings to C API]) + WITH_PGSQL='yes' + PGSQL_NAME='$(PGSQL_NAME)' + else + WITH_PGSQL='no' + PGSQL_NAME='' + fi + AC_SUBST(PGSQL_NAME) + AC_SUBST(WITH_PGSQL) + AC_PATH_PROGS(PG_CONFIG, pg_config, NA) + if test ".$ac_cv_with_pgsql" = ".yes" -a ".$PG_CONFIG" = ".NA"; then + AC_ERROR([required PostgreSQL pg_config utility not found in \$PATH]) + fi + if test ".$ac_cv_with_pgsql" = ".yes" -a ".`${MAKE-make} -v 2>/dev/null | grep GNU`" = .; then + AC_ERROR([PostgreSQL bindings require GNU make to build]) + fi ])