-# Only test for dlopen() if the others didn't work
-LIBDL=""
-if test "${ac_cv_have_plugins}" = "no" -o "${SYS}" = "darwin"; then
- ac_cv_my_have_dlopen=no
- AC_CHECK_FUNC(dlopen, [
- ac_cv_my_have_dlopen=yes
- ], [
- AC_CHECK_LIB(dl, dlopen, [
- ac_cv_my_have_dlopen=yes
- LIBDL="-ldl"
- ], [
- AC_CHECK_LIB(svld, dlopen, [
- ac_cv_my_have_dlopen=yes
- LIBDL="-lsvld"
- ])
- ])
- ])
- if test "${ac_cv_my_have_dlopen}" = "yes"; then
- ac_cv_have_plugins=yes
- VLC_ADD_LIBS([libvlccore realvideo lua],[$LIBDL])
- fi
-fi
+AS_IF([test "$LIBDL" != "no"], [
+ AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1,
+ [Define to 1 if dynamic plugins are supported.])
+], [
+ dnl Clear $LIBDL so as not to break linking
+ LIBDL=""
+])