summaryrefslogtreecommitdiff
path: root/macros2/gnome-platform.m4
diff options
context:
space:
mode:
Diffstat (limited to 'macros2/gnome-platform.m4')
-rw-r--r--macros2/gnome-platform.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/macros2/gnome-platform.m4 b/macros2/gnome-platform.m4
new file mode 100644
index 00000000..649eb27d
--- /dev/null
+++ b/macros2/gnome-platform.m4
@@ -0,0 +1,34 @@
+dnl
+dnl GNOME_PLATFORM_GNOME_2(default, [force])
+dnl
+dnl If the first parameter is `yes', then the default is
+dnl the GNOME 2.x platform, otherwise the GNOME 1.x one.
+dnl
+dnl If the optional second parameter is `force', then use
+dnl the default value without command line argument.
+dnl
+
+AC_DEFUN([GNOME_PLATFORM_GNOME_2],[
+ if test x$1 = xyes ; then
+ platform_gnome_2_default=yes
+ else
+ platform_gnome_2_default=no
+ fi
+ if test x$2 = xforce ; then
+ platform_gnome_2="$platform_gnome_2_default";
+ else
+ AC_ARG_ENABLE(platform-gnome-2, [ --enable-platform-gnome-2 enable GNOME 2.x platform [default=no]],[platform_gnome_2="$enableval"],[platform_gnome_2="$platform_gnome_2_default"])
+ fi
+
+ AM_CONDITIONAL(PLATFORM_GNOME_2, test $platform_gnome_2 = yes)
+
+ AC_MSG_CHECKING(for GNOME Platform)
+ if test $platform_gnome_2 = yes; then
+ AC_MSG_RESULT(GNOME 2.x)
+ GNOME_INTERFACE_VERSION=2
+ else
+ AC_MSG_RESULT(GNOME 1.x)
+ GNOME_INTERFACE_VERSION=1
+ fi
+ AC_SUBST(GNOME_INTERFACE_VERSION)
+])