diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-05-14 08:05:32 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-05-14 08:05:32 +0000 |
commit | 569a00fe49b70c2aa4c6e20e4b4d6089f876d15f (patch) | |
tree | a9a4d00eb05e6ac3671e1b4358d80ee084910c3f /apr-config.in | |
parent | 42451da5c46d42e8bfd07203de6d8722861301fd (diff) | |
download | apr-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.in | 17 |
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" |