aboutsummaryrefslogtreecommitdiff
path: root/m4/arc-gnome.m4
diff options
context:
space:
mode:
authorHorst31802015-10-26 16:14:42 +0100
committerHorst31802015-10-26 16:14:42 +0100
commitcadb4ac730bd1ebd264b27e95086596cd3afd889 (patch)
tree71f31d6cfa0f908c0b3da6bc6691264bef4af6ca /m4/arc-gnome.m4
parentf4c71247cf9470037d052ae4a12b86073d0001ff (diff)
downloadsolarc-theme-cadb4ac730bd1ebd264b27e95086596cd3afd889.tar.gz
solarc-theme-cadb4ac730bd1ebd264b27e95086596cd3afd889.tar.xz
solarc-theme-cadb4ac730bd1ebd264b27e95086596cd3afd889.zip
better error handling
Diffstat (limited to 'm4/arc-gnome.m4')
-rw-r--r--m4/arc-gnome.m422
1 files changed, 15 insertions, 7 deletions
diff --git a/m4/arc-gnome.m4 b/m4/arc-gnome.m4
index 82bd510..f247b8a 100644
--- a/m4/arc-gnome.m4
+++ b/m4/arc-gnome.m4
@@ -3,18 +3,25 @@
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. Please install GTK+3.0 and/or GTK+3.0 development files.])]
+ )
+ ]
)
# Trim version extras
@@ -31,7 +38,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])
])