summaryrefslogtreecommitdiff
path: root/apr-config.in
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2002-05-14 08:05:32 +0000
committerJustin Erenkrantz <jerenkrantz@apache.org>2002-05-14 08:05:32 +0000
commit569a00fe49b70c2aa4c6e20e4b4d6089f876d15f (patch)
treea9a4d00eb05e6ac3671e1b4358d80ee084910c3f /apr-config.in
parent42451da5c46d42e8bfd07203de6d8722861301fd (diff)
downloadapr-569a00fe49b70c2aa4c6e20e4b4d6089f876d15f.tar.gz
Revert and fix ala gstein.
The better thing to do here is if we're installed and the file doesn't exist, we MUST print the -L/-l options. But, if we're in build mode, then we'll be optimistic and assume that at some point we'll create the LA_FILE. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63398 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'apr-config.in')
-rw-r--r--apr-config.in17
1 files changed, 15 insertions, 2 deletions
diff --git a/apr-config.in b/apr-config.in
index d1670cdc5..d80ed2d15 100644
--- a/apr-config.in
+++ b/apr-config.in
@@ -185,10 +185,23 @@ while test $# -gt 0; do
fi
;;
--link-libtool)
- flags="$flags $LA_FILE"
+ # If the LA_FILE exists where we think it should be, use it. If we're
+ # installed and the LA_FILE does not exist, assume to use -L/-l
+ # (the LA_FILE may not have been installed). If we're building ourselves,
+ # we'll assume that at some point the .la file be created.
+ if test -f "$LA_FILE"; then
+ flags="$flags $LA_FILE"
+ elif test "$location" = "installed"; then
+ ### avoid using -L if libdir is a "standard" location like /usr/lib
+ flags="$flags -L$libdir -lapr"
+ else
+ flags="$flags $LA_FILE"
+ fi
;;
--apr-la-file)
- flags="$flags $LA_FILE"
+ if test -f "$LA_FILE"; then
+ flags="$flags $LA_FILE"
+ fi
;;
--apr-so-ext)
echo "$APR_SO_EXT"