diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-13 14:01:53 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-13 14:01:53 -0600 |
commit | 9e9e51c2eb3b7bb64e1d68be0d42bae3a4f24f79 (patch) | |
tree | fec599cdc57bc6d1cd5377ffc39425fb9e3464d1 /clucene.m4 | |
parent | 9962399a82af4deb740597a3953b53d1d43197d9 (diff) | |
download | bibletime-9e9e51c2eb3b7bb64e1d68be0d42bae3a4f24f79.tar.gz bibletime-9e9e51c2eb3b7bb64e1d68be0d42bae3a4f24f79.zip |
Fix FTBFS with CLucene v2
Diffstat (limited to 'clucene.m4')
-rw-r--r-- | clucene.m4 | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -28,7 +28,8 @@ AC_ARG_ENABLE(static-clucene, dnl try to find CLucene library files AC_MSG_CHECKING([for CLucene library files]) -ac_clucene_library_dirs="$ac_clucene_dir/lib $exec_prefix/lib $prefix/lib /usr/lib /usr/lib64 /usr/local/lib" +clucene_multiarch_libs="/usr/lib/`uname -m`-linux-gnu" +ac_clucene_library_dirs="$ac_clucene_dir/lib $exec_prefix/lib $prefix/lib /usr/lib /usr/lib64 /usr/local/lib $clucene_multiarch_libs" if test "x$ac_static_clucene" = "xYES"; then SEARCH_LIBS="libclucene.a"; @@ -40,13 +41,24 @@ fi AC_CACHE_VAL(ac_cv_clucene_libdir, AC_FIND_FILE($SEARCH_LIBS, $ac_clucene_library_dirs, ac_cv_clucene_libdir)) if test "x$ac_cv_clucene_libdir" = "xNO"; then - AC_MSG_ERROR(CLucene library not found. Try to use configure with --with-clucene-dir=/path/to/clucene); + AC_MSG_CHECKING([for CLucene 2.x library files]) + SEARCH_LIBS="libclucene-shared.so libclucene-shared.so.1"; + AC_CACHE_VAL(ac_cv_clucene2_libdir, AC_FIND_FILE($SEARCH_LIBS, $ac_clucene_library_dirs, ac_cv_clucene_libdir)) + + if test "x$ac_cv_clucene2_libdir" = "xNO"; then + AC_MSG_ERROR(CLucene library not found. Try to use configure with --with-clucene-dir=/path/to/clucene); + fi fi if test "x$ac_static_clucene" = "xYES"; then LIB_CLUCENE="$ac_cv_clucene_libdir/libclucene.a"; else - LIB_CLUCENE="-lclucene"; + if test "x$ac_cv_clucene2_libdir" = "xNO"; then + LIB_CLUCENE="-lclucene"; + else + CXXFLAGS="$CXXFLAGS -DCLUCENE_V2" + LIB_CLUCENE="-lclucene-shared"; + fi fi AC_SUBST(CLUCENE_LIBRARY_PATH) |