AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
+dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
+dnl them. And we need the comma otherwize automake will choke on it.
+AM_INIT_AUTOMAKE(vlc,0.5.0-cvs-am)
AM_CONFIG_HEADER(config.h)
dnl
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
+dnl
dnl Gettext stuff
+dnl
ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
AM_GNU_GETTEXT_VERSION(0.10.40)
AM_GNU_GETTEXT
+if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
+ AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
+ INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
+fi
+AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL
LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
LIBEXT=".dylib"
;;
- x*mingw32*)
- SYS=mingw32
- AC_CHECK_TOOL(WINDRES, windres, :)
- CFLAGS_save="${CFLAGS_save} -fnative-struct"; CFLAGS="${CFLAGS_save}"
- CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
- LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows -Xlinker --force-exe-suffix"
- LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
- LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
- LDFLAGS_access_http="${LDFLAGS_http} -lws2_32"
- LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
- LIBEXT=".dll"
- ;;
- x*cygwin*)
- SYS=cygwin
+ x*mingw32* | x*cygwin*)
AC_CHECK_TOOL(WINDRES, windres, :)
LIBEXT=".dll"
+
+ case "x${target_os}" in
+ x*mingw32*)
+ SYS=mingw32
+ ;;
+ x*cygwin*)
+ dnl Check if we are using the mno-cygwin mode in which case we are
+ dnl actually dealing with a mingw32 compiler.
+ AC_EGREP_CPP(yes,
+ [#ifdef WIN32
+ yes
+ #endif],
+ SYS=mingw32, SYS=cygwin)
+ ;;
+ esac
+
+ if test "x$SYS" = "xmingw32"; then
+ CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
+ CPPFLAGS="${CPPFLAGS_save}"
+ LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
+ LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
+ LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
+ LDFLAGS_access_http="${LDFLAGS_http} -lws2_32"
+ LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
+ fi
;;
x*nto*)
SYS=nto
CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
- LDFLAGS_beos="${LDFLAGS_beos} -lbe -lgame -lroot -ltracker -lstdc++.r4 -ltranslation"
+ LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation"
LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"
;;
x*)
AC_MSG_CHECKING(for suffix of libraries)
AC_MSG_RESULT(${LIBEXT})
+dnl Check for the need to include the mingwex lib for mingw32
+if test x$SYS = xmingw32
+then
+ AC_CHECK_LIB(mingwex,opendir,
+ AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
+ [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
+ LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
+ )
+fi
+
+dnl Check for fnative-struct or mms-bitfields support for mingw32
+if test x$SYS = xmingw32
+then
+ AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
+ [ac_cv_c_mms_bitfields],
+ [CFLAGS="${CFLAGS_save} -mms-bitfields"
+ AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
+ if test x"$ac_cv_c_mms_bitfields" != x"no"; then
+ CFLAGS_mingw32_special="-mms-bitfields"
+ else
+ CFLAGS_mingw32_special="-fnative-struct"
+ fi
+
+ CFLAGS_save="${CFLAGS_save} ${CFLAGS_mingw32_special}"; CFLAGS="${CFLAGS_save}"
+fi
+
dnl Flags for plugin compilation
case "x${SYS}" in
xmingw32|xcygwin)
- CFLAGS_pics="${CFLAGS_pics} -fnative-struct"
- CXXFLAGS_pics="${CXXFLAGS_pics} -fnative-struct"
- OBJCFLAGS_pics="${OBJCFLAGS_pics} -fnative-struct"
- CFLAGS_plugins="${CFLAGS_plugins} -fnative-struct"
- CXXFLAGS_plugins="${CXXFLAGS_plugins} -fnative-struct"
- OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fnative-struct"
+ CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
+ CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special}"
+ OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
+ CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
+ CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special}"
+ OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
;;
x*)
CFLAGS_pics="${CFLAGS_pics} -fPIC"
dnl Check for headers
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(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.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)
dnl
dnl default modules
dnl
-PLUGINS="${PLUGINS} dummy null"
-PLUGINS="${PLUGINS} rc logger access_file memcpy"
+PLUGINS="${PLUGINS} dummy rc logger access_file memcpy"
PLUGINS="${PLUGINS} es audio mpeg_system ps ts"
PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
#PLUGINS="${PLUGINS} a52old imdct downmix"
-PLUGINS="${PLUGINS} lpcm"
+PLUGINS="${PLUGINS} lpcm a52"
PLUGINS="${PLUGINS} deinterlace invert wall transform distort clone crop motionblur"
PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab"
PLUGINS="${PLUGINS} trivial_resampler ugly_resampler"
#PLUGINS="${PLUGINS} scope"
PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
PLUGINS="${PLUGINS} id3"
+PLUGINS="${PLUGINS} wav araw"
dnl
dnl Network modules
dnl VCD module
dnl
AC_ARG_ENABLE(vcd,
- [ --enable-vcd VCD support for Linux, FreeBSD and MacOS X (default enabled)])
+ [ --enable-vcd VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
if test "x${enable_vcd}" != "xno"
then
AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
])
- if test "x${SYS}" = "xbsdi"
+ if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
then
PLUGINS="${PLUGINS} vcd"
fi
if test "x${SYS}" = "xdarwin"
then
- # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
+ PLUGINS="${PLUGINS} vcd"
LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
fi
fi
if test -f ${real_a52_tree}/include/a52.h
then
AC_MSG_RESULT(yes)
- CPPFLAGS_a52="${CPPFLAGS_a52} -I${real_a52_tree}"
- LDFLAGS_a52="${LDFLAGS_a52} -L${real_a52_tree}/liba52/.libs"
- LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52}"
+ CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
+ LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
+ LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
AC_CHECK_LIB(a52, a52_free, [
- BUILTINS="${BUILTINS} a52"
- LDFLAGS_a52="${LDFLAGS_a52} -la52 -lm"
- CPPFLAGS_a52="${CPPFLAGS_a52} -DUSE_A52DEC_TREE"
+ BUILTINS="${BUILTINS} a52tofloat32"
+ LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -la52 -lm"
+ CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
],[
if test -f ${real_a52_tree}/liba52/.libs/liba52.a
then
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test}"
AC_CHECK_HEADERS(a52dec/a52.h, [
AC_CHECK_LIB(a52, a52_free, [
- PLUGINS="${PLUGINS} a52"
- LDFLAGS_a52="${LDFLAGS_a52} ${LDFLAGS_test} -la52 -lm"
- CPPFLAGS_a52="${CPPFLAGS_a52} ${CPPFLAGS_test}"
+ PLUGINS="${PLUGINS} a52tofloat32"
+ LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} ${LDFLAGS_test} -la52 -lm"
+ CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
],[
if test "x${enable_dvbpsi}" != "x"
then
[ --enable-directx Win32 DirectX support (default enabled on Win32)])
if test "x${enable_directx}" != "xno"
then
- if test "x${SYS}" = "xmingw32"
+ if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
then
AC_ARG_WITH(directx,
[ --with-directx=PATH Win32 DirectX headers])
if test "x${with_directx}" = "x"
then
AC_CHECK_HEADERS(ddraw.h,
- [ PLUGINS="${PLUGINS} directx"
- LDFLAGS_directx="${LDFLAGS_directx} -lgdi32" ])
+ [ PLUGINS="${PLUGINS} vout_directx aout_directx"
+ LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
else
AC_MSG_CHECKING(for directX headers in ${with_directx})
if test -f ${with_directx}/ddraw.h
then
- PLUGINS="${PLUGINS} directx"
- LDFLAGS_directx="${LDFLAGS_directx} -lgdi32"
- CPPFLAGS_directx="${CPPFLAGS_directx} -I${with_directx}"
+ PLUGINS="${PLUGINS} vout_directx aout_directx"
+ LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
+ CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
+ CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
dnl
AC_ARG_ENABLE(waveout,
[ --enable-waveout Win32 waveOut module (default enabled on Win32)])
-if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
- then
+if test "x${enable_waveout}" != "xno"; then
+ if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
PLUGINS="${PLUGINS} waveout"
LDFLAGS_waveout="-lwinmm"
+ fi
fi
dnl
then
AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
fi
- CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
- LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
+ if test "x${SYS}" != "xmingw32"; then
+ CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
+ LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
+ else
+ CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
+ LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+ fi
# now look for the gtk.h header
CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
ac_cv_gtk_headers=yes
if test "x${ac_cv_gtk_headers}" = "xyes"
then
PLUGINS="${PLUGINS} gtk"
- NEED_GTK_MAIN=yes
+ if test "x${SYS}" != "xmingw32"; then
+ NEED_GTK_MAIN=yes
+ fi
ALIASES="${ALIASES} gvlc"
fi
CPPFLAGS="${CPPFLAGS_save}"
fi])
])
-LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
-LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
+if test "x${SYS}" != "xmingw32"; then
+ LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
+ LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
+fi
dnl
dnl Mozilla plugin
fi
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
+dnl
+dnl test plugins
+dnl
+AC_ARG_ENABLE(testsuite,
+ [ --enable-testsuite build test modules (default disabled)])
+if test "x${enable_testsuite}" = "xyes"
+then
+ TESTS="test1 test2 test3 test4"
+
+ dnl we define those so that bootstrap sets the right linker
+ CXXFLAGS_test2="${CXXFLAGS_test2}"
+ OBJCFLAGS_test3="${OBJCFLAGS_test3}"
+ dnl this one is needed until automake knows what to do
+ LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
+
+ PLUGINS="${PLUGINS} ${TESTS}"
+ #BUILTINS="${BUILTINS} ${TESTS}"
+fi
+
dnl
dnl gtk_main plugin
dnl
if test "x${NEED_GTK_MAIN}" != "xno"
then
PLUGINS="${PLUGINS} gtk_main"
+ CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
fi
plugin_support=false
fi])
-dnl Automagically disable plugins if there is no system support for .so files
-dnl don't forget vlc-win32 still can load .so as plugins
+dnl Automagically disable plugins if there is no system support for
+dnl dynamically loadable files (.so, .dll, .dylib).
+dnl don't forget vlc-win32 still can load .dll as plugins
if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
then
echo "*** Your system doesn't have plugin support. All plugins will be built"
then
for plugin in `echo ${PLUGINS}`
do
- typeset ${plugin}_plugin=yes
+ eval "${plugin}_plugin=yes"
done
else
BUILTINS="${BUILTINS} ${PLUGINS}"
builtin_support=:
for builtin in `echo ${BUILTINS}`
do
- typeset ${builtin}_builtin=yes
+ eval "${builtin}_builtin=yes"
done
fi]
AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
dnl
dnl Stuff used by the program
dnl
-AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN", [Simple version string])
+AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
AC_SUBST(BCBUILDER)
AC_SUBST(XPIDL)
AC_SUBST(LIBEXT)
+AC_SUBST(INCLUDES)
AC_SUBST(CFLAGS_TUNING)
AC_SUBST(CFLAGS_OPTIM)