Newer
Older
AC_INIT(vlc,0.7.2-test1)
Samuel Hocevar
committed
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CONFIG_AUX_DIR(autotools)
Samuel Hocevar
committed
AC_CANONICAL_SYSTEM
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.7.2-test1)
AM_CONFIG_HEADER(config.h)
Samuel Hocevar
committed
AM_PROG_CC_C_O
Samuel Hocevar
committed
AC_PROG_CXX
AC_PROG_MAKE_SET
AC_PROG_INSTALL
dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
dnl now otherwise it might be set in an obscure if statement.
AC_EGREP_CPP(foo,foo)
Samuel Hocevar
committed
dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
AC_MSG_CHECKING(for an Objective-C compiler)
OBJC="${CXX}"
AC_SUBST(OBJC)
OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
AC_SUBST(OBJCFLAGS)
dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
#OBJCDEPMODE="depmode=gcc3"
#AC_SUBST(OBJCDEPMODE)
_AM_DEPENDENCIES(OBJC)
AC_MSG_RESULT(not implemented yet)
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 Sam, if you think I didn't see that... --Meuuh
dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL
dnl Check for compiler properties
AC_C_CONST
AC_C_INLINE
dnl
dnl Check for the contrib directory
dnl
topdir="`pwd`"
if test -d ${topdir}/extras/contrib/lib; then
export PATH=${topdir}/extras/contrib/bin:$PATH
export LD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$DYLD_LIBRARY_PATH
CPPFLAGS="${CPPFLAGS} -I${topdir}/extras/contrib/include"
CPPFLAGS_save="${CPPFLAGS_save} -I${topdir}/extras/contrib/include"
CFLAGS="${CFLAGS} -I${topdir}/extras/contrib/include"
CFLAGS_save="${CFLAGS_save} -I${topdir}/extras/contrib/include"
CXXFLAGS="${CXXFLAGS} -I${topdir}/extras/contrib/include"
CXXFLAGS_save="${CXXFLAGS_save} -I${topdir}/extras/contrib/include"
OBJCFLAGS="${OBJCFLAGS} -I${topdir}/extras/contrib/include"
OBJCFLAGS_save="${OBJCFLAGS_save} -I${topdir}/extras/contrib/include"
if test -d ${topdir}/extras/contrib/vlc-lib; then
LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/vlc-lib"
LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/vlc-lib"
fi
LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/lib"
LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/lib"
with_livedotcom_tree=${topdir}/extras/contrib/src/live
with_goom_tree=${topdir}/extras/contrib/src/goom
fi
Samuel Hocevar
committed
dnl Set default values
Samuel Hocevar
committed
LDFLAGS_vlc="${LDFLAGS}"
LIBEXT=".so"
Samuel Hocevar
committed
SYS=unknown
;;
Samuel Hocevar
committed
SYS=linux
;;
Samuel Hocevar
committed
SYS=bsdi
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
Samuel Hocevar
committed
;;
Samuel Hocevar
committed
SYS="${target_os}"
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
;;
Samuel Hocevar
committed
SYS=darwin
CFLAGS_save="${CFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
AX_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
Samuel Hocevar
committed
AX_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress])
Samuel Hocevar
committed
LIBEXT=".dylib"
;;
Samuel Hocevar
committed
AC_CHECK_TOOL(WINDRES, windres, :)
LIBEXT=".dll"
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
# add ws2_32 for closesocket, select, recv
CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
AX_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
AX_ADD_LDFLAGS([vcdx cddax],[-lwinmm])
AX_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard telnet],[-lws2_32])
Samuel Hocevar
committed
;;
Samuel Hocevar
committed
SYS=nto
Samuel Hocevar
committed
;;
Samuel Hocevar
committed
SYS=solaris
# _POSIX_PTHREAD_SEMANTICS is needed to get the POSIX ctime_r
# Perhaps it is useful other places as well?
CFLAGS_save="${CFLAGS_save} -D_POSIX_PTHREAD_SEMANTICS"; CFLAGS="${CFLAGS_save}"
Samuel Hocevar
committed
;;
Samuel Hocevar
committed
SYS=hpux
LIBEXT=".sl"
;;
Samuel Hocevar
committed
SYS=beos
CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
AX_ADD_LDFLAGS([vlc beos],[-lbe])
AX_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame])
if test -f /boot/beos/system/lib/libzeta.so; then
AX_ADD_LDFLAGS([beos],[-lzeta])
fi
Samuel Hocevar
committed
;;
Samuel Hocevar
committed
SYS="${target_os}"
;;
AM_CONDITIONAL(HAVE_BEOS, test "${SYS}" = "beos")
AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
Samuel Hocevar
committed
dnl
dnl Gettext stuff
dnl
ALL_LINGUAS="de en_GB es fr hu it ja nl no pl pt_BR ru sv"
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)
else
AC_CHECK_FUNCS(textdomain,,[
AC_CHECK_LIB(intl,textdomain,
Loading
Loading full blame...