summaryrefslogtreecommitdiff
path: root/macros2/gnome-platform.m4
blob: 5d44a70ddd298e18b11bed69b7e1ebfe8fd0581a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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],[
	AC_REQUIRE([GNOME_REQUIRE_PKGCONFIG])

	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
	    GNOME_REQUIRE_PKGCONFIG
	else
	    AC_MSG_RESULT(GNOME 1.x)
	    GNOME_INTERFACE_VERSION=1
	fi
	AC_SUBST(GNOME_INTERFACE_VERSION)
])