X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=13dffe3be3f3f91a47473a8d999656cfc50c9c23;hb=7fb7f638de5f8f57e19b3e9c56904e775f93ef05;hp=e504d083be0cecc177ddade712b74e847f7ce5a5;hpb=283b125f4ac0ba3fcd6398f1da522557356831e9;p=vlc diff --git a/configure.ac b/configure.ac index e504d083be..13dffe3be3 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,11 @@ dnl Autoconf settings for vlc AC_COPYRIGHT([Copyright 2002-2009 the VideoLAN team]) -AC_INIT(vlc, 1.0.0-git) +AC_INIT(vlc, 1.0.0-pre2) VERSION_MAJOR="1" VERSION_MINOR="0" VERSION_REVISION="0" -VERSION_EXTRA="-git" +VERSION_EXTRA="-pre2" PKGDIR="vlc" AC_SUBST(PKGDIR) @@ -18,6 +18,7 @@ AC_PREREQ(2.59c) AC_CONFIG_SRCDIR(src/libvlc.c) AC_CONFIG_AUX_DIR(autotools) AC_CONFIG_MACRO_DIR(m4) +AC_CONFIG_LIBOBJ_DIR(compat) AC_CANONICAL_BUILD AC_CANONICAL_HOST @@ -111,15 +112,20 @@ dnl dnl Check for the contrib directory dnl AC_ARG_WITH(contrib, - [ --without-contrib do not use the libraries in extras/contrib],[],[]) + [ --without-contrib do not use the libraries in CONTRIB_DIR],[],[]) 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" + 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 fi - 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`"],[ + AC_MSG_CHECKING([for libs in ${CONTRIB_DIR}]) + AS_IF([test -d ${CONTRIB_DIR}/lib],[ + 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]) @@ -129,36 +135,36 @@ AC_ARG_WITH(contrib, fi ],[ AC_MSG_RESULT([yes]) - export PATH=${topdir}/extras/contrib/bin:$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" + export PATH=${CONTRIB_DIR}/bin:$PATH + 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=${topdir}/extras/contrib/lib/pkgconfig:$PKG_CONFIG_PATH + export PKG_CONFIG_PATH=${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH else - export PKG_CONFIG_LIBDIR=${topdir}/extras/contrib/lib/pkgconfig + export PKG_CONFIG_LIBDIR=${CONTRIB_DIR}/lib/pkgconfig fi - LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/lib" - LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/lib" + 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=${topdir}/extras/contrib/gecko-sdk + with_mozilla_sdk_path=${CONTRIB_DIR}/gecko-sdk fi if test -z $with_cyberlink_tree; then - with_cyberlink_tree=${topdir}/extras/contrib/src/clinkcc + with_cyberlink_tree=${CONTRIB_DIR}/src/clinkcc fi if test ".`uname -s`" = ".Darwin"; then - export LD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$LD_LIBRARY_PATH - export DYLD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$DYLD_LIBRARY_PATH + 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=${topdir}/extras/contrib/lib:$LIBRARY_PATH - export BELIBRARIES=${topdir}/extras/contrib/lib:$BELIBRARIES + export LIBRARY_PATH=${CONTRIB_DIR}/lib:$LIBRARY_PATH + export BELIBRARIES=${CONTRIB_DIR}/lib:$BELIBRARIES fi ]) ],[ @@ -264,26 +270,6 @@ case "${host_os}" in enable_xvideo="no" echo " Assuming --disable-xvideo" fi - if test ".`uname -p`" = ".i386"; then - dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code - dnl without hacking it a lot, we disable mmx and sse. - dnl (that bug is about ld being unable to handle - dnl text relocation) - save_cflags="$CFLAGS" - CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress" - AC_TRY_LINK( - [int a;], [asm("movq _a,%mm0\n");], - ac_ld_does_not_support_text_reloc=no, - ac_ld_does_not_support_text_reloc=yes) - CFLAGS="$save_cflags" - - if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then - enable_mmx="no" - echo " Assuming --disable-mmx (due to a bug in ld)" - enable_sse="no" - echo " Assuming --disable-sse (due to a bug in ld)" - fi - fi dnl dnl Check for Mac OS X SDK settings dnl @@ -296,6 +282,20 @@ case "${host_os}" in OBJC="${OBJC} -isysroot ${with_macosx_sdk}" LD="${LD} -syslibroot ${with_macosx_sdk}" fi + if test "${host_cpu}" = "powerpc"; then + CPP="${CPP} -arch ppc" + CC="${CC} -arch ppc" + CXX="${CXX} -arch ppc" + OBJC="${OBJC} -arch ppc" + LD="${LD} -arch ppc" + fi + if test "${host_cpu}" = "i386"; then + CPP="${CPP} -arch i386" + CC="${CC} -arch i386" + CXX="${CXX} -arch i386" + OBJC="${OBJC} -arch i386" + LD="${LD} -arch i386" + fi AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VERSION compile for MacOSX VERSION and above]) if test "${with_macosx_version_min}" != "" ; then @@ -311,6 +311,28 @@ case "${host_os}" in export MACOSX_DEPLOYMENT_TARGET fi ;; + darwin9*) + if (test ".`uname -p`" = ".i386"); then + dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code + dnl without hacking it a lot, we disable mmx and sse. + dnl (that bug is about ld being unable to handle + dnl text relocation) + save_cflags="$CFLAGS" + CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress" + AC_TRY_LINK( + [int a;], [asm("movq _a,%mm0\n");], + ac_ld_does_not_support_text_reloc=no, + ac_ld_does_not_support_text_reloc=yes) + CFLAGS="$save_cflags" + + if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then + enable_mmx="no" + echo " Assuming --disable-mmx (due to a bug in ld)" + enable_sse="no" + echo " Assuming --disable-sse (due to a bug in ld)" + fi + fi + ;; *mingw32* | *cygwin* | *wince* | *mingwce* | *pe*) AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(OBJCOPY, objcopy, :) @@ -448,6 +470,25 @@ AM_ICONV VLC_ADD_CFLAGS([libvlc],[${INCICONV}]) VLC_ADD_LIBS([libvlc],[${LTLIBICONV}]) +dnl Check for broken versions of mingw-runtime compatability library +AS_IF([test "${SYS}" = "mingw32"], [ + AC_MSG_CHECKING(for broken mingw-runtime) + AC_PREPROC_IFELSE([ +#include <_mingw.h> +#if (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 14) +# error Attempting to use mingw-runtime with broken vsnprintf support +#endif +], [ + AC_MSG_RESULT([ok]) +], [ + AC_MSG_RESULT([present]) + AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.14 or higher!]) +]) + dnl force use of mingw provided c99 *printf over msvcrt + CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1" + CPPFLAGS_save="${CPPFLAGS_save} -D__USE_MINGW_ANSI_STDIO=1" +]) + dnl Check for the need to include the mingwex lib for mingw32 if test "${SYS}" = "mingw32" then @@ -498,6 +539,24 @@ AC_LANG_PUSH(C++) AC_LANG_POP(C++) fi +dnl +dnl Buggy glibc prevention. Purposedly not cached. +dnl Ubuntu alone has 20 bug numbers for this... +dnl +AC_MSG_CHECKING(for buggy GNU/libc versions) +AC_PREPROC_IFELSE([ +#include +#if defined (__GLIBC__) && (__GLIBC__ == 2) \ + && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7) +# error GNU/libc with dcgettext killer bug! +#endif +], [ + AC_MSG_RESULT([not present]) +], [ + AC_MSG_RESULT([found]) + AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable work-around for this. Check with your distribution vendor on how to update the glibc run-time.]) +]) + dnl Plugin compilation stuff VLC_LIBRARY_SUFFIX @@ -509,12 +568,11 @@ dnl Check for system libs needed need_libc=false dnl Check for usual libc functions -AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise uselocale]) -AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)]) -AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)]) -AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)]) +AC_CHECK_FUNCS([gettimeofday isatty sigrelse getpwuid_r memalign posix_memalign if_nametoindex getenv putenv setenv ctime_r lrintf daemon fork lstat posix_fadvise posix_madvise uselocale]) AC_FUNC_ALLOCA AC_CHECK_FUNCS(fcntl) +AC_REPLACE_FUNCS([asprintf atof atoll gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtoll vasprintf swab]) +AC_CHECK_FUNCS([stricmp strnicmp]) dnl Check for Linux system calls AC_CHECK_FUNCS([vmsplice]) @@ -806,8 +864,8 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[ AC_MSG_RESULT(no)]) dnl Check for headers -AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h stdbool.h getopt.h strings.h inttypes.h sys/int_types.h wchar.h locale.h) -AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h xlocale.h) +AC_CHECK_HEADERS(getopt.h strings.h locale.h) +AC_CHECK_HEADERS(fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h xlocale.h) AC_CHECK_HEADERS([arpa/inet.h netinet/in.h netinet/udplite.h sys/eventfd.h]) AC_CHECK_HEADERS([net/if.h], [], [], [ @@ -1802,7 +1860,7 @@ dnl AC_ARG_ENABLE(taglib, [ --disable-taglib Taglib support (default enabled) ]) AS_IF([test "${enable_taglib}" != "no"],[ - PKG_CHECK_MODULES(TAGLIB, taglib, + PKG_CHECK_MODULES(TAGLIB, taglib >= 1.5, [ AC_DEFINE( HAVE_TAGLIB, 1, [Define if you have taglib plugin built] ) VLC_ADD_PLUGIN([taglib]) VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz]) @@ -3262,10 +3320,8 @@ dnl dnl QuickTime plugin dnl AC_ARG_ENABLE(quicktime, - [ --enable-quicktime QuickTime module (default enabled on MacOS X)]) -if test "${enable_quicktime}" != "no" && - (test "${SYS}" = "darwin" || test "${enable_quicktime}" = "yes") -then + [ --enable-quicktime QuickTime module (deprecated)]) +if test "${enable_quicktime}" = "yes"; then if test "${SYS}" = "mingw32"; then VLC_ADD_PLUGIN([quicktime]) else @@ -3687,7 +3743,7 @@ dnl AC_ARG_ENABLE(schroedinger, [ --disable-schroedinger high performance dirac codec (default enabled)]) if test "${enable_schroedinger}" != "no"; then - PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0], [ + PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0.6], [ VLC_ADD_PLUGIN([schroedinger]) VLC_ADD_CFLAGS([schroedinger],[$SCHROEDINGER_CFLAGS]) VLC_ADD_LIBS([schroedinger],[$SCHROEDINGER_LIBS]) ], [ @@ -3760,6 +3816,17 @@ if test "${enable_x264}" != "no"; then PKG_CHECK_MODULES(X264,x264, [ VLC_ADD_PLUGIN([x264]) VLC_ADD_LDFLAGS([x264],[${X264_LIBS}]) + + AC_CACHE_CHECK([if linker supports -Bsymbolic], + [ac_cv_ld_bsymbolic], + [LDFLAGS="${LDFLAGS_vlc} -Wl,-Bsymbolic" + AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no) + LDFLAGS="${LDFLAGS_save}" + ]) + AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [ + VLC_ADD_LDFLAGS([x264],[-Wl,-Bsymbolic]) + ]) + VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}]) if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB]) @@ -4276,8 +4343,6 @@ then VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}]) if test "${SYS}" = "mingw32"; then VLC_ADD_LIBS([freetype skins2],[-lxml2]) - fi - if test "${SYS}" = "mingw32"; then VLC_ADD_LIBS([freetype],[-liconv]) fi if test "${enable_fontconfig}" != "no" @@ -4312,41 +4377,17 @@ dnl libxml2 module dnl AC_ARG_ENABLE(libxml2, [ --enable-libxml2 libxml2 support (default enabled)]) -if test "${enable_libxml2}" != "no" -then - XML2_PATH="${PATH}" - AC_ARG_WITH(xml2-config-path, - [ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)], - [ if test "${with_xml2_config_path}" != "no"; then - XML2_PATH="${with_xml2_config_path}:${PATH}" - fi ]) - AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH}) - if test "${XML2_CONFIG}" != "no"; then - VLC_ADD_CPPFLAGS([xml],[`${XML2_CONFIG} --cflags`]) - VLC_ADD_LIBS([xml],[`${XML2_CONFIG} --libs`]) - dnl depends on the xmlTextReader extension - CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xml}" - LDFLAGS="${LDFLAGS_save} ${LIBS_xml}" - AC_CHECK_LIB(xml2,xmlTextReaderConstName,[ - AC_EGREP_HEADER(xmlTextReaderConstName,libxml/xmlreader.h,[ - VLC_ADD_PLUGIN([xml]) ],[ - AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version]) - if test "${enable_xml2}" = "yes"; then - AC_MSG_ERROR([libxml2 missing the xmlTextReader extension]) - fi]) - ],[ - AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version]) - if test "${enable_xml2}" = "yes"; then - AC_MSG_ERROR([libxml2 missing the xmlTextReader extension]) - fi]) - LDFLAGS="${LDFLAGS_save}" - CPPFLAGS="${CPPFLAGS_save}" - else - if test "${enable_xml2}" = "yes"; then - AC_MSG_ERROR([Could not find libxml2]) - fi - fi -fi +AS_IF([test "${enable_libxml2}" != "no"], [ + PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.5], [ + VLC_ADD_CPPFLAGS([xml],[${XML2_CFLAGS}]) + VLC_ADD_LIBS([xml],[${XML2_LIBS}]) + VLC_ADD_PLUGIN([xml]) + ], [ + AS_IF([test "x${enable_xml2}" != "x"], [ + AC_MSG_ERROR([Could not find libxml version 2.5 or higher]) + ]) + ]) +]) dnl dnl SVG module @@ -5123,9 +5164,9 @@ then VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer qtcapture],[-Wl,-framework,Cocoa]) VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer],[-Wl,-framework,OpenGL]) VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,Carbon]) + VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,CoreServices]) 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]) @@ -5851,6 +5892,7 @@ AC_SUBST(VERSION_MESSAGE) AC_SUBST(VERSION_MAJOR) AC_SUBST(VERSION_MINOR) AC_SUBST(VERSION_REVISION) +AC_SUBST(VERSION_EXTRA) AC_SUBST(COPYRIGHT_YEARS) AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure]) if test "${build_os}" = "cygwin" @@ -5933,9 +5975,11 @@ AC_CONFIG_FILES([ projects/activex/axvlc_rc.rc projects/mozilla/npvlc_rc.rc projects/mozilla/vlc.r + projects/mozilla/install.js share/Makefile share/vlc_win32_rc.rc share/libvlc_win32_rc.rc + compat/Makefile src/Makefile src/test/Makefile bin/Makefile