Actually add nspr-config to RELEASE_BINS this time. NSPRPUB_CLIENT_BRANCH
authorcls%seawood.org
Thu, 05 Apr 2001 03:17:36 +0000
branchNSPRPUB_CLIENT_BRANCH
changeset 1806 bdf7e7f967c12a5e5bfd86863ee5b9626ed1d136
parent 1805 ac6c912c79bd4d0bf803c910bc4a67cf2ff73b37
child 1807 3be9ac6d2e78c79cc99ef1412b2e3ef55c1884a1
push idunknown
push userunknown
push dateunknown
bugs73919
Actually add nspr-config to RELEASE_BINS this time. Last check in & this one, Bug #73919 r=jag <disttsc@bart.nl>
config/Makefile.in
config/nspr-config.in
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -26,16 +26,18 @@ include $(MOD_DEPTH)/config/autoconf.mk
 
 # Indicate that this directory builds build tools.
 INTERNAL_TOOLS	= 1
 
 # autoconf.mk must be deleted last (from the top-level directory)
 # because it is included by every makefile.
 DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config
 
+RELEASE_BINS	= nspr-config
+
 include $(topsrcdir)/config/config.mk
 
 CSRCS	= now.c
 
 # This version hasn't been ported for us; the one in mozilla/config has
 ifneq ($(OS_ARCH),OS2)
 CSRCS  += nsinstall.c
  
new file mode 100755
--- /dev/null
+++ b/config/nspr-config.in
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@MOD_MAJOR_VERSION@
+minor_version=@MOD_MINOR_VERSION@
+revision_version=@MOD_REVISION_VERSION@
+
+usage()
+{
+	cat <<EOF
+Usage: nspr-config [OPTIONS] [LIBRARIES]
+Options:
+	[--prefix[=DIR]]
+	[--version]
+	[--libs]
+	[--cflags]
+Libraries:
+	nspr
+	plc
+	plds
+EOF
+	exit $1
+}
+
+if test $# -eq 0; then
+	usage 1 1>&2
+fi
+
+lib_nspr=yes
+lib_plc=yes
+lib_plds=yes
+
+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=yes
+      ;;
+    --version)
+      echo ${major_version}.${minor_version}.${revision_version}
+      ;;
+    --cflags)
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    nspr)
+      lib_nspr=yes
+      ;;
+    plc)
+      lib_plc=yes
+      ;;
+    plds)
+      lib_plds=yes
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+if test "$echo_prefix" = "yes"; then
+	echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+	echo $exec_prefix
+fi
+
+if test "$echo_cflags" = "yes"; then
+      echo -I@includedir@/nspr
+fi
+
+if test "$echo_libs" = "yes"; then
+      libdirs=-L@libdir@
+      if test -n "$lib_plds"; then
+	libdirs="$libdirs -lplds${major_version}"
+      fi
+      if test -n "$lib_plc"; then
+	libdirs="$libdirs -lplc${major_version}"
+      fi
+      if test -n "$lib_nspr"; then
+	libdirs="$libdirs -lnspr${major_version}"
+      fi
+
+      echo $libdirs @LDFLAGS@ @OS_LIBS@
+fi      
+