[goffice] Coped code from introspection.m4
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Coped code from introspection.m4
- Date: Mon, 21 May 2012 16:24:36 +0000 (UTC)
commit e79e0d4a36c8da11f63159e35bd822edc4b96c48
Author: Jean Brefort <jean brefort normalesup org>
Date: Mon May 21 18:24:14 2012 +0200
Coped code from introspection.m4
ChangeLog | 4 ++++
configure.in | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e004ee7..a440636 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-21 Jean Brefort <jean brefort normalesup org>
+
+ * configure.in: copied code from introspection.m4
+
2012-05-19 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/utils/go-color.h (go_color_from_gdk_rgba): new
diff --git a/configure.in b/configure.in
index 87a591f..d59b0a1 100644
--- a/configure.in
+++ b/configure.in
@@ -652,8 +652,62 @@ AC_SUBST(EXTRA_INCLUDES)
AC_SUBST(EXTRA_DEPS)
# GObject Introspection
+GIR_REQ=1.0.0
+AC_ARG_ENABLE(introspection,
+ AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
+ [Enable introspection for this build]),,
+ [enable_introspection=no])
+
+AC_MSG_CHECKING([for gobject-introspection])
+
+dnl presence/version checking
+AS_CASE([$enable_introspection],
+[no], [
+ found_introspection="no (disabled, use --enable-introspection to enable)"
+],
+[yes],[
+ PKG_CHECK_EXISTS([gobject-introspection-1.0],,
+ AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GIR_REQ],
+ found_introspection=yes,
+ AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
+],
+[auto],[
+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GIR_REQ], found_introspection=yes, found_introspection=no)
+dnl Canonicalize enable_introspection
+enable_introspection=$found_introspection
+],
+[
+ AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
+])
-GOBJECT_INTROSPECTION_CHECK(1.0)
+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`
+ INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+ INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+ INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+ INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+fi
+AC_SUBST(INTROSPECTION_SCANNER)
+AC_SUBST(INTROSPECTION_COMPILER)
+AC_SUBST(INTROSPECTION_GENERATE)
+AC_SUBST(INTROSPECTION_GIRDIR)
+AC_SUBST(INTROSPECTION_TYPELIBDIR)
+AC_SUBST(INTROSPECTION_CFLAGS)
+AC_SUBST(INTROSPECTION_LIBS)
+AC_SUBST(INTROSPECTION_MAKEFILE)
+
+AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
dnl we need to change the install directories for distcheck
AC_ARG_WITH([gir-dir],
AS_HELP_STRING(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]