summaryrefslogtreecommitdiff
path: root/apr-config.in
diff options
context:
space:
mode:
authorGreg Stein <gstein@apache.org>2002-02-06 11:41:57 +0000
committerGreg Stein <gstein@apache.org>2002-02-06 11:41:57 +0000
commitcbb09718cdf7b15d33ff2f08526fef208de27e28 (patch)
tree6c0ebe8ca8e35191262736ea905073959c36c6a7 /apr-config.in
parentc6ecb57de9a9643696d8a3121ff7e567cc54d8de (diff)
downloadapr-cbb09718cdf7b15d33ff2f08526fef208de27e28.tar.gz
Big revamp of the find_apr.m4 script for locating an installed/bundled
copy of APR. Some associated changes in apr-config to better support the concept, and to fix some issues with apps using it for flags. * find_apr.m4: dramatic simplification. if we can find apr-config, then we can get all the possible information we might need: libraries, includes, linker flags, etc. So, most of the code was cut and we now just look for apr-config. The parameters to APR_FIND_APR have been clarified and cleand up to better support VPATH builds. * apr-config.in: glom all flags together to prevent newlines from getting in there. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62918 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'apr-config.in')
-rw-r--r--apr-config.in34
1 files changed, 21 insertions, 13 deletions
diff --git a/apr-config.in b/apr-config.in
index 065851058..e3c31c050 100644
--- a/apr-config.in
+++ b/apr-config.in
@@ -123,6 +123,8 @@ else
LA_FILE="$thisdir/libapr.la"
fi
+flags=""
+
while test $# -gt 0; do
# Normalize the prefix.
case "$1" in
@@ -137,52 +139,54 @@ while test $# -gt 0; do
;;
--prefix)
echo $prefix
+ exit 0
;;
--cflags)
- echo $CFLAGS
+ flags="$flags $CFLAGS"
;;
--cppflags)
- echo $CPPFLAGS
+ flags="$flags $CPPFLAGS"
;;
--libs)
- echo $LIBS
+ flags="$flags $LIBS"
;;
--ldflags)
- echo $LDFLAGS
+ flags="$flags $LDFLAGS"
;;
--includes)
if test "$location" = "installed"; then
- echo "-I$includedir $EXTRA_INCLUDES"
+ flags="$flags -I$includedir $EXTRA_INCLUDES"
elif test "$location" = "source"; then
- echo "-I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+ flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
else
- echo "-I$thisdir/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+ flags="$flags -I$thisdir/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
fi
;;
--srcdir)
echo $APR_SOURCE_DIR
+ exit 0
;;
--link-ld)
if test "$location" = "installed"; then
### avoid using -L if libdir is a "standard" location like /usr/lib
- echo "-L$libdir -lapr"
+ flags="$flags -L$libdir -lapr"
else
- echo "-L$thisdir -lapr"
+ flags="$flags -L$thisdir -lapr"
fi
;;
--link-libtool)
if test -f "$LA_FILE"; then
- echo $LA_FILE
+ flags="$flags $LA_FILE"
elif test "$location" = "installed"; then
### avoid using -L if libdir is a "standard" location like /usr/lib
- echo "-L$libdir -lapr"
+ flags="$flags -L$libdir -lapr"
else
- echo "-L$thisdir -lapr"
+ flags="$flags-L$thisdir -lapr"
fi
;;
--apr-la-file)
if test -f "$LA_FILE"; then
- echo $LA_FILE
+ flags="$flags $LA_FILE"
fi
;;
--help)
@@ -199,4 +203,8 @@ while test $# -gt 0; do
shift
done
+if test -n "$flags"; then
+ echo "$flags"
+fi
+
exit 0