mirror of
https://github.com/horst3180/arc-theme.git
synced 2024-10-27 19:04:02 +00:00
better error handling
This commit is contained in:
parent
f4c71247cf
commit
cadb4ac730
@ -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])
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user