[nautilus-actions] Review m4 Gtk check behavior
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Review m4 Gtk check behavior
- Date: Thu, 1 May 2014 22:09:50 +0000 (UTC)
commit 95a139755fd0db5482e68fd56be81232a2b50c67
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Jan 30 19:54:32 2014 +0100
Review m4 Gtk check behavior
ChangeLog | 1 +
m4/na-check-for-gtk.m4 | 32 +++++++++++++++++++-------------
2 files changed, 20 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 54ebb74..08a70af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2014-01-30 Pierre Wieser <pwieser trychlos org>
+ * m4/na-check-for-gtk.m4:
* m4/na-check-module.m4: Review m4 macro behavior, not exiting in
case of an error, but letting all tests go up to the end.
diff --git a/m4/na-check-for-gtk.m4 b/m4/na-check-for-gtk.m4
index 97c87bf..d28b717 100644
--- a/m4/na-check-for-gtk.m4
+++ b/m4/na-check-for-gtk.m4
@@ -25,7 +25,8 @@
# Pierre Wieser <pwieser trychlos org>
# ... and many others (see AUTHORS)
-# serial 1 creation
+# serial 2 review the macro behavior
+# add version of selected packages
dnl let the user choose the Gtk+ version he wants build against
dnl --with-gtk+=[2|3]
@@ -39,15 +40,12 @@ AC_DEFUN([NA_CHECK_FOR_GTK],[
])
AC_DEFUN([_AC_NA_ARG_GTK],[
- AC_ARG_WITH(
- [gtk],
+ AC_ARG_WITH([gtk],
AC_HELP_STRING(
[--with-gtk=@<:@2|3@:>@],
- [the Gtk+ version to build against @<:@auto@:>@]
- ),
- [with_gtk=$withval],
- [with_gtk="auto"]
- )
+ [the Gtk+ version to build against @<:@auto@:>@]),
+ [with_gtk=$withval],
+ [with_gtk="auto"])
])
AC_DEFUN([_AC_NA_CHECK_GTK],[
@@ -56,23 +54,27 @@ AC_DEFUN([_AC_NA_CHECK_GTK],[
if test "${have_gtk3}" != "yes"; then
_AC_NA_CHECK_FOR_GTK2
if test "${have_gtk2}" != "yes"; then
- AC_MSG_ERROR([unable to find any suitable Gtk+ library])
+ AC_MSG_WARN([unable to find any suitable Gtk+ development library])
+ let na_fatal_count+=1
fi
fi
else
if test "${with_gtk}" = "2"; then
_AC_NA_CHECK_FOR_GTK2
if test "${have_gtk2}" != "yes"; then
- AC_MSG_ERROR([unable to build against Gtk+-2.0 library])
+ AC_MSG_WARN([unable to build against Gtk+ v2; try to install gtk2-devel
package])
+ let na_fatal_count+=1
fi
else
if test "${with_gtk}" = "3"; then
_AC_NA_CHECK_FOR_GTK3
if test "${have_gtk3}" != "yes"; then
- AC_MSG_ERROR([unable to build against Gtk+-3.0 library])
+ AC_MSG_WARN([unable to build against Gtk+ v3; try to install
gtk3-devel package])
+ let na_fatal_count+=1
fi
else
- AC_MSG_ERROR([--with-gtk=${with_gtk}: invalid argument])
+ AC_MSG_WARN([--with-gtk=${with_gtk}: invalid argument])
+ let na_fatal_count+=1
fi
fi
fi
@@ -88,7 +90,9 @@ AC_DEFUN([_AC_NA_CHECK_FOR_GTK3],[
NA_CHECK_MODULE([UNIQUE],[unique-3.0],[no])
if test "${have_UNIQUE}" != "yes"; then
have_gtk3="no"
- else
+ else
+ msg_gtk_version=$(pkg-config --modversion gtk+-3.0)
+ msg_unique_version=$(pkg-config --modversion unique-3.0)
NAUTILUS_ACTIONS_CFLAGS="${NAUTILUS_ACTIONS_CFLAGS} ${GTK3_CFLAGS}"
NAUTILUS_ACTIONS_LIBS="${NAUTILUS_ACTIONS_LIBS} ${GTK3_LIBS}"
fi
@@ -106,6 +110,8 @@ AC_DEFUN([_AC_NA_CHECK_FOR_GTK2],[
if test "${have_UNIQUE}" != "yes"; then
have_gtk2="no"
else
+ msg_gtk_version=$(pkg-config --modversion gtk+-2.0)
+ msg_unique_version=$(pkg-config --modversion unique-1.0)
NAUTILUS_ACTIONS_CFLAGS="${NAUTILUS_ACTIONS_CFLAGS} ${GTK2_CFLAGS}"
NAUTILUS_ACTIONS_LIBS="${NAUTILUS_ACTIONS_LIBS} ${GTK2_LIBS}"
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]