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.4.2"
CODENAME=Ourumov
dnl Save CFLAGS and LDFLAGS
fi
dnl Gettext stuff
-ALL_LINGUAS="de fr ja no ru nl"
+ALL_LINGUAS="de en_GB fr ja no ru nl pl"
-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
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"
+ ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
+ http_LDFLAGS="${http_LDFLAGS} -lws2_32"
rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
;;
x*nto*)
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 atoll)
AC_CHECK_FUNC(connect,,[
AC_CHECK_LIB(socket,connect,
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
Define if <strings.h> defines strncasecmp.)])
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(stdint.h getopt.h strings.h inttypes.h sys/int_types.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)
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 <time.h> defines nanosleep.)
+])
+
+dnl Make sure we have timespecs
+AC_EGREP_HEADER(timespec,sys/time.h,[
+ AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
+ Define if <sys/time.h> defines struct timespec.)
+])
+
dnl Check for threads library
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
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],
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 filter_crop fx_scope"
dnl
dnl Accelerated modules
[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
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])
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, [
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
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])
+ AC_ARG_WITH(dvbpsi,
+ [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
+ case "x$with_dvbpsi" in
+ x|xyes)
+ if test "x$with_dvbpsi_tree" = x
+ then
+ AC_CHECK_HEADERS(dvbpsi/dr.h,
+ [ PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
+ mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} -ldvbpsi" ], [],
+ [ AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
+ else
+ AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
+ real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
+ if test "x$real_dvbpsi_tree" = x
+ then
+ dnl The given directory can't be found
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
+ fi
+ if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+ then
+ dnl Use a custom libdvbpsi
+ AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
+ BUILTINS="${BUILTINS} mpeg_ts_dvbpsi"
+ mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+ mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
+ else
+ dnl The given libdvbpsi wasn't built
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
+ fi
+ fi
+ ;;
+ xno)
+ dnl Compile without dvbpsi (dlopen version, works only under Linux)
+ ;;
+ *)
+ AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
+ 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"
+ ;;
+ esac
+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
-AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"])
+if test x$SYS != xnto && test "x$SYS" != "xmingw32"
+then
+ AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"])
+fi
+if test "x$SYS" = "xmingw32"
+then
+ AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
+ AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
+ PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
+fi
+
+dnl
+dnl AVI demux plugin
+dnl
+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
[ --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,
+ [ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
+ if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"
+ then
+ ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I$with_ffmpeg/include/libffmpeg"
+ ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L$with_ffmpeg/lib"
+ fi
+
+ AC_ARG_WITH(ffmpeg-tree,
+ [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
+ if test "x$with_ffmpeg_tree" != "x"
+ then
+ 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 -lm"
+ 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
+ else
+ save_CFLAGS=$CFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CFLAGS="$CFLAGS $ffmpeg_CFLAGS"
+ LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS -lm"
+ AC_CHECK_LIB(avcodec, avcodec_init, [
+ BUILTINS="${BUILTINS} ffmpeg"
+ ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" ],
+ [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
+ CFLAGS=$save_CFLAGS
+ LDFLAGS=$save_LDFLAGS
+ 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_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
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
;;
]
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`"
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,
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 .- __`"
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)
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)
AC_SUBST(gtk_LDFLAGS)
+AC_SUBST(http_LDFLAGS)
AC_SUBST(idctaltivec_LDFLAGS)
AC_SUBST(imdct_LDFLAGS)
AC_SUBST(imdct3dn_LDFLAGS)
AC_SUBST(imdctsse_LDFLAGS)
AC_SUBST(ipv4_LDFLAGS)
+AC_SUBST(ipv6_LDFLAGS)
AC_SUBST(kde_LDFLAGS)
AC_SUBST(lirc_LDFLAGS)
AC_SUBST(macosx_LDFLAGS)
AC_SUBST(x11_LDFLAGS)
AC_SUBST(xvideo_LDFLAGS)
-AC_OUTPUT([Makefile.opts po/Makefile.in])
+AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in])
echo "
vlc configuration