]> git.sesse.net Git - vlc/blobdiff - configure.ac
Fix static modules
[vlc] / configure.ac
index 3e6974bcad25d3c5fef3d5a3fbfd937bc7debb25..4f20abedc868ddbfdacc53be1729d0acd462179b 100644 (file)
@@ -465,8 +465,6 @@ AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
   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
@@ -564,8 +562,8 @@ need_libc=false
 
 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.])
 ])
@@ -691,27 +689,34 @@ AC_CHECK_LIB(m,lrintf, [
 ])
 
 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])
 
@@ -2139,7 +2144,7 @@ EXPLODE
 ], [
   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