winejack: Fix detection of jack libraries with a bad soname.
Francois Gouget
fgouget at codeweavers.com
Fri Jul 11 10:47:23 CDT 2008
---
As described in bug 5033 [1], at least on Debian 4.0, the Jack library
is called libjack-0.100.0.so.0. However by default the
WINE_CHECK_SONAME() macro is looking for something like 'libjack.so' so
it thinks that the library is missing. The fix is to give it the right
pattern for matching the library. The parts that make this tricky are
sed's regular expression support and m4:
* The obvious form is:
libjack(-[0-9.]+)?
* But sed does not support '+' and '?'. However it does support \{n,\}
and \{n,m\} so that's ok and we get:
libjack(-[0-9.]\{1,\})\{0,1\}
* However on Solaris, sed does not support applying \{\} quantifiers to
the stuff in parentheses. So that's out. So we get:
(libjack|libjack-[0-9.]\{1,\})
* But sed does not support '|' (and also it would be \(\) ) so we have
to go with a less specific form:
libjack-\{0,1\}[0-9.]*
* Also square brackets don't play well with m4 so I had to replace them
with quadrigraphs:
libjack-\{0,1\}@<:@0-9.@:>@*
* Finally m4 also does not like the curly brackets unless I double
quote the regexp so we end up with:
[[libjack-\{0,1\}@<:@0-9.@:>@*]]
[1] http://bugs.winehq.org/show_bug.cgi?id=5033
configure | 4 ++--
configure.ac | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index d9f9b65..6c49e55 100755
--- a/configure
+++ b/configure
@@ -15154,8 +15154,8 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
$as_test_x conftest$ac_exeext; then
case "$LIBEXT" in
dll) ;;
- dylib) ac_cv_lib_soname_jack=`otool -L conftest$ac_exeext | grep "libjack\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libjack\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
- *) ac_cv_lib_soname_jack=`$ac_cv_path_LDD conftest$ac_exeext | grep "libjack\\.$LIBEXT" | sed -e "s/^.*\(libjack\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
+ dylib) ac_cv_lib_soname_jack=`otool -L conftest$ac_exeext | grep "libjack-\{0,1\}[0-9.]*\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libjack-\{0,1\}[0-9.]*\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
+ *) ac_cv_lib_soname_jack=`$ac_cv_path_LDD conftest$ac_exeext | grep "libjack-\{0,1\}[0-9.]*\\.$LIBEXT" | sed -e "s/^.*\(libjack-\{0,1\}[0-9.]*\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
esac
else
echo "$as_me: failed program was:" >&5
diff --git a/configure.ac b/configure.ac
index 400152f..8bfb938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1129,7 +1129,7 @@ WINE_NOTICE_WITH(cups,[test "x$ac_cv_lib_soname_cups" = "x"],
dnl **** Check for jack ****
if test "$ac_cv_header_jack_jack_h" = "yes"
then
- WINE_CHECK_SONAME(jack,jack_client_new)
+ WINE_CHECK_SONAME(jack,jack_client_new,,,,[[libjack-\{0,1\}@<:@0-9.@:>@*]])
fi
dnl **** Check for fontconfig ****
--
1.5.6
More information about the wine-patches
mailing list