Skip to content
Snippets Groups Projects
configure.ac 190 KiB
Newer Older
  AC_CHECK_HEADERS(GL/gl.h GL/glu.h, [
    if test "${SYS}" != "mingw32"; then
      VLC_ADD_LDFLAGS([galaktos],[${X_LIBS} -lGL -lGLU])
    else
      VLC_ADD_LDFLAGS([galaktos],[-lopengl32])
    fi
  ])
dnl
dnl  goom visualization plugin
dnl
AC_ARG_ENABLE(goom,
hartman's avatar
hartman committed
[  --enable-goom           goom visualisation plugin (default disabled)])
if test "${enable_goom}" = "yes"
then
  AC_ARG_WITH(goom-tree,
    [    --with-goom-tree=PATH goom tree for static linking (required)])

  dnl
  dnl test for --with-goom-tree
  dnl
  if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}"; then
    AC_MSG_CHECKING(for libgoom2.a in ${with_goom_tree})
    real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`"
    if test -z "${real_goom_tree}"; then
      dnl  The given directory can't be found
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([cannot cd to ${with_goom_tree}])
    fi
    if test -f "${real_goom_tree}/src/.libs/libgoom2.a"; then
      AC_MSG_RESULT(${real_goom_tree}/src/.libs/libgoom2.a)
      VLC_ADD_BUILTINS([goom])
      VLC_ADD_LDFLAGS([goom],[-L${real_goom_tree}/src/.libs -lgoom2])
      VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree}/src -DUSE_GOOM_TREE])
      dnl  The given libgoom2 wasn't built, try to look for the old goom
      AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree})
      if test -f "${real_goom_tree}/libgoom.a"; then
        AC_MSG_RESULT(${real_goom_tree}/libgoom.a)
        VLC_ADD_BUILTINS([goom])
        VLC_ADD_LDFLAGS([goom],[-L${real_goom_tree} -lgoom])
        VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree} -DUSE_GOOM_TREE -DOLD_GOOM])
      else
        dnl  The given libgoom wasn't built
        AC_MSG_RESULT(no)
        AC_MSG_ERROR([cannot find ${real_goom_tree}/src/.libs/libgoom2.a, make sure you compiled goom in ${with_goom_tree}])
      fi
gbazin's avatar
gbazin committed
      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_goom}"
        VLC_ADD_PLUGINS([goom])
        VLC_ADD_LDFLAGS([goom],[-lgoom2])
      ],[
        AC_MSG_ERROR([Could not find goom on your system: you may get it from http://www.ios-software.com/.])
      ])
gbazin's avatar
gbazin committed
      LDFLAGS="${LDFLAGS_save}"
dnl
dnl  Bonjour services discovery
dnl
AC_ARG_ENABLE(bonjour,
  [  --enable-bonjour        Bonjour services discovery (default enabled)])
if test "${enable_bonjour}" != "no"
then
  PKG_CHECK_MODULES(BONJOUR, avahi-client >= 0.3,
    [PKG_CHECK_MODULES(BONJOUR, avahi-client >= 0.6,
       [AC_DEFINE(HAVE_AVAHI_06, [], [Define if you have avahi-client 0.6 or greater])],)
      AC_DEFINE(HAVE_AVAHI_CLIENT, [], [Define if you have the avahi-client library])
      VLC_ADD_LDFLAGS([bonjour access_output_http],[$BONJOUR_LIBS])
      VLC_ADD_CFLAGS([bonjour access_output_http],[$BONJOUR_CFLAGS])
      VLC_ADD_PLUGINS([bonjour]) ],
    [AC_MSG_WARN(avahi-client library not found)])
fi

dnl
dnl  Lirc plugin
dnl
AC_ARG_ENABLE(lirc,
  [  --enable-lirc           lirc support (default disabled)])
if test "${enable_lirc}" = "yes"
then
  AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
  if test "${have_lirc}" = "true"
    VLC_ADD_PLUGINS([lirc])
    VLC_ADD_LDFLAGS([lirc],[-llirc_client])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
AC_ARG_WITH(,[Misc options:])

dnl
dnl TLS/SSL
dnl
AC_ARG_ENABLE(gnutls,
  [  --enable-gnutls         gnutls TLS/SSL support (default enabled)])

AS_IF([test "${enable_gnutls}" != "no"], [
  PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.2.9], [have_gnutls="yes"], [have_gnutls="no"])

  AS_IF([test "${have_gnutls}" = "yes"], [
    VLC_ADD_PLUGINS([gnutls])
    VLC_ADD_CFLAGS([gnutls], [$GNUTLS_CFLAGS])
    VLC_ADD_LDFLAGS([gnutls], [$GNUTLS_LIBS])
      AC_MSG_ERROR([gnutls not present or too old (version 1.2.9 required)])
  AC_CHECK_LIB([gcrypt], [gcry_control], [
    VLC_ADD_LDFLAGS([gnutls], [-lgcrypt])
  ])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl  We give the user the opportunity to specify
dnl  --with-words=big or --with-words=little ; otherwise, try to guess
dnl
AC_ARG_WITH(words,
  [    --with-words=endianness set endianness (big or little)])
  case "${with_words}" in
    big)
Samuel Hocevar's avatar
 
Samuel Hocevar committed
      ac_cv_c_bigendian=yes
      ;;
    little)
Samuel Hocevar's avatar
 
Samuel Hocevar committed
      ac_cv_c_bigendian=no
      ;;
    *)
      dnl  Try to guess endianness by matching patterns on a compiled
      dnl  binary, by looking for an ASCII or EBCDIC string
      AC_CACHE_CHECK([whether the byte order is big-endian],
        [ac_cv_c_bigendian],
Samuel Hocevar's avatar
 
Samuel Hocevar committed
        [cat >conftest.c <<EOF
        short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
        short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
        void _a(void) { char*s = (char*)am; s = (char *)ai; }
        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
        void _e(void) { char*s = (char*)em; s = (char*)ei; }
        int main(void) { _a(); _e(); return 0; }
EOF
        ]
        if test -f conftest.c
        then
          if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
Samuel Hocevar's avatar
 
Samuel Hocevar committed
              && test -f conftest.o
          then
            if test "`strings conftest.o | grep BIGenDianSyS`"
            then
Samuel Hocevar's avatar
 
Samuel Hocevar committed
            fi
            if test "`strings conftest.o | grep LiTTleEnDian`"
            then
Samuel Hocevar's avatar
 
Samuel Hocevar committed
            fi
          fi
        fi
      ])
      if test "${ac_cv_c_bigendian}" = "unknown"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
      then
        AC_MSG_ERROR([Could not guess endianness, please use --with-words])
      fi
      ;;
  esac
dnl  Now we know what to use for endianness, just put it in the header
Samuel Hocevar's avatar
 
Samuel Hocevar committed
then
  AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
fi
dnl
dnl  DLL loader copied from MPlayer copied from somewhere else (WINE ?)
dnl
loader=false
AC_ARG_ENABLE(loader,
  [  --enable-loader         build DLL loader for ELF i386 platforms (default disabled)])
AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
AS_IF([test "${enable_loader}" = "yes"],
    VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/loader])
    VLC_ADD_LDFLAGS([dmo],[../../../loader/libloader.la -lpthread])
    VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/loader])
    VLC_ADD_LDFLAGS([quicktime],[../../loader/libloader.la -lpthread])
    VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/loader -DLOADER])
    VLC_ADD_LDFLAGS([realaudio],[../../loader/libloader.la -ldl -lpthread])
dnl
dnl  Microsoft ActiveX support
dnl
activex=false
AC_ARG_ENABLE(activex,
  [  --enable-activex        build a vlc-based ActiveX control (default enabled on Win32)])
damienf's avatar
damienf committed
AC_ARG_WITH(wine-sdk-path,
  [    --with-wine-sdk-path=PATH path to wine sdk])
if test "${enable_activex}" != "no"
then
  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
  then
damienf's avatar
damienf committed
    AC_CHECK_PROGS(MIDL, [midl], no)
    if test "${with_wine_sdk_path}" != ""
    then
       WINE_SDK_PATH=${with_wine_sdk_path}
       AC_PATH_PROG(WIDL, widl, no, [$WINE_SDK_PATH/bin:$WINE_SDK_PATH/tools/widl])
    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]
      ],
      [ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
    )
AC_ARG_VAR(MIDL, [Microsoft IDL compiler (Win32 platform only)])
AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
damienf's avatar
damienf committed
AC_ARG_VAR(WIDL, [Wine IDL compiler (requires Wine SDK)])
AM_CONDITIONAL(HAS_WIDL_COMPILER, test "${WIDL}" != "no")
AM_CONDITIONAL(BUILD_ACTIVEX,${activex})
AC_ARG_ENABLE(mozilla,
  [  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)])
AC_ARG_WITH(mozilla-sdk-path,
  [    --with-mozilla-sdk-path=PATH path to mozilla sdk])
AC_LANG_PUSH(C++)
if test "${enable_mozilla}" = "yes" 
  dnl currently vlc plugin only needs headers, no xpcom support apis are actually used
  need_xpcom_libs=false
Jean-Paul Saman's avatar
Jean-Paul Saman committed
  if test "${with_mozilla_sdk_path}" = "" -o "${with_mozilla_sdk_path}" = "no"
    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"
        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
        MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
    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}"
      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_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
      else
         VLC_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin`])
      fi
      CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}"
      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
        ])
      if test "${MOZILLA_REQUIRED_HEADERS}" = "0"
      then
        AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
      fi
      MOZILLA_REQUIRED_HEADERS=
      MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`"
    dnl End of moz_sdk = ""
    dnl special case for mingw32
    if test "${SYS}" = "mingw32"
    then
      AC_CHECK_TOOL(CYGPATH, cygpath, "")
      dnl latest gecko sdk does not have an xpcom directory
Christophe Mutricy's avatar
Christophe Mutricy committed
      if test -d "${with_mozilla_sdk_path}/xpcom"; then
  
    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
    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
          #endif
        ])
    if test "${MOZILLA_REQUIRED_HEADERS}" = "0"
    then
        AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
    fi
    MOZILLA_REQUIRED_HEADERS=
    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
    fi
    MOZILLA_SDK_PATH="${real_mozilla_sdk}"
    if test -n "${CYGPATH}"; then
      real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
    fi
Samuel Hocevar's avatar
Samuel Hocevar committed
    CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP(C++)
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
dnl  Mediacontrol Python bindings
AC_ARG_ENABLE(python-bindings,
  [  --enable-python-bindings    Enable Python bindings (default disabled)])
dnl TODO: look for python dev headers
AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"])
dnl
dnl  Java bindings
dnl
AC_ARG_ENABLE(java-bindings,
  [  --enable-java-bindings  Enable Java bindings (default disabled)])
if test "${enable_java_bindings}" = "yes"
  AS_IF([test "x${JAVA_HOME}" == "x"],
	[AC_MSG_ERROR([Please set the JAVA_HOME variable to your JDK environment])])
  AC_PROG_JAVAC
  AC_PROG_JAVA
fi
AM_CONDITIONAL(BUILD_JAVA, [test "${enable_java_bindings}" = "yes"])
dnl
dnl  test plugins
dnl
AC_ARG_ENABLE(testsuite,
  [  --enable-testsuite      build test modules (default disabled)])
if test "${enable_testsuite}" = "yes"
  dnl  we define those so that bootstrap sets the right linker
  VLC_ADD_CXXFLAGS([test2],[])
  VLC_ADD_OBJCFLAGS([test3],[])
  dnl  this one is needed until automake knows what to do
  VLC_ADD_LDFLAGS([test3],[-lobjc])
  VLC_ADD_PLUGINS([${TESTS}])
  #VLC_ADD_BUILTINS([${TESTS}])
dnl
dnl Microsoft Layer for Unicode for WIN9x/ME
dnl
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
    AC_CHECK_LIB(unicows, LoadUnicowsSymbol, [
        VLC_ADD_LDFLAGS([vlc],[-Wl,--exclude-libs,libunicows.a -lunicows])
if test "${NEED_GTK_MAIN}" != "no"
    VLC_ADD_PLUGINS([gtk_main])
    VLC_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk}])
    VLC_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk}])
if test "${NEED_GNOME_MAIN}" != "no"
    VLC_ADD_PLUGINS([gnome_main])
    VLC_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_gnome}])
    VLC_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_gnome}])
if test "${NEED_GTK2_MAIN}" != "no"
    VLC_ADD_PLUGINS([gtk2_main])
    VLC_ADD_CFLAGS([gtk2],[-DNEED_GTK2_MAIN])
    VLC_ADD_CFLAGS([pda],[-DNEED_GTK2_MAIN])
    VLC_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2} ${CFLAGS_pda}])
    VLC_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2} ${LDFLAGS_pda}])
if test "${NEED_GNOME2_MAIN}" != "no"
    VLC_ADD_PLUGINS([gnome2_main])
    VLC_ADD_CFLAGS([gnome2_main],[${CFLAGS_gtk2} ${CFLAGS_gnome2}])
    VLC_ADD_LDFLAGS([gnome2_main],[${LDFLAGS_gtk2} ${LDFLAGS_gnome2}])
if test "${NEED_QTE_MAIN}" != "no"
    VLC_ADD_PLUGINS([qte_main])
    VLC_ADD_CXXFLAGS([opie qte qt_video],[-DNEED_QTE_MAIN])
    VLC_ADD_CXXFLAGS([qte_main],[${CXXFLAGS_qte} ${CXXFLAGS_qt_video}])
    VLC_ADD_LDFLAGS([qte_main],[${LDFLAGS_qte} ${LDFLAGS_qt_video}])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
builtin_support=false
plugin_support=:

dnl Support for plugins - this must be AT THE END
Samuel Hocevar's avatar
 
Samuel Hocevar committed
AC_ARG_ENABLE(plugins,
  [  --disable-plugins       make all plugins built-in (default plugins enabled)],
  [if test "${enable_plugins}" = "no"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
   then
Samuel Hocevar's avatar
 
Samuel Hocevar committed
   fi])

dnl Automagically disable plugins if there is no system support for
dnl dynamically loadable files (.so, .dll, .dylib).
dnl don't forget vlc-win32 still can load .dll as plugins
Samuel Hocevar's avatar
Samuel Hocevar committed
if test "${ac_cv_have_plugins}" = "no"
  echo "*** Your system doesn't have plugin support. All plugins will be built"
  echo "statically."
  plugin_support=false
fi

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
AS_IF([${plugin_support}], [
  AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, Define if we have support for dynamic plugins)
], [
  VLC_ADD_BUILTINS([${PLUGINS}])
  PLUGINS=""
])

dnl
dnl Pic and shared libvlc stuff
dnl
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
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"], [
  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"
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
  VLC_ADD_PLUGINS([${BUILTINS}])
  BUILTINS=""
], [
  FILE_LIBVLC_DLL=""
])
 dnl Import conditional variables generated by bootstrap
VLC_CONDITIONALS
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
dnl  Stuff used by the program
dnl
AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2006 the VideoLAN team", [Copyright string])
AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,"${VERSION_MAJOR}", [version major number])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,"${VERSION_MINOR}", [version minor number])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,"${VERSION_REVISION}", [version minor number])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_EXTRA,"${VERSION_EXTRA}", [version minor number])
AC_SUBST(VERSION_MAJOR)
AC_SUBST(VERSION_MINOR)
AC_SUBST(VERSION_REVISION)
AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure]) 
AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure]) 
AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure]) 
AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler]) 
Samuel Hocevar's avatar
 
Samuel Hocevar committed

dnl Old definitions for version-dependant plugins
dnl VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`"
dnl AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])

