diff options
author | Horst3180 | 2015-05-28 17:41:22 +0200 |
---|---|---|
committer | Horst3180 | 2015-05-28 17:41:22 +0200 |
commit | f21150e179d2ceae1e743041fbf9ea9eddc93d9a (patch) | |
tree | ad8b0021f8f1501e5b1935a9053bdab5c6bdd8fc /m4 | |
parent | d533557384041bfc1a73c0ee9f65c4184a4ec92a (diff) | |
download | solarc-theme-f21150e179d2ceae1e743041fbf9ea9eddc93d9a.tar.gz solarc-theme-f21150e179d2ceae1e743041fbf9ea9eddc93d9a.tar.xz solarc-theme-f21150e179d2ceae1e743041fbf9ea9eddc93d9a.zip |
add build system
Diffstat (limited to 'm4')
-rw-r--r-- | m4/arc-enable.m4 | 19 | ||||
-rw-r--r-- | m4/arc-gnome.m4 | 37 |
2 files changed, 56 insertions, 0 deletions
diff --git a/m4/arc-enable.m4 b/m4/arc-enable.m4 new file mode 100644 index 0000000..99a5be8 --- /dev/null +++ b/m4/arc-enable.m4 @@ -0,0 +1,19 @@ +# ARC_ENABLE(VARIABLE, FEATURE, HELP-NAME, DISABLE/ENABLE) +# ----------------------------------------------------------- +AC_DEFUN([ARC_ENABLE], [ + AC_ARG_ENABLE( + [$2], + [AS_HELP_STRING( + [--$4-$2], + [$4 $3 support] + )], + [ENABLE_$1="$enableval"], + [AS_IF( + [test "x$4" == "xdisable"], + [ENABLE_$1="yes"], + [ENABLE_$1="no"] + )] + ) + AM_CONDITIONAL([ENABLE_$1], [test "x$ENABLE_$1" == "xyes"]) + AC_SUBST([ENABLE_$1]) +]) diff --git a/m4/arc-gnome.m4 b/m4/arc-gnome.m4 new file mode 100644 index 0000000..82bd510 --- /dev/null +++ b/m4/arc-gnome.m4 @@ -0,0 +1,37 @@ +# ARC_GNOME() +# --------------- +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"] + ) + + # Trim version extras + GNOME_VERSION=`echo $GNOME_VERSION | cut -d. -f-2` + + # Extra major and minor version components + GNOME_VERSMJR=`echo $GNOME_VERSION | cut -d. -f1` + GNOME_VERSMNR=`echo $GNOME_VERSION | cut -d. -f2` + + # Evenize the minor version for stable versions + AS_IF( + [test `expr $GNOME_VERSMNR % 2` != "0"], + [GNOME_VERSION="$GNOME_VERSMJR.`expr $GNOME_VERSMNR + 1`"] + ) + AS_IF( + [! test -e "$GNOMEDIR/$GNOME_VERSION"], + [AC_MSG_ERROR([invalid GNOME version: $GNOME_VERSION])] + ) + AC_SUBST([GNOME_VERSION]) +]) |