aboutsummaryrefslogtreecommitdiff
path: root/m4/arc-gnome.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/arc-gnome.m4')
-rw-r--r--m4/arc-gnome.m420
1 files changed, 13 insertions, 7 deletions
diff --git a/m4/arc-gnome.m4 b/m4/arc-gnome.m4
index 82bd510..349d1e0 100644
--- a/m4/arc-gnome.m4
+++ b/m4/arc-gnome.m4
@@ -3,18 +3,23 @@
AC_DEFUN([ARC_GNOME], [
GNOMEDIR="$srcdir/common/gtk-3.0"
- PKG_CHECK_EXISTS(
- [gtk+-3.0],
- [GNOME_VERSION=`$PKG_CONFIG --modversion gtk+-3.0`],
- [GNOME_VERSION=`ls -1 "$GNOMEDIR" | tail -1`]
- )
AC_ARG_WITH(
[gnome],
[AS_HELP_STRING(
[--with-gnome],
[GNOME minor version]
)],
- [GNOME_VERSION="$withval"]
+ [GNOME_VERSION="$withval"],
+ [AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
+ AS_IF(
+ [test "x$HAVE_PKG_CONFIG" != "xyes"],
+ [AC_MSG_ERROR([Could not find pkg-config.])]
+ )
+ PKG_CHECK_EXISTS(
+ [gtk+-3.0],
+ [GNOME_VERSION=`$PKG_CONFIG --modversion gtk+-3.0`],
+ [AC_MSG_ERROR([Could not determine GNOME version. Install GTK3 and its development files (libgtk-3-dev for Debian/Ubuntu based distros and gtk3-devel for RPM based distros).])]
+ )]
)
# Trim version extras
@@ -31,7 +36,8 @@ AC_DEFUN([ARC_GNOME], [
)
AS_IF(
[! test -e "$GNOMEDIR/$GNOME_VERSION"],
- [AC_MSG_ERROR([invalid GNOME version: $GNOME_VERSION])]
+ [AC_MSG_ERROR([Invalid GNOME version: $GNOME_VERSION])]
)
AC_SUBST([GNOME_VERSION])
+ AC_MSG_RESULT([Building for GNOME $GNOME_VERSION])
])