check to see if gnome-deprecated-macros.m4 ended up in aclocal.m4, and
[platform/upstream/gnome-common.git] / macros2 / gnome-platform.m4
1 dnl
2 dnl GNOME_PLATFORM_GNOME_2(default, [force])
3 dnl
4 dnl   If the first parameter is `yes', then the default is
5 dnl   the GNOME 2.x platform, otherwise the GNOME 1.x one.
6 dnl
7 dnl   If the optional second parameter is `force', then use
8 dnl   the default value without command line argument.
9 dnl
10
11 AC_DEFUN([GNOME_PLATFORM_GNOME_2],[
12         AC_REQUIRE([GNOME_REQUIRE_PKGCONFIG])
13
14         if test x$1 = xyes ; then
15             platform_gnome_2_default=yes
16         else
17             platform_gnome_2_default=no
18         fi
19         if test x$2 = xforce ; then
20             platform_gnome_2="$platform_gnome_2_default";
21         else
22             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"])
23         fi
24
25         AM_CONDITIONAL(PLATFORM_GNOME_2, test $platform_gnome_2 = yes)
26
27         AC_MSG_CHECKING(for GNOME Platform)
28         if test $platform_gnome_2 = yes; then
29             AC_MSG_RESULT(GNOME 2.x)
30             GNOME_INTERFACE_VERSION=2
31             GNOME_REQUIRE_PKGCONFIG
32         else
33             AC_MSG_RESULT(GNOME 1.x)
34             GNOME_INTERFACE_VERSION=1
35         fi
36         AC_SUBST(GNOME_INTERFACE_VERSION)
37 ])