summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>2001-04-05 03:17:36 +0000
committercls%seawood.org <devnull@localhost>2001-04-05 03:17:36 +0000
commit8dd90ca62e3299ccd99f793212fdaec5f89f7011 (patch)
tree4f8121cd9d71c91b0081d7f1c835ef02f70a95c7
parent52aa60f8946de54144cdae8df0971faf0d869a37 (diff)
downloadnspr-hg-8dd90ca62e3299ccd99f793212fdaec5f89f7011.tar.gz
Actually add nspr-config to RELEASE_BINS this time.
Last check in & this one, Bug #73919 r=jag <disttsc@bart.nl>
-rw-r--r--config/Makefile.in2
-rwxr-xr-xconfig/nspr-config.in98
2 files changed, 100 insertions, 0 deletions
diff --git a/config/Makefile.in b/config/Makefile.in
index bce82500..e7caa407 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -31,6 +31,8 @@ INTERNAL_TOOLS = 1
# 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
diff --git a/config/nspr-config.in b/config/nspr-config.in
new file mode 100755
index 00000000..d635a680
--- /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
+