[gnome-control-center] build: Add helper for platform specific errors



commit 035880a261cd738fffa78a8d6a0200da93a3f396
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Feb 8 19:58:12 2017 +0100

    build: Add helper for platform specific errors
    
    One for panels required on Linux, one for panels required on non-S390
    Linux (where USB is not available).

 configure.ac |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 073a707..4c0f2e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,6 +191,38 @@ if test "x$have_wayland" = xyes ; then
        fi
 fi
 
+# Panels that must be built on Linux systems
+linux_error_or_warn()
+{
+       case $host_os in
+       linux*)
+               AC_MSG_ERROR([$1])
+               ;;
+       *)
+               AC_MSG_WARN([$1])
+               ;;
+       esac
+
+}
+
+# Panels that must be built on Linux systems with
+# USB support (so not on S390)
+linux_usb_error_or_warn()
+{
+       case $host_os in
+       linux*)
+               if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
+                       AC_MSG_WARN([$1 (no USB support on this platform) ***])
+               else
+                       AC_MSG_ERROR([$1 ***])
+               fi
+               ;;
+       *)
+               AC_MSG_NOTICE([$1])
+               ;;
+       esac
+}
+
 PKG_CHECK_MODULES(NETWORK_MANAGER,
                   libnm >= $NETWORK_MANAGER_REQUIRED_VERSION
                   libnma >= $NETWORK_MANAGER_APPLET_REQUIRED_VERSION


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]