summaryrefslogtreecommitdiff
blob: 2cb181a34c85434f5ea2875de828e98878676939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- xapian-config.in.orig
+++ xapian-config.in
@@ -132,6 +132,14 @@
 	test /usr/lib != "$libdir" && L="-L$libdir "
 	D=
 	eval `grep ^dependency_libs= "$libdir/libxapian.la"`
+	# Replace "/path/to/libfoo.la" with "-L/path/to -lfoo" which doesn't
+	# take into account any dependency_libs which libfoo.la may pull in
+	# but the only .la that we're likely to see is libstdc++.la and it'll
+	# hopefully work there as any dependency libs will probably be pulled
+	# in by the compiler for us.  Recursively pulling in dependency_libs
+	# is probably too hard to do in sh - we'd need to reimplement
+	# xapian-config in C or C++.
+	dependency_libs=`echo " $dependency_libs "|sed 's![     ][      ]*!  !g;s! \(/[^ ]*\)/lib\([^ ]*\).la ! -L\1 -l\2 !g;s!  ! !g;s!^ !!;s! $!!'`
 	test -n "$dependency_libs" && D=" $dependency_libs"
 	echo "$F$L-lxapian$D"
 	;;