dnl Process this file with autoconf to produce a configure script.
AC_INIT(epiphany, 1.1.11,
[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany])
EPIPHANY_MAJOR=1.1
AC_SUBST(EPIPHANY_MAJOR)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR(configure.in)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_MAINTAINER_MODE
AC_PROG_INTLTOOL([0.29])
dnl put the ACLOCAL flags in the Makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
GLIB_REQUIRED=2.3.5
GTK_REQUIRED=2.3.5
LIBBONOBOUI_REQUIRED=2.1.1
LIBXML_REQUIRED=2.6.6
LIBGNOMEVFS_REQUIRED=2.3.1
LIBGLADE_REQUIRED=2.3.1
LIBNAUTILUS_REQUIRED=2.5
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
AC_SUBST(LIBBONOBOUI_REQUIRED)
AC_SUBST(LIBXML_REQUIRED)
AC_SUBST(LIBGNOMEVFS_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
AC_SUBST(LIBNAUTILUS_REQUIRED)
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
AM_PROG_LIBTOOL
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_PROG_INTLTOOL
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_SUBST(AM_CXXFLAGS)
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS(error)
GNOME_CXX_WARNINGS(yes, yes)
dnl ******************************
dnl Nautilus View checking
dnl ******************************
build_nautilus_view=no
AC_ARG_ENABLE(nautilus-view, [ --enable-nautilus-view (auto,yes,no)
Enable Nautilus View Epiphany Component])
AC_MSG_CHECKING(if NautilusView Epiphany component is wanted)
if test "x$enable_nautilus_view" = "x" ; then
enable_nautilus_view=auto
fi
if test "x$enable_nautilus_view" = "xauto"; then
temptest=`pkg-config --cflags libnautilus 2> /dev/null`
if test "x$temptest" = "x" ; then
enable_nautilus_view=no
else
enable_nautilus_view=yes
fi
fi
AC_MSG_RESULT($enable_nautilus_view)
if test "x$enable_nautilus_view" = "xyes"; then
PKG_CHECK_MODULES(NAUTILUS_DEPENDENCY, libnautilus >= $LIBNAUTILUS_REQUIRED, \
[AC_DEFINE(ENABLE_NAUTILUS_VIEW, 1, [Define if the nautilus view has to be built])], \
[enable_nautilus_view=no])
fi
AC_SUBST(NAUTILUS_DEPENDENCY_CFLAGS)
AC_SUBST(NAUTILUS_DEPENDENCY_LIBS)
AM_CONDITIONAL(ENABLE_NAUTILUS_VIEW, test "x$enable_nautilus_view" = "xyes")
PKG_CHECK_MODULES(EPIPHANY_DEPENDENCY, \
glib-2.0 >= $GLIB_REQUIRED \
gtk+-2.0 >= $GTK_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
libgnomeui-2.0 libglade-2.0 \
bonobo-activation-2.0 \
libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED \
ORBit-2.0 \
libglade-2.0 >= $LIBGLADE_REQUIRED \
gnome-vfs-2.0 >= $LIBGNOMEVFS_REQUIRED \
gnome-vfs-module-2.0 \
gconf-2.0 \
)
AC_SUBST(EPIPHANY_DEPENDENCY_CFLAGS)
AC_SUBST(EPIPHANY_DEPENDENCY_LIBS)
ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)
LIBBONOBO_IDL="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
AC_SUBST(LIBBONOBO_IDL)
BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACTIVATION_IDL)
PKG_CHECK_MODULES(MOZILLA_COMPONENT, mozilla-gtkmozembed)
AC_SUBST(MOZILLA_COMPONENT_CFLAGS)
AC_SUBST(MOZILLA_COMPONENT_LIBS)
MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir mozilla-gtkmozembed`"
AC_SUBST(MOZILLA_INCLUDE_ROOT)
MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
AC_SUBST(MOZILLA_HOME)
dnl whether to build with DEBUG defined
AC_ARG_WITH(mozilla-debug,
[ --with-mozilla-debug Use a debug mozilla build],
AM_CXXFLAGS="-DDEBUG $AM_CXXFLAGS",)
AC_ARG_ENABLE(cpp-rtti,
[ --enable-cpp-rtti Enable C++ RTTI (for cvs gcc)],,
enable_cpp_rtti=no)
if test "x$enable_cpp_rtti" = "xno"; then
AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS"
fi
dnl Specify the gconf configuration source,
dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2
dnl This is from Mozilla's configure.in. They set almost all the config stuff
dnl they need in mozilla-config.h Except for this compiler flag, which can't
dnl go in mozilla-config.h So we check the flag too and now we can include
dnl mozilla-config.h without breaking epiphany.
dnl This is really gcc-only
dnl Do this test using CXX only since some versions of gcc
dnl 2.95-2.97 have a signed wchar_t in c++ only and some versions
dnl only have short-wchar support for c++.
AC_LANG_PUSH(C++)
_SAVE_CXXFLAGS=$CXXFLAGS
_SAVE_AM_CXXFLAGS=$AM_CXXFLAGS
AM_CXXFLAGS="$AM_CXXFLAGS -fshort-wchar"
CXXFLAGS="$CXXFLAGS $AM_CXXFLAGS"
AC_CACHE_CHECK(for compiler -fshort-wchar option,
ac_cv_have_usable_wchar_option,
[AC_TRY_RUN([#include <stddef.h>
int main () {
return (sizeof(wchar_t) != 2) ||
(wchar_t)-1 < (wchar_t) 0 ; } ],
ac_cv_have_usable_wchar_option="yes",
ac_cv_have_usable_wchar_option="no",
ac_cv_have_usable_wchar_option="maybe")])
if test "$ac_cv_have_usable_wchar_option" != "yes"; then
AM_CXXFLAGS=$_SAVE_AM_CXXFLAGS
fi
CXXFLAGS=$_SAVE_CXXFLAGS
AC_LANG_POP(C++)
AC_MSG_CHECKING(for mozilla version)
MOZILLA_VERSION="`$PKG_CONFIG --modversion mozilla-gtkmozembed`"
dnl allow user to override the autodetected mozilla version
dnl - without arguments for cvs head
AC_ARG_WITH(mozilla-snapshot,
AC_HELP_STRING([--with-mozilla-snapshot@<:@=1.4|1.4.1|1.5|1.6a|1.6b|trunk@:>@],
[Whether to try building against mozilla 1.4|1.4.1|1.5|1.6|1.7a|1.7b|trunk
snapshot. @<:@guessed@:>@]),
[autodetect=" (guessed: $MOZILLA_VERSION)"; MOZILLA_VERSION="$withval"])
AC_MSG_RESULT($MOZILLA_VERSION$autodetect)
case "$MOZILLA_VERSION" in
1.4) MOZILLA_SNAPSHOT=8 ;;
1.4.1) MOZILLA_SNAPSHOT=9 ;;
1.4.2) MOZILLA_SNAPSHOT=9 ;;
1.5a) MOZILLA_SNAPSHOT=10 ;;
1.5b) MOZILLA_SNAPSHOT=11 ;;
1.5) MOZILLA_SNAPSHOT=11 ;;
1.6a) MOZILLA_SNAPSHOT=12 ;;
1.6b) MOZILLA_SNAPSHOT=13 ;;
1.6) MOZILLA_SNAPSHOT=13 ;;
1.7a) MOZILLA_SNAPSHOT=14 ;;
1.7b) MOZILLA_SNAPSHOT=15 ;;
1.7) MOZILLA_SNAPSHOT=15 ;;
trunk) MOZILLA_SNAPSHOT=15 ;;
*) AC_ERROR([
*****************************************************************************
Epiphany can be built using Mozilla 1.4, 1.4.1, 1.5, 1.6, 1.7a, 1.7b, or
trunk snapshot, but the version available is $MOZILLA_VERSION.
When using Mozilla trunk snapshot, a successful build is not guaranteed due
to the frequently changing state of the Mozilla interfaces and the limited
resources of the Epiphany team to support non-release Mozilla snapshots.
*****************************************************************************])
esac
AC_DEFINE_UNQUOTED(MOZILLA_SNAPSHOT, $MOZILLA_SNAPSHOT, [Define mozilla snapshot])
AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/pipnss/nsIX509Cert.h],
[AC_DEFINE(HAVE_MOZILLA_PSM, 1,
[Define if you have the mozilla psm headers installed])])
dnl *******************************
dnl Internationalization
dnl *******************************
dnl Add the languages which your application supports here.
ALL_LINGUAS="am ar az be bn ca cs cy da de el en_CA en_GB es et fa fi fr ga hi hr hu is id it ja ko li lt nl mi mk mn ms no pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta tr uk vi wa zh_CN zh_TW"
GETTEXT_PACKAGE=epiphany
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
dnl uninstalled share dir to search data
AC_DEFINE_UNQUOTED(SHARE_UNINSTALLED_DIR,"`pwd`/data",[path to source data dir])
GTK_DOC_CHECK([1.0])
AC_OUTPUT([
Makefile
data/Makefile
data/epiphany-1.2.pc
data/glade/Makefile
data/art/Makefile
data/ui/Makefile
doc/Makefile
doc/reference/Makefile
lib/Makefile
lib/egg/Makefile
lib/widgets/Makefile
embed/Makefile
embed/mozilla/Makefile
src/Makefile
src/bookmarks/Makefile
help/Makefile
help/C/Makefile
po/Makefile.in
src/epiphany
],
[chmod +x src/epiphany])