4
AC_INIT([gnome-screensaver],
6
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-screensaver])
8
AC_CONFIG_SRCDIR(src/gnome-screensaver.c)
10
AM_INIT_AUTOMAKE([1.10 no-dist-gzip dist-xz tar-ustar])
11
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
13
AM_CONFIG_HEADER(config.h)
15
AM_MAINTAINER_MODE([enable])
17
IT_PROG_INTLTOOL([0.35.0])
29
# Save flags to aclocal
30
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
32
GETTEXT_PACKAGE=gnome-screensaver
33
AC_SUBST(GETTEXT_PACKAGE)
34
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
41
DBUS_REQUIRED_VERSION=0.30
42
GLIB_REQUIRED_VERSION=2.25.6
43
GTK_REQUIRED_VERSION=2.99.3
44
X11_REQUIRED_VERSION=1.0
45
GNOME_DESKTOP_REQUIRED_VERSION=3.1.91
46
GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION=0.1.7
48
LIBGNOMEKBDUI_REQUIRED_VERSION=0.1
50
AC_CHECK_HEADERS(unistd.h)
51
AC_CHECK_HEADERS(crypt.h sys/select.h)
52
AC_CHECK_FUNCS(select fcntl uname nice setpriority getcwd getwd putenv sbrk)
53
AC_CHECK_FUNCS(sigaction syslog realpath setrlimit)
54
AC_CHECK_FUNCS(getresuid)
57
AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv])
58
PKG_CHECK_MODULES(GNOME_SCREENSAVER,
59
x11 >= $X11_REQUIRED_VERSION
60
gtk+-3.0 >= $GTK_REQUIRED_VERSION
61
dbus-glib-1 >= $DBUS_REQUIRED_VERSION
62
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
63
gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION)
64
AC_SUBST(GNOME_SCREENSAVER_CFLAGS)
65
AC_SUBST(GNOME_SCREENSAVER_LIBS)
67
PKG_CHECK_MODULES(GNOME_SCREENSAVER_DIALOG,
69
gtk+-3.0 >= $GTK_REQUIRED_VERSION)
70
AC_SUBST(GNOME_SCREENSAVER_DIALOG_CFLAGS)
71
AC_SUBST(GNOME_SCREENSAVER_DIALOG_LIBS)
73
PKG_CHECK_MODULES(GNOME_SCREENSAVER_CAPPLET,
74
gio-2.0 >= $GLIB_REQUIRED_VERSION
75
gtk+-3.0 >= $GTK_REQUIRED_VERSION
76
gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION)
77
AC_SUBST(GNOME_SCREENSAVER_CAPPLET_CFLAGS)
78
AC_SUBST(GNOME_SCREENSAVER_CAPPLET_LIBS)
80
PKG_CHECK_MODULES(GNOME_SCREENSAVER_COMMAND,
81
gio-2.0 >= $GLIB_REQUIRED_VERSION
82
gobject-2.0 >= $GLIB_REQUIRED_VERSION)
83
AC_SUBST(GNOME_SCREENSAVER_COMMAND_CFLAGS)
84
AC_SUBST(GNOME_SCREENSAVER_COMMAND_LIBS)
88
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS"
89
SAVER_LIBS="$ALL_X_LIBS"
91
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
93
GNOME_COMPILE_WARNINGS(yes)
95
# Optional dependencies for the theme engines
97
SAVER_MODULES="gthread-2.0 gtk+-3.0 >= $GTK_REQUIRED_VERSION"
99
PKG_CHECK_MODULES(GNOME_SCREENSAVER_SAVER, $SAVER_MODULES)
100
AC_SUBST(GNOME_SCREENSAVER_SAVER_CFLAGS)
101
AC_SUBST(GNOME_SCREENSAVER_SAVER_LIBS)
103
# Find out the version of DBUS we're using
105
dbus_version=`pkg-config --modversion dbus-1`
106
DBUS_VERSION_MAJOR=`echo $dbus_version | awk -F. '{print $1}'`
107
DBUS_VERSION_MINOR=`echo $dbus_version | awk -F. '{print $2}'`
108
DBUS_VERSION_MICRO=`echo $dbus_version | awk -F. '{print $3}'`
109
if test "z$DBUS_VERSION_MAJOR" = "z"; then
110
DBUS_VERSION_MAJOR="0"
112
if test "z$DBUS_VERSION_MINOR" = "z"; then
113
DBUS_VERSION_MINOR="0"
115
if test "z$DBUS_VERSION_MICRO" = "z"; then
116
DBUS_VERSION_MICRO="0"
119
if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then echo "Error: Couldn't determine the version of your DBUS package."
120
echo " This is probably an error in this script, please report it"
121
echo " along with the following information:"
122
echo " Base DBUS version ='$dbus_version'"
123
echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
124
echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
125
echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
129
echo "Your dbus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
130
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
131
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
132
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
134
AC_SUBST(DBUS_CFLAGS)
137
# Find out where the session service file goes
138
# The sad sed hack is recomended by section 27.10 of the automake manual.
139
DBUS_SESSION_SERVICE_DIR=`pkg-config --variable session_bus_services_dir dbus-1 | sed -e 's,/usr/share,${datarootdir},g'`
140
AC_SUBST(DBUS_SESSION_SERVICE_DIR)
142
dnl ---------------------------------------------------------------------------
143
dnl - Where should we put documentation ?
144
dnl ---------------------------------------------------------------------------
146
[AC_HELP_STRING([--with-doc-dir=<dir>],
147
[directory to install documentation])])
148
if ! test -z "$with_doc_dir"; then
149
DOCDIR="$with_doc_dir/gnome-screensaver-$VERSION"
151
DOCDIR="$datadir/doc/gnome-screensaver-$VERSION"
155
dnl ---------------------------------------------------------------------------
156
dnl - DocBook Documentation
157
dnl ---------------------------------------------------------------------------
158
AC_ARG_ENABLE(docbook-docs, [ --enable-docbook-docs build documentation (requires xmlto)],enable_docbook_docs=$enableval,enable_docbook_docs=no)
159
AC_PATH_PROG(XMLTO, xmlto, no)
160
AC_MSG_CHECKING([whether to build DocBook documentation])
161
if test x$XMLTO = xno ; then
166
if test x$enable_docbook_docs = xauto ; then
167
if test x$have_docbook = xno ; then
168
enable_docbook_docs=no
170
enable_docbook_docs=yes
173
if test x$enable_docbook_docs = xyes; then
174
if test x$have_docbook = xno; then
175
AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found])
178
AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
181
dnl ---------------------------------------------------------------------------
182
dnl - Some utility functions to make checking for X things easier.
183
dnl ---------------------------------------------------------------------------
185
# Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
187
AC_DEFUN([AC_CHECK_X_HEADER], [
188
ac_save_CPPFLAGS="$CPPFLAGS"
189
if test \! -z "$includedir" ; then
190
CPPFLAGS="$CPPFLAGS -I$includedir"
192
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
193
AC_CHECK_HEADER([$1],[$2],[$3],[$4])
194
CPPFLAGS="$ac_save_CPPFLAGS"])
196
# Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
198
AC_DEFUN([AC_TRY_X_COMPILE], [
199
ac_save_CPPFLAGS="$CPPFLAGS"
200
if test \! -z "$includedir" ; then
201
CPPFLAGS="$CPPFLAGS -I$includedir"
203
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
204
AC_TRY_COMPILE([$1], [$2], [$3], [$4])
205
CPPFLAGS="$ac_save_CPPFLAGS"])
208
# Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
209
# Use this sparingly; it probably doesn't work very well on X programs.
211
AC_DEFUN([AC_CHECK_X_LIB], [
212
ac_save_CPPFLAGS="$CPPFLAGS"
213
ac_save_LDFLAGS="$LDFLAGS"
214
# ac_save_LIBS="$LIBS"
216
if test \! -z "$includedir" ; then
217
CPPFLAGS="$CPPFLAGS -I$includedir"
219
# note: $X_CFLAGS includes $x_includes
220
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
222
if test \! -z "$libdir" ; then
223
LDFLAGS="$LDFLAGS -L$libdir"
225
# note: $X_LIBS includes $x_libraries
226
LDFLAGS="$LDFLAGS $ALL_X_LIBS"
228
AC_CHECK_LIB([$1], [$2], [$3], [$4], [$5])
229
CPPFLAGS="$ac_save_CPPFLAGS"
230
LDFLAGS="$ac_save_LDFLAGS"
231
# LIBS="$ac_save_LIBS"
235
# Usage: HANDLE_X_PATH_ARG([variable_name],
236
# [--command-line-option],
237
# [descriptive string])
239
# All of the --with options take three forms:
241
# --with-foo (or --with-foo=yes)
242
# --without-foo (or --with-foo=no)
245
# This function, HANDLE_X_PATH_ARG, deals with the /DIR case. When it sees
246
# a directory (string beginning with a slash) it checks to see whether
247
# /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
250
AC_DEFUN([HANDLE_X_PATH_ARG], [
256
AC_MSG_CHECKING([for [$3] headers])
259
X_CFLAGS="-I$d $X_CFLAGS"
262
AC_MSG_RESULT(not found ($d: no such directory))
265
AC_MSG_CHECKING([for [$3] libs])
268
X_LIBS="-L$d $X_LIBS"
271
AC_MSG_RESULT(not found ($d: no such directory))
274
# replace the directory string with "yes".
281
echo "error: argument to [$2] must be \"yes\", \"no\", or a directory."
282
echo " If it is a directory, then \`DIR/include' will be added to"
283
echo " the -I list, and \`DIR/lib' will be added to the -L list."
289
dnl ---------------------------------------------------------------------------
290
dnl - Check for shaped window extension
291
dnl ---------------------------------------------------------------------------
294
AC_CHECK_X_HEADER(X11/extensions/shape.h, [have_shape=yes],,
295
[#include <X11/Xlib.h>])
296
if test "$have_shape" = yes; then
297
AC_DEFINE(HAVE_SHAPE_EXT, 1, [Define if shape extension is available])
300
dnl ---------------------------------------------------------------------------
301
dnl - Check for the MIT-SCREEN-SAVER server extension.
302
dnl ---------------------------------------------------------------------------
305
with_mit_req=unspecified
307
[ --with-mit-ext Include support for the MIT-SCREEN-SAVER extension.],
308
[with_mit="$withval"; with_mit_req="$withval"],[with_mit=yes])
310
HANDLE_X_PATH_ARG(with_mit, --with-mit-ext, MIT-SCREEN-SAVER)
312
if test "$with_mit" = yes; then
313
AC_CHECK_X_HEADER(X11/extensions/scrnsaver.h, [have_mit=yes],,
314
[#include <X11/Xlib.h>])
316
# Now check to see if it's really in the library; XF86Free-3.3 ships
317
# scrnsaver.h, but doesn't include the code in libXext.a
318
if test "$have_mit" = yes; then
319
AC_CHECK_X_LIB(Xext, XScreenSaverRegister, [true], [have_mit=no], -lm)
321
if test "$have_mit" = no; then
322
# Looks like XF86Free-3.3 actually puts it in XExExt instead
324
AC_CHECK_X_LIB(XExExt, XScreenSaverRegister,
325
[have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"],
326
[true], -lX11 -lXext -lm)
329
if test "$have_mit" = no; then
330
# Looks like some versions of XFree86 (whichever version
331
# it is that comes with RedHat Linux 2.0 -- I can't find a version
332
# number) put this in Xss instead of Xext.
333
AC_CHECK_X_LIB(Xss, XScreenSaverRegister,
334
[have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"],
335
[true], -lX11 -lXext -lm)
338
if test "$have_mit" = yes; then
339
AC_DEFINE(HAVE_MIT_SAVER_EXTENSION, 1, [Define if the MIT screensaver extension is available])
344
elif test "$with_mit" != no; then
345
echo "error: must be yes or no: --with-mit-ext=$with_mit"
349
dnl ---------------------------------------------------------------------------
350
dnl - Check for the XF86VMODE server extension (for gamma fading.)
351
dnl ---------------------------------------------------------------------------
355
have_xf86gamma_ramp=no
356
with_xf86gamma_req=unspecified
357
AC_ARG_WITH(xf86gamma-ext,
358
[ --with-xf86gamma-ext Include support for XFree86 gamma fading.],
359
[with_xf86gamma="$withval"; with_xf86gamma_req="$withval"],
360
[with_xf86gamma=yes])
362
HANDLE_X_PATH_ARG(with_xf86gamma, --with-xf86gamma-ext, xf86gamma)
364
if test "$with_xf86gamma" = yes; then
366
# first check for xf86vmode.h, if we haven't already
367
if test "$have_xf86vmode" = yes; then
370
AC_CHECK_X_HEADER(X11/extensions/xf86vmode.h, [have_xf86gamma=yes],,
371
[#include <X11/Xlib.h>])
374
# if that succeeded, then check for the -lXxf86vm
375
if test "$have_xf86gamma" = yes; then
377
AC_CHECK_X_LIB(Xxf86vm, XF86VidModeSetGamma,
378
[have_xf86gamma=yes],
379
[true], -lXext -lX11)
382
# check for the Ramp versions of the functions too.
383
if test "$have_xf86gamma" = yes; then
384
have_xf86gamma_ramp=no
385
AC_CHECK_X_LIB(Xxf86vm, XF86VidModeSetGammaRamp,
386
[have_xf86gamma_ramp=yes],
387
[true], -lXext -lX11)
390
# if those tests succeeded, then we've really got the functions.
391
if test "$have_xf86gamma" = yes; then
392
AC_DEFINE(HAVE_XF86VMODE_GAMMA, 1, [Define if XF86VMODE Gamma is available])
395
if test "$have_xf86gamma_ramp" = yes; then
396
AC_DEFINE(HAVE_XF86VMODE_GAMMA_RAMP, 1, [Define if XF86VMODE Gamma Ramp is available])
399
# pull in the lib, if we haven't already
400
if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
401
SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
404
elif test "$with_xf86gamma" != no; then
405
echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
409
dnl ---------------------------------------------------------------------------
410
dnl - Check for XF86MiscSetGrabKeysState (but only bother if we are already
411
dnl - using other XF86 stuff.)
412
dnl ---------------------------------------------------------------------------
415
have_xf86miscsetgrabkeysstate=no
416
if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
417
AC_CHECK_X_LIB(Xxf86misc, XF86MiscSetGrabKeysState,
418
[have_xf86miscsetgrabkeysstate=yes],
419
[true], -lXext -lX11)
420
if test "$have_xf86miscsetgrabkeysstate" = yes ; then
421
SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
422
AC_DEFINE(HAVE_XF86MISCSETGRABKEYSSTATE, , [Define this if you have the XF86MiscSetGrabKeysState function])
426
dnl ---------------------------------------------------------------------------
427
dnl - The --enable-locking option
428
dnl ---------------------------------------------------------------------------
430
AC_ARG_ENABLE(locking,[
431
Screen locking options:
433
--enable-locking Compile in support for locking the display.
434
--disable-locking Do not allow locking at all.],
435
[enable_locking="$enableval"],[enable_locking=yes])
436
if test "$enable_locking" = yes; then
438
elif test "$enable_locking" = no; then
439
AC_DEFINE(NO_LOCKING, 1, [Define if screen locking support is disabled])
441
echo "error: must be yes or no: --enable-locking=$enable_locking"
445
# We can't lock on MacOS X, so don't compile in support for it.
447
if test "$ac_macosx" = yes; then
448
if test "$enable_locking" = yes; then
449
AC_MSG_RESULT(locking disabled: it doesn't work on MacOS X)
451
AC_DEFINE(NO_LOCKING, 1, [Define if screen locking support is disabled])
455
dnl ---------------------------------------------------------------------------
456
dnl - Check for bsd_auth(3) (OpenBSD)
457
dnl ---------------------------------------------------------------------------
460
with_bsdauth_req=unspecified
468
if test "x$enable_locking" = "xyes"; then
474
if test "$with_bsdauth" = yes ; then
475
AC_CACHE_CHECK([for BSD Authentication], ac_cv_bsdauth,
476
[AC_TRY_X_COMPILE([#include <stdlib.h>
478
#include <sys/types.h>
479
#include <bsd_auth.h>],
480
[int ok = auth_userokay("x", 0, "x", "x");],
482
[ac_cv_bsdauth=no])])
483
if test "$ac_cv_bsdauth" = yes; then
488
if test "$have_bsdauth" = yes; then
489
AC_DEFINE(HAVE_BSDAUTH, 1, [Define to 1 if using bsd_auth(3) authentication])
492
AC_SUBST(NEED_SETUID)
494
dnl ---------------------------------------------------------------------------
496
dnl ---------------------------------------------------------------------------
499
AC_ARG_WITH(pam-prefix,
500
AS_HELP_STRING([--with-pam-prefix=<prefix>],
501
[specify where pam files go]),
502
[if test x$withval != x; then
503
AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.")
506
if test x$withval != x; then
507
PAM_PREFIX="$withval"
509
PAM_PREFIX='${sysconfdir}'
514
if test "x$enable_locking" = "xyes" -a "x$have_bsdauth" = "xno"; then
515
AC_CHECK_LIB(pam, pam_start, have_pam=yes)
518
if test "x$have_pam" = "xyes"; then
519
AUTH_LIBS="${AUTH_LIBS} -lpam"
521
# On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
523
AC_CHECK_LIB(c, sigtimedwait, [have_timedwait=yes])
524
if test "$have_timedwait" = no ; then
525
AC_CHECK_LIB(rt, sigtimedwait, [AUTH_LIBS="${AUTH_LIBS} -lrt"])
528
AC_MSG_CHECKING(how to call pam_strerror)
529
AC_CACHE_VAL(ac_cv_pam_strerror_args,
530
[AC_TRY_COMPILE([#include <stdio.h>
532
#include <security/pam_appl.h>],
533
[pam_handle_t *pamh = 0;
534
char *s = pam_strerror(pamh, PAM_SUCCESS);],
535
[ac_pam_strerror_args=2],
536
[AC_TRY_COMPILE([#include <stdio.h>
538
#include <security/pam_appl.h>],
540
pam_strerror(PAM_SUCCESS);],
541
[ac_pam_strerror_args=1],
542
[ac_pam_strerror_args=0])])
543
ac_cv_pam_strerror_args=$ac_pam_strerror_args])
544
ac_pam_strerror_args=$ac_cv_pam_strerror_args
545
if test "$ac_pam_strerror_args" = 1 ; then
546
AC_MSG_RESULT(one argument)
547
elif test "$ac_pam_strerror_args" = 2 ; then
548
AC_DEFINE(PAM_STRERROR_TWO_ARGS, 1, [Define if pam_strerror takes two arguments])
549
AC_MSG_RESULT(two arguments)
551
AC_MSG_RESULT(unknown)
554
elif test "x$have_bsdauth" = "xno"; then
555
AC_MSG_ERROR("PAM libraries not found")
559
AC_SUBST(AUTH_SCHEME)
561
if test "x$have_pam" = "xyes"; then
562
AC_CHECK_HEADERS([security/pam_modutil.h security/pam_ext.h])
563
AC_CHECK_LIB(pam, pam_syslog, [AC_DEFINE(HAVE_PAM_SYSLOG, [], [Define to 1 if you have the pam_syslog function])])
566
dnl test whether struct pam_message is const (Linux) or not (Sun)
567
if test "x$have_pam" = "xyes"; then
568
pam_appl_h="$ac_pam_includes/security/pam_appl.h"
569
AC_MSG_CHECKING(for const pam_message)
570
AC_EGREP_HEADER([struct pam_message],
572
[ AC_EGREP_HEADER([const struct pam_message],
574
[AC_MSG_RESULT(["const: Linux-type PAM"]) ],
575
[AC_MSG_RESULT(["nonconst: Sun-type PAM"])
576
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
578
[AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])]
582
dnl ---------------------------------------------------------------------------
584
dnl ---------------------------------------------------------------------------
586
AC_ARG_WITH(console-kit,
587
AS_HELP_STRING([--with-console-kit],
588
[Add ConsoleKit support]),,
589
with_console_kit=auto)
592
if test "x$with_console_kit" != "xno" ; then
594
AC_DEFINE(WITH_CONSOLE_KIT, 1, [ConsoleKit support])
596
AM_CONDITIONAL(WITH_CONSOLE_KIT, test x$use_console_kit = xyes)
597
AC_SUBST(WITH_CONSOLE_KIT)
599
dnl ---------------------------------------------------------------------------
601
dnl ---------------------------------------------------------------------------
604
AS_HELP_STRING([--with-systemd],
605
[Add systemd support]),
606
[with_systemd=$withval], [with_systemd=auto])
608
PKG_CHECK_MODULES(SYSTEMD,
610
[have_systemd=yes], [have_systemd=no])
612
if test "x$with_systemd" = "xauto" ; then
613
if test x$have_systemd = xno ; then
619
use_systemd=$with_systemd
622
if test "x$use_systemd" = "xyes"; then
623
if test "x$have_systemd" = "xno"; then
624
AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
627
AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
629
AC_SUBST(SYSTEMD_CFLAGS)
630
AC_SUBST(SYSTEMD_LIBS)
632
dnl ---------------------------------------------------------------------------
634
dnl ---------------------------------------------------------------------------
636
have_libgnomekbdui=no
637
AC_ARG_WITH(kbd-layout-indicator,[ --without-kbd-layout-indicator disable keyboard layout indicator],
638
[with_kbd_layout_indicator="$withval"],[with_kbd_layout_indicator=yes])
639
if test x$with_kbd_layout_indicator != xno; then
640
PKG_CHECK_MODULES(LIBGNOMEKBDUI, libgnomekbdui >= $LIBGNOMEKBDUI_REQUIRED_VERSION libxklavier, have_libgnomekbdui=yes, have_libgnomekbdui=no)
642
if test "x$have_libgnomekbdui" = "xyes"; then
643
AC_SUBST(LIBGNOMEKBDUI_CFLAGS)
644
AC_SUBST(LIBGNOMEKBDUI_LIBS)
645
AC_DEFINE(WITH_KBD_LAYOUT_INDICATOR, 1, [Define if keyboard layout indicator should be built])
648
dnl ---------------------------------------------------------------------------
650
dnl ---------------------------------------------------------------------------
657
if test "x$prefix" = "xNONE"; then
658
REAL_PREFIX=$ac_default_prefix
663
## temporarily change prefix and exec_prefix
667
if test "x$exec_prefix" = xNONE ; then
668
REAL_EXEC_PREFIX=$REAL_PREFIX
670
REAL_EXEC_PREFIX=$exec_prefix
672
old_exec_prefix=$exec_prefix
673
exec_prefix=$REAL_EXEC_PREFIX
676
LOCALSTATEDIR_TMP="$localstatedir"
677
EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
678
AC_SUBST(EXPANDED_LOCALSTATEDIR)
680
SYSCONFDIR_TMP="$sysconfdir"
681
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
682
AC_SUBST(EXPANDED_SYSCONFDIR)
685
EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
686
AC_SUBST(EXPANDED_BINDIR)
689
EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
690
AC_SUBST(EXPANDED_LIBDIR)
692
DATADIR_TMP="$datadir"
693
EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
694
AC_SUBST(EXPANDED_DATADIR)
696
## put prefix and exec_prefix back
698
exec_prefix=$old_exec_prefix
700
# Turn on the additional warnings last, so -Werror doesn't affect other tests.
702
AC_ARG_ENABLE(more-warnings,
703
AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
704
set_more_warnings="$enableval",[
705
if test -d $srcdir/.git; then
707
set_more_warnings=yes
712
AC_MSG_CHECKING(for more warnings)
713
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
717
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
718
-Wnested-externs -Wpointer-arith \
719
-Wcast-align -Wsign-compare \
722
for option in -Wno-strict-aliasing -Wno-sign-compare; do
723
SAVE_CFLAGS="$CFLAGS"
724
CFLAGS="$CFLAGS $option"
725
AC_MSG_CHECKING([whether gcc understands $option])
726
AC_TRY_COMPILE([], [],
729
if test $has_option = no; then
730
CFLAGS="$SAVE_CFLAGS"
732
AC_MSG_RESULT($has_option)
744
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug=[no/yes]], [turn on debugging])],, enable_debug=yes)
745
if test "$enable_debug" = "yes"; then
746
DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
748
if test "x$enable_debug" = "xno"; then
749
DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
754
AC_SUBST(DEBUG_CFLAGS)
768
src/gnome-screensaver.desktop.in
770
data/org.gnome.ScreenSaver.service
772
doc/gnome-screensaver.xml
776
gnome-screensaver $VERSION
777
========================
780
exec_prefix: ${exec_prefix}
781
libdir: ${EXPANDED_LIBDIR}
782
bindir: ${EXPANDED_BINDIR}
783
sysconfdir: ${EXPANDED_SYSCONFDIR}
784
localstatedir: ${EXPANDED_LOCALSTATEDIR}
785
datadir: ${EXPANDED_DATADIR}
786
source code location: ${srcdir}
789
Base libs: ${GNOME_SCREENSAVER_LIBS}
790
Extension libs: ${SAVER_LIBS}
791
Maintainer mode: ${USE_MAINTAINER_MODE}
792
Docs enabled: ${enable_docbook_docs}
794
Screen locking enabled: ${enable_locking}
795
Show keyboard indicator: ${with_kbd_layout_indicator}
797
systemd: ${use_systemd}
798
ConsoleKit: ${use_console_kit}
801
if test "x$have_pam" = "xyes" ; then
803
PAM prefix: ${PAM_PREFIX}