X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=cf125c84fc9ce5968538aa98f1f83a36d22f1bc4;hb=8bb2caa71370469b6d91c31ce3acaab5fa52b1de;hp=8ac12e60a0cbe6d57be2f87fb584c8ca359765df;hpb=5baeb0ec93da74f4dd8fc4af5b19cacd6abbd352;p=vlc diff --git a/configure.ac b/configure.ac index 8ac12e60a0..cf125c84fc 100644 --- a/configure.ac +++ b/configure.ac @@ -320,8 +320,8 @@ case "${host_os}" in *mingw32* | *cygwin* | *wince* | *mingwce*) AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(OBJCOPY, objcopy, :) - AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0501' for Windows XP APIs.]) - AC_DEFINE([_WIN32_IE], 0x0501, [Define to '0x0501' for IE 5.01 (and shell) APIs.]) + AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows XP SP2 APIs.]) + AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.]) case "${host_os}" in *wince* | *mingwce* | *mingw32ce*) @@ -452,13 +452,9 @@ dnl fail on anything other than pass_all. AC_CACHE_VAL(lt_cv_deplibs_check_method, [lt_cv_deplibs_check_method=pass_all]) -AC_DISABLE_STATIC -dnl AC_DISABLE_FAST_INSTALL -AC_LIBTOOL_DLOPEN -AC_LIBTOOL_WIN32_DLL -m4_undefine([AC_PROG_F77]) -m4_defun([AC_PROG_F77],[]) -AC_PROG_LIBTOOL +LT_INIT([dlopen win32-dll shared disable-static]) +LT_LANG([C++]) +LT_LANG([Windows Resource]) m4_undefine([AC_DEPLIBS_CHECK_METHOD]) m4_defun([AC_DEPLIBS_CHECK_METHOD],[]) @@ -696,50 +692,31 @@ AC_CHECK_LIB(m,lrintf, [ ]) dnl Check for dynamic plugins -ac_cv_have_plugins=no - -# Win32 style -if test "${ac_cv_have_plugins}" = "no"; then - if test "${SYS}" = "mingw32" ; then - AC_CHECK_LIB(kernel32, main, - [VLC_ADD_LIBS([libvlccore],[-lkernel32]) - ac_cv_have_plugins=yes]) - fi -fi +LIBDL="no" +LIBS_save="$LIBS" +AC_SEARCH_LIBS(dlopen, [dl svld], [ + AS_IF([test "$ac_cv_search_dlopen" != "none required"], [ + LIBDL="$ac_cv_search_dlopen" + ]) +]) +LIBS="$LIBS_save" -# WinCE style -if test "${ac_cv_have_plugins}" = "no"; then - if test "${SYS}" = "mingwce"; then - ac_cv_have_plugins=yes - fi -fi +# Windows +AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [ + LIBDL="" +]) -# Only test for dlopen() if the others didn't work -LIBDL="" -if test "${ac_cv_have_plugins}" = "no" -o "${SYS}" = "darwin"; then - AC_CHECK_HEADERS(dlfcn.h sys/dl.h) - 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_DEFINE(HAVE_DL_DLOPEN, 1, [Define if you have the dlopen API]) - 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="" +]) AC_SUBST(LIBDL) +VLC_ADD_LIBS([libvlccore realvideo lua],[$LIBDL]) +dnl Check for thread library if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then dnl Check for pthreads - borrowed from XMMS THREAD_LIB=error @@ -4217,23 +4194,6 @@ AC_ARG_ENABLE(vlc, AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"]) -dnl -dnl Plugin and builtin checks -dnl -plugin_support=yes - -dnl Automagically disable plugins if there is no system support for -dnl dynamically loadable files (.so, .dll, .dylib). -dnl don't forget vlc-win32 still can load .dll as plugins -AS_IF([test "${ac_cv_have_plugins}" = "no"], [ - AC_MSG_WARN([*** No plugin support! Building statically! ***]) - plugin_support=no -]) - -AS_IF([test "${plugin_support}" != "no"], [ - AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, [Define if dynamic plugins are supported]) -]) - dnl dnl Pic and shared libvlc stuff dnl