[postgis-tickets] r14399 - Cleanly handle empty return from pg_config --pgxs

Sandro Santilli strk at keybit.net
Tue Nov 17 21:14:53 PST 2015


Author: strk
Date: 2015-11-17 21:14:52 -0800 (Tue, 17 Nov 2015)
New Revision: 14399

Modified:
   trunk/configure.ac
Log:
Cleanly handle empty return from pg_config --pgxs

On a debian-derivate system, the call may prints on stderr:

" You need to install postgresql-server-dev-X.Y for building
  a server-side extension or libpq-dev for building a client-side
  application. "

This has been seen on a Trisquel 7.0 GNU/Linux system.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2015-11-16 19:37:56 UTC (rev 14398)
+++ trunk/configure.ac	2015-11-18 05:14:52 UTC (rev 14399)
@@ -422,7 +422,7 @@
   dnl ===========================================================================
 
   PGXS=`$PG_CONFIG --pgxs`
-  if test ! -f $PGXS; then
+  if test "x$PGXS" = "x" -o ! -f "$PGXS"; then
     AC_MSG_ERROR([the PGXS Makefile $PGXS cannot be found. Please install the PostgreSQL server development packages and re-run configure.])
   fi
 



More information about the postgis-tickets mailing list