X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.in;h=d810531f170322ce1bfb326fb8765a1926ac6a7d;hb=348f966219df7389494a915cc2736df172be47c0;hp=0de1ca1703de0b176f79a5ea64d3d766b6d9e9a4;hpb=0393b2535bf1af5de00714e3b7322c002b6e04bb;p=vlc diff --git a/configure.in b/configure.in index 0de1ca1703..d810531f17 100644 --- a/configure.in +++ b/configure.in @@ -1,10 +1,10 @@ dnl Autoconf settings for vlc AC_INIT(include/main.h) AC_CONFIG_HEADER(include/defs.h) - AC_CANONICAL_SYSTEM -VERSION="0.3.0" +PACKAGE="vlc" +VERSION="0.3.1" CODENAME=Ourumov dnl Save CFLAGS and LDFLAGS @@ -39,9 +39,9 @@ else fi dnl Gettext stuff -ALL_LINGUAS="de fr ja no ru nl" +ALL_LINGUAS="de en_GB fr ja no ru nl" -AC_DEFINE_UNQUOTED(VLC_PACKAGE, "vlc", [Package name]) +AC_DEFINE_UNQUOTED(VLC_PACKAGE, "$PACKAGE", [Package name]) AC_DEFINE_UNQUOTED(VLC_VERSION, "$VERSION", [Package version]) AM_GNU_GETTEXT @@ -76,7 +76,7 @@ case x"${target_os}" in SYS=mingw32 AC_CHECK_TOOL(WINDRES, windres, :) save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long" - save_LDFLAGS="${save_LDFLAGS} -mwindows -Xlinker --force-exe-suffix" + vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix" vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32" ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32" rc_LDFLAGS="${rc_LDFLAGS} -lws2_32" @@ -111,7 +111,7 @@ dnl The -DSYS_FOO flag save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`" dnl Check for system libs needed -AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty usleep vasprintf swab sigrelse getpwuid memalign posix_memalign) +AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2) AC_CHECK_FUNC(connect,,[ AC_CHECK_LIB(socket,connect, @@ -124,16 +124,18 @@ AC_CHECK_FUNC(gethostbyname,,[ AC_CHECK_FUNC(gethostbyname,,[ AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind") ]) -AC_CHECK_FUNC(nanosleep,,[ - AC_CHECK_LIB(rt,nanosleep,vlc_LDFLAGS="${vlc_LDFLAGS} -lrt",[ - AC_CHECK_LIB(posix4,nanosleep,vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4") - ]) +AC_CHECK_FUNCS(nanosleep,,[ + AC_CHECK_LIB(rt,nanosleep, + [vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"], + [AC_CHECK_LIB(posix4,nanosleep, + [vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"])] + ) ]) AC_CHECK_FUNC(inet_aton,,[ AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv") ]) AC_CHECK_FUNC(textdomain,,[ - AC_CHECK_LIB(intl,textdomain,vlc_LDFLAGS="${vlc_LDFLAGS} -lintl") + AC_CHECK_LIB(intl,textdomain,save_LDFLAGS="${save_LDFLAGS} -lintl") ]) dnl Check for getopt @@ -185,7 +187,7 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[ dnl Check for headers AC_CHECK_HEADERS(getopt.h strings.h) -AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h sys/times.h) +AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h) AC_CHECK_HEADERS(dlfcn.h image.h) AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h) AC_CHECK_HEADERS(machine/param.h sys/shm.h) @@ -193,6 +195,18 @@ AC_CHECK_HEADERS(linux/version.h) AC_HEADER_TIME +dnl Mac OS X and other OSes don't have declaration for nanosleep +AC_EGREP_HEADER(nanosleep,time.h,[ + AC_DEFINE(HAVE_DECL_NANOSLEEP, 1, + Define if defines nanosleep.) +]) + +dnl Make sure we have timespecs +AC_EGREP_HEADER(timespec,sys/time.h,[ + AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, + Define if defines struct timespec.) +]) + dnl Check for threads library AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h) @@ -331,6 +345,20 @@ if test x"$ac_cv_ld_plugins" != x"no"; then plugins_LDFLAGS="${plugins_LDFLAGS} -shared" fi +dnl Check for variadic macros +AC_CACHE_CHECK([for variadic cpp macros], + [ac_cv_cpp_variadic_macros], + [CFLAGS="${save_CFLAGS}" + AC_TRY_COMPILE( + [#include + #define a(b,c...) printf(b,##c)], + [a("foo");a("%s","bar");a("%s%s","baz","quux");], + ac_cv_cpp_variadic_macros=yes, + ac_cv_cpp_variadic_macros=no)]) +if test x"$ac_cv_cpp_variadic_macros" != x"no"; then + AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros) +fi + dnl Checks for __attribute__(aligned()) directive AC_CACHE_CHECK([__attribute__ ((aligned ())) support], [ac_cv_c_attribute_aligned], @@ -392,7 +420,7 @@ dnl dnl default modules dnl BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec" -PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope" +PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope" dnl dnl Accelerated modules @@ -432,7 +460,7 @@ AC_CACHE_CHECK([if \$CC groks SSE inline assembly], [ac_cv_sse_inline], [AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));], ac_cv_sse_inline=yes, ac_cv_sse_inline=no)]) -if test x"$ac_cv_sse_inline" != x"no"; then +if test x"$ac_cv_sse_inline" != x"no" -a x$SYS != xmingw32; then AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.) ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}" fi @@ -510,8 +538,8 @@ dnl AC_ARG_WITH(tuning, [ --with-tuning=ARCH enable special tuning for an architecture (default i686 on IA-32 and 750 on PPC)]) -if test "x$withval" != "x"; then - TUNING=$withval +if test "x$with_tuning" != "x"; then + TUNING="$with_tuning" else if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro" else @@ -533,7 +561,7 @@ dnl Enable/disable optimizations dnl AC_ARG_ENABLE(optimizations, [ --disable-optimizations disable compiler optimizations (default enabled)], -[ if test x$enableval = xno; then OPTIMS=0; fi ], +[ if test x$enable_optimizations = xno; then OPTIMS=0; fi ], [ OPTIMS=1 ]) dnl @@ -541,7 +569,7 @@ dnl AltiVec acceleration dnl AC_ARG_ENABLE(altivec, [ --disable-altivec disable altivec optimizations (default enabled on PPC)], -[ if test x$enableval = xyes; then ARCH="${ARCH} altivec"; +[ if test x$enable_altivec = xyes; then ARCH="${ARCH} altivec"; BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ], [ if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec"; BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ]) @@ -552,7 +580,7 @@ dnl DEBUG=0 AC_ARG_ENABLE(debug, [ --enable-debug debug mode (default disabled)], -[ if test x$enableval = xyes; then DEBUG=1; fi ]) +[ if test x$enable_debug = xyes; then DEBUG=1; fi ]) dnl dnl Enable release-specific flags @@ -560,7 +588,7 @@ dnl RELEASE=0 AC_ARG_ENABLE(release, [ --enable-release activate extra optimizations (default disabled)], -[ if test x$enableval = xyes; then RELEASE=1; fi ], +[ if test x$enable_release = xyes; then RELEASE=1; fi ], [ VERSION="${VERSION}_`date +%Y-%m-%d`" ]) dnl @@ -574,7 +602,7 @@ dnl DVD module: optionally check for installed libdvdcss dnl AC_ARG_ENABLE(dvd, [ --enable-dvd DVD input module (default enabled)]) -if test "x$enableval" != "xno" +if test "x$enable_dvd" != "xno" then AC_ARG_WITH(dvdcss, [ --with-dvdcss=PATH libdvdcss headers and libraries]) @@ -641,17 +669,17 @@ dnl dvdread module: check for libdvdread plugin dnl AC_ARG_ENABLE(dvdread, [ --enable-dvdread dvdread input module (default disabled)]) -if test "x$enableval" != "xno" +if test "x$enable_dvdread" != "xno" then AC_ARG_WITH(dvdread, [ --with-dvdread=PATH libdvdread headers and libraries]) - if test "x$withval" = x + if test "x$with_dvdread" = x then test_LDFLAGS="" test_CFLAGS="" else - test_LDFLAGS="-L${withval}/lib" - test_CFLAGS="-I${withval}/include" + test_LDFLAGS="-L${with_dvdread}/lib" + test_CFLAGS="-I${with_dvdread}/include" fi CPPFLAGS="$save_CPPFLAGS $test_CFLAGS" AC_CHECK_HEADERS(dvdread/dvd_reader.h, [ @@ -661,17 +689,17 @@ then dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread" dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}" ],[ - if test "x$enableval" != x + if test "x$enable_dvdread" != x then AC_MSG_ERROR([Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later]) fi ]) ],[ - if test "x$enableval" != x + if test "x$enable_dvdread" != x then - if test "x$withval" != x + if test "x$with_dvdread" != x then - AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${withval}/include]) + AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include]) else AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h]) fi @@ -680,18 +708,54 @@ then CPPFLAGS="$save_CPPFLAGS" fi +dnl +dnl libdvbpsi ts demux +dnl +AC_ARG_ENABLE(dvbpsi, +[ --enable-dvbpsi dvbpsi ts demux module (default disabled)]) +if test "x$enable_dvbpsi" != "xno" +then + AC_ARG_WITH(dvbpsi, + [ --with-dvbpsi=PATH libdvbpsi headers and libraries]) + if test "x$with_dvbpsi" = x + then + test_LDFLAGS="" + test_CFLAGS="" + else + test_LDFLAGS="-L${with_dvbpsi}/lib" + test_CFLAGS="-I${with_dvbpsi}/include" + fi + CPPFLAGS="$save_CPPFLAGS $test_CFLAGS" + AC_CHECK_HEADER([dvbpsi/dr.h],[ + PLUGINS="${PLUGINS} mpeg_ts_dvbpsi" + mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi" + mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}" + ],[ + if test "x$enable_dvbpsi" != x + then + AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1]) + fi + ]) + CPPFLAGS="$save_CPPFLAGS" +fi + dnl dnl VCD module dnl AC_ARG_ENABLE(vcd, - [ --enable-vcd VCD support for Linux and MacOS X (default enabled)]) + [ --enable-vcd VCD support for Linux, FreeBSD and MacOS X (default enabled)]) if test x$enable_vcd != xno then AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[ PLUGINS="${PLUGINS} vcd" ]) - + + AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[ + PLUGINS="${PLUGINS} vcd" + AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support) + ]) + if test "x${SYS}" = "xbsdi" then PLUGINS="${PLUGINS} vcd" @@ -699,7 +763,7 @@ then if test "x${SYS}" = "xdarwin" then - PLUGINS="${PLUGINS} vcd" + # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" fi fi @@ -711,14 +775,26 @@ AC_ARG_ENABLE(satellite, [ --enable-satellite satellite card support (default disabled)], [ if test x$enable_satellite = xyes then - BUILTINS="${BUILTINS} satellite" - AC_DEFINE(HAVE_SATELLITE, 1, define if compiling with satellite card support) + PLUGINS="${PLUGINS} satellite" fi]) dnl -dnl ipv6 plugin +dnl ipv6 plugin - not for QNX yet +dnl +if test x$SYS != xnto +then + AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"]) +fi + +dnl +dnl AVI demux plugin dnl -AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"]) +AC_ARG_ENABLE(avi, + [ --enable-avi AVI demux module (default enabled)]) +if test x$enable_avi != xno +then + PLUGINS="${PLUGINS} avi" +fi dnl dnl Codec plugins @@ -733,31 +809,97 @@ AC_ARG_ENABLE(mad, [ --enable-mad libmad module (default disabled)]) if test x$enable_mad = xyes then - PLUGINS="${PLUGINS} mad" - mad_LDFLAGS="${mad_LDFLAGS} -lmad" AC_ARG_WITH(mad, - [ --with-mad=PATH path to libmad], - [ if test "x$with_val" != "xno" -a "x$with_val" != "x" - then - mad_CFLAGS="${mad_CFLAGS} -I$with_val/include" - mad_LDFLAGS="${mad_LDFLAGS} -L$with_val/lib" - fi ]) - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS $mad_CFLAGS" - LDFLAGS="$LDFLAGS $mad_LDFLAGS" - AC_CHECK_HEADERS(mad.h, , - [ echo "Cannot find development headers for libmad..." - exit 1 - ]) - AC_CHECK_LIB(mad, mad_bit_init, , - [ echo "Cannot find libmad library..." - exit 1 - ]) - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS + [ --with-mad=PATH path to libmad],[],[]) + if test "x$with_mad" != "xno" -a "x$with_mad" != "x" + then + mad_CFLAGS="${mad_CFLAGS} -I$with_mad/include" + mad_LDFLAGS="${mad_LDFLAGS} -L$with_mad/lib" + fi + + AC_ARG_WITH(mad-tree, + [ --with-mad-tree=PATH mad tree for static linking],[],[]) + if test "x$with_mad_tree" != "xno" -a "x$with_mad_tree" != "x" + then + real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`" + if test "x$real_mad_tree" = x + then + dnl The given directory can't be found + AC_MSG_RESULT(no) + AC_MSG_ERROR([${with_mad_tree} directory doesn't exist]) + fi + dnl Use a custom libmad + AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad) + if test -f ${real_mad_tree}/libmad/mad.h + then + AC_MSG_RESULT(yes) + mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad" + mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs" + save_LDFLAGS=$LDFLAGS + LDFLAGS=$mad_LDFLAGS + AC_CHECK_LIB(mad, mad_bit_init, [ + BUILTINS="${BUILTINS} mad" + mad_LDFLAGS="${mad_LDFLAGS} -lmad" + ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ]) + ],[]) + LDFLAGS=$save_LDFLAGS + else + AC_MSG_RESULT(no) + AC_MSG_ERROR([the specified tree doesn't have mad.h]) + fi + else + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + CFLAGS="$CFLAGS $mad_CFLAGS" + LDFLAGS="$LDFLAGS $mad_LDFLAGS" + AC_CHECK_HEADERS(mad.h, , + [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ]) + AC_CHECK_LIB(mad, mad_bit_init, + PLUGINS="${PLUGINS} mad" + mad_LDFLAGS="${mad_LDFLAGS} -lmad", + [ AC_MSG_ERROR([Cannot find libmad library...]) ]) + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS + fi +fi + +dnl +dnl ffmpeg decoder plugin +dnl +AC_ARG_ENABLE(ffmpeg, +[ --enable-ffmpeg ffmpeg codec (default disabled)]) +if test "x$enable_ffmpeg" = "xyes" +then + AC_ARG_WITH(ffmpeg-tree, + [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking]) + if test "x$with_ffmpeg_tree" = x + then + AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a]) + else + AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree}) + real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`" + if test "x$real_ffmpeg_tree" = x + then + dnl The given directory can't be found + AC_MSG_RESULT(no) + AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}]) + fi + 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" + ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a" + ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec" + else + dnl The given libavcodec wasn't built + AC_MSG_RESULT(no) + AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}]) + fi + fi fi + dnl special case for BeOS if test x$SYS = xbeos then @@ -769,12 +911,54 @@ dnl a52 AC3 decoder plugin dnl AC_ARG_ENABLE(a52, [ --enable-a52 AC3 support with liba52 (default enabled)]) -if test "x$enableval" != "xno" -a x$SYS != xmingw32 +if test "x$enable_a52" != "xno" +then + AC_ARG_WITH(a52-tree, + [ --with-a52-tree=PATH a52dec tree for static linking ],[],[]) + if test "x$with_a52_tree" != "xno" -a "x$with_a52_tree" != "x" then + real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`" + if test "x$real_a52_tree" = x + then + dnl The given directory can't be found + AC_MSG_RESULT(no) + AC_MSG_ERROR([${with_a52_tree} directory doesn't exist]) + fi + dnl Use a custom a52dec + AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include) + if test -f ${real_a52_tree}/include/a52.h + then + AC_MSG_RESULT(yes) + a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}" + a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs" + save_LDFLAGS=$LDFLAGS + LDFLAGS="$a52_LDFLAGS $LDFLAGS" + AC_CHECK_LIB(a52, a52_free, [ + BUILTINS="${BUILTINS} a52" + a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm" + a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE" + ],[ + if test -f ${real_a52_tree}/liba52/.libs/liba52.a + then + AC_MSG_ERROR([make sure you have at least a52dec-0.7.3]) + else + AC_MSG_ERROR([the specified tree hasn't been compiled]) + fi + ],[-lm]) + LDFLAGS=$save_LDFLAGS + else + AC_MSG_RESULT(no) + AC_MSG_ERROR([the specified tree doesn't have a52.h]) + fi + else dnl no with args AC_CHECK_HEADERS(a52dec/a52.h, [ - BUILTINS="${BUILTINS} a52" - a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm" - ],[]) + AC_CHECK_LIB(a52, a52_free, [ + BUILTINS="${BUILTINS} a52" + a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm" + a52_CFLAGS="${a52_CFLAGS}" + ],[],[-lm]) + ]) + fi fi dnl @@ -782,10 +966,11 @@ dnl ogg vorbis plugin dnl AC_ARG_ENABLE(vorbis, [ --enable-vorbis Ogg/Vorbis decoder support (default enabled)]) -if test "x$enableval" != "xno" +if test "x$enable_vorbis" != "xno" then AC_CHECK_HEADERS(ogg/ogg.h, [ - PLUGINS="${PLUGINS} vorbis" + dnl disabled for the moment + #PLUGINS="${PLUGINS} vorbis" vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis" ],[]) fi @@ -862,9 +1047,9 @@ then SDL_PATH=$PATH AC_ARG_WITH(sdl-config-path, [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)], - [ if test "x$withval" != "xno" + [ if test "x$with_sdl_config_path" != "xno" then - SDL_PATH=$withval:$PATH + SDL_PATH="$with_sdl_config_path:$PATH" fi ]) AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, $SDL_PATH) SDL_CONFIG=${SDL12_CONFIG} @@ -912,7 +1097,7 @@ dnl Windows DirectX module dnl AC_ARG_ENABLE(directx, [ --enable-directx Win32 DirectX support (default enabled on Win32)]) -if test "x$enableval" != "xno" +if test "x$enable_directx" != "xno" then if test x$SYS = xmingw32 then @@ -924,16 +1109,16 @@ then [ PLUGINS="${PLUGINS} directx" directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" ]) else - AC_MSG_CHECKING(for directX headers in ${withval}) - if test -f ${withval}/ddraw.h + AC_MSG_CHECKING(for directX headers in ${with_directx}) + if test -f ${with_directx}/ddraw.h then PLUGINS="${PLUGINS} directx" - directx_LDFLAGS="${directx_LDFLAGS} -L${withval}/lib -lgdi32" - directx_CFLAGS="${directx_CFLAGS} -I${withval}" + directx_LDFLAGS="${directx_LDFLAGS} -L${with_directx}/lib -lgdi32" + directx_CFLAGS="${directx_CFLAGS} -I${with_directx}" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - AC_MSG_ERROR([Cannot find ${withval}/ddraw.h!]) + AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!]) fi fi fi @@ -972,10 +1157,10 @@ then ggi_LDFLAGS="${ggi_LDFLAGS} -lggi" AC_ARG_WITH(ggi, [ --with-ggi=PATH path to libggi], - [ if test "x$with_val" != "xno" -a "x$with_val" != "x" + [ if test "x$with_ggi" != "xno" -a "x$with_ggi" != "x" then - CFLAGS_GGI="${CFLAGS_GGI} -I$with_val/include" - ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_val/lib" + CFLAGS_GGI="${CFLAGS_GGI} -I$with_ggi/include" + ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_ggi/lib" fi ]) fi @@ -991,10 +1176,10 @@ then glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide" AC_ARG_WITH(glide, [ --with-glide=PATH path to libglide], - [ if test "x$with_val" != "xno" -a "x$with_val" != "x" + [ if test "x$with_glide" != "xno" -a "x$with_glide" != "x" then - glide_CFLAGS="${glide_CFLAGS} -I$with_val/include" - glide_LDFLAGS="${glide_LDFLAGS} -L$with_val/lib" + glide_CFLAGS="${glide_CFLAGS} -I$with_glide/include" + glide_LDFLAGS="${glide_LDFLAGS} -L$with_glide/lib" fi ]) fi @@ -1086,7 +1271,7 @@ dnl win32 waveOut plugin dnl AC_ARG_ENABLE(waveout, [ --enable-waveout Win32 waveOut module (default enabled on Win32)]) -if test "x$enableval" != "xno" -a x$SYS = xmingw32 +if test "x$enable_waveout" != "xno" -a x$SYS = xmingw32 then PLUGINS="${PLUGINS} waveout" waveout_LDFLAGS="-lwinmm" @@ -1108,9 +1293,9 @@ then GTK_PATH=$PATH AC_ARG_WITH(gtk-config-path, [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)], - [ if test "x$withval" != "xno" + [ if test "x$with_gtk_config_path" != "xno" then - GTK_PATH=$withval:$PATH + GTK_PATH="$with_gtk_config_path:$PATH" fi ]) # look for gtk-config AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, $GTK_PATH) @@ -1213,15 +1398,11 @@ AC_ARG_ENABLE(macosx, [if test x$enable_macosx = xyes then BUILTINS="${BUILTINS} macosx" - macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc" - macosx_CFLAGS="${macosx_CFLAGS} -ObjC" - LDFLAGS="${LDFLAGS} -ObjC" + macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC" fi], [AC_CHECK_HEADERS(Cocoa/Cocoa.h, BUILTINS="${BUILTINS} macosx" - macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc" - macosx_CFLAGS="${macosx_CFLAGS} -ObjC" - LDFLAGS="${LDFLAGS} -ObjC" + macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC" )]) dnl @@ -1242,7 +1423,7 @@ dnl Windows native interface module, built with Borland C++ Builder dnl AC_ARG_ENABLE(intfwin, [ --enable-intfwin Win32 interface support (default disabled)], -[ if test "x$enableval" != "xno" +[ if test "x$enable_intfwin" != "xno" then AC_ARG_WITH(bcbuilder, [ --with-bcbuilder=PATH Borland C++ Builder installation path]) @@ -1288,7 +1469,7 @@ dnl --with-words=big or --with-words=little ; otherwise, try to guess dnl AC_ARG_WITH(words, [ --with-words=endianness set endianness (big or little)]) - case "x$withval" in + case "x$with_words" in xbig) ac_cv_c_bigendian=yes ;; @@ -1313,7 +1494,7 @@ EOF ] if test -f conftest.c then - if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \ + if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \ && test -f conftest.o then if test "`strings conftest.o | grep BIGenDianSyS`" @@ -1345,12 +1526,12 @@ dnl GPROF=0 AC_ARG_ENABLE(gprof, [ --enable-gprof gprof profiling (default disabled)], -[ if test x$enableval = xyes; then GPROF=1; fi ]) +[ if test "x$enable_gprof" = "xyes"; then GPROF=1; fi ]) CPROF=0 AC_ARG_ENABLE(cprof, [ --enable-cprof cprof profiling (default disabled)], -[ if test x$enableval = xyes; +[ if test "x$enable_cprof" = "xyes"; then LDFLAGS="${LDFLAGS} -lcprof" CPROF=1 @@ -1362,7 +1543,7 @@ dnl GNU portable threads dnl AC_ARG_ENABLE(pth, [ --enable-pth GNU Pth support (default disabled)], - [ if test x$enableval = xyes; then + [ if test "x$enable_pth" = "xyes"; then AC_CHECK_LIB(pth,pth_init) AC_EGREP_HEADER(pth_init,pth.h,[ AC_DEFINE(PTH_INIT_IN_PTH_H, 1, @@ -1376,7 +1557,7 @@ dnl State Threads dnl AC_ARG_ENABLE(st, [ --enable-st State Threads (default disabled)], - [ if test x$enableval = xyes; then + [ if test "x$enable_st" = "xyes"; then AC_CHECK_LIB(st,st_init) AC_EGREP_HEADER(st_init,st.h,[ AC_DEFINE(ST_INIT_IN_ST_H, 1, @@ -1411,7 +1592,7 @@ fi dnl dnl Stuff used by the program dnl -AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN\n", [Simple version string]) +AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN", [Simple version string]) AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN", [Copyright string]) VLC_SYMBOL="`echo ${VERSION} | tr .- __`" @@ -1441,8 +1622,8 @@ AC_SUBST(RELEASE) AC_SUBST(MOC) AC_SUBST(WINDRES) AC_SUBST(BCBUILDER) -AC_SUBST(VLC_PACKAGE) -AC_SUBST(VLC_VERSION) +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) AC_SUBST(NEED_GETOPT) AC_SUBST(CFLAGS_OPTIM) @@ -1453,11 +1634,14 @@ AC_SUBST(vlc_CFLAGS) AC_SUBST(plugins_CFLAGS) AC_SUBST(builtins_CFLAGS) +AC_SUBST(a52_CFLAGS) AC_SUBST(arts_CFLAGS) AC_SUBST(dvd_CFLAGS) AC_SUBST(dvdread_CFLAGS) +AC_SUBST(mpeg_ts_dvbpsi_CFLAGS) AC_SUBST(directx_CFLAGS) AC_SUBST(esd_CFLAGS) +AC_SUBST(ffmpeg_CFLAGS) AC_SUBST(glide_CFLAGS) AC_SUBST(gnome_CFLAGS) AC_SUBST(gtk_CFLAGS) @@ -1486,8 +1670,10 @@ AC_SUBST(directx_LDFLAGS) AC_SUBST(dsp_LDFLAGS) AC_SUBST(dvd_LDFLAGS) AC_SUBST(dvdread_LDFLAGS) +AC_SUBST(mpeg_ts_dvbpsi_LDFLAGS) AC_SUBST(esd_LDFLAGS) AC_SUBST(filter_distort_LDFLAGS) +AC_SUBST(ffmpeg_LDFLAGS) AC_SUBST(ggi_LDFLAGS) AC_SUBST(glide_LDFLAGS) AC_SUBST(gnome_LDFLAGS)