diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2014-11-22 23:45:59 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2014-11-22 23:45:59 +0000 |
commit | 7ac852cd9709af98b6c12f2c7eca67915932e8a9 (patch) | |
tree | 1ffa660b599f2e3227dcde7262751f147e7c4ade /configure.ac | |
parent | 8b8bc75c3f913dee50e10fb66d157cc278bd8570 (diff) | |
download | usdx-7ac852cd9709af98b6c12f2c7eca67915932e8a9.tar.gz usdx-7ac852cd9709af98b6c12f2c7eca67915932e8a9.tar.xz usdx-7ac852cd9709af98b6c12f2c7eca67915932e8a9.zip |
Fix PCRE on linux and macosx. The soname of libpcre.so is different depending on the system, e.g. .so.1 on Arch and .so.3 on Debian. Instead of always using libpcre.so.0, detect the soname for the current system. Thanks to rudi_s.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3105 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f61c91d3..a61048f7 100644 --- a/configure.ac +++ b/configure.ac @@ -263,6 +263,16 @@ AC_SUBST_DEFINE(HAVE_LIBPCRE, $libpcre_HAVE) # get libpcre library dir PKG_VALUE([libpcre], [LIBDIR], [variable=libdir], [$libpcre_PKG], [library dir (e.g. /usr/lib, /sw/lib, ...)]) +# we need the soname of the pcre library +if test x"$libpcre_HAVE" = xyes; then + old_LIBS="$LIBS" + LIBS="-lpcre" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [libpcre_LIBNAME=`objdump -p "conftest$EXEEXT" | grep pcre | awk '{print $2}'` dnl ' + AC_SUBST([libpcre_LIBNAME],[$libpcre_LIBNAME])], + [AC_MSG_ERROR([failed to link])]) + LIBS="$old_LIBS" +fi # find portmixer PKG_HAVE([portmixer], [portmixer], no) |