[packages] libxapian: fix xapian-config M4 macro
[openwrt/svn-archive/archive.git] / libs / libxapian / patches / 004-xapian_config_no_ltlibs.patch
1 Index: xapian-core-1.0.7/m4-macros/xapian.m4
2 ===================================================================
3 --- xapian-core-1.0.7.orig/m4-macros/xapian.m4 2011-10-11 16:11:04.000000000 +0200
4 +++ xapian-core-1.0.7/m4-macros/xapian.m4 2011-10-11 16:12:00.000000000 +0200
5 @@ -47,14 +47,12 @@
6 [$2])
7 else
8 AC_MSG_CHECKING([$XAPIAN_CONFIG works])
9 - dnl check for --ltlibs but not --libs as "xapian-config --libs" will
10 - dnl fail if xapian isn't installed...
11
12 dnl run with exec to avoid leaking output on "real" bourne shells
13 - if (exec >&5 2>&5 ; $XAPIAN_CONFIG --ltlibs --cxxflags; exit $?) then
14 + if (exec >&5 2>&5 ; $XAPIAN_CONFIG --libs --cxxflags; exit $?) then
15 AC_MSG_RESULT(yes)
16 else
17 - AC_MSG_ERROR([\`$XAPIAN_CONFIG --ltlibs --cxxflags' doesn't work, aborting])
18 + AC_MSG_ERROR([\`$XAPIAN_CONFIG --libs --cxxflags' doesn't work, aborting])
19 fi
20
21 dnl If LT_INIT, AC_PROG_LIBTOOL or the deprecated older version
22 @@ -64,11 +62,11 @@
23 XAPIAN_VERSION=`$XAPIAN_CONFIG --version|sed 's/.* //;s/_svn[[0-9]]*$//'`
24 XAPIAN_CXXFLAGS=`$XAPIAN_CONFIG --cxxflags`
25 AC_PROVIDE_IFELSE([LT_INIT],
26 - [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
27 + [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
28 [AC_PROVIDE_IFELSE([AC_PROG_LIBTOOL],
29 - [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
30 + [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
31 [AC_PROVIDE_IFELSE([AM_PROG_LIBTOOL],
32 - [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
33 + [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
34 dnl Pass magic option so xapian-config knows we called it (so it
35 dnl can choose a more appropriate error message if asked to link
36 dnl with an uninstalled libxapian). Also pass ac_top_srcdir
37 @@ -76,11 +74,11 @@
38 dnl "configure.in" according to which is in use.
39 [XAPIAN_LIBS=`ac_top_srcdir="$ac_top_srcdir" $XAPIAN_CONFIG --from-xo-lib-xapian --libs`
40 define([LT_INIT], defn([LT_INIT])
41 - [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])
42 + [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])
43 define([AC_PROG_LIBTOOL], defn([AC_PROG_LIBTOOL])
44 - [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])
45 + [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])
46 define([AM_PROG_LIBTOOL], defn([AM_PROG_LIBTOOL])
47 - [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])])])])
48 + [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])])])])
49 ifelse([$1], , :, [$1])
50 fi
51 AC_SUBST(XAPIAN_CXXFLAGS)