Bug 41192 - Add the expat libtool file to the LT_LDFLAGS variable
Summary: Add the expat libtool file to the LT_LDFLAGS variable
Status: NEEDINFO
Alias: None
Product: APR
Classification: Unclassified
Component: APR-util (show other bugs)
Version: HEAD
Hardware: All other
: P1 trivial (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2006-12-17 11:15 UTC by Davi Arnaut
Modified: 2007-10-31 01:55 UTC (History)
0 users



Attachments
Add the expat libtool file to the LT_LDFLAGS variable (1.15 KB, patch)
2006-12-17 11:15 UTC, Davi Arnaut
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?