diff options
author | Crispin Flowerday <gnome@flowerday.cx> | 2005-09-25 04:20:39 +0800 |
---|---|---|
committer | Crispin Flowerday <crispin@src.gnome.org> | 2005-09-25 04:20:39 +0800 |
commit | ea90d20bec0c716aacbb72052961492c1ad9f960 (patch) | |
tree | 2b10013dbf45971eba62d705fbf111d132c4172f | |
parent | e04c3b73a2bff0e5b6f1b597df150bbff7fef2b5 (diff) | |
download | gsoc2013-epiphany-ea90d20bec0c716aacbb72052961492c1ad9f960.tar.gz gsoc2013-epiphany-ea90d20bec0c716aacbb72052961492c1ad9f960.tar.zst gsoc2013-epiphany-ea90d20bec0c716aacbb72052961492c1ad9f960.zip |
Rename the autoconf macro to EPIPHANY_EXTENSION_INIT() and make it check
2005-09-24 Crispin Flowerday <gnome@flowerday.cx>
* data/epiphany.m4:
Rename the autoconf macro to EPIPHANY_EXTENSION_INIT() and make it
check the ephy version, get the extension directory and find out
whether python is enabled.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | data/epiphany.m4 | 60 |
2 files changed, 67 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2005-09-24 Crispin Flowerday <gnome@flowerday.cx> + + * data/epiphany.m4: + + Rename the autoconf macro to EPIPHANY_EXTENSION_INIT() and make it + check the ephy version, get the extension directory and find out + whether python is enabled. + 2005-09-24 Jean-François Rameau <jframeau@cvs.gnome.org> * embed/mozilla/EphyAboutModule.cpp: (GetErrorMessage): diff --git a/data/epiphany.m4 b/data/epiphany.m4 index e880c22b6..890fc3866 100644 --- a/data/epiphany.m4 +++ b/data/epiphany.m4 @@ -20,9 +20,67 @@ ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. -AC_DEFUN([AC_EPIPHANY_EXTENSION], + +# Usage: +# EPIPHANY_EXTENSION_INIT(ephy-api-version, [minimum-ephy-version]) +# +# Side effects: +# EPIPHANY_EXTENSIONS_DIR is set to the directory to install extensions in +# EPIPHANY_EXTENSION_RULE can be used to translate .ephy-extension files +# EPIPHANY_HAS_PYTHON is set if the epiphany is compiled with python support +AC_DEFUN([EPIPHANY_EXTENSION_INIT], +[ +dnl Check we have an api-version +ifelse([$1], [], [AC_MSG_ERROR([Required Epiphany API version not supplied])], []) + +_epiphany_api_version=$1 + +AC_MSG_CHECKING([whether epiphany-$_epiphany_api_version is available]) +PKG_CHECK_EXISTS([epiphany-$_epiphany_api_version], [result=yes],[result=no]) +AC_MSG_RESULT([$result]) + +if test $result = "no" ; then + AC_MSG_ERROR([Epiphany API version $_epiphany_api_version is required + +This API version is used in the $_epiphany_api_version stable series, and +the preceeding development series. Please ensure you have the appropriate +Epiphany version installed.]) +fi + +dnl Check the minimum version +ifelse([$2], [], [], [ + AC_MSG_CHECKING([whether minimum epiphany version $2 is available]) + PKG_CHECK_EXISTS([epiphany-$_epiphany_api_version >= $2], [result=yes], [result=no]) + AC_MSG_RESULT([$result]) + + if test $result = "no" ; then + AC_MSG_ERROR([The minimum epiphany version supported by this application is $2. + +Please upgrade to at least $2. If you have compiled a later version it is +possible pkg-config isn't finding it, in which case set the PKG_CONFIG_PATH +environment variable.]) + fi +]) + +dnl set the EPIPHANY_EXTENSIONS_DIR variable +EPIPHANY_EXTENSIONS_DIR="`$PKG_CONFIG --variable=extensionsdir epiphany-$_epiphany_api_version`" +AC_SUBST([EPIPHANY_EXTENSIONS_DIR]) + +dnl Look to see if epiphany has python support +AC_MSG_CHECKING([whether epiphany has python support]) +_epiphany_features="`$PKG_CONFIG --variable=features epiphany-$_epiphany_api_version`" +if echo "$_epiphany_features" | egrep '(^| )(python)($| )' > /dev/null; then + result=yes + EPIPHANY_HAS_PYTHON=1 + AC_SUBST([EPIPHANY_HAS_PYTHON]) +else + result=no +fi +AC_MSG_RESULT([$result]) +dnl Add a rule that auto-translates the .ephy-extension files +dnl (like the INTLTOOL_XML_RULE does for xml files) EPIPHANY_EXTENSION_RULE='%.ephy-extension: %.ephy-extension.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' AC_SUBST(EPIPHANY_EXTENSION_RULE) |