dnl New definitions with value matching 0.8.6 release
module_symbol="0_8_6c"
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions])
AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $module_symbol, [Symbol suffix for module functions])
VLC_ENTRY="vlc_entry__${module_symbol}"
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
AC_SUBST(VLC_ENTRY)
Samuel Hocevar's avatar
Samuel Hocevar committed
dnl
Samuel Hocevar's avatar
Samuel Hocevar committed
dnl  Handle substvars that use $(top_srcdir)
Samuel Hocevar's avatar
Samuel Hocevar committed
dnl
VLC_CONFIG="top_builddir=\"\$(top_builddir)\" \$(top_builddir)/vlc-config"
Samuel Hocevar's avatar
Samuel Hocevar committed
AC_SUBST(VLC_CONFIG)
CPPFLAGS_save="${CPPFLAGS_save} -I\$(top_srcdir)/include"
Samuel Hocevar's avatar
Samuel Hocevar committed
dnl  Restore *FLAGS
VLC_RESTORE_FLAGS
Samuel Hocevar's avatar
Samuel Hocevar committed

Samuel Hocevar's avatar
Samuel Hocevar committed
LDFLAGS_libvlc="${LDFLAGS_vlc} ${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
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl  Configuration is finished
dnl
Samuel Hocevar's avatar
 
