VERSION_REVISION="0"
VERSION_EXTRA="svn"
-CONFIGURE_LINE="$0 $ac_configure_args"
+CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
CODENAME="Grishenko"
AC_PREREQ(2.59)
LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${LDFLAGS_save}"
dnl Check for BONE
if test -f /boot/beos/system/lib/libbind.so; then
- VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap vlc growl],[-lbind -lsocket])
+ VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl],[-lbind -lsocket])
else
- VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap vlc growl],[-lnet])
+ VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl],[-lnet])
fi
dnl Ugly check for Zeta
AC_PROG_LIBTOOL
AC_ARG_ENABLE(libtool,
- [ --enable-libtool use libtool (default disabled)])
+ [ --enable-libtool use libtool (default enabled)])
AM_CONDITIONAL(USE_LIBTOOL, [test "x${enable_libtool}" != "xno"])
])
], [
AS_IF([test "${enable_libtool}" != "no"], [
- VLC_ADD_LDFLAGS([libvlc], [${LTLIBINTL}])
+ VLC_ADD_LDFLAGS([libvlc vlc], [${LTLIBINTL}])
], [
- VLC_ADD_LDFLAGS([libvlc], [${LIBINTL}])
+ VLC_ADD_LDFLAGS([libvlc vlc], [${LIBINTL}])
])
])
AC_SUBST(INCLUDED_LIBINTL)
fi
VLC_ADD_CFLAGS([libvlc],[${INCICONV}])
AS_IF([test "${enable_libtool}" != "no"], [
- VLC_ADD_LDFLAGS([libvlc],[${LIBICONV}])
+ VLC_ADD_LDFLAGS([libvlc vlc],[${LIBICONV}])
],[
- VLC_ADD_LDFLAGS([libvlc],[${LTLIBICONV}])
+ VLC_ADD_LDFLAGS([libvlc vlc],[${LTLIBICONV}])
])
dnl Check for the need to include the mingwex lib for mingw32
VLC_ADD_LDFLAGS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise],[-lm])
])
AC_CHECK_LIB(m,pow,[
- VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq vlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
+ VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
])
AC_CHECK_LIB(m,sqrt,[
- VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres],[-lm])
+ VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
])
AC_CHECK_LIB(m,ceil,[
VLC_ADD_LDFLAGS([mosaic],[-lm])
AC_ARG_ENABLE(dbus,
[ --enable-dbus Linux D-BUS message bus system (default enabled)])
-if test "${enable_dbus}" != "no"
+if test "${enable_dbus}" != "no" -a "$SYS" = "Linux"
then
dnl api stable dbus
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
dnl This helps detect broken plugins with undefined symbols
dnl Better fail loudly at build-time than silenty at run-time.
-RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
- VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
-])
+dnl Unfortunately, this sucks on FreeBSD (won't even link with -lc)
+dnl RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
+dnl VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
+dnl ])
dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os],
VLC_ADD_PLUGINS([dummy logger memcpy])
VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta])
VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac])
-VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise])
+VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise extract])
VLC_ADD_PLUGINS([converter_fixed mono])
VLC_ADD_PLUGINS([trivial_resampler ugly_resampler])
VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer])
dnl
dnl x86 accelerations
dnl
-if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}" = "x86_64"
+if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}"="i486" -o "${host_cpu}" = "x86_64"
then
ARCH="${ARCH} mmx"
VLC_ADD_BUILTINS([${ACCEL_MODULES}])
[ --enable-release activate extra optimizations (default disabled)])
test "${enable_release}" != "yes" && enable_release="no"
-dnl
-dnl Is the shared libvlc forced ?
-dnl
-AC_ARG_ENABLE(shared-libvlc,
- [ --enable-shared-libvlc Win32 libvlc.dll build (default disabled)])
-AS_IF([test "${enable_libtool}" != "no" && test "${enable_shared_libvlc}"], [
- AC_MSG_ERROR([--enable-shared-libvlc and --enable-libtool are mutually exclusive])
-])
-
dnl
dnl Stream output
dnl
dnl gnomeVFS access module
dnl
AC_ARG_ENABLE(gnomevfs,
- [ --enable-gnomevfs GnomeVFS access module (default enabled)])
-if test "${enable_gnomevfs}" != "no"
+ [ --enable-gnomevfs GnomeVFS access module (default disabled)])
+if test "${enable_gnomevfs}" = "yes"
then
PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0,
VLC_ADD_LDFLAGS([access_gnomevfs],[$GNOMEVFS_LIBS])
AC_MSG_RESULT(${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a)
VLC_ADD_BUILTINS([twolame])
VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a])
- VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame])
+ VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame -DLIBTWOLAME_STATIC])
else
dnl The given libtwolame wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
fi
else
- CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame}"
+ CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame} -DLIBTWOLAME_STATIC"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_twolame}"
AC_CHECK_HEADERS(twolame.h, ,
[ AC_MSG_ERROR([Cannot find development header for libtwolame...]) ])
AC_CHECK_LIB(twolame, twolame_init, [
VLC_ADD_PLUGINS([twolame])
+ VLC_ADD_CPPFLAGS([twolame],[-DLIBTWOLAME_STATIC])
VLC_ADD_LDFLAGS([twolame],[-ltwolame]) ],
[ AC_MSG_ERROR([Cannot find libtwolame library...]) ])
LDFLAGS="${LDFLAGS_save}"
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_glx}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
- AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h, [
+ AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h)
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
+ [[#if !defined(HAVE_X11_XLIB_H) || !defined(HAVE_GL_GLU_H) || !defined(HAVE_GL_GLX_H)
+ choke me
+ #endif]]),
+ [
VLC_ADD_PLUGINS([glx])
VLC_ADD_LDFLAGS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU])
VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}])
- ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])])
+ ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])])
CPPFLAGS="${CPPFLAGS_save}"
fi
])
AC_CHECK_HEADERS(d3d9.h,
[ VLC_ADD_PLUGINS([direct3d])
- VLC_ADD_LDFLAGS([direct3d],[-ld3d9 -lgdi32])
+ VLC_ADD_LDFLAGS([direct3d],[-lgdi32])
])
else
AC_MSG_CHECKING(for directX headers in ${with_directx})
# wxwidgets should provide the following flags but does not
# the following is required to compile for win32
VLC_ADD_CXXFLAGS([wxwidgets],[-D_UNICODE -DUNICODE])
+ else
+ AC_MSG_ERROR([You need a unicode build of wxWidgets. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
fi
if test "$have_libcdio" = "yes"
then
WIDL=no
fi
AC_LANG_PUSH(C++)
- AC_CHECK_HEADERS(ole2.h olectl.h,
- [ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
- VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
- AC_CHECK_HEADERS(objsafe.h,
- VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
- [#if HAVE_OLE2_H
- # include <ole2.h>
- #endif]
- )
- activex=:
- ],
+ AC_CHECK_HEADERS(ole2.h,
+ [AC_CHECK_HEADERS(olectl.h,
+ [ VLC_ADD_CPPFLAGS([activex],[-D_MIDL_USE_GUIDDEF_])
+ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
+ VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
+ AC_CHECK_HEADERS(objsafe.h,
+ VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
+ [
+ #if HAVE_OLE2_H
+ # include <ole2.h>
+ #endif
+ ]
+ )
+ activex=:
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} activex"
+ ],
+ [ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
+ )],
[ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
)
AC_LANG_POP(C++)
dnl
mozilla=false
AC_ARG_ENABLE(mozilla,
- [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
+ [ --enable-mozilla build a vlc-based Firefox/Mozilla plugin (default disabled)])
AC_ARG_WITH(mozilla-sdk-path,
[ --with-mozilla-sdk-path=PATH path to mozilla sdk])
AC_LANG_PUSH(C++)
then
dnl currently vlc plugin only needs headers, no xpcom support apis are actually used
need_xpcom_libs=false
+
if test "${with_mozilla_sdk_path}" = "" -o "${with_mozilla_sdk_path}" = "no"
then
- AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
- if test "${MOZILLA_CONFIG}" = "no"
- then
- AC_PATH_PROG(SEAMONKEY_CONFIG, seamonkey-config, no)
- if test "${SEAMONKEY_CONFIG}" = "no"
- then
- AC_PATH_PROG(XULRUNNER_CONFIG, xulrunner-config, no)
- if test "${XULRUNNER_CONFIG}" = "no"
+ dnl New firefox-1.5 SDK api
+ PKG_CHECK_MODULES([firefox], [firefox-plugin],
+ [
+ firefox_libs=`pkg-config --libs firefox-plugin`
+ firefox_cflags=`pkg-config --cflags firefox-plugin`
+ PKG_CHECK_MODULES([mozilla-nspr], [mozilla-nspr],
+ [
+ nspr_libs=`pkg-config --libs mozilla-nspr`
+ npsr_cflags=`pkg-config --cflags mozilla-nspr`
+ ],
+ [
+ PKG_CHECK_MODULES([nspr], [nspr],
+ [
+ nspr_libs=`pkg-config --libs nspr`
+ npsr_cflags=`pkg-config --cflags nspr`
+ ],
+ [
+ AC_MSG_ERROR([Please install the nspr development tools.])
+ ]
+ )
+ ]
+ )
+ CPPFLAGS="${CPPFLAGS_save} ${firefox_cflags} ${nspr_cflags} ${MOZILLA_CPPFLAGS}"
+ MOZILLA_REQUIRED_HEADERS=1
+ AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0)
+ AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0)
+ AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0,
+ [#if HAVE_NPAPI_H
+ # include <npapi.h>
+ #endif
+ ])
+ CPPFLAGS="${CPPFLAGS_save}"
+ if test "${MOZILLA_CONFIG_HEADERS}" = "0"; then
+ AC_MSG_ERROR([Please install the Firefox development tools; mozilla-config.h, plugin/npapi.h and plugin/npruntime.h were not found.])
+ fi
+ MOZILLA_REQUIRED_HEADERS=
+ mozilla=:
+ firefox_include=`pkg-config --variable=includedir firefox-plugin`
+ MOZILLA_CONFIG_H="${firefox_include}/mozilla-config.h"
+ if grep '^#define MOZ_X11 1' ${MOZILLA_CONFIG_H} 2>&1 > /dev/null ; then
+ VLC_ADD_LDFLAGS([mozilla], [${X_LIBS} ${X_PRE_LIBS} -lX11 -lXt])
+ fi
+ VLC_ADD_CPPFLAGS([mozilla],[${firefox_cflags} ${nspr_cflags} ${MOZILLA_CPPFLAGS}])
+ VLC_ADD_LDFLAGS([mozilla],[${firefox_libs} ${nspr_libs} ${MOZILLA_LDFLAGS}])
+ VLC_ADD_PLUGINS([mozilla])
+ MOZILLA_CONFIG=
+ ],
+ [
+ AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
+ if test "${MOZILLA_CONFIG}" = "no"
then
- AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
- else
- have_xul=true
- MOZILLA_CONFIG="${XULRUNNER_CONFIG}"
+ AC_PATH_PROG(SEAMONKEY_CONFIG, seamonkey-config, no)
+ if test "${SEAMONKEY_CONFIG}" = "no"
+ then
+ AC_PATH_PROG(XULRUNNER_CONFIG, xulrunner-config, no)
+ if test "${XULRUNNER_CONFIG}" = "no"
+ then
+ AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
+ else
+ have_xul=true
+ MOZILLA_CONFIG="${XULRUNNER_CONFIG}"
+ fi
+ else
+ MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
+ fi
fi
- else
- MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
+ ]
+ )
+ if test ! -z "${MOZILLA_CONFIG}"
+ then
+ if ${MOZILLA_CONFIG} --defines | grep -q 'MOZ_X11=1'; then
+ LDFLAGS="${LDFLAGS_save} ${X_LIBS} ${X_PRE_LIBS}"
+ AC_CHECK_LIB(Xt,XtStrings,
+ [
+ VLC_ADD_CPPFLAGS([mozilla],[${X_CFLAGS}])
+ VLC_ADD_LDFLAGS([mozilla],[${X_LIBS} ${X_PRE_LIBS} -lXt -lX11 -lSM -lICE])
+ ],
+ [],
+ [[${X_LIBS} ${X_PRE_LIBS} -lX11 -lSM -lICE]
+ ])
+ LDFLAGS="${LDFLAGS_save}"
fi
- fi
-
- if ${MOZILLA_CONFIG} --defines | grep -q 'MOZ_X11=1'; then
- LDFLAGS="${LDFLAGS_save} ${X_LIBS} ${X_PRE_LIBS}"
- AC_CHECK_LIB(Xt,XtStrings,
- [
- VLC_ADD_CPPFLAGS([mozilla],[${X_CFLAGS}])
- VLC_ADD_LDFLAGS([mozilla],[${X_LIBS} ${X_PRE_LIBS} -lXt -lX11 -lSM -lICE])
-],
- [],
- [[${X_LIBS} ${X_PRE_LIBS} -lX11 -lSM -lICE]
- ])
- LDFLAGS="${LDFLAGS_save}"
- fi
-
+
mozilla=:
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} mozilla"
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
if ${need_xpcom_libs}; then
MOZILLA_REQUIRED_HEADERS=
CPPFLAGS="${CPPFLAGS_save}"
MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`"
+ fi
dnl End of moz_sdk = ""
else
dnl special case for mingw32
mozilla_sdk_xpcom="/xpcom"
fi
fi
-
+
real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
MOZILLA_REQUIRED_HEADERS=1
fi
MOZILLA_REQUIRED_HEADERS=
mozilla=:
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} mozilla"
VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include])
if ${need_xpcom_libs}; then
VLC_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -L${real_mozilla_sdk}/lib -lnspr4 -lplds4 -lplc4 -lxpcomglue])
if test "${SYS}" = "mingw32"; then
- dnl latest gecko sdk does not have embedstring
- if test -d "${real_mozilla_sdk}/embedstring/bin"
- then
- VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
- fi
- fi
+ dnl latest gecko sdk does not have embedstring
+ if test -d "${real_mozilla_sdk}/embedstring/bin"
+ then
+ VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
+ fi
+ fi
fi
MOZILLA_SDK_PATH="${real_mozilla_sdk}"
-
+
if test -n "${CYGPATH}"; then
real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
fi
AC_ARG_ENABLE(python-bindings,
[ --enable-python-bindings Enable Python bindings (default disabled)])
dnl TODO: look for python dev headers
+AS_IF([test "${enable_python_bindings}" = "yes"],
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} python"
+ )
+
AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"])
dnl
[AC_MSG_ERROR([Please set the JAVA_HOME variable to your JDK environment])])
AC_PROG_JAVAC
AC_PROG_JAVA
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} java"
fi
AM_CONDITIONAL(BUILD_JAVA, [test "${enable_java_bindings}" = "yes"])
dnl
dnl Pic and shared libvlc stuff
dnl
-AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no])
-AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"])
-AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no"], [
+AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
VLC_ADD_PLUGINS([${BUILTINS}])
BUILTINS=""
], [
+ LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}"
FILE_LIBVLC_DLL=""
])
dnl Create the vlc-config script
dnl
LDFLAGS_libvlc="${LDFLAGS_libvlc} ${LDFLAGS_builtin}"
-for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
dnl
dnl Configuration is finished
test "${enable_release}" = "yes" && printf "release " || printf "devel "
echo "
vlc aliases :${ALIASES}
+plugins/bindings :${PLUGINS_BINDINGS}
You can tune the compiler flags in vlc-config.
To build vlc and its plugins, type \`./compile' or \`make'.