X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac.in;h=d0a17d41b58700de5f1b32db08a458102b6169ad;hb=8229bf31c8d590c8e5c176ddc905d11a323c53e7;hp=8d50ad0d09a443b356767fc82a693b395b8800a4;hpb=2ca4281aa9ce545bfd4cbe69b9ba29856643fbef;p=vlc diff --git a/configure.ac.in b/configure.ac.in index 8d50ad0d09..d0a17d41b5 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -132,6 +132,7 @@ case "x${target_os}" in LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32" LDFLAGS_sap="${LDFLAGS_sap} -lws2_32" LDFLAGS_slp="${LDFLAGS_slp} -lws2_32" + LDFLAGS_http="${LDFLAGS_http} -lws2_32" LDFLAGS_httpd="${LDFLAGS_httpd} -lws2_32" fi ;; @@ -291,6 +292,7 @@ AC_CHECK_FUNCS(send,,[ LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket" LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lsocket" LDFLAGS_sap="${LDFLAGS_sap} -lsocket" + LDFLAGS_http="${LDFLAGS_http} -lsocket" LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lsocket" )]) @@ -325,6 +327,7 @@ AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)], [need_getopt=:])]) AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt}) +if test "x$SYS" != "xmingw32"; then AC_TYPE_SIGNAL AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl") AC_CHECK_LIB(m,cos, @@ -344,7 +347,9 @@ AC_CHECK_LIB(m,pow, AC_CHECK_LIB(m,sqrt, LDFLAGS_headphone_channel_mixer="${LDFLAGS_headphone_channel_mixer} -lm" ) +fi # end "x$SYS" != "xmingw32" +if test "x$SYS" != "xmingw32"; then dnl Check for pthreads - borrowed from XMMS THREAD_LIB=error if test "x${THREAD_LIB}" = "xerror"; then @@ -402,10 +407,8 @@ AC_ARG_ENABLE(st, fi ]) -if test "x${SYS}" != "xmingw32"; then - LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}" - LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}" -fi +LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}" +LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}" dnl Don't link with rt when using GNU-pth if test "x${THREAD_LIB}" != "x-lpth" && test "x${THREAD_LIB}" != "x-lst"; then @@ -440,6 +443,7 @@ AC_EGREP_HEADER(pthread_once,pthread.h,[ AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1, Define if defines pthread_once.)],[ AC_MSG_RESULT(no)]) +fi # end "x$SYS" != "xmingw32" AC_MSG_CHECKING(for strncasecmp in strings.h) AC_EGREP_HEADER(strncasecmp,strings.h,[ @@ -453,8 +457,10 @@ AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h) AC_CHECK_HEADERS(dlfcn.h image.h) AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h) +if test "x$SYS" != "xmingw32"; then AC_CHECK_HEADERS(machine/param.h sys/shm.h) AC_CHECK_HEADERS(linux/version.h) +fi # end "x$SYS" != "xmingw32" AC_HEADER_TIME @@ -464,6 +470,7 @@ AC_CHECK_HEADERS(dirent.h,,[need_dirent=:]) AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent}) dnl Mac OS X and other OSes don't have declaration for nanosleep +if test "x$SYS" != "xmingw32"; then AC_MSG_CHECKING(for nanosleep in time.h) AC_EGREP_HEADER(nanosleep,time.h,[ AC_MSG_RESULT(yes) @@ -472,6 +479,7 @@ AC_EGREP_HEADER(nanosleep,time.h,[ ],[ AC_MSG_RESULT(no) ]) +fi # end "x$SYS" != "xmingw32" dnl Make sure we have timespecs AC_MSG_CHECKING(for timespec in sys/time.h) @@ -484,7 +492,9 @@ AC_EGREP_HEADER(timespec,sys/time.h,[ ]) dnl Check for threads library +if test "x$SYS" != "xmingw32"; then AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h) +fi # end "x$SYS" != "xmingw32" dnl Default X headers and libraries if test "x${x_includes}" = "xNONE"; then @@ -823,7 +833,7 @@ PLUGINS="${PLUGINS} id3 m3u" PLUGINS="${PLUGINS} rawvideo" PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys au" PLUGINS="${PLUGINS} access_file access_udp access_http ipv4 access_mms" -PLUGINS="${PLUGINS} access_ftp access_directory sap httpd" +PLUGINS="${PLUGINS} access_ftp access_directory sap httpd http" dnl dnl Some plugins aren't useful on some platforms @@ -887,8 +897,6 @@ if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}" fi -# don't try to grok AltiVec with native mingw32 it doesn't work right now -# we should be able to remove this test with future versions of mingw32 if test "x${SYS}" != "xmingw32"; then AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly], [ac_cv_altivec_inline], @@ -944,7 +952,7 @@ if test "x${ac_cv_ld_altivec}" != "xno"; then LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib" LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib" fi -fi # end if mingw32 +fi # end "x$SYS" != "xmingw32" AC_ARG_WITH(,[]) AC_ARG_WITH(,[Optimization options:]) @@ -1520,7 +1528,7 @@ then LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}" AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h) AC_CHECK_LIB(avcodec, avcodec_init, [ - BUILTINS="${BUILTINS} ffmpeg stream_out_transcode" + BUILTINS="${BUILTINS} ffmpeg stream_out_transcode encoder_ffmpeg" LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" dnl XXX: we don't link with -lavcodec a 2nd time because the OS X dnl linker would miserably barf on multiple definitions. @@ -1544,7 +1552,7 @@ then if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then dnl Use a custom libffmpeg AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a) - BUILTINS="${BUILTINS} ffmpeg stream_out_transcode" + BUILTINS="${BUILTINS} ffmpeg stream_out_transcode encoder_ffmpeg" LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec" CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec" @@ -1559,6 +1567,10 @@ then fi fi + dnl Duplicate the ffmpeg CPPFLAGS and LDFLAGS for the encoder + LDFLAGS_encoder_ffmpeg=${LDFLAGS_ffmpeg} + CPPFLAGS_encoder_ffmpeg=${CPPFLAGS_ffmpeg} + dnl Add postprocessing modules PLUGINS="${PLUGINS} postprocessing_c" if test "x${ac_cv_mmx_inline}" != "xno"; then @@ -1657,7 +1669,7 @@ then then dnl Use a custom xvid AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a) - BUILTINS="${BUILTINS} xvid" + BUILTINS="${BUILTINS} xvid encoder_xvid" LDFLAGS_xvid="${LDFLAGS_xvid} -L${real_xvid_tree}/build/generic -lxvidcore" CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src" else @@ -1671,12 +1683,16 @@ then AC_CHECK_HEADERS(xvid.h, , [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ]) AC_CHECK_LIB(xvidcore, xvid_init, [ - PLUGINS="${PLUGINS} xvid" + PLUGINS="${PLUGINS} xvid encoder_xvid" LDFLAGS_xvid="${LDFLAGS_xvid} -lxvidcore" ], [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ]) LDFLAGS="${LDFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}" fi + + dnl Duplicate the xvid CPPFLAGS and LDFLAGS for the encoder + LDFLAGS_encoder_xvid=${LDFLAGS_xvid} + CPPFLAGS_encoder_xvid=${CPPFLAGS_xvid} fi @@ -1761,7 +1777,7 @@ then LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}" CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}" ],[ - AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.]) + 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.]) ]) ]) CPPFLAGS="${CPPFLAGS_save}" @@ -1802,21 +1818,50 @@ AC_ARG_ENABLE(libmpeg2, [ --enable-libmpeg2 libmpeg2 decoder support (default enabled)]) if test "x${enable_libmpeg2}" != "xno" then - AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [ - AC_MSG_CHECKING(for libmpeg2 version >= 0.3.2) - AC_EGREP_CPP(yes, - [#include - #ifdef MPEG2_RELEASE - #if MPEG2_RELEASE >= MPEG2_VERSION(0,3,2) - yes - #endif - #endif], - [AC_MSG_RESULT([yes]) - PLUGINS="${PLUGINS} libmpeg2" - LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"], - [AC_MSG_RESULT([no]) ] + AC_ARG_WITH(libmpeg2-tree, + [ --with-libmpeg2-tree=PATH libmpeg2 tree for static linking]) + if test "x${with_libmpeg2_tree}" != "x" + then + AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree}) + real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`" + if test "x${real_libmpeg2_tree}" = x + then + dnl The given directory can't be found + AC_MSG_RESULT(no) + AC_MSG_ERROR([cannot cd to ${with_libmpeg2_tree}]) + fi + if test -f "${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a" + then + dnl Use a custom libmpeg2 + AC_MSG_RESULT(${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a) + PLUGINS="${PLUGINS} libmpeg2" + LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -L${real_libmpeg2_tree}/libmpeg2/.libs -lmpeg2" + CFLAGS_libmpeg2="${CFLAGS_libmpeg2} -I${real_libmpeg2_tree}/include" + eval "`cd ${real_libmpeg2_tree}/include && ln -sf . mpeg2dec 2>/dev/null`" + else + dnl The given libmpeg2 wasn't built + AC_MSG_RESULT(no) + AC_MSG_ERROR([cannot find ${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a, make sure you compiled libmpeg2 in ${with_libmpeg2_tree}]) + fi + else + AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [ + AC_MSG_CHECKING(for libmpeg2 version >= 0.3.2) + AC_EGREP_CPP(yes, + [#include + #ifdef MPEG2_RELEASE + #if MPEG2_RELEASE >= MPEG2_VERSION(0,3,2) + yes + #endif + #endif], + [AC_MSG_RESULT([yes]) + PLUGINS="${PLUGINS} libmpeg2" + LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Your libmpeg2 is too old (you need the cvs version): you may get a more recent one from http://libmpeg2.sf.net/. Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])])], + + [AC_MSG_ERROR([Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ (you need the cvs version). Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])] ) - ]) + fi fi dnl @@ -2028,7 +2073,7 @@ then fi ]) AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH}) - if test "x${FREETYPE_CONFIG}" != "xno" -a "x${have_xosd}" = "xtrue" + if test "x${FREETYPE_CONFIG}" != "xno" then PLUGINS="${PLUGINS} osdtext" CFLAGS_osdtext="${CFLAGS_osdtext} `${FREETYPE_CONFIG} --cflags`" @@ -2351,7 +2396,7 @@ if test "x${enable_skins}" != "xno"; then if test "x${enable_skins}" = "xyes"; then PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0]) PLUGINS="${PLUGINS} skins" - CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/gtk2 -Imodules/gui/skins/controls -Imodules/gui/skins/parser ${GTK2_CFLAGS}" + CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/gtk2 -Imodules/gui/skins/controls -Imodules/gui/skins/parser ${GTK2_CFLAGS} -DGTK2_SKINS" LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ ${GTK2_LIBS}" fi fi