Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / bind / dist / isc-config.sh.in
blob152bdc3ca09e0f8e5257e1bde0d10ee0f29042dd
1 #!/bin/sh
3 # Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: isc-config.sh.in,v 1.17 2007/06/19 23:46:59 tbox Exp
20 prefix=@prefix@
21 exec_prefix=@exec_prefix@
22 exec_prefix_set=
24 usage()
26 cat << EOF
27 Usage: isc-config [OPTIONS] [LIBRARIES]
28 Options:
29 [--prefix[=DIR]]
30 [--exec-prefix[=DIR]]
31 [--version]
32 [--libs]
33 [--cflags]
34 Libraries:
35 isc
36 isccc
37 isccfg
38 dns
39 lwres
40 bind9
41 EOF
42 exit $1
45 if test $# -eq 0; then
46 usage 1 1>&2
49 while test $# -gt 0; do
50 case "$1" in
51 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
52 *) optarg= ;;
53 esac
55 case "$1" in
56 --prefix=*)
57 prefix=$optarg
58 if test "x$exec_prefix_set" = x ; then
59 exec_prefix=$prefix
62 --prefix)
63 echo_prefix=true
65 --exec-prefix=*)
66 exec_prefix=$optarg
68 --exec-prefix)
69 echo_exec_prefix=true
71 --version)
72 echo @BIND9_VERSION@
73 exit 0
75 --cflags)
76 echo_cflags=true
78 --libs)
79 echo_libs=true;
81 isc)
82 libisc=true;
84 isccc)
85 libisccc=true;
86 libisc=true;
88 isccfg)
89 libisccfg=true;
90 libisc=true;
92 dns)
93 libdns=true;
94 libisc=true;
96 lwres)
97 liblwres=true;
99 bind9)
100 libdns=true;
101 libisc=true;
102 libisccfg=true;
103 libbind9=true;
106 usage 1 1>&2
107 esac
108 shift
109 done
111 if test x"$echo_prefix" = x"true" ; then
112 echo $prefix
114 if test x"$echo_exec_prefix" = x"true" ; then
115 echo $exec_prefix
117 if test x"$echo_cflags" = x"true"; then
118 includes="-I${exec_prefix}/include"
119 if test x"$libisc" = x"true"; then
120 includes="$includes @ALWAYS_DEFINES@ @STD_CINCLUDES@ @STD_CDEFINES@ @CCOPT@"
122 echo $includes
124 if test x"$echo_libs" = x"true"; then
125 libs=-L${exec_prefix}/lib
126 if test x"$liblwres" = x"true" ; then
127 libs="$libs -llwres"
129 if test x"$libbind9" = x"true" ; then
130 libs="$libs -lbind9"
132 if test x"$libdns" = x"true" ; then
133 libs="$libs -ldns @DNS_CRYPTO_LIBS@"
135 if test x"$libisccfg" = x"true" ; then
136 libs="$libs -lisccfg"
138 if test x"$libisccc" = x"true" ; then
139 libs="$libs -lisccc"
141 if test x"$libisc" = x"true" ; then
142 libs="$libs -lisc"
143 needothers=true
145 if test x"$needothers" = x"true" ; then
146 libs="$libs @CCOPT@ @LIBS@"
148 echo $libs