diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | data/epiphany.pc.in (renamed from data/epiphany-1.10.pc.in) | 0 | ||||
-rw-r--r-- | m4/gecko.m4 | 80 |
4 files changed, 83 insertions, 27 deletions
@@ -1,3 +1,13 @@ +2006-01-08 Christian Persch <chpe@cvs.gnome.org> + + * configure.ac: + R data/epiphany-1.10.pc.in: + A data/epiphany.pc.in: + * m4/gecko.m4: + + Various improvements to gecko.m4. Generate the versioned .pc file + from the unversioned .pc.in file. + 2006-01-05 thetroublemaker <thetroublemaker@inventati.org> * src/ephy-notebook.c: diff --git a/configure.ac b/configure.ac index 76beebab4..c05e5bb14 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,9 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([configure.ac]) EPIPHANY_MAJOR=1.9 +EPIPHANY_API_VERSION=1.10 AC_SUBST([EPIPHANY_MAJOR]) +AC_SUBST([EPIPHANY_API_VERSION]) AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news]) @@ -339,8 +341,16 @@ fi # Check for some contractIDs that we need but are provided by extensions # which may or may not have been built. -GECKO_CHECK_CONTRACTID([PermissionManager],[@mozilla.org/permissionmanager;1]) -GECKO_CHECK_CONTRACTID([CookiePermission],[@mozilla.org/cookie/permission;1]) +GECKO_CHECK_CONTRACTID([@mozilla.org/permissionmanager;1], + [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,cookie,permissions])]) +GECKO_CHECK_CONTRACTID([@mozilla.org/PopupWindowManager;1], + [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,cookie,permissions])]) +GECKO_CHECK_CONTRACTID([@mozilla.org/cookie/permission;1], + [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,cookie,permissions])]) + +# This one ought to exist too but somehow doesn't on breezy at least...!? +# GECKO_CHECK_CONTRACTID([@mozilla.org/permissions/contentblocker;1], +# [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,cookie,permissions])]) # *************** # Multimedia keys @@ -611,7 +621,7 @@ GTK_DOC_CHECK([1.0]) AC_CONFIG_FILES([ Makefile data/Makefile -data/epiphany-1.10.pc +data/epiphany-${EPIPHANY_API_VERSION}.pc:data/epiphany.pc.in data/epiphany.desktop.in data/bme.desktop.in data/glade/Makefile @@ -630,6 +640,8 @@ help/Makefile plugins/Makefile plugins/desktop-file/Makefile po/Makefile.in -]) +], +[], +[EPIPHANY_API_VERSION=$EPIPHANY_API_VERSION]) AC_OUTPUT diff --git a/data/epiphany-1.10.pc.in b/data/epiphany.pc.in index 06eeaf5ba..06eeaf5ba 100644 --- a/data/epiphany-1.10.pc.in +++ b/data/epiphany.pc.in diff --git a/m4/gecko.m4 b/m4/gecko.m4 index b9053e148..035b0119b 100644 --- a/m4/gecko.m4 +++ b/m4/gecko.m4 @@ -15,7 +15,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# GECKO_INIT([VARIABLE]) +# GECKO_INIT(VARIABLE,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) # # Checks for gecko, and aborts if it's not found # @@ -45,7 +45,7 @@ AC_MSG_CHECKING([which gecko to use]) AC_ARG_WITH([gecko], AS_HELP_STRING([--with-gecko@<:@=mozilla|firefox|seamonkey|xulrunner@:>@], - [Which gecko engine to use (default: autodetect)])) + [Which gecko engine to use (autodetected by default)])) # Backward compat AC_ARG_WITH([mozilla],[],[with_gecko=$withval],[]) @@ -63,13 +63,23 @@ if test -z "$_GECKO"; then done fi +AC_MSG_RESULT([$_GECKO]) + if test "x$_GECKO" = "x"; then - AC_MSG_ERROR([No gecko found; you may need to adjust PKG_CONFIG_PATH or install a mozilla/firefox/xulrunner -devel package]) + ifelse([$3],,[AC_MSG_ERROR([No gecko found; you may need to adjust PKG_CONFIG_PATH or install a mozilla/firefox/xulrunner -devel package])],[$3]) + gecko_cv_have_gecko=no elif ! ( echo "$_geckos" | egrep "(^| )$_GECKO(\$| )" > /dev/null); then AC_MSG_ERROR([Unknown gecko "$_GECKO" specified]) +else + ifelse([$2],,[],[$2]) + gecko_cv_have_gecko=yes fi -AC_MSG_RESULT([$_GECKO]) +# **************** +# Define variables +# **************** + +if test "$gecko_cv_have_gecko" = "yes"; then case "$_GECKO" in mozilla) _GECKO_FLAVOUR=mozilla ;; @@ -78,11 +88,12 @@ seamonkey) _GECKO_FLAVOUR=mozilla ;; xulrunner) _GECKO_FLAVOUR=toolkit ;; esac - _GECKO_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $_GECKO-gtkmozembed`" _GECKO_HOME="`$PKG_CONFIG --variable=libdir $_GECKO-gtkmozembed`" _GECKO_PREFIX="`$PKG_CONFIG --variable=prefix $_GECKO-gtkmozembed`" +fi # if gecko_cv_have_gecko + $1[]=$_GECKO $1[]_FLAVOUR=$_GECKO_FLAVOUR $1[]_INCLUDE_ROOT=$_GECKO_INCLUDE_ROOT @@ -101,6 +112,8 @@ _GECKO_EXTRA_CFLAGS= _GECKO_EXTRA_CXXFLAGS= _GECKO_EXTRA_LDFLAGS= +if test "$gecko_cv_have_gecko" = "yes"; then + AC_LANG_PUSH([C++]) _SAVE_CXXFLAGS=$CXXFLAGS @@ -126,10 +139,14 @@ if test "$gecko_cv_have_usable_wchar_option" = "yes"; then AM_CXXFLAGS="$AM_CXXFLAGS -fshort-wchar" fi +fi # if gecko_cv_have_gecko + # ************** # Check for RTTI # ************** +if test "$gecko_cv_have_gecko" = "yes"; then + AC_MSG_CHECKING([whether to enable C++ RTTI]) AC_ARG_ENABLE([cpp-rtti], AS_HELP_STRING([--enable-cpp-rtti],[Enable C++ RTTI]), @@ -141,10 +158,14 @@ if test "$enable_cpp_rtti" = "no"; then AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS" fi +fi # if gecko_cv_have_gecko + # ************* # Various tests # ************* +if test "$gecko_cv_have_gecko" = "yes"; then + AC_LANG_PUSH([C++]) _SAVE_CPPFLAGS="$CPPFLAGS" @@ -185,10 +206,14 @@ if test "$gecko_cv_have_debug" = "yes"; then AM_CXXFLAGS="-DDEBUG -D_DEBUG $AM_CXXFLAGS" fi +fi # if gecko_cv_have_gecko + # *********************** # Check for gecko version # *********************** +if test "$gecko_cv_have_gecko" = "yes"; then + AC_MSG_CHECKING([[for gecko version]]) _GECKO_VERSION_SPLIT=`cat $_GECKO_INCLUDE_ROOT/mozilla-config.h | grep MOZILLA_VERSION_U | awk '{ print $[3]; }' | tr ".ab+" " "` @@ -202,10 +227,6 @@ _GECKO_VERSION="$_GECKO_VERSION_MAJOR.$_GECKO_VERSION_MINOR" AC_MSG_RESULT([$_GECKO_VERSION]) -$1[]_VERSION=$_GECKO_VERSION -$1[]_VERSION_MAJOR=$_GECKO_VERSION_MAJOR -$1[]_VERSION_MINOR=$_GECKO_VERSION_MINOR - if test "$_GECKO_VERSION_MAJOR" != "1" -o "$_GECKO_VERSION_MINOR" -lt "7" -o "$_GECKO_VERSION_MINOR" -gt "9"; then AC_MSG_ERROR([Gecko version $_GECKO_VERSION is not supported!]) fi @@ -223,10 +244,16 @@ if test "$_GECKO_VERSION_MAJOR" = "1" -a "$_GECKO_VERSION_MINOR" -ge "9"; then gecko_cv_have_gecko_1_9=yes fi +fi # if gecko_cv_have_gecko + AM_CONDITIONAL([HAVE_GECKO_1_7],[test "$_GECKO_VERSION_MAJOR" = "1" -a "$_GECKO_VERSION_MINOR" -ge "7"]) AM_CONDITIONAL([HAVE_GECKO_1_8],[test "$_GECKO_VERSION_MAJOR" = "1" -a "$_GECKO_VERSION_MINOR" -ge "8"]) AM_CONDITIONAL([HAVE_GECKO_1_9],[test "$_GECKO_VERSION_MAJOR" = "1" -a "$_GECKO_VERSION_MINOR" -ge "9"]) +$1[]_VERSION=$_GECKO_VERSION +$1[]_VERSION_MAJOR=$_GECKO_VERSION_MAJOR +$1[]_VERSION_MINOR=$_GECKO_VERSION_MINOR + ]) # *************************************************************************** @@ -238,6 +265,10 @@ AM_CONDITIONAL([HAVE_GECKO_1_9],[test "$_GECKO_VERSION_MAJOR" = "1" -a "$_GECKO_ m4_define([GECKO_DISPATCH], [ +if test "$gecko_cv_have_gecko" != "yes"; then + AC_MSG_FAILURE([Gecko not present; can't run this test!]) +fi + AC_LANG_PUSH([C++]) _SAVE_CPPFLAGS="$CPPFLAGS" @@ -285,17 +316,19 @@ AC_DEFUN([GECKO_RUN_IFELSE],[GECKO_DISPATCH([AC_RUN_IFELSE],$@)]) # *************************************************************************** # *************************************************************************** -# GECKO_CHECK_CONTRACTID(IDENTIFIER, CONTRACTID, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# GECKO_CHECK_CONTRACTID(CONTRACTID, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Checks wheter CONTRACTID is a registered contract ID AC_DEFUN([GECKO_CHECK_CONTRACTID], [AC_REQUIRE([GECKO_INIT])dnl -AC_CACHE_CHECK([for the $2 XPCOM component], -[gecko_cv_xpcom_contractid_[]$1], +AS_VAR_PUSHDEF([gecko_cv_have_CID],[gecko_cv_have_$1]) + +AC_CACHE_CHECK([for the $1 XPCOM component], +[gecko_cv_have_CID], [ -gecko_cv_xpcom_contractid_[]$1[]=no +gecko_cv_have_CID=no GECKO_RUN_IFELSE([], [AC_LANG_PROGRAM([[ @@ -334,26 +367,27 @@ if (NS_FAILED (rv)) { } PRBool isRegistered = PR_FALSE; -rv = registar->IsContractIDRegistered ("$2", &isRegistered); +rv = registar->IsContractIDRegistered ("$1", &isRegistered); registar = nsnull; // release registar before shutdown NS_ShutdownXPCOM (nsnull); exit (isRegistered ? EXIT_SUCCESS : EXIT_FAILURE); ]]) ], -[gecko_cv_xpcom_contractid_[]$1[]=present], -[gecko_cv_xpcom_contractid_[]$1[]="not present"], -[gecko_cv_xpcom_contractid_[]$1[]="not present (cross-compiling)"]) +[gecko_cv_have_CID=yes], +[gecko_cv_have_CID=no], +[gecko_cv_have_CID=maybe]) ]) -if test "$gecko_cv_xpcom_contractid_[]$1" = "present"; then - ifelse([$3],,[:],[$3]) +if test "$gecko_cv_have_CID" = "yes"; then + ifelse([$2],,[:],[$2]) else - ifelse([$4],,[AC_MSG_FAILURE([dnl -Contract ID "$2" is not registered, but $PACKAGE_NAME depends on it.])], - [$4]) + ifelse([$3],,[AC_MSG_FAILURE([dnl +Contract ID "$1" is not registered, but $PACKAGE_NAME depends on it.])], + [$3]) fi -]) +AS_VAR_POPDEF([gecko_cv_have_CID]) +]) |