1dnl
2dnl This file was autogenerated from "configure.ac.in".
3dnl Edit that file instead!
4dnl
5
6dnl
7dnl Copyright (c) 2003-2019
8dnl         The Xfce development team. All rights reserved.
9dnl
10dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11dnl
12
13dnl Version information
14m4_define([xfsm_version_major], [4])
15m4_define([xfsm_version_minor], [16])
16m4_define([xfsm_version_micro], [0])
17m4_define([xfsm_version_nano], []) dnl leave this empty to have no nano version
18m4_define([xfsm_version_build], [939ce5ae])
19m4_define([xfsm_version_tag], [])
20m4_define([xfsm_version], [xfsm_version_major().xfsm_version_minor().xfsm_version_micro()ifelse(xfsm_version_nano(), [], [], [.xfsm_version_nano()])ifelse(xfsm_version_tag(), [git], [xfsm_version_tag()-xfsm_version_build()], [xfsm_version_tag()])])
21
22m4_define([xfsm_debug_default], [ifelse(xfsm_version_tag(), [git], [yes], [minimum])])
23m4_define([intltool_minimum_version], [0.35])
24
25dnl Initialize autoconf
26AC_COPYRIGHT([Copyright (c) 2003-2019
27        The Xfce development team. All rights reserved.
28
29Written for Xfce by Benedikt Meurer <benny@xfce.org>.])
30AC_INIT([xfce4-session], [xfsm_version], [https://bugzilla.xfce.org/])
31AC_PREREQ([2.60])
32AC_REVISION([$Id$])
33AC_PROG_MAKE_SET()
34
35dnl Initialize automake
36AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar no-dist-gzip foreign])
37AC_CONFIG_HEADERS([config.h])
38AC_CONFIG_MACRO_DIRS([m4])
39AM_MAINTAINER_MODE()
40AM_SILENT_RULES([yes])
41
42dnl Set helper path prefix
43AC_ARG_WITH([helper-path-prefix],
44            [AC_HELP_STRING([--with-helper-path-prefix=PATH],
45                            [Path prefix under which helper executables will be installed (default: $libdir)])],
46            [HELPER_PATH_PREFIX="$withval"],
47            [HELPER_PATH_PREFIX="$libdir"])
48AC_SUBST([HELPER_PATH_PREFIX])
49
50dnl check for UNIX variants
51AC_USE_SYSTEM_EXTENSIONS
52AM_CONDITIONAL([HAVE_OS_CYGWIN], [test x"`uname | grep \"CYGWIN\"`" != x""])
53if test x"`uname | grep \"CYGWIN\"`" != x""; then
54	AC_DEFINE([HAVE_OS_CYGWIN], [1], [Compiling under cygwin])
55fi
56
57dnl check for basic programs
58AC_PROG_AWK
59AC_PROG_CC
60AC_PROG_INSTALL
61AC_PROG_LN_S
62AC_PROG_MAKE_SET
63AC_PROG_MKDIR_P
64IT_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
65m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_CHECK_PROG(SED, sed, sed)])
66
67dnl check for libtool
68LT_PREREQ([2.2.6])
69LT_INIT([disable-static])
70
71dnl check for standard header files
72AC_HEADER_STDC
73AC_CHECK_HEADERS([errno.h fcntl.h \
74                  netdb.h signal.h stdarg.h sys/resource.h \
75                  sys/socket.h sys/time.h sys/wait.h sys/utsname.h time.h \
76                  unistd.h math.h sys/types.h])
77AC_CHECK_FUNCS([getaddrinfo gethostbyname gethostname setsid strdup])
78
79# Checks for typedefs, structures, and compiler characteristics.
80AC_C_INLINE
81AC_TYPE_MODE_T
82AC_TYPE_PID_T
83AC_TYPE_SIZE_T
84
85# Checks for library functions.
86AC_FUNC_MALLOC
87
88dnl Check for required libraries
89AC_CHECK_LIBM
90AC_SUBST(LIBM)
91
92dnl Check for X11 installed
93XDT_CHECK_LIBX11_REQUIRE()
94
95dnl Check for session management support
96XDT_CHECK_LIBSM()
97
98dnl Check for _IceTransNoListen
99ac_LIBS="$LIBS"
100LIBS="$LIBS $LIBSM_LDFLAGS $LIBSM_LIBS"
101AC_CHECK_FUNCS([_IceTransNoListen])
102LIBS="$ac_LIBS"
103
104dnl Check for i18n support
105XDT_I18N([eo en_GB ca zh_CN nb tr en_CA en_AU fr eu gl be zh_TW th sr fi pl ast it he et pt_BR de sl pa zh_HK nl hy_AM hi ja hu nn si ar ko es kk ur sk am te hr sq pt cs is be@tarask uk hye bn ur_PK id vi da ug lv el sv ru ie lt ms ro bg oc ])
106
107dnl Check for required packages
108XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.15.2])
109XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.15.1])
110XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0])
111XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.50.0])
112XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.50.0])
113XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-3.0], [3.10])
114XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
115
116dnl Check for Polkit/PolicyKit
117XDT_CHECK_OPTIONAL_PACKAGE([POLKIT], [polkit-gobject-1], [0.102],
118                           [polkit], [Polkit support])
119
120AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_50, [Ignore post 2.50 deprecations])
121AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_50, [Prevent post 2.50 APIs])
122
123AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_20, [Ignore post 3.20 deprecations])
124AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_20, [Prevent post 3.20 APIs])
125
126dnl Check for debugging support
127XDT_FEATURE_DEBUG([xfsm_debug_default])
128
129dnl Check for linker optimizations
130XDT_FEATURE_LINKER_OPTS()
131
132dnl Check for iceauth
133AC_PATH_PROG([ICEAUTH], [iceauth])
134if test x"$ICEAUTH" != x""; then
135  AC_DEFINE_UNQUOTED([ICEAUTH_CMD], ["$ICEAUTH"], [path to iceauth])
136else
137  AC_MSG_ERROR([iceauth missing, please check your X11 installation])
138fi
139
140dnl Find a location for the session desktop file
141AC_MSG_CHECKING([what xsession-prefix to use])
142AC_ARG_WITH([xsession-prefix],
143            AC_HELP_STRING([--with-xsession-prefix=XSESSION_PREFIX], [What should be the prefix for the xsession .desktop file?]),
144  [], [with_xsession_prefix="/usr"])
145XSESSION_PREFIX=$with_xsession_prefix
146AC_SUBST([XSESSION_PREFIX])
147AC_MSG_RESULT([$with_xsession_prefix])
148
149dnl Check for legacy session management
150AC_ARG_ENABLE([legacy-sm],
151AC_HELP_STRING([--enable-legacy-sm], [Enable X11R5 session management])
152AC_HELP_STRING([--disable-legacy-sm], [Disable X11R5 session management]),
153  [], [enable_legacy_sm=yes])
154AC_MSG_CHECKING([whether to enable X11R5 session management])
155if test x"$enable_legacy_sm" != x"yes"; then
156  AC_MSG_RESULT([no])
157else
158  AC_DEFINE([LEGACY_SESSION_MANAGEMENT], [1], [Define for X11R5 sm compat])
159  AC_MSG_RESULT([yes])
160fi
161
162dnl Compile time default choice of backend
163AC_ARG_WITH([backend],
164	    AS_HELP_STRING([--with-backend=<option>],
165			   [Default backend to use linux, freebsd, openbsd]))
166# default to a sane option
167AC_CANONICAL_HOST
168if test x$with_backend = x; then
169	AS_CASE([$host],
170		[*-linux*],   [with_backend=linux],
171		[*-*freebsd*], [with_backend=freebsd],
172		[*-*dragonfly*], [with_backend=freebsd],
173		[*-openbsd*], [with_backend=openbsd])
174fi
175AC_DEFINE_UNQUOTED(BACKEND, "$with_backend", [backend])
176AC_SUBST(BACKEND, "$with_backend")
177
178if test x$with_backend = xlinux; then
179    AC_DEFINE(BACKEND_TYPE_LINUX, 1, [Linux suspend/hibernate/hybrid-sleep backend])
180fi
181if test x$with_backend = xfreebsd; then
182    AC_DEFINE(BACKEND_TYPE_FREEBSD, 1, [FreeBSD suspend/hibernate backend])
183fi
184if test x$with_backend = xopenbsd; then
185    AC_DEFINE(BACKEND_TYPE_OPENBSD, 1, [OpenBSD suspend/hibernate backend])
186fi
187
188AC_CONFIG_FILES([
189Makefile
190doc/Makefile
191icons/Makefile
192icons/16x16/Makefile
193icons/24x24/Makefile
194icons/24x24-actions/Makefile
195icons/32x32/Makefile
196icons/48x48-actions/Makefile
197icons/48x48/Makefile
198icons/128x128/Makefile
199icons/scalable/Makefile
200libxfsm/Makefile
201po/Makefile.in
202settings/Makefile
203scripts/Makefile
204scripts/xinitrc.in
205xfce4-session/Makefile
206xfce4-session-logout/Makefile
207xfsm-shutdown-helper/Makefile
208])
209AC_OUTPUT
210
211dnl ***************************
212dnl *** Print configuration ***
213dnl ***************************
214echo
215echo "Build Configuration:"
216echo
217echo " * Debugging support:              $enable_debug"
218if test x"$POLKIT_FOUND" = x"yes"; then
219echo " * Polkit/PolicyKit support:       yes"
220else
221echo " * Polkit/PolicyKit support:       no"
222fi
223if test x"$enable_legacy_sm" = x"yes"; then
224echo " * Legacy session management:      yes"
225else
226echo " * Legacy session management:      no"
227fi
228echo " * Backend:                        ${with_backend}"
229
230echo
231