Samuel Hocevar committed
AC_SUBST(ASM)
Samuel Hocevar's avatar
 
Samuel Hocevar committed
AC_SUBST(MOC)
zorglub's avatar
zorglub committed
AC_SUBST(RCC)
AC_SUBST(UIC)
Samuel Hocevar's avatar
 
Samuel Hocevar committed
AC_SUBST(WINDRES)
damienf's avatar
damienf committed
AC_SUBST(WINE_SDK_PATH)
gbazin's avatar
 
gbazin committed
AC_SUBST(ALL_LINGUAS)
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
AC_SUBST(FILE_LIBVLC_DLL)
Samuel Hocevar's avatar
 
Samuel Hocevar committed

Samuel Hocevar's avatar
Samuel Hocevar committed
dnl Import substitutions generated by bootstrap
VLC_SUBSTS
Samuel Hocevar's avatar
Samuel Hocevar committed

dnl Create vlc-config.in
VLC_OUTPUT_VLC_CONFIG_IN
  activex/Makefile
  bindings/Makefile
  bindings/java/Makefile
  bindings/java/src/Makefile
  bindings/python/Makefile
  loader/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  m4/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed

Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/access/Makefile
gbazin's avatar
 
gbazin committed
  modules/access/dshow/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/access/mms/Makefile
  modules/access/rtsp/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/access/vcd/Makefile
