upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / srclib / apr / apr-config
1 #!/bin/sh
2 # Licensed to the Apache Software Foundation (ASF) under one or more
3 # contributor license agreements.  See the NOTICE file distributed with
4 # this work for additional information regarding copyright ownership.
5 # The ASF licenses this file to You under the Apache License, Version 2.0
6 # (the "License"); you may not use this file except in compliance with
7 # the License.  You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17
18 # APR script designed to allow easy command line access to APR configuration
19 # parameters.
20
21 APR_MAJOR_VERSION="0"
22 APR_DOTTED_VERSION="0.9.19"
23
24 prefix="/bottlenecks/rubbos/app/apache2"
25 exec_prefix="/bottlenecks/rubbos/app/apache2"
26 bindir="${prefix}/bin"
27 libdir="${prefix}/lib"
28 datarootdir="/bottlenecks/rubbos/app/apache2"
29 datadir="/bottlenecks/rubbos/app/apache2"
30 installbuilddir="${prefix}/build"
31 includedir="/bottlenecks/rubbos/app/apache2/include"
32
33 CC="gcc"
34 CPP="gcc -E"
35 SHELL="/bin/bash"
36 CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE"
37 CFLAGS="-g -O2 -pthread"
38 LDFLAGS=""
39 LIBS="-lrt -lm -lcrypt -lnsl  -lpthread -ldl"
40 EXTRA_INCLUDES=""
41 SHLIBPATH_VAR="LD_LIBRARY_PATH"
42 APR_SOURCE_DIR="/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr"
43 APR_BUILD_DIR="/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr"
44 APR_SO_EXT="lo"
45 APR_LIB_TARGET="-rpath \$(libdir) \$\$objects"
46 APR_LIBNAME="apr-${APR_MAJOR_VERSION}"
47
48 # NOTE: the following line is modified during 'make install': alter with care!
49 location=source
50
51 show_usage()
52 {
53     cat << EOF
54 Usage: apr-config [OPTION]
55
56 Known values for OPTION are:
57   --prefix[=DIR]    change prefix to DIR
58   --bindir          print location where binaries are installed
59   --includedir      print location where headers are installed
60   --cc              print C compiler name
61   --cpp             print C preprocessor name and any required options
62   --cflags          print C compiler flags
63   --cppflags        print cpp flags
64   --includes        print include information
65   --ldflags         print linker flags
66   --libs            print additional libraries to link against
67   --srcdir          print APR source directory
68   --installbuilddir print APR build helper directory
69   --link-ld         print link switch(es) for linking to APR
70   --link-libtool    print the libtool inputs for linking to APR
71   --shlib-path-var  print the name of the shared library path env var
72   --apr-la-file     print the path to the .la file, if available
73   --apr-so-ext      print the extensions of shared objects on this platform
74   --apr-lib-target  print the libtool target information
75   --apr-libtool     print the path to APR's libtool
76   --version         print the APR's version as a dotted triple
77   --help            print this help
78
79 When linking with libtool, an application should do something like:
80   APR_LIBS="\`apr-config --link-libtool --libs\`"
81 or when linking directly:
82   APR_LIBS="\`apr-config --link-ld --libs\`"
83
84 An application should use the results of --cflags, --cppflags, --includes,
85 and --ldflags in their build process.
86 EOF
87 }
88
89 if test $# -eq 0; then
90     show_usage
91     exit 1
92 fi
93
94 if test "$location" = "installed"; then
95     LA_FILE="$libdir/lib${APR_LIBNAME}.la"
96 else
97     LA_FILE="$APR_BUILD_DIR/lib${APR_LIBNAME}.la"
98 fi
99
100 flags=""
101
102 while test $# -gt 0; do
103     # Normalize the prefix.
104     case "$1" in
105     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
106     *) optarg= ;;
107     esac
108
109     case "$1" in
110     # It is possible for the user to override our prefix.
111     --prefix=*)
112     prefix=$optarg
113     ;;
114     --prefix)
115     echo $prefix
116     exit 0
117     ;;
118     --bindir)
119     echo $bindir
120     exit 0
121     ;;
122     --includedir)
123     if test "$location" = "installed"; then
124         flags="$includedir"
125     elif test "$location" = "source"; then
126         flags="$APR_SOURCE_DIR/include"
127     else
128         # this is for VPATH builds
129         flags="$APR_BUILD_DIR/include $APR_SOURCE_DIR/include"
130     fi
131     echo $flags
132     exit 0
133     ;;
134     --cc)
135     echo $CC
136     exit 0
137     ;;
138     --cpp)
139     echo $CPP
140     exit 0
141     ;;
142     --cflags)
143     flags="$flags $CFLAGS"
144     ;;
145     --cppflags)
146     flags="$flags $CPPFLAGS"
147     ;;
148     --libs)
149     flags="$flags $LIBS"
150     ;;
151     --ldflags)
152     flags="$flags $LDFLAGS"
153     ;;
154     --includes)
155     if test "$location" = "installed"; then
156         flags="$flags -I$includedir $EXTRA_INCLUDES"
157     elif test "$location" = "source"; then
158         flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
159     else
160         # this is for VPATH builds
161         flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
162     fi
163     ;;
164     --srcdir)
165     echo $APR_SOURCE_DIR
166     exit 0
167     ;;
168     --installbuilddir)
169     if test "$location" = "installed"; then
170         echo "${installbuilddir}"
171     elif test "$location" = "source"; then
172         echo "$APR_SOURCE_DIR/build"
173     else
174         # this is for VPATH builds
175         echo "$APR_BUILD_DIR/build"
176     fi
177     exit 0
178     ;;
179     --version)
180     echo $APR_DOTTED_VERSION
181     exit 0
182     ;;
183     --link-ld)
184     if test "$location" = "installed"; then
185         ### avoid using -L if libdir is a "standard" location like /usr/lib
186         flags="$flags -L$libdir -l${APR_LIBNAME}"
187     else
188         ### this surely can't work since the library is in .libs?
189         flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
190     fi
191     ;;
192     --link-libtool)
193     # If the LA_FILE exists where we think it should be, use it.  If we're
194     # installed and the LA_FILE does not exist, assume to use -L/-l
195     # (the LA_FILE may not have been installed).  If we're building ourselves,
196     # we'll assume that at some point the .la file be created.
197     if test -f "$LA_FILE"; then
198         flags="$flags $LA_FILE"
199     elif test "$location" = "installed"; then
200         ### avoid using -L if libdir is a "standard" location like /usr/lib
201         flags="$flags -L$libdir -l${APR_LIBNAME}"
202     else
203         flags="$flags $LA_FILE"
204     fi
205     ;;
206     --shlib-path-var)
207     echo "$SHLIBPATH_VAR"
208     exit 0
209     ;;
210     --apr-la-file)
211     if test -f "$LA_FILE"; then
212         flags="$flags $LA_FILE"
213     fi
214     ;;
215     --apr-so-ext)
216     echo "$APR_SO_EXT"
217     exit 0
218     ;;
219     --apr-lib-target)
220     echo "$APR_LIB_TARGET"
221     exit 0
222     ;;
223     --apr-libtool)
224     if test "$location" = "installed"; then
225         echo "${installbuilddir}/libtool"
226     else
227         echo "$APR_BUILD_DIR/libtool"
228     fi
229     exit 0
230     ;;
231     --help)
232     show_usage
233     exit 0
234     ;;
235     *)
236     show_usage
237     exit 1
238     ;;
239     esac
240
241     # Next please.
242     shift
243 done
244
245 if test -n "$flags"; then
246   echo "$flags"
247 fi
248
249 exit 0