[libbluray-devel] configure issues

Dominic Fandrey kamikaze at bsdforen.de
Sat Feb 19 19:12:55 CET 2011


Hello, there's a small typo in configure.ac that renders
--with-dlopen-crypto-libs useless.

Here's the fix:

--- configure.ac.orig	2011-02-19 18:20:05.000000000 +0100
+++ configure.ac	2011-02-19 18:42:11.000000000 +0100
@@ -35,7 +35,7 @@
 pkg_config_missing="Could not find pkg-config.  Assuming..."
 
 # configure options
-AC_ARG_ENABLE([dlopen-crypto-libs],
+AC_ARG_WITH([dlopen-crypto-libs],
   [AS_HELP_STRING([--with-dlopen-crypto-libs],
   [use libaacs and libbdplus via dlopen (default is auto)])],
   [use_dlopen_crypto_libs=$withval],



I'm trying to port libbluray to FreeBSD, the next issue I'm
stumbling over:

...
checking for snprintf... yes
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... no
configure: error: Could not find required library!

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.

Oh, by the way, I successfully tested the patch, i.e. it allows me to
compile libbluray on FreeBSD.

Regards

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 


More information about the libbluray-devel mailing list