gbazin's avatar
 
gbazin committed
  modules/access/vcdx/Makefile
  modules/access/screen/Makefile
  modules/access_filter/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/access_output/Makefile
  modules/audio_filter/Makefile
  modules/audio_filter/channel_mixer/Makefile
  modules/audio_filter/converter/Makefile
  modules/audio_filter/resampler/Makefile
  modules/audio_mixer/Makefile
  modules/audio_output/Makefile
  modules/codec/Makefile
  modules/codec/cmml/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/codec/ffmpeg/Makefile
  modules/codec/spudec/Makefile
  modules/control/Makefile
  modules/control/http/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/demux/Makefile
  modules/demux/asf/Makefile
  modules/demux/avi/Makefile
  modules/demux/mp4/Makefile
  modules/demux/mpeg/Makefile
  modules/demux/playlist/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/gui/Makefile
  modules/gui/beos/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/gui/macosx/Makefile
  modules/gui/qnx/Makefile
  modules/gui/qt4/Makefile
  modules/gui/skins2/Makefile
  modules/gui/wince/Makefile
zorglub's avatar
zorglub committed
  modules/meta_engine/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/misc/Makefile
  modules/misc/dummy/Makefile
  modules/misc/memcpy/Makefile
  modules/misc/network/Makefile
  modules/misc/notify/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/misc/testsuite/Makefile
  modules/misc/playlist/Makefile
