[packages] libxapian: fix xapian-config M4 macro
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 11 Oct 2011 15:55:43 +0000 (15:55 +0000)
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 11 Oct 2011 15:55:43 +0000 (15:55 +0000)
don't check for xapian using 'xapian-config --ltlibs', since .la files are not installed anymore

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28415 3c298f89-4303-0410-b956-a3cf2f4a3e73

libs/libxapian/patches/004-xapian_config_no_ltlibs.patch [new file with mode: 0644]

diff --git a/libs/libxapian/patches/004-xapian_config_no_ltlibs.patch b/libs/libxapian/patches/004-xapian_config_no_ltlibs.patch
new file mode 100644 (file)
index 0000000..cdcf5f5
--- /dev/null
@@ -0,0 +1,51 @@
+Index: xapian-core-1.0.7/m4-macros/xapian.m4
+===================================================================
+--- xapian-core-1.0.7.orig/m4-macros/xapian.m4 2011-10-11 16:11:04.000000000 +0200
++++ xapian-core-1.0.7/m4-macros/xapian.m4      2011-10-11 16:12:00.000000000 +0200
+@@ -47,14 +47,12 @@
+       [$2])
+   else
+     AC_MSG_CHECKING([$XAPIAN_CONFIG works])
+-    dnl check for --ltlibs but not --libs as "xapian-config --libs" will
+-    dnl fail if xapian isn't installed...
+     dnl run with exec to avoid leaking output on "real" bourne shells
+-    if (exec >&5 2>&5 ; $XAPIAN_CONFIG --ltlibs --cxxflags; exit $?) then
++    if (exec >&5 2>&5 ; $XAPIAN_CONFIG --libs --cxxflags; exit $?) then
+       AC_MSG_RESULT(yes)
+     else
+-      AC_MSG_ERROR([\`$XAPIAN_CONFIG --ltlibs --cxxflags' doesn't work, aborting])
++      AC_MSG_ERROR([\`$XAPIAN_CONFIG --libs --cxxflags' doesn't work, aborting])
+     fi
+ dnl If LT_INIT, AC_PROG_LIBTOOL or the deprecated older version
+@@ -64,11 +62,11 @@
+     XAPIAN_VERSION=`$XAPIAN_CONFIG --version|sed 's/.* //;s/_svn[[0-9]]*$//'`
+     XAPIAN_CXXFLAGS=`$XAPIAN_CONFIG --cxxflags`
+     AC_PROVIDE_IFELSE([LT_INIT],
+-      [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
++      [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
+       [AC_PROVIDE_IFELSE([AC_PROG_LIBTOOL],
+-      [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
++      [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
+       [AC_PROVIDE_IFELSE([AM_PROG_LIBTOOL],
+-        [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
++        [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
+         dnl Pass magic option so xapian-config knows we called it (so it
+         dnl can choose a more appropriate error message if asked to link
+         dnl with an uninstalled libxapian).  Also pass ac_top_srcdir
+@@ -76,11 +74,11 @@
+         dnl "configure.in" according to which is in use.
+         [XAPIAN_LIBS=`ac_top_srcdir="$ac_top_srcdir" $XAPIAN_CONFIG --from-xo-lib-xapian --libs`
+         define([LT_INIT], defn([LT_INIT])
+-               [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])
++               [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])
+         define([AC_PROG_LIBTOOL], defn([AC_PROG_LIBTOOL])
+-               [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])
++               [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])
+         define([AM_PROG_LIBTOOL], defn([AM_PROG_LIBTOOL])
+-               [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])])])])
++               [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])])])])
+     ifelse([$1], , :, [$1])
+   fi
+   AC_SUBST(XAPIAN_CXXFLAGS)