transport: empty test for sqlite converter
[abstract.git] / nspr-config
blob6d543d2d215cfd2c6fdd889c260a4b01f1da2254
1 #!/bin/sh
3 prefix=/usr/local
5 major_version=4
6 minor_version=7
7 patch_version=2
9 usage()
11 cat <<EOF
12 Usage: nspr-config [OPTIONS] [LIBRARIES]
13 Options:
14 [--prefix[=DIR]]
15 [--exec-prefix[=DIR]]
16 [--includedir[=DIR]]
17 [--libdir[=DIR]]
18 [--version]
19 [--libs]
20 [--cflags]
21 Libraries:
22 nspr
23 plc
24 plds
25 EOF
26 exit $1
29 if test $# -eq 0; then
30 usage 1 1>&2
33 lib_nspr=yes
34 lib_plc=yes
35 lib_plds=yes
37 while test $# -gt 0; do
38 case "$1" in
39 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
40 *) optarg= ;;
41 esac
43 case $1 in
44 --prefix=*)
45 prefix=$optarg
47 --prefix)
48 echo_prefix=yes
50 --exec-prefix=*)
51 exec_prefix=$optarg
53 --exec-prefix)
54 echo_exec_prefix=yes
56 --includedir=*)
57 includedir=$optarg
59 --includedir)
60 echo_includedir=yes
62 --libdir=*)
63 libdir=$optarg
65 --libdir)
66 echo_libdir=yes
68 --version)
69 echo ${major_version}.${minor_version}.${patch_version}
71 --cflags)
72 echo_cflags=yes
74 --libs)
75 echo_libs=yes
77 nspr)
78 lib_nspr=yes
80 plc)
81 lib_plc=yes
83 plds)
84 lib_plds=yes
87 usage 1 1>&2
89 esac
90 shift
91 done
93 # Set variables that may be dependent upon other variables
94 if test -z "$exec_prefix"; then
95 exec_prefix=${prefix}
97 if test -z "$includedir"; then
98 includedir=${prefix}/include/nspr
100 if test -z "$libdir"; then
101 libdir=${exec_prefix}/lib
104 if test "$echo_prefix" = "yes"; then
105 echo $prefix
108 if test "$echo_exec_prefix" = "yes"; then
109 echo $exec_prefix
112 if test "$echo_includedir" = "yes"; then
113 echo $includedir
116 if test "$echo_libdir" = "yes"; then
117 echo $libdir
120 if test "$echo_cflags" = "yes"; then
121 echo -I$includedir
124 if test "$echo_libs" = "yes"; then
125 libdirs=-L$libdir
126 if test -n "$lib_plds"; then
127 libdirs="$libdirs -lplds${major_version}"
129 if test -n "$lib_plc"; then
130 libdirs="$libdirs -lplc${major_version}"
132 if test -n "$lib_nspr"; then
133 libdirs="$libdirs -lnspr${major_version}"
135 os_ldflags=""
136 for i in $os_ldflags ; do
137 if echo $i | grep \^-L >/dev/null; then
138 libdirs="$libdirs $i"
140 done
141 echo $libdirs -lpthread -ldl