[brasero/introspection] Make 'make distcheck' work
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero/introspection] Make 'make distcheck' work
- Date: Sun, 13 Sep 2009 20:13:41 +0000 (UTC)
commit 11320862f265c7e9a6e5b91314f4b17c5a3d64fc
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Sun Sep 13 22:08:09 2009 +0200
Make 'make distcheck' work
Because girdir and typelibdir were hard coded "make distcheck" failed.
Makefile.am | 4 ++-
configure.in | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 76 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index b73f83d..c9fcd02 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,9 @@ noinst_PROGRAMS =
DISTCHECK_CONFIGURE_FLAGS = \
--disable-scrollkeeper \
--enable-gtk-doc \
- --with-nautilusdir='$${libdir}/nautilus/extensions-2.0-distcheck'
+ --with-nautilusdir='$${libdir}/nautilus/extensions-2.0-distcheck' \
+ --with-girdir='$${datadir}/girdir-distcheck/' \
+ --with-typelibdir='$${libdir}/typelibdir-distcheck'
DISTCLEANFILES = \
intltool-extract \
diff --git a/configure.in b/configure.in
index a4a710c..fad7d5d 100644
--- a/configure.in
+++ b/configure.in
@@ -413,8 +413,80 @@ fi
AM_CONDITIONAL(BUILD_INOTIFY, test x"$enable_inotify" = "xyes")
dnl ****** GObject Introspection **********************
+dnl This is a copy of the m4 function in gobject-introspection package
+dnl but it was modified so the install path can be forced with a command
+dnl line parameter. This is to be able to use make distcheck.
+
+GOBJECT_INTROSPECTION_REQUIRED=0.6.3
+
+enable_introspection=yes
+AC_ARG_ENABLE(introspection,
+ AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
+ [Enable introspection for this build]),,
+ [enable_introspection=auto])
+
+AC_ARG_WITH(girdir,
+ AS_HELP_STRING([--with-girdir=DIR],[Installation path for .gir files @<:@auto@:>@]),
+ [ac_with_girdir=$withval],
+ [ac_with_girdir=""])
+
+AC_ARG_WITH(typelibdir,
+ AS_HELP_STRING([--with-typelibdir=DIR],[Installation path for .typelib files @<:@auto@:>@]),
+ [ac_with_typelibdir=$withval],
+ [ac_with_typelibdir=""])
+
+AC_MSG_CHECKING([for gobject-introspection])
+
+dnl presence/version checking
+AS_CASE([$enable_introspection],
+ [no], [dnl
+ found_introspection="no (disabled, use --enable-introspection to enable)"
+ ],dnl
+ [yes],[dnl
+ PKG_CHECK_EXISTS([gobject-introspection-1.0],,
+ AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED],
+ found_introspection=yes,
+ AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
+ ],dnl
+ [auto],[dnl
+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED], found_introspection=yes, found_introspection=no)
+ ],dnl
+ [dnl
+ AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
+])dnl
+
+AC_MSG_RESULT([$found_introspection])
+
+INTROSPECTION_SCANNER=
+INTROSPECTION_COMPILER=
+INTROSPECTION_GENERATE=
+INTROSPECTION_GIRDIR=
+INTROSPECTION_TYPELIBDIR=
+if test "x$found_introspection" = "xyes"; then
+ INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+ INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+ INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+
+ if test "${ac_with_girdir}" = ""; then
+ ac_with_girdir=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ fi
+ INTROSPECTION_GIRDIR=${ac_with_girdir}
+ AC_MSG_NOTICE([installing .gir files in ${INTROSPECTION_GIRDIR}])
+
+ if test "${ac_with_typelibdir}" = ""; then
+ ac_with_typelibdir="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+ fi
+ INTROSPECTION_TYPELIBDIR=${ac_with_typelibdir}
+ AC_MSG_NOTICE([installing .typelib files in ${INTROSPECTION_TYPELIBDIR}])
+fi
+AC_SUBST(INTROSPECTION_SCANNER)
+AC_SUBST(INTROSPECTION_COMPILER)
+AC_SUBST(INTROSPECTION_GENERATE)
+AC_SUBST(INTROSPECTION_GIRDIR)
+AC_SUBST(INTROSPECTION_TYPELIBDIR)
-GOBJECT_INTROSPECTION_CHECK(0.6.3)
+AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
dnl ****** Update mime, desktop and icon caches *******
AC_ARG_ENABLE(caches,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]