dnl Autoconf settings for vlc
-AC_INIT(vlc, 0.9.0)
-VERSION_MAJOR="0"
-VERSION_MINOR="9"
+AC_INIT(vlc, 1.0.0)
+VERSION_MAJOR="1"
+VERSION_MINOR="0"
VERSION_REVISION="0"
-VERSION_EXTRA=""
+VERSION_EXTRA="-git"
CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
-CODENAME="Grishenko"
+CODENAME="Goldeneye"
COPYRIGHT_YEARS="1996-2008"
AC_PREREQ(2.59c)
dnl
AC_ARG_WITH(contrib,
[ --without-contrib do not use the libraries in extras/contrib],[],[])
- if test "${with_contrib}" != "no"; then
+ AS_IF([test "${with_contrib}" != "no"],[
AC_MSG_CHECKING([for libs in extras/contrib])
topdir="`dirname $0`"
if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
topdir="`pwd`/$topdir"
fi
- if test "`grep HOST ${topdir}/extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"; then
+ AS_IF([test -d ${topdir}/extras/contrib/lib],[
+ AS_IF([test "`grep HOST ${topdir}/extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"],[
if test "${with_contrib}" = "yes"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([ not using the libs in extras/contrib as it is not the same host])
AC_MSG_RESULT([no])
AC_MSG_WARN([ not using the libs in extras/contrib as it is not the same host])
fi
- else
- if test -d ${topdir}/extras/contrib/lib; then
+ ],[
AC_MSG_RESULT([yes])
export PATH=${topdir}/extras/contrib/bin:$PATH
CPPFLAGS="${CPPFLAGS} -I${topdir}/extras/contrib/include"
export LIBRARY_PATH=${topdir}/extras/contrib/lib:$LIBRARY_PATH
export BELIBRARIES=${topdir}/extras/contrib/lib:$BELIBRARIES
fi
- else
- AC_MSG_RESULT([no])
- fi
- fi
-fi
+ ])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+])
dnl
dnl Set default values
dnl
echo " Assuming --enable-realrtsp"
enable_update_check="yes"
echo " Assuming --enable-update-check"
+ enable_libass="yes"
+ echo " Assuming --enable-libass"
+ enable_asademux="yes"
+ echo " Assuming --enable-asademux"
enable_skins2="no"
echo " Assuming --disable-skins2"
[lt_cv_deplibs_check_method=pass_all])
AC_DISABLE_STATIC
-AC_DISABLE_FAST_INSTALL
+dnl AC_DISABLE_FAST_INSTALL
AC_LIBTOOL_DLOPEN
AC_LIBTOOL_WIN32_DLL
m4_undefine([AC_PROG_F77])
AC_ARG_ENABLE(hal,
[ --enable-hal Linux HAL services discovery (default enabled)])
-if test "${enable_hal}" != "no"
+if test "${enable_hal}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
then
PKG_CHECK_MODULES(HAL, hal >= 0.5.0,
[
[ --enable-dbus Linux D-BUS message bus system (default enabled)])
case "${SYS}" in
linux*|*bsd*)
-if test "${enable_dbus}" != "no"
+if test "${enable_dbus}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
then
dnl api stable dbus
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
VLC_ADD_PLUGIN([grain])
VLC_ADD_PLUGIN([extract])
VLC_ADD_PLUGIN([sharpen])
-VLC_ADD_PLUGIN([seamcarving])
VLC_ADD_PLUGIN([croppadd])
VLC_ADD_PLUGIN([canvas])
VLC_ADD_PLUGIN([blendbench])
dnl Growl notification plugin
dnl
AC_ARG_ENABLE(growl,
- [ --enable-growl growl notification plugin (default enabled)])
+ [ --enable-growl growl notification plugin (default disabled)],,
+ [enable_growl=no])
AS_IF([test "${enable_growl}" != "no"], [
VLC_ADD_PLUGIN([growl_udp])
AC_CHECK_HEADERS(Growl/GrowlDefines.h, [
])
])
other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
+ other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
other_libs="$other_libs -lws2_32"
fi
+ dnl We need to check for pic because live555 don't provide shared libs
+ dnl and we want to build a plugins so we need -fPIC on some arch.
AC_CHECK_HEADERS(liveMedia.hh, [
VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
+ AC_CHECK_LIB(liveMedia_pic, main, [
+ VLC_ADD_PLUGIN([live555])
+ VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
+ ],[
AC_CHECK_LIB(liveMedia, main, [
VLC_ADD_PLUGIN([live555])
VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
- ],[],[${other_libs}])
+ ],[],[${other_libs}]) ],[${other_libs_pic}])
])
CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP(C++)
if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
- AC_MSG_CHECKING(for libebml version >= 0.7.6)
+ AC_MSG_CHECKING(for libebml version >= 0.7.7)
AC_EGREP_CPP(yes,
[#include <ebml/EbmlVersion.h>
#ifdef LIBEBML_VERSION
#endif],
[AC_MSG_RESULT([yes])
AC_CHECK_HEADERS(matroska/KaxVersion.h, [
- AC_MSG_CHECKING(for libmatroska version >= 0.7.7)
+ AC_MSG_CHECKING(for libmatroska version >= 0.8.0)
AC_EGREP_CPP(yes,
[#include <matroska/KaxVersion.h>
#ifdef LIBMATROSKA_VERSION
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,AGL])
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,IOKit])
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,QuickTime])
+ dnl For bug report
+ VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,AddressBook])
VLC_ADD_LDFLAGS([macosx qtcapture], [-Wl,-framework,QTKit])
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,CoreAudio])
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,WebKit])
ORIGCFLAGS=$CFLAGS
CFLAGS="$CFLAGS -x objective-c"
- AC_TRY_COMPILE([#import <QuartzCore/CALayer.h>],
+ AC_TRY_COMPILE([#import <QuartzCore/CALayer.h>],,
[VLC_ADD_PLUGIN([opengllayer])
- VLC_ADD_OBJCFLAGS([opengllayer], [-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5])])
+ VLC_ADD_OBJCFLAGS([opengllayer])],[])
CFLAGS=$ORIGCFLAGS
fi
AC_LANG_PUSH(C++)
if test "${enable_mozilla}" = "yes"
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
- dnl New firefox-1.5 SDK api
- PKG_CHECK_MODULES([FIREFOX], [firefox-plugin],
- [
- PKG_CHECK_MODULES([FIREFOX_XPCOM], [firefox-xpcom],
- [],
- [
- PKG_CHECK_MODULES([MOZILLA_NSPR], [mozilla-nspr],
- [],
- [
- PKG_CHECK_MODULES([NSPR], [nspr],
- [],
- [
- AC_MSG_ERROR([Please install the nspr development tools.])
- ]
- )
- ]
- )
- ])
- CPPFLAGS="${CPPFLAGS_save} ${FIREFOX_CFLAGS} ${FIREFOX_XPCOM_CFLAGS} ${MOZILLA_NSPR_CFLAGS} ${NSPR_CFLAGS} ${MOZILLA_CPPFLAGS}"
+ AS_IF([test "${with_mozilla_sdk_path}" = "" -o "${with_mozilla_sdk_path}" = "no"],
+ [
+ dnl pkg-config
+ dnl As we want to do a loop due to the number of name possible for the .pc
+ dnl we can't use the pkg-config macros.
+
+ AC_ARG_VAR([MOZILLA_CFLAGS], [C compiler flags for Mozilla, overriding pkg-config])
+ AC_ARG_VAR([MOZILLA_LIBS], [linker flags for Mozilla, overriding pkg-config])
+ AC_MSG_NOTICE([Checking for Mozilla])
+ found=0
+ if test -n "$MOZILLA_CFLAGS" -a -n "$MOZILLA_LIBS"
+ then
+ found=1
+ else
+ if test -n "$PKG_CONFIG"; then
+ for i in seamonkey iceape xulrunner firefox iceweasel mozilla; do
+ echo "Trying to find $i .pc files" >&5
+ i="${i}-xpcom ${i}-plugin"
+ if $PKG_CONFIG --exists --print-errors "$i" 2>&5
+ then
+ echo "Using $i .pc files." >&5
+ echo "Using $i .pc files." >&6
+ found=1
+ MOZILLA_CFLAGS=$( $PKG_CONFIG --cflags "$i" )
+ MOZILLA_LIBS=$( $PKG_CONFIG --libs "$i" )
+ break
+ fi
+ done
+ fi
+ fi
+ AS_IF( [test $found = 1],[
+ CPPFLAGS="${CPPFLAGS_save} ${MOZILLA_CFLAGS}"
MOZILLA_REQUIRED_HEADERS=1
AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0)
AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0)
fi
MOZILLA_REQUIRED_HEADERS=
mozilla=:
- firefox_include=`pkg-config --variable=includedir firefox-plugin`
- if test -f "${firefox_include}/mozilla-config.h" -a -f "${firefox_include}/mozilla-config32.h"; then
- MOZILLA_CONFIG_H="${firefox_include}/mozilla-config32.h"
- elif test -f "${firefox_include}/mozilla-config.h" -a -f "${firefox_include}/mozilla-config64.h"; then
- MOZILLA_CONFIG_H="${firefox_include}/mozilla-config64.h"
- else
- MOZILLA_CONFIG_H="${firefox_include}/mozilla-config.h"
- fi
- if grep '^#define MOZ_X11 1' ${MOZILLA_CONFIG_H} 2>&1 > /dev/null ; then
- AC_CHECK_HEADERS(X11/xpm.h,,AC_MSG_ERROR([Please install libXpm-devel library for required X11/xpm.h]))
+ AC_EGREP_CPP(yes,
+ [#include <mozilla-config.h>
+ #ifdef MOZ_X11
+ yes
+ #endif],
+ [AC_CHECK_HEADERS(X11/xpm.h,,AC_MSG_ERROR([Please install libXpm-devel library for required X11/xpm.h]))
VLC_ADD_LIBS([mozilla], [${X_LIBS} ${X_PRE_LIBS} -lX11 -lXt -lXpm])
- fi
+ ])
VLC_ADD_CPPFLAGS([mozilla],[${CPPFLAGS}])
- VLC_ADD_LDFLAGS([mozilla],[${MOZILLA_LDFLAGS}])
- VLC_ADD_LIBS([mozilla],[${FIREFOX_LIBS} ${MOZILLA_NSPR_LIBS} ${NSPR_LIBS}])
+ VLC_ADD_LIBS([mozilla],[${MOZILLA_LIBS}])
VLC_ADD_PLUGIN([mozilla])
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} mozilla"
MOZILLA_CONFIG=
CPPFLAGS="${CPPFLAGS_save}"
- ],
- [
- PKG_CHECK_MODULES([XULRUNNER], [libxul],
- [
- PKG_CHECK_MODULES([FIREFOX_XPCOM], [firefox-xpcom],
- [],
- [
- PKG_CHECK_MODULES([MOZILLA_NSPR], [mozilla-nspr],
- [],
- [
- PKG_CHECK_MODULES([NSPR], [nspr],
- [],
- [
- AC_MSG_ERROR([Please install the nspr development tools.])
- ]
- )
- ]
- )
- ]
- )
- CPPFLAGS="${CPPFLAGS_save} ${XULRUNNER_CFLAGS} ${XULRUNNER_CPPFLAGS} ${FIREFOX_XPCOM_CFLAGS} ${MOZILLA_NSPR_CFLAGS} ${NSPR_CFLAGS} ${MOZILLA_CPPFLAGS}"
- MOZILLA_REQUIRED_HEADERS=1
- 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
- ])
- if test "${MOZILLA_REQUIRED_HEADERS}" = "0"; then
- AC_MSG_ERROR([Please install the Mozilla runtime package xulrunner-devel; plugplugin/npapi.h and plugin/npruntime.h were not found.])
- fi
- MOZILLA_REQUIRED_HEADERS=
- mozilla=:
- AC_DEFINE([XP_UNIX],[1],[Defined for Mozilla as we are Unix])
- AC_DEFINE([MOZ_X11],[1],[Defined as Unix mozilla uses X11])
- AC_DEFINE([OJI],[1],[Java Runtime Interface])
- AC_CHECK_HEADERS(X11/xpm.h,,AC_MSG_ERROR([Please install libXpm-devel library for required X11/xpm.h]))
- VLC_ADD_LIBS([mozilla], [${X_LIBS} ${X_PRE_LIBS} -lX11 -lXt -lXpm])
- VLC_ADD_CPPFLAGS([mozilla],[${CPPFLAGS}])
- VLC_ADD_LDFLAGS([mozilla],[${MOZILLA_LDFLAGS}])
- VLC_ADD_LIBS([mozilla],[${FIREFOX_LIBS} ${MOZILLA_NSPR_LIBS} ${NSPR_LIBS}])
- VLC_ADD_PLUGIN([mozilla])
- MOZILLA_CONFIG=
- CPPFLAGS="${CPPFLAGS_save}"
],
[
- 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"
- 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
+ AC_PATH_PROGS(MOZILLA_CONFIG,
+ [mozilla-config seamonkey-config xulrunner-config],
+ AC_MSG_ERROR([Please install the Mozilla development tools. mozilla-config was not found.])
+ )
]
)
- ]
- )
- if test ! -z "${MOZILLA_CONFIG}"
- then
+ dnl pkg-config failed but we might have found a mozilla-config
+ AS_IF( [test ! -z "${MOZILLA_CONFIG}"],[
if ${MOZILLA_CONFIG} --defines | grep -q 'MOZ_X11=1'; then
LDFLAGS="${LDFLAGS_save} ${X_LIBS} ${X_PRE_LIBS}"
AC_CHECK_LIB(Xt,XtStrings,
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
- VLC_ADD_LIBS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
- else
- VLC_ADD_LIBS([mozilla],[`${MOZILLA_CONFIG} --libs plugin`])
- fi
+ VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin java`]])
+ VLC_ADD_LIBS([mozilla],[`${MOZILLA_CONFIG} --libs plugin`])
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}"
MOZILLA_REQUIRED_HEADERS=1
AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0)
MOZILLA_REQUIRED_HEADERS=
CPPFLAGS="${CPPFLAGS_save}"
MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`"
- fi
+ ])
dnl End of moz_sdk = ""
- else
+ ],[
dnl special case for mingw32
if test "${SYS}" = "mingw32"
then
real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
fi
CPPFLAGS="${CPPFLAGS_save}"
- fi
+ ])
fi
AC_LANG_POP(C++)
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
share/vlc_win32_rc.rc
share/libvlc_win32_rc.rc
src/Makefile
+ src/test/Makefile
+ bin/Makefile
test/Makefile
])