Hi,

For several years now, two methods of configuration have been
possible:

1) pqxx-config [options]
2) pkg-config [options] libpqxx

However, there are some discrepancies between the linker flags for the
two.  pqxx-config can't support static linking properly and support
correct shared library dependencies, whereas this is possible with
pkg-config (but not currently done for either--it needs the static
dependencies of libpq and libpqxx specifying).

The patch fixes pqxx-config to work as a wrapper around pkg-config, so
both give the same output.  At the same time, it also prints a
deprecation warning to stderr, so that it will be possible to obsolete
and remove pqxx-config at some point in the future, while continuing
to work for the time being.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please sign and encrypt your mail.
Index: configure.ac.in
===================================================================
--- configure.ac.in	(revision 1108)
+++ configure.ac.in	(working copy)
@@ -35,6 +35,7 @@
 AC_PROG_MAKE_SET
 AC_PATH_PROG([MKDIR], [mkdir])
 AC_PATH_PROG([DOXYGEN], [doxygen])
+AC_PATH_PROG([PKG_CONFIG], [pkg-config])
 AM_CONDITIONAL([BUILD_REFERENCE], [test -n "$DOXYGEN"])
 AC_CHECK_PROG(HAVE_DOT, dot, YES, NO)
 AC_PATH_PROG([XMLTO], [xmlto])
Index: pqxx-config.in
===================================================================
--- pqxx-config.in	(revision 1108)
+++ pqxx-config.in	(working copy)
@@ -4,6 +4,7 @@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 usage()
 {
@@ -17,6 +18,8 @@
   --cflags		print pre-processor and compiler flags
   --help		display this help and exit
   --version		output version information
+
+pqxx-config is deprecated; please use $pkgconfig (module libpqxx)
 EOF
 
     exit $1
@@ -45,7 +48,8 @@
 	;;
 
     --version)
-	echo @PQXXVERSION@
+	echo "pqxx-config is deprecated; please use \"$pkgconfig --modversion libpqxx\"" 1>&2
+	$pkgconfig --modversion libpqxx
 	exit 0
 	;;
 
@@ -54,11 +58,13 @@
 	;;
 
     --cflags)
-       	echo [EMAIL PROTECTED]@ @POSTGRES_INCLUDE@
+	echo "pqxx-config is deprecated; please use \"$pkgconfig --cflags libpqxx\"" 1>&2
+       	$pkgconfig --cflags libpqxx
        	;;
 
     --libs)
-       	echo [EMAIL PROTECTED]@ -lpqxx [EMAIL PROTECTED]@ -lpq
+	echo "pqxx-config is deprecated; please use \"$pkgconfig --libs libpqxx\"" 1>&2
+       	$pkgconfig --libs libpqxx
        	;;
 
     *)

Attachment: pgpaF0iEjY8xU.pgp
Description: PGP signature

_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to