>> There is no -ldl on FreeBSD. It's obsolete, because dlopen is part
>> of -lc (libc). I'm not really comfortable enough with autotools
>> to resolve this nicely, but I suppose hooking onto the mingw32
>> exception will do:
>> ...
>
> Maybe the attached patch would solve those issues too ?
Yes, your patch works as expected in all scenarios, i.e. auto, with
and without! Note that the way you designed your nested checks
(libc, if failed libldl) should make the check for mingw32 obsolete,
too:
--- configure.ac.orig 2011-02-22 13:27:22.000000000 +0100
+++ configure.ac 2011-02-22 14:18:53.000000000 +0100
@@ -119,21 +119,24 @@
fi
# dlopen check
+AC_CHECK_FUNCS(
+ [dlopen],
+ [DLOPEN_LDFLAGS=""; have_dlopen="yes"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [DLOPEN_LDFLAGS="-ldl"; have_dlopen="yes"],
+ [have_dlopen="no"])])
+
if [[ $use_dlopen_crypto_libs = "auto" ]]; then
- if test "${SYS}" != "mingw32" ; then
- AC_CHECK_LIB([dl], [dlopen],
- [DLOPEN_LDFLAGS="-ldl"; AC_MSG_NOTICE($using_dlopen_crypto_libs)
- AC_DEFINE([DLOPEN_CRYPTO_LIBS], [1], ["Define to 1 if dlopening
crypto libs"])],
- [use_dlopen_crypto_libs="no"; AC_MSG_NOTICE($using_normal_linking)])
- else
- AC_DEFINE([DLOPEN_CRYPTO_LIBS], [1], ["Define to 1 if dlopening
crypto libs"])
+ use_dlopen_crypto_libs=$have_dlopen
+fi
+if [[ $use_dlopen_crypto_libs = "yes" ]]; then
+ if [[ $have_dlopen = "no" ]]; then
+ AC_MSG_ERROR($library_not_found)
fi
-elif [[ $use_dlopen_crypto_libs = "yes" ]]; then
- AC_CHECK_LIB([dl], [dlopen],
- [DLOPEN_LDFLAGS="-ldl"; AC_MSG_NOTICE($using_dlopen_crypto_libs)
- AC_DEFINE([DLOPEN_CRYPTO_LIBS], [1], ["Define to 1 if dlopening crypto
libs"])],
- [AC_MSG_ERROR($library_not_found)])
-else
+ AC_MSG_NOTICE($using_dlopen_crypto_libs)
+ AC_DEFINE([DLOPEN_CRYPTO_LIBS], [1], ["Define to 1 if dlopening crypto
libs"])
+fi
+if [[ $use_dlopen_crypto_libs = "no" ]]; then
AC_CHECK_LIB([aacs], [aacs_open],,
[AC_MSG_ERROR($library_not_found)])
AC_CHECK_LIB([bdplus], [bdplus_init],,
_______________________________________________
libbluray-devel mailing list
[email protected]
http://mailman.videolan.org/listinfo/libbluray-devel