AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
])
-AM_CONDITIONAL(HAVE_SHARED_PLUGINS, [test "${enable_shared}" != "no"])
-
dnl
dnl Gettext stuff
dnl
dnl Check for usual libc functions
AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
-AC_CHECK_FUNCS([daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
-AC_REPLACE_FUNCS([asprintf atof atoll dirfd flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
+AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
+AC_REPLACE_FUNCS([asprintf atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
])
])
dnl Check for dynamic plugins
-LIBDL="no"
+LIBDL=""
+have_dynamic_objects="no"
LIBS_save="$LIBS"
AC_SEARCH_LIBS(dlopen, [dl svld], [
AS_IF([test "$ac_cv_search_dlopen" != "none required"], [
LIBDL="$ac_cv_search_dlopen"
])
+ have_dynamic_objects="yes"
])
LIBS="$LIBS_save"
# Windows
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
LIBDL=""
+ have_dynamic_objects="yes" #assume we can use shared objects
])
-AS_IF([test "$LIBDL" != "no"], [
+test "${enable_shared}" = "no" && have_dynamic_objects=no
+
+AS_IF([test "${have_dynamic_objects}" != "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=""
])
+AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"])
+
AC_SUBST(LIBDL)
VLC_ADD_LIBS([realvideo lua],[$LIBDL])
], [
ac_cv_linux_s2api=no
])])
-AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_s2api" = no])
+AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_s2api" = "yes"])
dnl
dnl libdvbpsi check for ts mux/demux