Ticket #751: pkgconfig_librt.patch

File pkgconfig_librt.patch, 1.7 KB (added by mgautier, 7 years ago)
  • xapian-core/configure.ac

    diff --git a/xapian-core/configure.ac b/xapian-core/configure.ac
    index fbec068..7083ffd 100644
    a b case $host_os in  
    433433esac
    434434
    435435dnl We use timer_create() if available to implement a search time limit.
     436use_rt_lib=0
    436437SAVE_LIBS=$LIBS
    437438AC_SEARCH_LIBS([timer_create], [rt],
    438439               [
    AC_SEARCH_LIBS([timer_create], [rt],  
    441442[[#if defined _AIX || defined __GNU__
    442443#error timer_create known not to work
    443444#endif]])],
    444         [AC_MSG_RESULT([yes])
    445         XAPIAN_LIBS="$LIBS $XAPIAN_LIBS"
    446         AC_DEFINE([HAVE_TIMER_CREATE], [1], [Define to 1 if you have the 'timer_create' function.])]
    447         ,
    448         [AC_MSG_RESULT([no])
    449     ])
     445          [AC_MSG_RESULT([yes])
     446          XAPIAN_LIBS="$LIBS $XAPIAN_LIBS"
     447          AC_DEFINE([HAVE_TIMER_CREATE], [1], [Define to 1 if you have the 'timer_create' function.])
     448          AS_IF([test "$ac_res" != "none required"], use_rt_lib=1)
     449      ],
     450          [AC_MSG_RESULT([no])]
     451        )
    450452])
    451453LIBS=$SAVE_LIBS
     454AM_CONDITIONAL([USE_RT_LIB], [test "$use_rt_lib" = 1])
    452455
    453456dnl Used by tests/soaktest/soaktest.cc
    454457AC_CHECK_FUNCS([srandom random])
  • xapian-core/pkgconfig/xapian-core.pc.in

    diff --git a/xapian-core/pkgconfig/xapian-core.pc.in b/xapian-core/pkgconfig/xapian-core.pc.in
    index 39c28ba..712f7a3 100644
    a b libraries for applications using Xapian functionality.  
    1111URL: https://xapian.org/
    1212Version: @VERSION@
    1313Cflags: -I${includedir} @abi_affecting_cxxflags@
    14 Libs: @ldflags@ -L${libdir} -lxapian@LIBRARY_VERSION_SUFFIX@
     14@USE_RT_LIB_TRUE@Libs: @ldflags@ -L${libdir} -lxapian@LIBRARY_VERSION_SUFFIX@ -lrt
     15@USE_RT_LIB_FALSE@Libs: @ldflags@ -L${libdir} -lxapian@LIBRARY_VERSION_SUFFIX@