X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=a9d412be656ece8181155359fedc2d8076093d3f;hb=bf64888f7c34aa7405241d95a045175f52c75e65;hp=8f631c42951307af330b8f948557d993c973b633;hpb=9f5b54964c36cda46acc6b3a0f5596355f252cda;p=vlc diff --git a/configure.ac b/configure.ac index 8f631c4295..a9d412be65 100644 --- a/configure.ac +++ b/configure.ac @@ -2,12 +2,12 @@ dnl Autoconf settings for vlc AC_COPYRIGHT([Copyright 2002-2011 the VideoLAN team]) -AC_INIT(vlc, 1.2.0-git) +AC_INIT(vlc, 1.2.0-pre1) VERSION_MAJOR=1 VERSION_MINOR=2 VERSION_REVISION=0 VERSION_EXTRA=0 -VERSION_DEV=git +VERSION_DEV=pre1 PKGDIR="vlc" AC_SUBST(PKGDIR) @@ -343,15 +343,6 @@ case "${host_os}" in VLC_ADD_LDFLAGS([vlc],[-mwindows]) VLC_ADD_LIBS([win32text],[-lgdi32]) VLC_ADD_LIBS([cdda vcdx sdl_image vout_sdl],[-lwinmm]) - dnl - dnl DEP and ASLR options - dnl - AC_ARG_WITH(peflags, - [AS_HELP_STRING([--with-peflags], - [use peflags (default enabled on Windows)])]) - if test "${with_peflags}" != "no" ; then - AC_PATH_TOOL(PEFLAGS, peflags, :) - fi AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos) ac_default_prefix="`pwd`/_win32" DESTDIR="`pwd`/_win32/" @@ -405,7 +396,6 @@ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce") AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian") -AM_CONDITIONAL(USE_PEFLAGS, test "${with_peflags}" = "yes") dnl dnl Sadly autoconf doesn't think about testing foo.exe when ask to test @@ -576,7 +566,7 @@ dnl Check for poll AC_SEARCH_LIBS(poll, [poll], [ AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS has poll().]) ], [ - AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [ + AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "os2"], [ AC_MSG_ERROR([poll() is required.]) ]) ]) @@ -1212,11 +1202,18 @@ AS_IF([test "${enable_mmx}" != "no"], [ [Define to 1 if MMX intrinsics are available.]) ]) - AC_CACHE_CHECK([if $CC groks MMX inline assembly], - [ac_cv_mmx_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));], - ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)]) + AC_CACHE_CHECK([if $CC groks MMX inline assembly], [ac_cv_mmx_inline], [ + CFLAGS="${CFLAGS_save} -mmmx" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2"); +]]) + ], [ + ac_cv_mmx_inline=yes + ], [ + ac_cv_mmx_inline=no + ]) + ]) AS_IF([test "${ac_cv_mmx_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_MMX, 1, [Define to 1 inline MMX assembly is available.]) @@ -1224,10 +1221,18 @@ AS_IF([test "${enable_mmx}" != "no"], [ ]) AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly], - [ac_cv_mmxext_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));], - ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)]) + [ac_cv_mmxext_inline], [ + CFLAGS="${CFLAGS_save} -mmmx" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2"); +]]) + ], [ + ac_cv_mmxext_inline=yes + ], [ + ac_cv_mmxext_inline=no + ]) + ]) AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_MMXEXT, 1, [Define to 1 if MMX EXT inline assembly is available.]) @@ -1278,21 +1283,35 @@ AS_IF([test "${enable_sse}" != "no"], [ [Define to 1 if SSE2 intrinsics are available.]) ]) - AC_CACHE_CHECK([if $CC groks SSE inline assembly], - [ac_cv_sse_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));], - ac_cv_sse_inline=yes, ac_cv_sse_inline=no)]) + AC_CACHE_CHECK([if $CC groks SSE inline assembly], [ac_cv_sse_inline], [ + CFLAGS="${CFLAGS_save} -msse" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("xorps %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2"); +]]) + ], [ + ac_cv_sse_inline=yes + ], [ + ac_cv_sse_inline=no + ]) + ]) AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [ AC_DEFINE(CAN_COMPILE_SSE, 1, [Define to 1 if SSE inline assembly is available.]) ]) - AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], - [ac_cv_sse2_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p));], - ac_cv_sse2_inline=yes, ac_cv_sse2_inline=no)]) + AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], [ac_cv_sse2_inline], [ + CFLAGS="${CFLAGS_save} -msse" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2"); +]]) + ], [ + ac_cv_sse2_inline=yes + ], [ + ac_cv_sse2_inline=no + ]) + ]) AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [ AC_DEFINE(CAN_COMPILE_SSE2, 1, [Define to 1 if SSE2 inline assembly is available.]) @@ -1300,50 +1319,87 @@ AS_IF([test "${enable_sse}" != "no"], [ ]) # SSE3 - AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], - [ac_cv_sse3_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p));], - ac_cv_sse3_inline=yes, ac_cv_sse3_inline=no)]) + AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], [ac_cv_sse3_inline], [ + CFLAGS="${CFLAGS_save} -msse" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1"); +]]) + ], [ + ac_cv_sse3_inline=yes + ], [ + ac_cv_sse3_inline=no + ]) + ]) AS_IF([test "${ac_cv_sse3_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_SSE3, 1, [Define to 1 if SSE3 inline assembly is available.]) ]) # SSSE3 - AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], - [ac_cv_ssse3_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p));], - ac_cv_ssse3_inline=yes, ac_cv_ssse3_inline=no)]) + AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], [ac_cv_ssse3_inline], [ + CFLAGS="${CFLAGS_save} -msse" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0"); +]]) + ], [ + ac_cv_ssse3_inline=yes + ], [ + ac_cv_ssse3_inline=no + ]) + ]) AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_SSSE3, 1, [Define to 1 if SSSE3 inline assembly is available.]) ]) # SSE4.1 AC_CACHE_CHECK([if $CC groks SSE4.1 inline assembly], - [ac_cv_sse4_1_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p));], - ac_cv_sse4_1_inline=yes, ac_cv_sse4_1_inline=no)]) + [ac_cv_sse4_1_inline], [ + CFLAGS="${CFLAGS_save} -msse" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1"); +]]) + ], [ + ac_cv_sse4_1_inline=yes + ], [ + ac_cv_sse4_1_inline=no + ]) + ]) AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_SSE4_1, 1, [Define to 1 if SSE4_1 inline assembly is available.]) ]) # SSE4.2 AC_CACHE_CHECK([if $CC groks SSE4.2 inline assembly], - [ac_cv_sse4_2_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p));], - ac_cv_sse4_2_inline=yes, ac_cv_sse4_2_inline=no)]) + [ac_cv_sse4_2_inline], [ + CFLAGS="${CFLAGS_save} -msse" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1"); +]]) + ], [ + ac_cv_sse4_2_inline=yes + ], [ + ac_cv_sse4_2_inline=no + ]) + ]) AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_SSE4_2, 1, [Define to 1 if SSE4_2 inline assembly is available.]) ]) # SSE4A - AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], - [ac_cv_sse4a_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("insertq %%xmm1,%%xmm0"::"r"(p));], - ac_cv_sse4a_inline=yes, ac_cv_sse4a_inline=no)]) + AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], [ac_cv_sse4a_inline], [ + CFLAGS="${CFLAGS_save} -msse" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1"); +]]) + ], [ + ac_cv_sse4a_inline=yes + ], [ + ac_cv_sse4a_inline=no + ]) + ]) AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_SSE4A, 1, [Define to 1 if SSE4A inline assembly is available.]) ]) @@ -1351,11 +1407,18 @@ AS_IF([test "${enable_sse}" != "no"], [ AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"]) have_3dnow="no" -AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], - [ac_cv_3dnow_inline], - [CFLAGS="${CFLAGS_save}" - AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));], - ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)]) +AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [ + CFLAGS="${CFLAGS_save} -mmmx" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[ +void *p; +asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2"); +]]) + ], [ + ac_cv_3dnow_inline=yes + ], [ + ac_cv_3dnow_inline=no + ]) +]) AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [ AC_DEFINE(CAN_COMPILE_3DNOW, 1, [Define to 1 if 3D Now! inline assembly is available.]) @@ -1624,7 +1687,7 @@ AC_ARG_ENABLE(httpd, [disable the built-in HTTP server (default enabled)])]) if test "${enable_httpd}" != "no" then - AC_DEFINE(ENABLE_HTTPD, 1, Define if you want the HTTP dameon support) + AC_DEFINE(ENABLE_HTTPD, 1, Define if you want the HTTP daemon support) fi AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"]) @@ -1674,127 +1737,91 @@ dnl AC_ARG_ENABLE(live555, [AS_HELP_STRING([--enable-live555], [enable RTSP input through live555 (default enabled)])]) -AC_ARG_WITH(live555-tree, - [AS_HELP_STRING([--with-live555-tree=PATH], - [live555 tree for static linking])]) -if test "${enable_live555}" != "no"; then - - dnl - dnl test for --with-live555-tree - dnl - if test -z "${with_live555_tree}" -a "${CXX}" != ""; then - AC_LANG_PUSH(C++) - CPPFLAGS_save="${CPPFLAGS}" - if test -z "${CONTRIB_DIR}"; then - CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment" - else - CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment" - fi - if test "${SYS}" = "solaris"; then - CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS" - fi - CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}" - - AC_CHECK_HEADERS(liveMedia_version.hh, [ - AC_MSG_CHECKING(for liveMedia version >= 1275091200 ) - AC_EGREP_CPP(yes, - [#include - #ifdef LIVEMEDIA_LIBRARY_VERSION_INT - #if LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200 - yes - #endif - #endif], - [AC_MSG_RESULT([no]) - AC_MSG_WARN([The installed liveMedia version is too old: +AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [ + AC_LANG_PUSH(C++) + CPPFLAGS_save="${CPPFLAGS}" + AS_IF([test -z "${CONTRIB_DIR}"], [ + CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment" + ], [ + CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment" + ]) + AS_IF([test "${SYS}" = "solaris"], [ + CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS" + ]) + CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}" + + AC_CACHE_CHECK([for live555 version 1275091200 or later], [ac_cv_live555], [ + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ +[#include +#if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200) +# error BOOM +#endif]]) + ], [ + ac_cv_live555="yes" + ], [ + ac_cv_live555="no" + ]) + ]) + AS_IF([test "$ac_cv_live555" = "no"], [ + AC_MSG_WARN([liveMedia is missing or its installed version is too old: Version 2010.05.29 or later is required to proceed. You can get an updated one from http://www.live555.com/liveMedia .]) - AS_IF([test "${enable_live555}" = "yes"], [ - AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable the plugin.]) - ]) - ],[ - AC_MSG_RESULT([yes]) - other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment" - other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic" - if test "${SYS}" = "mingw32"; then - # add ws2_32 for closesocket, select, recv - other_libs="$other_libs -lws2_32" - elif test "${SYS}" = "mingwce"; then - # add ws2 for closesocket, select, recv - other_libs="$other_libs -lws2" - fi - - dnl We need to check for pic because live555 don't provide shared libs - dnl and we want to build a plugins so we need -fPIC on some arch. - VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}]) - AC_CHECK_LIB(liveMedia_pic, main, [ - VLC_ADD_PLUGIN([live555]) - VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}]) - ],[ - AC_CHECK_LIB(liveMedia, main, [ - VLC_ADD_PLUGIN([live555]) - VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}]) - ],[],[${other_libs}]) ],[${other_libs_pic}]) - - CPPFLAGS="${CPPFLAGS_save}" - AC_LANG_POP(C++) - ]) - ]) - else - AC_MSG_CHECKING(for liveMedia/libliveMedia.a in ${with_live555_tree}) - real_live555_tree="`cd ${with_live555_tree} 2>/dev/null && pwd`" - if test -z "${real_live555_tree}"; then - dnl The given directory can't be found - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot cd to ${with_live555_tree}]) - fi - if test -f "${real_live555_tree}/liveMedia/libliveMedia.a"; then - AC_MSG_RESULT(${real_live555_tree}/liveMedia/libliveMedia.a) - - AC_CHECK_HEADERS(${real_live555_tree}/liveMedia/include/liveMedia_version.hh,[ - AC_MSG_CHECKING(for liveMedia version >= 1275091200 ) - AC_EGREP_CPP(yes, - [#include "${real_live555_tree}/liveMedia/include/liveMedia_version.hh" - #ifdef LIVEMEDIA_LIBRARY_VERSION_INT - #if LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200 - yes - #endif - #endif], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your version of liveMedia is too old: you may get a more recent one from http://www.live555.com/liveMedia. -lternatively you can use --disable-live555 to disable the liveMedia plugin.]) - ],[ - AC_MSG_RESULT([yes]) - ]) + AS_IF([test -n "${enable_live555}"], [ + AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.]) + ]) + ac_cv_live555_usable="" + ], [ + dnl Check that live555 is patched correctly. + AC_CACHE_CHECK([for live555 usability], [ac_cv_live555_usable], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +[#include +#ifdef __APPLE__ +# include +#endif +#undef LC_ALL +#define LC_ALL BOOM +#ifdef LC_ALL_MASK +#include +#endif +#include ]], [ +[struct in_addr addr; +our_inet_ntoa(addr, NULL);]]) + ], [ + ac_cv_live555_usable="yes" + ], [ + ac_cv_live555_usable="no" ]) + ]) + AS_IF([test "$ac_cv_live555_usable" = "no"], [ + AC_MSG_ERROR([liveMedia lacks patches and is not usable. +Please apply our patches from the VLC contrib (contrib/src/live555/). +You can also disable RTSP input with --disable-live555. You were warned.]) + ]) + other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment" + other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic" + AS_IF([test "${SYS}" = "mingw32"], [ + # add ws2_32 for closesocket, select, recv + other_libs="$other_libs -lws2_32" + ], [test "${SYS}" = "mingwce"], [ + # add ws2 for closesocket, select, recv + other_libs="$other_libs -lws2" + ]) + dnl We need to check for pic because live555 don't provide shared libs + dnl and we want to build a plugins so we need -fPIC on some arch. + VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}]) + AC_CHECK_LIB(liveMedia_pic, main, [ VLC_ADD_PLUGIN([live555]) - - if test "${SYS}" = "mingw32"; then - # add ws2_32 for closesocket, select, recv - VLC_ADD_LIBS([live555],[-lws2_32]) - fi - - VLC_ADD_LIBS([live555],[-L${real_live555_tree}/UsageEnvironment -lUsageEnvironment]) - VLC_ADD_LIBS([live555],[-L${real_live555_tree}/BasicUsageEnvironment -lBasicUsageEnvironment]) - VLC_ADD_LIBS([live555],[-L${real_live555_tree}/groupsock -lgroupsock]) - VLC_ADD_LIBS([live555],[-L${real_live555_tree}/liveMedia -lliveMedia]) - - VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/BasicUsageEnvironment/include]) - VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/groupsock/include]) - VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/liveMedia/include]) - VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/UsageEnvironment/include ]) - if test "${SYS}" = "solaris"; then - VLC_ADD_CXXFLAGS([live555],[-DSOLARIS]) - fi - else - dnl The given live555 wasn't built - AC_MSG_RESULT(no) - if test "${enable_live555}" = "yes"; then - AC_MSG_ERROR([cannot find ${real_live555_tree}/liveMedia/libliveMedia.a, make sure you compiled live555 in ${with_live555_tree}]) - fi - fi - fi -fi + VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}]) + ],[ + AC_CHECK_LIB(liveMedia, main, [ + VLC_ADD_PLUGIN([live555]) + VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}]) + ],[],[${other_libs}])],[${other_libs_pic}]) + ]) + CPPFLAGS="${CPPFLAGS_save}" + AC_LANG_POP(C++) +]) dnl dnl - special access module for dc1394 input @@ -2101,19 +2128,16 @@ then fi dnl -dnl QTCapture -AC_ARG_ENABLE(macosx-qtcapture, - [ --enable-macosx-qtcapture Mac OS X qtcapture (iSight) module (default enabled on Mac OS X)]) -if test "x${enable_macosx_qtcapture}" != "xno" && - (test "${SYS}" = "darwin" || test "${enable_macosx_qtcapture}" = "yes") +dnl QTKit +AC_ARG_ENABLE(macosx-qtkit, + [ --enable-macosx-qtkit Mac OS X qtcapture (video) and qtsound (audio) module (default enabled on Mac OS X)]) +if test "x${enable_macosx_qtkit}" != "xno" && + (test "${SYS}" = "darwin" || test "${enable_macosx_qtkit}" = "yes") then - VLC_ADD_LIBS([qtcapture], [-Wl,-framework,Cocoa]) - VLC_ADD_LIBS([qtcapture], [-Wl,-framework,QTKit]) - VLC_ADD_LIBS([qtcapture], [-Wl,-framework,CoreAudio]) - VLC_ADD_LIBS([qtcapture], [-Wl,-framework,QuartzCore]) - VLC_ADD_LIBS([qtcapture], [-Wl,-framework,CoreVideo]) VLC_ADD_PLUGIN([qtcapture]) + VLC_ADD_PLUGIN([qtsound]) fi +AM_CONDITIONAL(HAVE_QTKIT, [test "${SYS}" = "darwin" && "x${enable_macosx_qtkit}" != "xno"]) dnl @@ -2774,7 +2798,7 @@ then VLC_ADD_CPPFLAGS([a52tofloat32],[${CPPFLAGS_test}]) ],[ AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.]) - ]) + ], [$LIBM]) ],[ AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.]) ]) @@ -3020,6 +3044,37 @@ dnl EXTEND_HELP_STRING([Video plugins:]) +dnl +dnl OpenGL +dnl +PKG_CHECK_MODULES([GL], [gl], [ + have_gl="yes" +], [ + AC_CHECK_HEADER([GL/gl.h], [ + have_gl="yes" + GL_CFLAGS="" + GL_LIBS="-lGL" + ], [ + have_gl="no" + ]) +]) + +dnl OpenGL ES 2: depends on EGL 1.1 and is currently unfinished +dnl PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [auto]) +dnl OpenGL ES 1: depends on EGL 1.0 and is currently broken +dnl PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [auto]) + +AC_ARG_ENABLE(egl, + [ --enable-egl OpenGL support through EGL (default disabled)],, [ + enable_egl="no" +]) +AS_IF([test "$enable_egl" != "no"], [ + PKG_CHECK_MODULES([EGL], [egl], [ + VLC_ADD_PLUGIN([gl]) + VLC_ADD_PLUGIN([egl]) + ]) +]) + dnl dnl Xlib dnl @@ -3042,6 +3097,10 @@ AC_ARG_ENABLE(xvideo, [ --enable-xvideo XVideo support (default enabled)],, [ enable_xvideo="$enable_xcb" ]) +AC_ARG_ENABLE(glx, + [ --enable-glx OpenGL support through GLX (default enabled)],, [ + enable_glx="$enable_xcb" +]) have_xcb="no" AS_IF([test "${enable_xcb}" != "no"], [ @@ -3075,33 +3134,19 @@ AS_IF([test "${enable_xcb}" != "no"], [ ], [ AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.]) ]) -]) -AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"]) -AC_ARG_ENABLE(glx, - [ --enable-glx X11 OpenGL (GLX) support (default enabled)],, [ - enable_glx="$enable_xcb" -]) -AS_IF([test "${enable_glx}" != "no"], [ - PKG_CHECK_MODULES(XLIB_XCB, [x11-xcb]) - PKG_CHECK_MODULES(GL, [gl],, [ - AC_CHECK_HEADER([GL/gl.h], [ - GL_CFLAGS="" - GL_LIBS="-lGL" + AS_IF([test "${enable_glx}" != "no"], [ + AS_IF([test "${have_gl}" != "yes"], [ + AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.]) + ]) + PKG_CHECK_MODULES(XLIB_XCB, [x11-xcb], [ + VLC_ADD_PLUGIN([xcb_glx]) ], [ - AC_MSG_ERROR([${GL_PKG_ERRORS}. If you do not need OpenGL with X11, pass --disable-glx.]) + AC_MSG_ERROR([${XLIB_XCB_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.]) ]) ]) - VLC_ADD_PLUGIN([xcb_glx]) ]) - -dnl -dnl OpenGL -dnl -PKG_ENABLE_MODULES_VLC([GL], [], [gl], [OpenGL support], [auto]) -PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [auto]) -PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [auto]) -PKG_ENABLE_MODULES_VLC([EGL], [], [egl], [EGL support], [auto]) +AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"]) dnl dnl SDL module @@ -3266,10 +3311,11 @@ if test "${enable_directx}" != "no"; then ) dnl OpenGL - AC_CHECK_HEADERS(GL/glext.h, + AC_CHECK_HEADERS(GL/wglew.h, [ VLC_ADD_PLUGIN([glwin32]) VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32]) ],[],[ + #include #include ]) @@ -4178,15 +4224,6 @@ AC_ARG_ENABLE(macosx-vlc-app, AM_CONDITIONAL(BUILD_MACOSX_VLC_APP, [test "${enable_macosx_vlc_app}" != "no" && (test "${SYS}" = "darwin" || test "${enable_macosx_vlc_app}" = "yes") ]) - -dnl -dnl Pic and shared libvlc stuff -dnl -AS_IF([test "${SYS}" = "mingw32"], [ - FILE_LIBVLCCORE_DLL="!define LIBVLCCORE_DLL libvlccore.dll" - FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll" -]) - dnl dnl Stuff used by the program dnl @@ -4347,8 +4384,6 @@ AM_COND_IF([HAVE_DARWIN], [ dnl Generate makefiles AC_OUTPUT -/bin/echo -n "Enabled modules: ${PLUGINS}" - dnl Do we have to use make or gmake ? USE_MAKE_OR_GMAKE=`case "${SYS}" in openbsd*) echo "gmake";; *) echo "make";; esac` dnl Shortcut to nice compile message