Index: trunk/psphot/.cvsignore
===================================================================
--- trunk/psphot/.cvsignore	(revision 12872)
+++ trunk/psphot/.cvsignore	(revision 12899)
@@ -17,2 +17,3 @@
 config.sub
 psphot.pc
+psphot-config
Index: trunk/psphot/Makefile.am
===================================================================
--- trunk/psphot/Makefile.am	(revision 12872)
+++ trunk/psphot/Makefile.am	(revision 12899)
@@ -3,8 +3,10 @@
 CLEANFILES = *.pyc *~ core core.*
 
+bin_SCRIPTS = psphot-config 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA= psphot.pc
 
 EXTRA_DIST = \
+	psphot-config.in \
 	psphot.pc.in \
 	autogen.sh
Index: trunk/psphot/configure.ac
===================================================================
--- trunk/psphot/configure.ac	(revision 12872)
+++ trunk/psphot/configure.ac	(revision 12899)
@@ -210,4 +210,5 @@
   Makefile
   src/Makefile
+  psphot-config
   psphot.pc
 ])
Index: trunk/psphot/psphot-config.in
===================================================================
--- trunk/psphot/psphot-config.in	(revision 12899)
+++ trunk/psphot/psphot-config.in	(revision 12899)
@@ -0,0 +1,87 @@
+#! /bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/@PACKAGE_NAME@
+top_srcdir=@ABS_SRCDIR@
+
+usage()
+{
+    cat <<EOF
+Usage: psphot-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix		print psphot installation prefix
+  --libs		print library linking information
+  --cflags		print pre-processor and compiler flags
+  --build-libs		print library linking information to the build (non-installed) version
+  --build-cflags	print pre-processor and compiler flags to the build (non-installed) version
+  --help		display this help and exit
+  --version		output version information
+
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+    case "$1" in
+    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) optarg= ;;
+    esac
+
+    case "$1" in
+    --prefix=*)
+	prefix=$optarg
+	;;
+
+    --prefix)
+	echo $prefix
+	;;
+
+    --version)
+	echo @VERSION@
+	exit 0
+	;;
+
+    --help)
+	usage 0
+	;;
+
+    --cflags)
+       	echo -I${includedir} @PSPHOT_CFLAGS@
+       	;;
+
+    --libs)
+       	echo -L${libdir} -lpsphot @PSPHOT_LIBS@
+       	;;
+
+    --build-cflags)
+       	echo @SRCINC@ @PSPHOT_CFLAGS@
+       	;;
+
+    --build-libs)
+       	echo -L@ABS_SRCDIR@/src/.libs -lpsphot @PSPHOT_LIBS@
+       	;;
+
+    --deps)
+       	echo @PSPHOT_LIBS@
+       	;;
+    *)
+	usage
+	exit 1
+	;;
+    esac
+    shift
+done
+
+exit 0
