summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 816da0f6e6bdc84a569285e688df8b529ecb2106 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
dnl $Id$
dnl
dnl Copyright (c) 2003-2004
dnl         The Xfce development team. All rights reserved.
dnl
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
dnl

dnl Version information
m4_define([xfsm_version_major], [4])
m4_define([xfsm_version_minor], [1])
m4_define([xfsm_version_micro], [7])
m4_define([xfsm_version], [xfsm_version_major.xfsm_version_minor.xfsm_version_micro])

dnl Initialize autoconf
AC_COPYRIGHT([Copyright (c) 2003-2004
        The Xfce development team. All rights reserved.
        
Written for Xfce by Benedikt Meurer <benny@xfce.org>.])
AC_INIT([xfce4-session], [xfsm_version], [xfce4-dev@xfce.org])
AC_PREREQ([2.50])
AC_REVISION([$Id$])

dnl Initialize automake
XFSM_VERSION=xfsm_version
AM_INIT_AUTOMAKE([xfce4-session], [$XFSM_VERSION])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE

dnl check for UNIX variants
AC_AIX
AC_ISC_POSIX
AC_MINIX

dnl check for basic programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL

dnl check for standard header files
AC_HEADER_STDC
AC_CHECK_FUNCS([sigaction strdup sync])
AC_CHECK_HEADERS([errno.h fcntl.h limits.h signal.h stdarg.h sys/param.h \
  sys/resource.h sys/time.h sys/wait.h time.h unistd.h])

dnl Check for X11 installed
BM_LIBX11_REQUIRE

dnl Check for session management support
BM_LIBSM

dnl Check for _IceTransNoListen
ac_LIBS="$LIBS"
LIBS="$LIBS $LIBSM_LDFLAGS $LIBSM_LIBS"
AC_CHECK_FUNCS([_IceTransNoListen])
LIBS="$ac_LIBS"

dnl Check for i18n support
BM_I18N([xfce4-session], [ar az ca de es es_MX eu fa_IR fr hi it ja ko ms nl no
	 pl pt_BR sv ta tr zh_CN zh_TW])

dnl Check for required packages
BM_DEPEND([LIBXFCE4UTIL], [libxfce4util-1.0], [4.1.11])
BM_DEPEND([LIBXFCE4MCS_CLIENT], [libxfce4mcs-client-1.0], [4.1.0])
BM_DEPEND([LIBXFCEGUI4], [libxfcegui4-1.0], [4.1.0])

dnl Configure the MCS plugins
XFCE_MCS_PLUGIN([XFCE_MCS_MANAGER], [4.1.0])

dnl Check for gnome support
BM_DEPEND_CHECK([GNOME], [libgnome-2.0], [2.4.0], [gnome],
  [Gnome support], [yes])

dnl Check for debugging support
BM_DEBUG_SUPPORT

dnl check for sudo
AC_PATH_PROG([SUDO], [sudo])
if test x"$SUDO" != x""; then
  AC_DEFINE_UNQUOTED([SUDO_CMD], ["$SUDO"], [path to sudo])
fi

dnl Check for legacy session management
AC_ARG_ENABLE([legacy-sm],
AC_HELP_STRING([--enable-legacy-sm], [Enable X11R5 session management])
AC_HELP_STRING([--disable-legacy-sm], [Disable X11R5 session management]),
  [], [enable_legacy_sm=yes])
AC_MSG_CHECKING([whether to enable X11R5 session management])
if test x"$enable_legacy_sm" != x"yes"; then
  AC_MSG_RESULT([no])
else
  AC_DEFINE([LEGACY_SESSION_MANAGEMENT], [1], [Define for X11R5 sm compat])
  AC_MSG_RESULT([yes])
fi

dnl
dnl arguments to set shutdown commands
dnl

AC_MSG_CHECKING([for custom 'poweroff' command])
AC_ARG_WITH([poweroff],
	AC_HELP_STRING([--with-poweroff=cmd], [command used to power down (full path with arguments)]),
	[with_poweroff="$withval"],
	[with_poweroff="no"])
if test "x$with_poweroff" != "xno"; then
	AC_DEFINE_UNQUOTED(POWEROFF_CMD, "$with_poweroff", [poweroff command])
fi
AC_MSG_RESULT([$with_poweroff])

AC_MSG_CHECKING([for custom 'halt' command])
AC_ARG_WITH([halt],
	AC_HELP_STRING([--with-halt=cmd], [command used to halt (full path with arguments)]),
	[with_halt="$withval"],
	[with_halt="no"])
if test "x$with_halt" != "xno"; then
	AC_DEFINE_UNQUOTED(HALT_CMD, "$with_halt", [halt command])
fi
AC_MSG_RESULT([$with_halt])

AC_MSG_CHECKING([for custom 'reboot' command])
AC_ARG_WITH([reboot],
	AC_HELP_STRING([--with-reboot=cmd], [command used to reboot (full path with arguments)]),
	[with_reboot="$withval"],
	[with_reboot="no"])
if test "x$with_reboot" != "xno"; then
	AC_DEFINE_UNQUOTED(REBOOT_CMD, "$with_reboot", [reboot command])
fi
AC_MSG_RESULT([$with_reboot])

AC_OUTPUT([
Makefile
xfce4-session.spec
defaults/Makefile
docs/Makefile
po/Makefile.in
settings/Makefile
themes/Makefile
themes/Default/Makefile
xfce4-session/Makefile
xfsm-shutdown-helper/Makefile
])