libbluray | branch: master | hpi1 <[email protected]> | Mon Nov 14 00:16:18 2011 +0200| [6eeb20d915e129e62b47f19f5cb494e3e177e1a8] | committer: hpi1
Fixed dlopen check for systems where it is in libc > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=6eeb20d915e129e62b47f19f5cb494e3e177e1a8 --- configure.ac | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index 316ad47..0bc428b 100644 --- a/configure.ac +++ b/configure.ac @@ -119,24 +119,27 @@ if test "${SYS}" != "mingw32" ; then fi # dlopen check +if test "${SYS}" != "mingw32" ; then + AC_CHECK_FUNCS( + [dlopen], + [DLOPEN_LDFLAGS=""; have_dlopen="yes"], + [AC_CHECK_LIB([dl], [dlopen], + [DLOPEN_LDFLAGS="-ldl"; have_dlopen="yes"], + [have_dlopen="no"])]) +else + have_dlopen="yes" +fi + +# dlopen check 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"]) - fi -elif [[ $use_dlopen_crypto_libs = "yes" ]]; 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"])], - [AC_MSG_ERROR($library_not_found)]) - 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 + AC_MSG_NOTICE($using_dlopen_crypto_libs) + AC_DEFINE([DLOPEN_CRYPTO_LIBS], [1], ["Define to 1 if dlopening crypto libs"]) else AC_CHECK_LIB([aacs], [aacs_open],, [AC_MSG_ERROR($library_not_found)]) _______________________________________________ libbluray-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libbluray-devel
