summaryrefslogtreecommitdiff
path: root/configure.ac
blob: cc57ba612aed6f813629e8f63e5f0072b11626a0 (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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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], [12])
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([getaddrinfo gethostbyname gethostname sigaction strdup sync])
AC_CHECK_HEADERS([errno.h fcntl.h limits.h netdb.h signal.h stdarg.h \
  sys/param.h sys/resource.h sys/socket.h sys/time.h sys/wait.h sys/utsname.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 lt
                          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.24])

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 iceauth
AC_PATH_PROG([ICEAUTH], [iceauth])
if test x"$ICEAUTH" != x""; then
  AC_DEFINE_UNQUOTED([ICEAUTH_CMD], ["$ICEAUTH"], [path to iceauth])
else
  AC_MSG_ERROR([iceauth missing, please check your X11 installation])
fi

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 rm
AC_PATH_PROG([RM], [rm])
if test x"$RM" != x""; then
  AC_DEFINE_UNQUOTED([RM_CMD], ["$RM"], [path to rm])
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 Check whether to create session screenshots
AC_ARG_ENABLE([session-screenshots],
AC_HELP_STRING([--enable-session-screenshots], [Create screenshots of sessions on logout]),
  [], [enable_session_screenshots=no])
AC_MSG_CHECKING([whether to create screenshots of sessions on logout])
if test x"$enable_session_screenshots" != x"yes"; then
  AC_MSG_RESULT([no])
else
  AC_DEFINE([SESSION_SCREENSHOTS], [1], [Define for session screenshots])
  AC_MSG_RESULT([yes])
fi

dnl Check for shutdown method
AC_ARG_WITH([shutdown-style],
AC_HELP_STRING([--with-shutdown-style=auto/none/redhat/sudo], [Shutdown style]),
  [with_shutdown=$withval], [with_shutdown=auto])
AC_MSG_CHECKING([what shutdown style should be used])
if test x"$with_shutdown" != x"redhat" -a x"$with_shutdown" != x"sudo" -a x"$with_shutdown" != x"none"; then
  if test -d "/var/lock/console" -o -d "/var/run/console"; then
    with_shutdown="redhat"
  elif test x"$SUDO" != x""; then
    with_shutdown="sudo"
  else
    with_shutdown="none"
  fi
fi
AC_DEFINE_UNQUOTED([XFSM_SHUTDOWN_HELPER_IMPL_C],
                   [<xfce4-session/xfsm-shutdown-helper-$with_shutdown.c>],
                   [Shutdown helper implementation])
AC_MSG_RESULT([$with_shutdown])

dnl
dnl arguments to set shutdown commands
dnl

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

AC_OUTPUT([
Makefile
xfce4-session.spec
docs/Makefile
engines/Makefile
engines/balou/Makefile
engines/balou/scripts/Makefile
engines/balou/themes/Makefile
engines/balou/themes/Default/Makefile
engines/mice/Makefile
engines/simple/Makefile
icons/Makefile
icons/48x48/Makefile
icons/64x64/Makefile
icons/72x72/Makefile
icons/128x128/Makefile
po/Makefile.in
settings/Makefile
settings/session/Makefile
settings/splash/Makefile
xfce4-session/Makefile
xfce4-session/xfce4-session-1.0.pc
xfsm-shutdown-helper/Makefile
])