summaryrefslogtreecommitdiff
path: root/trunk/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/configure.in')
-rw-r--r--trunk/configure.in955
1 files changed, 955 insertions, 0 deletions
diff --git a/trunk/configure.in b/trunk/configure.in
new file mode 100644
index 000000000..7c86c2030
--- /dev/null
+++ b/trunk/configure.in
@@ -0,0 +1,955 @@
+AC_PREREQ(2.52)
+
+m4_define(totem_version_major, 2)
+m4_define(totem_version_minor, 17)
+m4_define(totem_version_micro, 90)
+
+AC_INIT([totem],
+ [totem_version_major.totem_version_minor.totem_version_micro],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=totem])
+
+AC_CONFIG_SRCDIR([src/totem.c])
+AC_CONFIG_HEADERS([config.h])
+
+AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news])
+
+dnl Add the languages which your application supports to po/LINGUAS
+GETTEXT_PACKAGE=totem
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name])
+AC_SUBST(GETTEXT_PACKAGE)
+AM_GLIB_GNU_GETTEXT
+IT_PROG_INTLTOOL([0.35.0])
+
+GNOME_DOC_INIT
+
+AC_PROG_CXX
+AC_PROG_LIBTOOL()
+PKG_PROG_PKG_CONFIG
+
+AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
+AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
+
+# Requirements
+GLIB_REQS=2.12.0
+GTK_REQS=2.10.0
+GNOMEVFS_REQS=2.9.92
+GNOMEUI_REQS=2.3.3
+LIBGNOME_REQS=2.14.0
+GNOMEICON_REQS=2.15.90
+DBUS_REQS=0.61
+
+# Before making a release, the PLPARSER_LT_VERSION string should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+# been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+# change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+PLPARSER_LT_VERSION=6:3:5
+AC_SUBST(PLPARSER_LT_VERSION)
+
+TOTEM_VERSION_MAJOR=totem_version_major
+TOTEM_VERSION_MINOR=totem_version_minor
+TOTEM_VERSION_MICRO=totem_version_micro
+AC_SUBST(TOTEM_VERSION_MAJOR)
+AC_SUBST(TOTEM_VERSION_MINOR)
+AC_SUBST(TOTEM_VERSION_MICRO)
+TOTEM_PL_PARSER_VERSION_MAJOR=totem_version_major
+TOTEM_PL_PARSER_VERSION_MINOR=totem_version_minor
+TOTEM_PL_PARSER_VERSION_MICRO=totem_version_micro
+AC_SUBST(TOTEM_PL_PARSER_VERSION_MAJOR)
+AC_SUBST(TOTEM_PL_PARSER_VERSION_MINOR)
+AC_SUBST(TOTEM_PL_PARSER_VERSION_MICRO)
+
+AC_ARG_ENABLE(nvtv, AC_HELP_STRING([--enable-nvtv],[Enable support for TV-output with nvtv]), enable_nvtv="$enableval", enable_nvtv=yes)
+
+if test x$enable_nvtv = xyes; then
+PKG_CHECK_MODULES(NVTV, nvtvsimple >= 0.4.5, found_nvtv=yes,
+ [
+ found_nvtv=no
+ AC_MSG_RESULT(no)
+ ])
+ if test x"$found_nvtv" = "xyes" ; then
+ AC_DEFINE(HAVE_NVTV,1,[Define to 1 if nvtv is available and used.])
+ fi
+fi
+
+dnl xine or gst ?
+
+dnl the two versions here implicate the gstreamer core and gst-plugins
+dnl release versions.
+XINE_REQS=1.1.2
+GST_MAJORMINOR=0.10
+GST_REQS=0.10.6
+GSTPLUG_REQS=0.10.7
+
+AC_ARG_ENABLE(xine,
+ AC_HELP_STRING([--enable-xine], [use xine instead of GStreamer for the backend]),
+ [case "${enableval}" in
+ yes) ENABLE_XINE=yes ;;
+ no) ENABLE_XINE=no ;;
+ *) AC_MSG_ERROR([
+ ***** Bad value ${enableval} for --enable-xine
+ ***** Please use one of the following:
+ ***** --enable-xine=yes
+ ***** --enable-xine=no
+ ]) ;;
+ esac],
+ [ENABLE_XINE=auto]) dnl Default value
+
+HAVE_GSTREAMER=no
+if test x$ENABLE_XINE = xno || test x$ENABLE_XINE = xauto; then
+ dnl Check for libgimme-codec unless disabled
+ dnl Do this first since we need to up the required GStreamer core
+ dnl version if we're using libgimme-codec.
+ AC_MSG_CHECKING([whether to enable easy codec installation support using libgimme-codec])
+ AC_ARG_ENABLE([easy-codec-installation],
+ [
+ AS_HELP_STRING([--enable-easy-codec-installation],
+ [Whether to enable easy codec installation support for GStreamer using libgimme-codec]
+ )
+ ], [
+ case "${enableval}" in
+ yes) enable_easy_codec_installation=yes ;;
+ no) enable_easy_codec_installation=no ;;
+ *) enable_easy_codec_installation=autodetect ;;
+ esac
+ ], [
+ dnl default value
+ enable_easy_codec_installation=auto
+ ]
+ )
+ AC_MSG_RESULT([$enable_easy_codec_installation])
+
+ if test "x$enable_easy_codec_installation" != "xno"; then
+ AC_CHECK_LIB([gimme-codec], [gimme_codec_async],
+ [HAVE_GIMME_CODEC=yes], [HAVE_GIMME_CODEC=no],
+ [-lgimme-codec])
+ if test "x$HAVE_GIMME_CODEC" = "xyes"; then
+ AC_CHECK_HEADER([gimme-codec.h], :, HAVE_GIMME_CODEC=no)
+ if test "x$HAVE_GIMME_CODEC" = "xyes"; then
+ GIMME_CODEC_LIBS="-lgimme-codec"
+ else
+ GIMME_CODEC_LIBS=""
+ fi
+ else
+ GIMME_CODEC_LIBS=""
+ fi
+ if test "x$HAVE_GIMME_CODEC" = "xyes"; then
+ AC_DEFINE([USE_GIMME_CODEC], 1, [Whether we have and want to use libgimme-codec])
+ dnl need CVS for gst_update_registry()
+ GST_REQS=0.10.11.1
+ fi
+ fi
+ AC_SUBST(GIMME_CODEC_LIBS)
+
+ MM="gstreamer-0.10 >= $GST_REQS gstreamer-plugins-base-0.10 >= $GSTPLUG_REQS gconf-2.0"
+ PKG_CHECK_MODULES(GST, $MM,
+ HAVE_GSTREAMER=yes, HAVE_GSTREAMER=no)
+ GST_LIBS="$GST_LIBS -lgstinterfaces-$GST_MAJORMINOR -lgstvideo-$GST_MAJORMINOR -lgstaudio-$GST_MAJORMINOR"
+ AC_SUBST(GST_LIBS)
+ EXTRA_BACKEND_LIBS="-lgstinterfaces-$GST_MAJORMINOR -lgstvideo-$GST_MAJORMINOR -lgstaudio-$GST_MAJORMINOR"
+
+ AC_MSG_CHECKING(for backend libraries)
+ dnl Give error and exit if we don't have gstreamer
+ if test "x$HAVE_GSTREAMER" = "xno"; then
+ AC_MSG_ERROR(you need the GStreamer or the xine-lib development packages installed)
+ fi
+ AC_MSG_RESULT(GStreamer-$GST_MAJORMINOR)
+
+ dnl Check for required plugins
+ gst010_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-0.10`
+ gst010_inspect="$gst010_toolsdir/gst-inspect-0.10"
+
+ dnl Check for elements from gst-plugins-base
+ for base_element in playbin ffmpegcolorspace videoscale
+ do
+ AC_MSG_CHECKING([GStreamer 0.10 $base_element plugin])
+ if $gst010_inspect $base_element >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([
+ Cannot find required GStreamer-0.10 plugin '$base_element'.
+ It should be part of gst-plugins-base. Please install it.
+ ])
+ fi
+ done
+
+ dnl Check for elements from gst-plugins-good
+ for good_element in gconfaudiosink gconfvideosink goom
+ do
+ AC_MSG_CHECKING([GStreamer 0.10 $good_element plugin])
+ if $gst010_inspect $good_element >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([
+ Cannot find required GStreamer-0.10 plugin '$good_element'.
+ It should be part of gst-plugins-good. Please install it.
+ ])
+ fi
+ done
+
+
+fi
+
+if test x$ENABLE_XINE = xno && test x$HAVE_GSTREAMER = xno; then
+ AC_MSG_CHECKING(for backend libraries)
+ AC_MSG_RESULT([none])
+ AC_MSG_ERROR(you need the GStreamer or the xine-lib development packages installed)
+fi
+
+if test x$HAVE_GSTREAMER = xno; then
+ MM="libxine >= $XINE_REQS gconf-2.0"
+ PKG_CHECK_MODULES(XINE, $MM, HAVE_XINE=yes,
+ [
+ AC_MSG_RESULT(no)
+ HAVE_XINE=no
+ ])
+ AC_MSG_CHECKING(for backend libraries)
+ if test x$HAVE_XINE = xyes; then
+ AC_MSG_RESULT([xine-lib])
+ else
+ AC_MSG_WARN([No xine-lib found])
+ fi
+fi
+
+if test "$HAVE_GSTREAMER" = "yes"; then
+ AC_DEFINE([HAVE_GSTREAMER],[1],[Define if using gst backend])
+fi
+
+AM_CONDITIONAL(TOTEM_GST, test "x$HAVE_GSTREAMER" = "xyes")
+
+AC_ARG_ENABLE(vanity,
+ AC_HELP_STRING([--enable-vanity],[do not compile and install vanity]),
+ [case "${enableval}" in
+ yes) ENABLE_VANITY=yes ;;
+ no) ENABLE_VANITY=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-vanity) ;;
+ esac],
+ [ENABLE_VANITY=no]) dnl Default value
+
+AC_MSG_CHECKING(for Linux)
+case `uname` in
+ *Linux*)
+ AC_MSG_RESULT([yes])
+ IS_LINUX="yes"
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ IS_LINUX="no"
+ ;;
+esac
+
+if test x$ENABLE_VANITY = "xyes" -a x$IS_LINUX = "xyes"; then
+ COMPILE_VANITY=yes
+else
+ COMPILE_VANITY=no
+fi
+
+AM_CONDITIONAL(TOTEM_VANITY, test x$COMPILE_VANITY = "xyes")
+AC_MSG_CHECKING(whether to compile vanity)
+AC_MSG_RESULT([$COMPILE_VANITY])
+
+dnl Check for GTK+ only build
+AC_ARG_ENABLE(gtk,
+ AC_HELP_STRING([--enable-gtk],[compile a gtk+ only version]),
+ [case "${enableval}" in
+ yes) ENABLE_GTK=yes ;;
+ no) ENABLE_GTK=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-gtk) ;;
+ esac],
+ [ENABLE_GTK=no]) dnl Default value
+
+dnl Seems that the order matters because libtool blows
+dnl Also check if we're going to be using GTK+ only
+if test x$ENABLE_GTK = "xno" ; then
+# FIXME: use gmodule-no-export instead!
+ PKG_CHECK_MODULES(EXTRA_GNOME, glib-2.0 >= $GLIB_REQS gtk+-2.0 >= $GTK_REQS libgnomeui-2.0 >= $GNOMEUI_REQS libglade-2.0 gnome-vfs-2.0 >= $GNOMEVFS_REQS gnome-vfs-module-2.0 >= $GNOMEVFS_REQS libgnome-2.0 >= $LIBGNOME_REQS gnome-desktop-2.0 >= 2.1.5 gnome-icon-theme >= $GNOMEICON_REQS gmodule-2.0 iso-codes $MM)
+ HAVE_GNOME=yes
+else
+# FIXME: use gmodule-no-export instead!
+ PKG_CHECK_MODULES(EXTRA_GNOME, glib-2.0 >= $GLIB_REQS gtk+-2.0 >= $GTK_REQS libglade-2.0 gnome-vfs-2.0 >= $GNOMEVFS_REQS gnome-vfs-module-2.0 >= $GNOMEVFS_REQS gnome-icon-theme >= $GNOMEICON_REQS gmodule-2.0 iso-codes $MM)
+ AC_DEFINE(USE_STABLE_LIBGNOMEUI, 1, [defined if we don't have GNOME])
+ AC_DEFINE(HAVE_GTK_ONLY, 1, [defined if GNOME isn't used])
+ HAVE_GNOME=no
+fi
+
+AC_MSG_CHECKING([whether iso-codes has iso-639 domain])
+if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
+
+AM_CONDITIONAL(HAVE_GNOME, test x$HAVE_GNOME = "xyes")
+EXTRA_GNOME_CFLAGS="$EXTRA_GNOME_CFLAGS"
+EXTRA_GNOME_LIBS="$EXTRA_GNOME_LIBS $EXTRA_BACKEND_LIBS"
+AC_SUBST(EXTRA_GNOME_CFLAGS)
+AC_SUBST(EXTRA_GNOME_LIBS)
+
+PKG_CHECK_MODULES(GTK, gtk+-2.0 $MM gthread-2.0)
+AC_SUBST(GTK_CFLAGS)
+GTK_LIBS="$GTK_LIBS $EXTRA_BACKEND_LIBS"
+AC_SUBST(GTK_LIBS)
+
+# ***************
+# Browser plugins
+# ***************
+
+AC_MSG_CHECKING([whether to compile the browser plugins])
+
+AC_ARG_ENABLE([browser-plugins],
+ [AS_HELP_STRING([--enable-browser-plugins],[compile the totem browser plugins])],
+ [],[enable_browser_plugins=autodetect])
+
+# Backward compatibility
+AC_ARG_ENABLE([mozilla],[],[enable_browser_plugins=$enableval],[])
+
+AC_MSG_RESULT([$enable_browser_plugins])
+
+# Check which mozilla to use
+
+if test "$enable_browser_plugins" != "no" ; then
+ AC_MSG_CHECKING([which gecko to use])
+
+ AC_ARG_WITH([gecko],
+ [AS_HELP_STRING([--with-gecko],[Which gecko engine to use (default: autodetect)])])
+
+ # backward compat
+ AC_ARG_WITH([mozilla],[],[with_gecko=$withval])
+
+ GECKOS="xulrunner firefox mozilla-firefox seamonkey mozilla"
+ gecko=$with_gecko
+
+ if test -z "$with_gecko"; then
+ dnl Autodetect gecko
+ for g in $GECKOS; do
+ if $PKG_CONFIG --exists $g-xpcom; then
+ gecko=$g
+ break;
+ fi
+ done
+ elif ! $PKG_CONFIG --exists $gecko-xpcom; then
+ AC_MSG_ERROR([Gecko "$gecko" not found])
+ fi
+
+ if test -z "$gecko" -a "$enable_browser_plugins" = "autodetect"; then
+ dnl No gecko found, disable plugin
+ AC_MSG_WARN([No gecko found, disabling plugin])
+ enable_browser_plugins=no
+ elif test -z "$gecko"; then
+ AC_MSG_ERROR([No gecko found])
+ elif ! ( echo "$GECKOS" | egrep "(^| )$gecko(\$| )" > /dev/null); then
+ AC_MSG_ERROR([Unknown gecko "$gecko" specified])
+ else
+ enable_browser_plugins=yes
+ fi
+
+ AC_MSG_RESULT([$gecko])
+
+ case "$gecko" in
+ mozilla) MOZILLA_VERSION_MIN=1.7 ;;
+ seamonkey) MOZILLA_VERSION_MIN=1.0 ;;
+ *firefox) MOZILLA_VERSION_MIN=1.0 ;;
+ xulrunner) MOZILLA_VERSION_MIN=1.8 ;;
+ esac
+
+ MOZILLA=$gecko
+ AC_SUBST([MOZILLA])
+
+ if test "$enable_cxx_warnings" != "no" -a "$GXX" = "yes"; then
+ PLUGIN_EXTRA_WARN_CXXFLAGS="-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Woverloaded-virtual"
+ else
+ PLUGIN_EXTRA_WARN_CXXFLAGS=
+ fi
+ AC_SUBST([PLUGIN_EXTRA_WARN_CXXFLAGS])
+fi
+
+# Check for mozilla modules, but keep the CFLAGS and LIBS in
+# separate vars
+if test "$enable_browser_plugins" = "yes" ; then
+ PKG_CHECK_MODULES([MOZILLA_NOT_LINKED],
+ [$MOZILLA-xpcom >= $MOZILLA_VERSION_MIN \
+ $MOZILLA-plugin],,
+ [enable_browser_plugins=no])
+fi
+# Check for other required modules, and merge CFLAGS, but not link
+# flags to avoid linking against -lxpcom -lplds4 -lplc4 -lnspr4
+if test "$enable_browser_plugins" = "yes" ; then
+ PKG_CHECK_MODULES([BROWSER_PLUGIN],
+ [glib-2.0
+ gnome-vfs-2.0 >= $GNOMEVFS_REQS
+ gnome-vfs-module-2.0 >= $GNOMEVFS_REQS
+ gthread-2.0],
+ [],[enable_browser_plugins=no])
+
+ BROWSER_PLUGIN_CFLAGS="$MOZILLA_NOT_LINKED_CFLAGS $BROWSER_PLUGIN_CFLAGS"
+ AC_SUBST([BROWSER_PLUGIN_CFLAGS])
+ AC_SUBST([BROWSER_PLUGIN_LIBS])
+
+ # Earlier versions misdetect playlists
+ PKG_CHECK_EXISTS([shared-mime-info >= 0.17],
+ [],
+ [AC_MSG_ERROR([
+ The Browser plugin requires shared-mime-info
+ >= 0.17 to function.])])
+fi
+
+if test "$enable_browser_plugins" = "yes" ; then
+ PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_REQS],,
+ [enable_browser_plugins=no])
+ DBUSLIBDIR="`$PKG_CONFIG dbus-glib-1 --variable=libdir`"
+ DBUSBINDIR="`echo $DBUSLIBDIR | sed -e s/lib/bin/`"
+ AC_PATH_PROG([DBUS_BIND], [dbus-binding-tool], [no], [$DBUSBINDIR:$PATH])
+ if test "x$DBUS_BIND" = "xno"; then
+ AC_MSG_WARN([dbus-binding-tool not found])
+ enable_browser_plugins=no
+ fi
+fi
+
+# Sets some variables, and check for xpidl
+if test "$enable_browser_plugins" = "yes" ; then
+ MOZILLA_PREFIX="`$PKG_CONFIG $MOZILLA-xpcom --variable=prefix`"
+ MOZILLA_LIBDIR="`$PKG_CONFIG $MOZILLA-xpcom --variable=libdir`"
+ MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
+ MOZILLA_XPCOM_CFLAGS="-I`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
+ MOZILLA_PLUGINDIR="${MOZILLA_PLUGINDIR:-$MOZILLA_LIBDIR}"
+
+ AC_PATH_PROG([MOZILLA_XPIDL], [xpidl], [no], [$MOZILLA_LIBDIR:$PATH])
+ if test "x$MOZILLA_XPIDL" = "xno"; then
+ AC_MSG_ERROR([xpidl compiler not found])
+ fi
+
+ AC_PATH_PROG([MOZILLA_XPT_LINK],[xpt_link],[no],[$MOZILLA_LIBDIR:$PATH])
+ if test "$MOZILLA_XPT_LINK" = "no"; then
+ AC_MSG_ERROR([xpt_link not found])
+ fi
+
+ AC_SUBST([MOZILLA_PREFIX])
+ AC_SUBST([MOZILLA_LIBDIR])
+ AC_SUBST([MOZILLA_XPCOM_CFLAGS])
+ AC_SUBST([MOZILLA_INCLUDE_ROOT])
+ AC_ARG_VAR([MOZILLA_PLUGINDIR],[Where to install the plugin to])
+fi
+
+# Search for the idl include directory
+if test "$enable_browser_plugins" = "yes" ; then
+ dnl This only works on gecko 1.8
+ MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir $MOZILLA-xpcom`"
+ dnl Fallback for older versions
+ if test "x$MOZILLA_IDLDIR" = "x"; then
+ MOZILLA_IDLDIR="`echo $MOZILLA_LIBDIR | sed -e s!lib!share/idl!`"
+ fi
+ dnl Some distributions (Gentoo) have it in unusual places
+ if test "x$MOZILLA_IDLDIR" = "x"; then
+ MOZILLA_IDLDIR="$MOZILLA_INCLUDE_ROOT/idl"
+ fi
+
+ AC_SUBST([MOZILLA_IDLDIR])
+fi
+
+if test "$enable_browser_plugins" = "yes" ; then
+ AC_DEFINE([ENABLE_BROWSER_PLUGINS],[1],[Define if you build the mozilla plugin])
+fi
+
+AM_CONDITIONAL([ENABLE_BROWSER_PLUGINS], [test "$enable_browser_plugins" = "yes"])
+
+# check for libxpcomglue_s
+
+LIBXPCOMGLUE_S=
+
+if test "$enable_browser_plugins" = "yes"; then
+ AC_LANG_PUSH([C++])
+ __SAVE_CPPFLAGS=$CPPFLAGS
+ __SAVE_CXXFLAGS=$CXXFLAGS
+ __SAVE_LIBS=$LIBS
+ __SAVE_LDFLAGS=$LDFLAGS
+
+ CPPFLAGS="$CPPFLAGS -I$MOZILLA_INCLUDE_ROOT"
+ CXXFLAGS="$CXXFLAGS $MOZILLA_NOT_LINKED_CFLAGS"
+ LIBS="$LIBS -L$MOZILLA_LIBDIR -lxpcom -lxpcomglue_s"
+ LDFLAGS="$LDFLAGS -Wl,--rpath -Wl,$MOZILLA_LIBDIR"
+
+ AC_MSG_CHECKING([for libxpcomglue_s])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <mozilla-config.h>
+#include <nsStringAPI.h>
+ ]],[[
+nsCString s;
+const char *t = s.get ();
+ ]])],
+ [have_libxpcomglue_s=yes],
+ [have_libxpcomglue_s=no])
+ AC_MSG_RESULT([$have_libxpcomglue_s])
+
+ CPPFLAGS=$__SAVE_CPPFLAGS
+ CXXFLAGS=$__SAVE_CXXFLAGS
+ LIBS=$__SAVE_LIBS
+ LDFLAGS=$__SAVE_LDFLAGS
+ AC_LANG_POP([C++])
+
+ if test "$have_libxpcomglue_s" = "yes"; then
+ LIBXPCOMGLUE_S="-L$MOZILLA_LIBDIR -lxpcomglue_s"
+ else
+ AC_MSG_WARN([libxpcomglue_s not available; plugins may not be portable])
+ fi
+fi
+
+AC_SUBST([LIBXPCOMGLUE_S])
+
+# check for -fno-rtti flag
+
+if test "$enable_browser_plugins" = "yes"; then
+ AC_LANG_PUSH([C++])
+ __SAVE_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="-fno-rtti $CXXFLAGS"
+
+ AC_MSG_CHECKING([for -fno-rtti compiler flag])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[have_no_rtti_flag=yes],[have_no_rtti_flag=no])
+ AC_MSG_RESULT([$have_no_rtti_flag])
+
+ CXXFLAGS=$__SAVE_CXXFLAGS
+ AC_LANG_POP([C++])
+
+ if test "$have_no_rtti_flag" = "yes"; then
+ AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS"
+ fi
+fi
+
+# check for some additional xpcom headers and for string compatibility
+
+if test "$enable_browser_plugins" = "yes"; then
+ AC_LANG_PUSH([C++])
+ __SAVE_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $MOZILLA_NOT_LINKED_CFLAGS -I$MOZILLA_INCLUDE_ROOT/xpcom"
+
+ AC_CHECK_HEADERS([nsTArray.h])
+
+ AC_MSG_CHECKING([whether we need string glue])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <mozilla-config.h>
+ #include <nsStringAPI.h>
+ ],[
+ nsDependentCString test("Test");
+ ])],[need_string_glue=no],[need_string_glue=yes])
+ AC_MSG_RESULT([$need_string_glue])
+
+ CPPFLAGS=$__SAVE_CPPFLAGS
+ AC_LANG_POP([C++])
+
+ if test "$need_string_glue" = "yes"; then
+ AC_DEFINE([NEED_STRING_GLUE],[1],[Define if we need string glue])
+ fi
+fi
+
+# check which plugins to enable
+
+if test "$enable_browser_plugins" = "yes"; then
+
+AC_MSG_CHECKING([whether to enable the basic browser plugin])
+AC_ARG_ENABLE([basic-plugin],
+ AS_HELP_STRING([--disable-basic-plugin],[Whether to disable the basic browser plugin]),
+ [],[enable_basic_plugin=yes])
+AC_MSG_RESULT([$enable_basic_plugin])
+
+AC_MSG_CHECKING([whether to enable the GMP browser plugin])
+AC_ARG_ENABLE([gmp-plugin],
+ AS_HELP_STRING([--enable-gmp-plugin],[Whether to enable the GMP browser plugin]),
+ [],[enable_gmp_plugin=yes])
+AC_MSG_RESULT([$enable_gmp_plugin])
+
+AC_MSG_CHECKING([whether to enable the Complex browser plugin])
+AC_ARG_ENABLE([complex-plugin],
+ AS_HELP_STRING([--enable-complex-plugin],[Whether to enable the complex browser plugin]),
+ [],[enable_complex_plugin=yes])
+AC_MSG_RESULT([$enable_complex_plugin])
+
+AC_MSG_CHECKING([whether to enable the NarrowSpace browser plugin])
+AC_ARG_ENABLE([narrowspace-plugin],
+ AS_HELP_STRING([--enable-narrowspace-plugin],[Whether to enable the NarrowSpace browser plugin]),
+ [],[enable_narrowspace_plugin=yes])
+AC_MSG_RESULT([$enable_narrowspace_plugin])
+
+AC_MSG_CHECKING([whether to enable the MullY browser plugin])
+AC_ARG_ENABLE([mully-plugin],
+ AS_HELP_STRING([--enable-mully-plugin],[Whether to enable the MullY browser plugin]),
+ [],[enable_mully_plugin=yes])
+AC_MSG_RESULT([$enable_mully_plugin])
+
+fi
+
+AM_CONDITIONAL([ENABLE_BASIC_PLUGIN],[test "$enable_basic_plugin" = "yes"])
+AM_CONDITIONAL([ENABLE_GMP_PLUGIN],[test "$enable_gmp_plugin" = "yes"])
+AM_CONDITIONAL([ENABLE_COMPLEX_PLUGIN],[test "$enable_complex_plugin" = "yes"])
+AM_CONDITIONAL([ENABLE_NARROWSPACE_PLUGIN],[test "$enable_narrowspace_plugin" = "yes"])
+AM_CONDITIONAL([ENABLE_MULLY_PLUGIN],[test "$enable_mully_plugin" = "yes"])
+
+dnl ********
+dnl Nautilus
+dnl ********
+
+dnl Check for Nautilus property page build
+AC_ARG_ENABLE(nautilus,
+ AC_HELP_STRING([--enable-nautilus],[compile the nautilus plugin]),
+ [case "${enableval}" in
+ yes) ENABLE_NAUTILUS=yes ;;
+ no) ENABLE_NAUTILUS=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
+ esac],
+ [ENABLE_NAUTILUS=yes]) dnl Default value
+
+if test x$ENABLE_NAUTILUS = "xyes" ; then
+ PKG_CHECK_MODULES(NAUTILUS, gtk+-2.0 $MM gthread-2.0 libnautilus-extension,
+ [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
+fi
+
+NAUTILUS_LIBS="$NAUTILUS_LIBS $EXTRA_BACKEND_LIBS"
+AC_SUBST(NAUTILUS_CFLAGS)
+AC_SUBST(NAUTILUS_LIBS)
+if test x$HAVE_NAUTILUS = "xyes"; then
+ AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
+fi
+AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
+
+dnl *****************
+dnl Media player keys
+dnl *****************
+
+AC_ARG_ENABLE([media-player-keys],
+ AC_HELP_STRING([--enable-media-player-keys],[add media player keys support]),
+ [case "${enableval}" in
+ yes) ENABLE_MEDIA_PLAYER_KEYS=yes ;;
+ no) ENABLE_MEDIA_PLAYER_KEYS=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-media-player-keys) ;;
+ esac],
+ [ENABLE_MEDIA_PLAYER_KEYS=yes])
+
+if test x$ENABLE_MEDIA_PLAYER_KEYS = "xyes" ; then
+ PKG_CHECK_MODULES(MEDIA_PLAYER_KEYS, gnome-settings-daemon >= 2.17.4 dbus-1 dbus-glib-1,
+ [HAVE_MEDIA_PLAYER_KEYS=yes], [HAVE_MEDIA_PLAYER_KEYS=no])
+fi
+
+AC_SUBST(MEDIA_PLAYER_KEYS_CFLAGS)
+AC_SUBST(MEDIA_PLAYER_KEYS_LIBS)
+
+if test x$HAVE_MEDIA_PLAYER_KEYS = "xyes"; then
+ AC_DEFINE(HAVE_MEDIA_PLAYER_KEYS, 1, [defined if you build the media player keys support])
+fi
+
+dnl ****
+dnl LIRC
+dnl ****
+
+AC_ARG_ENABLE([lirc],
+ AC_HELP_STRING([--enable-lirc],[enable lirc support]),
+ [case "${enableval}" in
+ yes) ENABLE_LIRC=yes ;;
+ no) ENABLE_LIRC=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-lirc) ;;
+ esac],
+ [ENABLE_LIRC=yes]) dnl Default value
+
+HAVE_LIRC=no
+if test x$ENABLE_LIRC = xyes ; then
+AC_CHECK_HEADER(irman.h,,)
+REMOTE_LIBS=""
+AC_CHECK_LIB(lirc_client, lirc_init, [
+ AC_CHECK_HEADER(lirc/lirc_client.h, [
+ REMOTE_LIBS="-llirc_client"
+ HAVE_LIRC=yes
+ ])
+])
+fi
+
+AC_SUBST(REMOTE_LIBS)
+
+if test x$HAVE_LIRC = "xyes"; then
+ AC_DEFINE(HAVE_LIRC, 1, [defined if you have lirc library])
+fi
+
+if test x$HAVE_MEDIA_PLAYER_KEYS = "xyes" || test x$HAVE_LIRC = "xyes"; then
+ AC_DEFINE(HAVE_REMOTE, 1, [defined if you build remote support])
+fi
+
+dnl ***
+dnl HAL
+dnl ***
+
+AC_ARG_WITH(hal,
+ AC_HELP_STRING([--without-hal],
+ [Disable HAL support]))
+if test "x$with_hal" != "xno"; then
+ PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6 dbus-1 >= $DBUS_REQS, enable_hal05=yes, enable_hal05=no)
+ if test x$enable_hal05 = xyes; then
+ enable_hal=yes
+ AC_DEFINE(HAVE_HAL, 1, [Define if you HAL support])
+ else
+ if test "x$with_hal" = "xyes"; then
+ AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found])
+ fi
+ fi
+fi
+AM_CONDITIONAL(HAVE_HAL, test x"$enable_hal" = xyes)
+
+
+dnl ***************************
+dnl D-Bus for gnome-screensaver
+dnl ***************************
+AC_MSG_CHECKING([for D-BUS])
+AC_ARG_WITH(dbus,
+ AC_HELP_STRING([--with-dbus],
+ [Enable D-BUS support]),,
+ with_dbus=auto)
+if test "x$with_dbus" != "xno"; then
+ PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $DBUS_REQS, enable_dbus=yes, enable_dbus=no)
+ if test "x$with_dbus" = xyes && test "x$enable_dbus" = xno; then
+ AC_MSG_ERROR([D-BUS explicitly requested but no support found])
+ fi
+ if test "x$enable_dbus" = xyes; then
+ AC_DEFINE(WITH_DBUS, 1, [Define if D-BUS is enabled])
+ AC_MSG_RESULT([we're getting on D-BUS])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+fi
+AM_CONDITIONAL(WITH_DBUS, test "x$enable_dbus" = "xyes")
+
+AC_PATH_X
+
+if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then
+ X_INCLUDES=-I`echo $x_includes | sed -e "s/:/ -I/g"`
+fi
+if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then
+ X_LIBRARIES=-L`echo $x_libraries | sed -e "s/:/ -L/g"`
+fi
+CFLAGS="$X_INCLUDES $CFLAGS"
+LIBS="$X_LIBRARIES $LIBS"
+
+XTEST_LIBS=""
+enable_xtest=no
+AC_CHECK_LIB(Xtst, XTestFakeKeyEvent,
+ XTEST_LIBS="-lX11 -lXtst $X_LIBRARIES"
+ enable_xtest=yes
+ AC_DEFINE(HAVE_XTEST, 1, [defined if you have XTest library]),
+ ,
+ $X_LIBRARIES)
+AC_SUBST(XTEST_LIBS)
+
+PKG_CHECK_MODULES(XVIDMODE, xrandr >= 1.1.1 xxf86vm >= 1.0.1,
+ have_xvidmode=yes, have_xvidmode=no)
+
+AM_CONDITIONAL(HAVE_XVIDMODE, [test x$have_xvidmode = xyes])
+if test x$have_xvidmode = xyes; then
+ AC_DEFINE(HAVE_XVIDMODE,, [Define this if you have the XVidMode and XRandR extension installed])
+fi
+
+X_LIBS=""
+if test x$(pkg-config --variable=target gtk+-2.0) = xx11; then
+ dnl Explicitely link against libX11 to avoid problems with crappy linkers
+ X_LIBS="$X_LIBRARIES -lX11"
+fi
+AC_SUBST(X_LIBS)
+
+dnl Multimedia keys
+have_xfree=no
+AC_COMPILE_IFELSE([
+ #include <X11/XF86keysym.h>
+ int main(int argc,char **argv) {
+ return 0;
+ }
+ ],
+ have_xfree=yes
+)
+AC_MSG_CHECKING(for X11 XFree86 headers)
+AC_MSG_RESULT([$have_xfree])
+if test x"$have_xfree" = "xyes" ; then
+ AC_DEFINE(HAVE_XFREE, 1, [defined if you have X11/XF86keysym.h])
+fi
+
+AC_PATH_PROG(GCONFTOOL, gconftool-2)
+AM_GCONF_SOURCE_2
+
+dnl Check for packages for building libtotem-plparser.la
+PKG_CHECK_MODULES(TOTEM_PLPARSER, [gtk+-2.0 libxml-2.0 gnome-vfs-2.0
+ gnome-vfs-module-2.0])
+
+PKG_CHECK_MODULES([TOTEM_PLPARSER_MINI],
+ [gnome-vfs-2.0 gnome-vfs-module-2.0])
+
+GNOME_COMMON_INIT
+GNOME_DEBUG_CHECK
+GNOME_COMPILE_WARNINGS([maximum])
+GNOME_CXX_WARNINGS
+GNOME_MAINTAINER_MODE_DEFINES
+
+dnl debug
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--disable-debug],[disables compilation of debugging messages]),
+ [case "${enableval}" in
+ yes) ENABLE_DEBUG=yes ;;
+ no) ENABLE_DEBUG=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-debug) ;;
+ esac],
+[ENABLE_DEBUG=no]) dnl Default value
+if test x$ENABLE_DEBUG = xyes; then
+ AC_DEFINE(TOTEM_DEBUG, 1, [Define if DEBUG statements should be compiled in])
+fi
+
+dnl run in source tree
+AC_ARG_ENABLE(run-in-source-tree,
+ AC_HELP_STRING([--disable-run-in-source-tree],[disable search for UI file in local directory ]),
+ [case "${enableval}" in
+ yes) ENABLE_RUN_IN_SOURCE_TREE=yes ;;
+ no) ENABLE_RUN_IN_SOURCE_TREE=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-run-in-source-tree) ;;
+ esac],
+[ENABLE_RUN_IN_SOURCE_TREE=yes]) dnl Default value
+if test x$ENABLE_RUN_IN_SOURCE_TREE = xyes; then
+ AC_DEFINE(TOTEM_RUN_IN_SOURCE_TREE, 1, [enable search for UI file in local directory])
+fi
+
+if test "$GCC" = "yes" ; then
+ CFLAGS="\
+ -Wall \
+ -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+ -Wnested-externs -Wpointer-arith \
+ -Wcast-align -Wsign-compare \
+ -fno-strict-aliasing \
+ $CFLAGS"
+fi
+
+AC_SUBST([AM_CPPFLAGS])
+AC_SUBST([AM_CFLAGS])
+AC_SUBST([AM_CXXFLAGS])
+AC_SUBST([AM_LDFLAGS])
+
+AC_OUTPUT([
+Makefile
+totem.spec
+totem-plparser.pc
+totem-plparser-uninstalled.pc
+src/Makefile
+src/backend/Makefile
+src/plparse/Makefile
+src/plparse/totem-pl-parser-features.h
+browser-plugin/Makefile
+browser-plugin/idl/Makefile
+data/Makefile
+data/totem.desktop.in.in
+data/vanity.desktop.in
+data/icons/Makefile
+data/icons/16x16/Makefile
+data/icons/22x22/Makefile
+data/icons/24x24/Makefile
+data/icons/32x32/Makefile
+data/icons/scalable/Makefile
+po/Makefile.in
+help/Makefile
+help/bg/Makefile
+help/ru/Makefile
+help/uk/Makefile
+])
+
+AC_MSG_NOTICE([Totem was configured with the following options:])
+if test x$HAVE_GSTREAMER = xno ; then
+ AC_MSG_NOTICE([** Using the xine backend])
+else
+ AC_MSG_NOTICE([** Using the GStreamer-$GST_MAJORMINOR backend])
+ if test "x$HAVE_GIMME_CODEC" = "xyes"; then
+ AC_MSG_NOTICE([** Easy codec installation support using libgimme-codec enabled])
+ else
+ AC_MSG_NOTICE([ Easy codec installation support using libgimme-codec disabled])
+ fi
+fi
+ if test x$found_nvtv = xyes ; then
+ AC_MSG_NOTICE([** nvtv support enabled])
+else
+ AC_MSG_NOTICE([ nvtv support disabled])
+fi
+if test x$COMPILE_VANITY = xyes ; then
+ AC_MSG_NOTICE([** vanity compilation enabled])
+else
+ AC_MSG_NOTICE([ vanity compilation disabled])
+fi
+if test x$ENABLE_GTK = xyes ; then
+ AC_MSG_NOTICE([** GTK+-only version enabled])
+else
+ AC_MSG_NOTICE([** GNOME version enabled])
+fi
+if test x$enable_browser_plugins = xyes ; then
+ AC_MSG_NOTICE([** Browser plugin enabled (using $MOZILLA)])
+ if test x$enable_basic_plugin = xyes ; then
+ AC_MSG_NOTICE([** Basic browser plugin enabled])
+ else
+ AC_MSG_NOTICE([ Basic browser plugin disabled])
+ fi
+ if test x$enable_gmp_plugin = xyes ; then
+ AC_MSG_NOTICE([** GMP (Windows Media) plugin enabled])
+ else
+ AC_MSG_NOTICE([ GMP (Windows Media) plugin disabled])
+ fi
+ if test x$enable_complex_plugin = xyes ; then
+ AC_MSG_NOTICE([** Complex (Real) plugin enabled])
+ else
+ AC_MSG_NOTICE([ Complex (Real) plugin disabled])
+ fi
+ if test x$enable_narrowspace_plugin = xyes ; then
+ AC_MSG_NOTICE([** NarrowSpace (QuickTime) plugin enabled])
+ else
+ AC_MSG_NOTICE([ NarrowSpace (QuickTime) plugin disabled])
+ fi
+ if test x$enable_mully_plugin = xyes ; then
+ AC_MSG_NOTICE([** MullY (DivX) plugin enabled])
+ else
+ AC_MSG_NOTICE([ MullY (DivX) plugin disabled])
+ fi
+else
+ AC_MSG_NOTICE([ Browser plugin disabled])
+fi
+if test x$ENABLE_NAUTILUS = xyes ; then
+ AC_MSG_NOTICE([** Nautilus properties page enabled])
+else
+ AC_MSG_NOTICE([ Nautilus properties page disabled])
+fi
+if test x$HAVE_MEDIA_PLAYER_KEYS = xyes ; then
+ AC_MSG_NOTICE([** Media player keys support enabled])
+else
+ AC_MSG_NOTICE([ Media player keys support disabled])
+fi
+if test x$HAVE_LIRC = xyes ; then
+ AC_MSG_NOTICE([** LIRC support enabled])
+else
+ AC_MSG_NOTICE([ LIRC support disabled])
+fi
+if test x$enable_hal = xyes ; then
+ AC_MSG_NOTICE([** HAL support enabled])
+else
+ AC_MSG_NOTICE([ HAL support disabled])
+fi
+if test x$enable_xtest = xyes ; then
+ AC_MSG_NOTICE([** XTest (legacy screensaver) support enabled])
+else
+ AC_MSG_NOTICE([ XTest (legacy screensaver) support disabled])
+fi
+if test x$enable_dbus = xyes ; then
+ AC_MSG_NOTICE([** D-Bus (gnome-screensaver) support enabled])
+else
+ AC_MSG_NOTICE([ D-Bus (gnome-screensaver) support disabled])
+fi
+if test x$have_xvidmode = xyes ; then
+ AC_MSG_NOTICE([** XVidmode support enabled])
+else
+ AC_MSG_NOTICE([ XVidmode support disabled])
+fi
+if test x$have_xfree = xyes ; then
+ AC_MSG_NOTICE([** XFree86 multimedia keys support enabled])
+else
+ AC_MSG_NOTICE([ XFree86 multimedia keys support disabled])
+fi
+
+AC_MSG_NOTICE([End options])
+