2011/2/19 Dominic Fandrey <[email protected]>:
> Hello, there's a small typo in configure.ac that renders
> --with-dlopen-crypto-libs useless.
>
> Here's the fix:
[...]

Thanks!

> 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:
>
> --- configure.ac.orig   2011-02-19 18:20:05.000000000 +0100
> +++ configure.ac        2011-02-19 18:42:11.000000000 +0100
> @@ -120,7 +120,7 @@
>
>  # dlopen check
>  if [[ $use_dlopen_crypto_libs = "auto" ]]; then
> -  if test "${SYS}" != "mingw32" ; then
> +  if test "${SYS}" != "mingw32" -a "${SYS}" == "${SYS#freebsd}" ; 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"])],
>
>
> Note that --width-dlopen... does not work on mingw32 or freebsd,
> because the check is performed there, too and no exception is made
> in that case.

Maybe the attached patch would solve those issues too ?
diff --git a/configure.ac b/configure.ac
index 9f105a7..23ccaf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,21 +119,29 @@ if test "${SYS}" != "mingw32" ; then
 fi
 
 # dlopen check
+have_dlopen="no"
+if test "${SYS}" != "mingw32" ; then
+  have_dlopen="yes"
+else
+  AC_CHECK_FUNCS(
+    [dlopen],
+    [DLOPEN_LDFLAGS=""; have_dlopen="yes"],
+    [AC_CHECK_LIB([dl], [dlopen],
+       [DLOPEN_LDFLAGS="-ldl"; have_dlopen="yes"],
+       [have_dlopen="no"])])
+fi
+
 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

Reply via email to