Bug 41192

Summary: Add the expat libtool file to the LT_LDFLAGS variable
Product: APR Reporter: Davi Arnaut <davi>
Component: APR-utilAssignee: Apache Portable Runtime bugs mailinglist <bugs>
Status: NEEDINFO ---    
Severity: trivial Keywords: PatchAvailable
Priority: P1    
Version: HEAD   
Target Milestone: ---   
Hardware: All   
OS: other   
Attachments: Add the expat libtool file to the LT_LDFLAGS variable

Description Davi Arnaut 2006-12-17 11:15:01 UTC
Add the expat libtool file to the LT_LDFLAGS variable to avoid placing a
libtool file path onto LDFLAGS (pkg-config --libs apr-util-1).

apr-util uses apr_rules.mk (from apr) which places the LT_LDFLAGS
on the libtool link command (confirm it by looking at apr's configure.in).

Current behavior is broken because it will place a .la file path on the
LDFLAGS for non-libtool compiles, as APRUTIL_EXPORT_LIBS is also used
when in the apr-util.pc.in file. e.g.:

/Users/davi/svn/apr-util $ pkg-config --libs apr-util-1
/Users/davi/svn/apr-util/xml/expat/lib/libexpat.la -L/tmp/apu/lib
-L/opt/local/lib -laprutil-1 -lsqlite3 -liconv -lapr-1 -lpthread
Comment 1 Davi Arnaut 2006-12-17 11:15:46 UTC
Created attachment 19271 [details]
Add the expat libtool file to the LT_LDFLAGS variable
Comment 2 Joe Orton 2007-07-04 03:12:28 UTC
The -lexpat should get added to the set of exported libs though, otherwise
everything will break if you do an all-static build.  So it should really be
adding "-L$libdir -lexpat" to _EXPORT_LIBS for the bundled-expat case, I guess.
Comment 3 William A. Rowe Jr. 2007-10-31 01:55:44 UTC
Sounds right Joe.  Care to rework this patch Davi?