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, "$PACKAGE", [Package name])
AC_DEFINE_UNQUOTED(VLC_VERSION, "$VERSION", [Package version])
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 <stdio.h>
+ #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],
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
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
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 ])
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
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
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])
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, [
],[
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
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/dvbpsi.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])
+ 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"
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
[ --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
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"
+ [ if test "x$with_mad" != "xno" -a "x$with_mad" != "x"
then
- mad_CFLAGS="${mad_CFLAGS} -I$with_val/include"
- mad_LDFLAGS="${mad_LDFLAGS} -L$with_val/lib"
+ mad_CFLAGS="${mad_CFLAGS} -I$with_mad/include"
+ mad_LDFLAGS="${mad_LDFLAGS} -L$with_mad/lib"
fi ])
save_CFLAGS=$CFLAGS
save_LDFLAGS=$LDFLAGS
LDFLAGS=$save_LDFLAGS
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
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
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
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}
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
[ 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
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
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
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"
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)
[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_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc"
macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
LDFLAGS="${LDFLAGS} -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_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc"
macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
LDFLAGS="${LDFLAGS} -ObjC"
)])
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])
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
;;
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
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,
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,
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)
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)