gbazin's avatar
gbazin committed
  modules/misc/xml/Makefile
zorglub's avatar
zorglub committed
  modules/misc/probe/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/mux/Makefile
  modules/mux/mpeg/Makefile
  modules/mux/rtp/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/packetizer/Makefile
  modules/services_discovery/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/stream_out/Makefile
  modules/stream_out/transrate/Makefile
Samuel Hocevar's avatar
Samuel Hocevar committed
  modules/video_chroma/Makefile
  modules/video_filter/Makefile
  modules/video_output/Makefile
  modules/video_output/directx/Makefile
  modules/video_output/qte/Makefile
  modules/video_output/x11/Makefile
  modules/visualization/Makefile
  modules/visualization/visual/Makefile
  modules/visualization/galaktos/Makefile
dnl Generate makefiles
AC_OUTPUT

# Cannot use AC_CONFIG_FILES([vlc-config]) as is automatically built,
# not provided with the source
${SHELL} ./config.status --file=vlc-config
chmod 0755 vlc-config

dnl echo "Enabled builtin modules :"
dnl for a in `./vlc-config --target builtin` ; do echo $a; done | sed -e 's,modules\/\(.*\)\/lib\(.*\)\.a,\2 (\1),'

dnl echo "Enabled plugin modules :"
dnl for a in `./vlc-config --target plugin` ; do echo $a; done | sed -e 's,modules\/\(.*\)\/lib\(.*\)_plugin,\2 (\1),'

dnl Shortcut to nice compile message
rm -f compile
echo '#! /bin/sh' >compile
echo "PATH=$PATH LANG=C make \$@ 2>&1| \\" >> compile
echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/make.pl' >> compile
Samuel Hocevar's avatar
 
Samuel Hocevar committed
vlc configuration
Samuel Hocevar's avatar
 
Samuel Hocevar committed
--------------------
Samuel Hocevar's avatar
 
Samuel Hocevar committed
vlc version           : ${VERSION}
Samuel Hocevar's avatar
 
Samuel Hocevar committed
system                : ${SYS}
architecture          : ${ARCH}
Samuel Hocevar's avatar
Samuel Hocevar committed
test "${enable_debug}" = "yes" && printf "debug "
test "${enable_cprof}" = "yes" && printf "cprof "
test "${enable_gprof}" = "yes" && printf "gprof "
test "${enable_optimizations}" = "yes" && printf "optim "
test "${enable_release}" = "yes" && printf "release " || printf "devel "
Samuel Hocevar's avatar
 
Samuel Hocevar committed
vlc aliases           :${ALIASES}
Samuel Hocevar's avatar
 
Samuel Hocevar committed

Samuel Hocevar's avatar
Samuel Hocevar committed
You can tune the compiler flags in vlc-config.
To build vlc and its plugins, type \`./compile' or \`make'.
Samuel Hocevar's avatar
 
Samuel Hocevar committed
"