Newer
Older
AC_COPYRIGHT([Copyright 2002-2009 the VideoLAN team])
PKGDIR="vlc"
AC_SUBST(PKGDIR)

Rémi Denis-Courmont
committed
CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
CODENAME="Yellow Bastard"
AC_PREREQ(2.59c)
Samuel Hocevar
committed
AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_LIBOBJ_DIR(compat)
AC_CANONICAL_HOST
Samuel Hocevar
committed
AM_CONFIG_HEADER(config.h)
# Disable with "./configure --disable-silent-rules" or "make V=1"
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

Rémi Denis-Courmont
committed
dnl Too many people are not aware of maintainer mode:
dnl If you want to use it, you definitely know what you are doing, so
dnl you can specify "--disable-maintainer-mode". But if you want the default
dnl automake behavior, you've likely never heard of maintainer mode, so we
dnl can't expect you to enable it manually.
AS_IF([test "x${enable_maintainer_mode}" != "xno"],
[enable_maintainer_mode="yes"])
dnl
dnl Directories
dnl
dnl vlcincludedir="\${includedir}/\${PKGDIR}"
dnl AC_SUBST(vlcincludedir)
vlcdatadir="\${datadir}/\${PKGDIR}"
AC_SUBST(vlcdatadir)
vlclibdir="\${libdir}/\${PKGDIR}"
AC_SUBST(vlclibdir)
dnl
dnl Deprecated options
dnl to notify packagers that stuff has changed
dnl
AC_ARG_ENABLE(python-bindings,
[ --enable-python-bindings Always fails for historical reasons)],,
[enable_python_bindings="no"])
AS_IF([test "${enable_python_bindings}" != "no"], [
AC_MSG_ERROR([Python bindings are now built from a separate source package])
])
AC_ARG_ENABLE(java-bindings,
[ --enable-java-bindings Always fails for historical reasons],,
[enable_java_bindings="no"])
AS_IF([test "${enable_java_bindings}" != "no"], [
AC_MSG_ERROR([Java bindings are now built from a separate source package])
])
AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to '2' to get glibc warnings.])
Samuel Hocevar
committed
AM_PROG_CC_C_O
AC_PROG_CXX

Jean-Paul Saman
committed
AC_PROG_CPP
AC_PROG_OBJC
_AM_DEPENDENCIES([OBJC])
AC_PROG_EGREP
AC_PROG_MAKE_SET
AC_PROG_INSTALL
dnl Find the right ranlib, even when cross-compiling
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_TOOL(LD, ld, :)
dnl Check for compiler properties
AC_C_CONST
AC_C_INLINE

Rémi Denis-Courmont
committed
AC_C_RESTRICT
dnl Allow binary package maintainer to pass a custom string to avoid
AS_HELP_STRING([--with-binary-version=STRING],
[To avoid plugins cache problem between binary version]),[],[])
AS_IF([test -n "${with_binary_version}"],[
AC_DEFINE_UNQUOTED([DISTRO_VERSION],["${with_binary_version}"],
[Binary specific version])
])
dnl
dnl Check for the contrib directory
dnl
[ --without-contrib do not use the libraries in CONTRIB_DIR],[],[])
AS_IF([test "${with_contrib}" != "no"],[
AC_ARG_VAR([CONTRIB_DIR], [directory containing pre-built contrib, overriding extras/contrib])
if test -z "$CONTRIB_DIR"
then
topdir="`dirname $0`"
if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
topdir="`pwd`/$topdir"
fi
CONTRIB_DIR=${topdir}/extras/contrib
AC_MSG_CHECKING([for libs in ${CONTRIB_DIR}])
AS_IF([test "`grep HOST ${CONTRIB_DIR}/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])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([ not using the libs in extras/contrib as it is not the same host])
CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
if test $build = $host -o "$PKG_CONFIG_LIBDIR"; then
export PKG_CONFIG_PATH=${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_LIBDIR=${CONTRIB_DIR}/lib/pkgconfig
LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
if test -z $with_mozilla_sdk_path; then
with_mozilla_sdk_path=${CONTRIB_DIR}/gecko-sdk
if test -z $with_cyberlink_tree; then
with_cyberlink_tree=${CONTRIB_DIR}/src/clinkcc
if test ".`uname -s`" = ".Darwin"; then
export LD_LIBRARY_PATH=${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH
elif test ".`uname -s`" = ".BeOS"; then
export LIBRARY_PATH=${CONTRIB_DIR}/lib:$LIBRARY_PATH
export BELIBRARIES=${CONTRIB_DIR}/lib:$BELIBRARIES
])
],[
AC_MSG_RESULT([no])
])
])
Samuel Hocevar
committed
dnl Set default values
Samuel Hocevar
committed
LDFLAGS_vlc="${LDFLAGS}"
Samuel Hocevar
committed
SYS=unknown
;;
Samuel Hocevar
committed
SYS=linux
;;
Samuel Hocevar
committed
SYS=bsdi
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
VLC_ADD_LIBS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
Samuel Hocevar
committed
;;
Samuel Hocevar
committed
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
Loading
Loading full blame...