From cvs-return-3481-apmail-apr-cvs-archive=apr.apache.org@apr.apache.org Tue May 14 08:05:36 2002 Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 41542 invoked by uid 500); 14 May 2002 08:05:35 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 41488 invoked from network); 14 May 2002 08:05:34 -0000 Date: 14 May 2002 08:05:33 -0000 Message-ID: <20020514080533.23212.qmail@icarus.apache.org> From: jerenkrantz@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr apr-config.in X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jerenkrantz 02/05/14 01:05:32 Modified: . apr-config.in Log: 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. Revision Changes Path 1.17 +15 -2 apr/apr-config.in Index: apr-config.in =================================================================== RCS file: /home/cvs/apr/apr-config.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- apr-config.in 14 May 2002 03:06:18 -0000 1.16 +++ apr-config.in 14 May 2002 08:05:32 -0000 1.17 @@ -185,10 +185,23 @@ 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"