1dnl -*- mode: m4 -*-
2
3AC_PREREQ(2.60)
4AC_INIT([mate-screensaver],
5        [1.26.1],
6        [https://mate-desktop.org/])
7
8AC_CONFIG_SRCDIR(src/mate-screensaver.c)
9AC_CONFIG_MACRO_DIR([m4])
10
11AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz check-news])
12m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
13
14AC_CONFIG_HEADERS(config.h)
15
16AM_MAINTAINER_MODE
17MATE_DEBUG_CHECK([no])
18MATE_COMPILE_WARNINGS
19
20AC_PROG_CC
21AM_PROG_CC_C_O
22AC_STDC_HEADERS
23AC_PROG_LIBTOOL
24AC_CANONICAL_HOST
25
26AC_HEADER_STDC
27
28AC_SUBST(VERSION)
29
30# Save flags to aclocal
31ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
32
33AM_GNU_GETTEXT_VERSION([0.19.8])
34AM_GNU_GETTEXT([external])
35
36GETTEXT_PACKAGE=mate-screensaver
37AC_SUBST(GETTEXT_PACKAGE)
38AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
39
40dnl
41dnl Enable gsettings schema macros
42dnl
43
44GLIB_GSETTINGS
45
46# Dependencies
47
48DBUS_REQUIRED_VERSION=0.30
49GLIB_REQUIRED_VERSION=2.58.0
50GTK_REQUIRED_VERSION=3.22.0
51X11_REQUIRED_VERSION=1.0
52LIBMATE_MENU_REQUIRED_VERSION=1.21.0
53MATE_DESKTOP_REQUIRED_VERSION=1.17.0
54LIBMATEKBDUI_REQUIRED_VERSION=1.17.0
55
56AC_CHECK_HEADERS(unistd.h)
57AC_CHECK_HEADERS(crypt.h sys/select.h)
58AC_CHECK_FUNCS(select fcntl uname nice setpriority getcwd getwd putenv sbrk)
59AC_CHECK_FUNCS(sigaction syslog realpath setrlimit)
60AC_CHECK_FUNCS(getresuid)
61AC_TYPE_UID_T
62
63AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv])
64PKG_CHECK_MODULES(MATE_SCREENSAVER,
65        x11 >= $X11_REQUIRED_VERSION
66        xscrnsaver
67        gtk+-3.0 >= $GTK_REQUIRED_VERSION
68        dbus-glib-1 >= $DBUS_REQUIRED_VERSION
69        gio-2.0 >= $GLIB_REQUIRED_VERSION
70        mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION
71        libmate-menu >= $LIBMATE_MENU_REQUIRED_VERSION)
72AC_SUBST(MATE_SCREENSAVER_CFLAGS)
73AC_SUBST(MATE_SCREENSAVER_LIBS)
74
75PKG_CHECK_MODULES(MATE_SCREENSAVER_DIALOG,
76        gio-2.0 >= $GLIB_REQUIRED_VERSION
77        gthread-2.0
78        gtk+-3.0 >= $GTK_REQUIRED_VERSION
79        mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION)
80AC_SUBST(MATE_SCREENSAVER_DIALOG_CFLAGS)
81AC_SUBST(MATE_SCREENSAVER_DIALOG_LIBS)
82
83PKG_CHECK_MODULES(MATE_SCREENSAVER_CAPPLET,
84        gio-2.0 >= $GLIB_REQUIRED_VERSION
85        gtk+-3.0 >= $GTK_REQUIRED_VERSION
86        mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION
87        libmate-menu >= $LIBMATE_MENU_REQUIRED_VERSION)
88AC_SUBST(MATE_SCREENSAVER_CAPPLET_CFLAGS)
89AC_SUBST(MATE_SCREENSAVER_CAPPLET_LIBS)
90
91PKG_CHECK_MODULES(MATE_SCREENSAVER_COMMAND,
92        gobject-2.0 >= $GLIB_REQUIRED_VERSION
93        dbus-glib-1 >= $DBUS_REQUIRED_VERSION)
94AC_SUBST(MATE_SCREENSAVER_COMMAND_CFLAGS)
95AC_SUBST(MATE_SCREENSAVER_COMMAND_LIBS)
96
97AC_PATH_XTRA
98
99ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS"
100SAVER_LIBS="$ALL_X_LIBS"
101
102AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
103
104# GLIB_COMPILE_RESOURCES
105
106AC_ARG_VAR([GLIB_COMPILE_RESOURCES],[glib-compile-resources bin])
107AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources],[])
108if test -z "$GLIB_COMPILE_RESOURCES"; then
109  AC_MSG_ERROR([glib-compile-resources not found])
110fi
111
112# XMLLINT
113
114AC_ARG_VAR([XMLLINT],[xmllint bin])
115AC_PATH_PROG([XMLLINT],[xmllint],[])
116if test -z "$XMLLINT"; then
117  AC_MSG_ERROR([xmllint not found])
118fi
119
120# Solaris requires libresolv for daemon()
121case "$host" in
122	*-*-solaris*)
123		AC_CHECK_LIB(resolv, daemon, [MATE_SCREENSAVER_LIBS="$MATE_SCREENSAVER_LIBS -lresolv"])
124	;;
125esac
126
127# Optional dependencies for the theme engines
128
129SAVER_MODULES="gthread-2.0 gtk+-3.0 >= $GTK_REQUIRED_VERSION gobject-2.0 >= $GLIB_REQUIRED_VERSION"
130
131PKG_CHECK_MODULES(MATE_SCREENSAVER_SAVER, $SAVER_MODULES)
132AC_SUBST(MATE_SCREENSAVER_SAVER_CFLAGS)
133AC_SUBST(MATE_SCREENSAVER_SAVER_LIBS)
134
135# Find out where the session service file goes
136# The sad sed hack is recomended by section 27.10 of the automake manual.
137DBUS_SESSION_SERVICE_DIR=`pkg-config --variable session_bus_services_dir dbus-1 | sed -e 's,/usr/share,${datarootdir},g'`
138AC_SUBST(DBUS_SESSION_SERVICE_DIR)
139
140# Determine PAM prefix
141
142withval=""
143AC_ARG_WITH(pam-prefix,
144[  --with-pam-prefix=<prefix>   specify where pam files go],[
145if test x$withval != x; then
146   AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.")
147fi])
148if test x$withval != x; then
149	PAM_PREFIX_UNEXPANDED="$withval"
150else
151	PAM_PREFIX_UNEXPANDED="$sysconfdir"
152fi
153PAM_PREFIX=`eval echo $PAM_PREFIX_UNEXPANDED`
154AC_SUBST(PAM_PREFIX)
155
156# Desktop entry handling
157
158PKG_CHECK_MODULES(LIB_MATE_MENU,
159        gtk+-3.0 >= $GTK_REQUIRED_VERSION)
160
161AC_SUBST(LIB_MATE_MENU_CFLAGS)
162AC_SUBST(LIB_MATE_MENU_LIBS)
163
164dnl ---------------------------------------------------------------------------
165dnl - Where should we put documentation ?
166dnl ---------------------------------------------------------------------------
167AC_ARG_WITH(doc-dir,
168              [AC_HELP_STRING([--with-doc-dir=<dir>],
169              [directory to install documentation])])
170if ! test -z "$with_doc_dir"; then
171   DOCDIR="$with_doc_dir/mate-screensaver-$VERSION"
172else
173   DOCDIR="$datadir/doc/mate-screensaver-$VERSION"
174fi
175AC_SUBST(DOCDIR)
176
177dnl ---------------------------------------------------------------------------
178dnl - DocBook Documentation
179dnl ---------------------------------------------------------------------------
180AC_ARG_ENABLE(docbook-docs, [  --enable-docbook-docs   build documentation (requires xmlto)],enable_docbook_docs=$enableval,enable_docbook_docs=no)
181AC_PATH_PROG(XMLTO, xmlto, no)
182AC_MSG_CHECKING([whether to build DocBook documentation])
183if test x$XMLTO = xno ; then
184    have_docbook=no
185else
186    have_docbook=yes
187fi
188if test x$enable_docbook_docs = xauto ; then
189    if test x$have_docbook = xno ; then
190        enable_docbook_docs=no
191    else
192        enable_docbook_docs=yes
193    fi
194fi
195if test x$enable_docbook_docs = xyes; then
196    if test x$have_docbook = xno; then
197	AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found])
198    fi
199fi
200AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
201AC_MSG_RESULT(yes)
202
203dnl ---------------------------------------------------------------------------
204dnl - Some utility functions to make checking for X things easier.
205dnl ---------------------------------------------------------------------------
206
207# Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
208#
209AC_DEFUN([AC_CHECK_X_HEADER], [
210  ac_save_CPPFLAGS="$CPPFLAGS"
211  if test \! -z "$includedir" ; then
212    CPPFLAGS="$CPPFLAGS -I$includedir"
213  fi
214  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
215  AC_CHECK_HEADER([$1],[$2],[$3],[$4])
216  CPPFLAGS="$ac_save_CPPFLAGS"])
217
218# Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
219#
220AC_DEFUN([AC_TRY_X_COMPILE], [
221  ac_save_CPPFLAGS="$CPPFLAGS"
222  if test \! -z "$includedir" ; then
223    CPPFLAGS="$CPPFLAGS -I$includedir"
224  fi
225  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
226  AC_TRY_COMPILE([$1], [$2], [$3], [$4])
227  CPPFLAGS="$ac_save_CPPFLAGS"])
228
229
230# Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
231# Use this sparingly; it probably doesn't work very well on X programs.
232#
233AC_DEFUN([AC_CHECK_X_LIB], [
234  ac_save_CPPFLAGS="$CPPFLAGS"
235  ac_save_LDFLAGS="$LDFLAGS"
236#  ac_save_LIBS="$LIBS"
237
238  if test \! -z "$includedir" ; then
239    CPPFLAGS="$CPPFLAGS -I$includedir"
240  fi
241  # note: $X_CFLAGS includes $x_includes
242  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
243
244  if test \! -z "$libdir" ; then
245    LDFLAGS="$LDFLAGS -L$libdir"
246  fi
247  # note: $X_LIBS includes $x_libraries
248  LDFLAGS="$LDFLAGS $ALL_X_LIBS"
249
250  AC_CHECK_LIB([$1], [$2], [$3], [$4], [$5])
251  CPPFLAGS="$ac_save_CPPFLAGS"
252  LDFLAGS="$ac_save_LDFLAGS"
253#  LIBS="$ac_save_LIBS"
254  ])
255
256
257# Usage: HANDLE_X_PATH_ARG([variable_name],
258#                          [--command-line-option],
259#                          [descriptive string])
260#
261# All of the --with options take three forms:
262#
263#   --with-foo (or --with-foo=yes)
264#   --without-foo (or --with-foo=no)
265#   --with-foo=/DIR
266#
267# This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
268# a directory (string beginning with a slash) it checks to see whether
269# /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
270# as appropriate.
271#
272AC_DEFUN([HANDLE_X_PATH_ARG], [
273   case "$[$1]" in
274    yes) ;;
275    no)  ;;
276
277    /*)
278     AC_MSG_CHECKING([for [$3] headers])
279     d=$[$1]/include
280     if test -d $d; then
281       X_CFLAGS="-I$d $X_CFLAGS"
282       AC_MSG_RESULT($d)
283     else
284       AC_MSG_RESULT(not found ($d: no such directory))
285     fi
286
287     AC_MSG_CHECKING([for [$3] libs])
288     d=$[$1]/lib
289     if test -d $d; then
290       X_LIBS="-L$d $X_LIBS"
291       AC_MSG_RESULT($d)
292     else
293       AC_MSG_RESULT(not found ($d: no such directory))
294     fi
295
296     # replace the directory string with "yes".
297     [$1]_req="yes"
298     [$1]=$[$1]_req
299     ;;
300
301    *)
302     echo ""
303     echo "error: argument to [$2] must be \"yes\", \"no\", or a directory."
304     echo "       If it is a directory, then \`DIR/include' will be added to"
305     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
306     exit 1
307     ;;
308   esac
309  ])
310
311dnl ---------------------------------------------------------------------------
312dnl - Check for shaped window extension
313dnl ---------------------------------------------------------------------------
314
315have_shape=no
316AC_CHECK_X_HEADER(X11/extensions/shape.h, [have_shape=yes],,
317                    [#include <X11/Xlib.h>])
318if test "$have_shape" = yes; then
319  AC_DEFINE(HAVE_SHAPE_EXT, 1, [Define if shape extension is available])
320fi
321
322dnl ---------------------------------------------------------------------------
323dnl - Check for the MIT-SCREEN-SAVER server extension.
324dnl ---------------------------------------------------------------------------
325
326have_mit=no
327with_mit_req=unspecified
328AC_ARG_WITH(mit-ext,
329[  --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.],
330  [with_mit="$withval"; with_mit_req="$withval"],[with_mit=yes])
331
332HANDLE_X_PATH_ARG(with_mit, --with-mit-ext, MIT-SCREEN-SAVER)
333
334if test "$with_mit" = yes; then
335  AC_CHECK_X_HEADER(X11/extensions/scrnsaver.h, [have_mit=yes],,
336                    [#include <X11/Xlib.h>])
337
338  # Now check to see if it's really in the library; XF86Free-3.3 ships
339  # scrnsaver.h, but doesn't include the code in libXext.a
340  if test "$have_mit" = yes; then
341    AC_CHECK_X_LIB(Xext, XScreenSaverRegister, [true], [have_mit=no], -lm)
342
343    if test "$have_mit" = no; then
344      # Looks like XF86Free-3.3 actually puts it in XExExt instead
345      # of in Xext.
346      AC_CHECK_X_LIB(XExExt, XScreenSaverRegister,
347                     [have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"],
348                     [true], -lX11 -lXext -lm)
349    fi
350
351    if test "$have_mit" = no; then
352      # Looks like some versions of XFree86 (whichever version
353      # it is that comes with RedHat Linux 2.0 -- I can't find a version
354      # number) put this in Xss instead of Xext.
355      AC_CHECK_X_LIB(Xss, XScreenSaverRegister,
356                     [have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"],
357                     [true], -lX11 -lXext -lm)
358    fi
359
360  if test "$have_mit" = yes; then
361    AC_DEFINE(HAVE_MIT_SAVER_EXTENSION, 1, [Define if the MIT screensaver extension is available])
362  fi
363
364  fi
365
366elif test "$with_mit" != no; then
367  echo "error: must be yes or no: --with-mit-ext=$with_mit"
368  exit 1
369fi
370
371dnl ---------------------------------------------------------------------------
372dnl - Check for the XF86VMODE server extension (for gamma fading.)
373dnl ---------------------------------------------------------------------------
374
375have_xf86vmode=no
376have_xf86gamma=no
377have_xf86gamma_ramp=no
378with_xf86gamma_req=unspecified
379AC_ARG_WITH(xf86gamma-ext,
380[  --with-xf86gamma-ext    Include support for XFree86 gamma fading.],
381  [with_xf86gamma="$withval"; with_xf86gamma_req="$withval"],
382  [with_xf86gamma=yes])
383
384HANDLE_X_PATH_ARG(with_xf86gamma, --with-xf86gamma-ext, xf86gamma)
385
386if test "$with_xf86gamma" = yes; then
387
388  # first check for xf86vmode.h, if we haven't already
389  if test "$have_xf86vmode" = yes; then
390    have_xf86gamma=yes
391  else
392    AC_CHECK_X_HEADER(X11/extensions/xf86vmode.h, [have_xf86gamma=yes],,
393                      [#include <X11/Xlib.h>])
394  fi
395
396  # if that succeeded, then check for the -lXxf86vm
397  if test "$have_xf86gamma" = yes; then
398    have_xf86gamma=no
399    AC_CHECK_X_LIB(Xxf86vm, XF86VidModeSetGamma,
400                  [have_xf86gamma=yes],
401                   [true], -lXext -lX11)
402  fi
403
404  # check for the Ramp versions of the functions too.
405  if test "$have_xf86gamma" = yes; then
406    have_xf86gamma_ramp=no
407    AC_CHECK_X_LIB(Xxf86vm, XF86VidModeSetGammaRamp,
408                  [have_xf86gamma_ramp=yes],
409                   [true], -lXext -lX11)
410  fi
411
412  # if those tests succeeded, then we've really got the functions.
413  if test "$have_xf86gamma" = yes; then
414    AC_DEFINE(HAVE_XF86VMODE_GAMMA, 1, [Define if XF86VMODE Gamma is available])
415  fi
416
417  if test "$have_xf86gamma_ramp" = yes; then
418    AC_DEFINE(HAVE_XF86VMODE_GAMMA_RAMP, 1, [Define if XF86VMODE Gamma Ramp is available])
419  fi
420
421  # pull in the lib, if we haven't already
422  if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
423    SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
424  fi
425
426elif test "$with_xf86gamma" != no; then
427  echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
428  exit 1
429fi
430
431dnl ---------------------------------------------------------------------------
432dnl - The --enable-locking option
433dnl ---------------------------------------------------------------------------
434
435AC_ARG_ENABLE(locking,[
436Screen locking options:
437
438  --enable-locking        Compile in support for locking the display.
439  --disable-locking       Do not allow locking at all.],
440  [enable_locking="$enableval"],[enable_locking=yes])
441if test "$enable_locking" = yes; then
442  true
443elif test "$enable_locking" = no; then
444  AC_DEFINE(NO_LOCKING, 1, [Define if screen locking support is disabled])
445else
446  echo "error: must be yes or no: --enable-locking=$enable_locking"
447  exit 1
448fi
449
450# Check whether to use a xscreensaver hacks configuration directory
451AC_MSG_CHECKING([whether to use xscreensaver hacks configuration])
452AC_ARG_WITH(xscreensaverdir, AC_HELP_STRING([--with-xscreensaverdir=dir], [Use xscreensaver hack configs found in directory],))
453xscreensaverdir=
454if test "x$with_xscreensaverdir" = "xyes"; then
455  if test -d /usr/share/xscreensaver/config; then
456    xscreensaverdir=/usr/share/xscreensaver/config
457  elif test -d /etc/xscreensaver; then
458    xscreensaverdir=/etc/xscreensaver
459  fi
460elif test "x$with_xscreensaverdir" = "x" -o "x$with_xscreensaverdir" = "xno"; then
461  xscreensaverdir=
462else
463  xscreensaverdir="$with_xscreensaverdir"
464fi
465
466if test "x$xscreensaverdir" != "x" ; then
467  AC_DEFINE_UNQUOTED(XSCREENSAVER_CONFIG_DIR, "$xscreensaverdir", [Define to the directory containing XScreensaver configuration files])
468  AC_MSG_RESULT([$xscreensaverdir])
469else
470  AC_MSG_RESULT([no])
471fi
472
473# Path to xscreensaver hack executables
474AC_ARG_WITH(xscreensaverhackdir, AC_HELP_STRING([--with-xscreensaverhackdir=dir], [Look for xscreensaver hack executables in directory],))
475AC_MSG_CHECKING([for location of xscreensaver hack executables])
476xscreensaverhackdir=
477if test "x$with_xscreensaverhackdir" = "xyes" -o "x$with_xscreensaverhackdir" = "x"; then
478  if test -d /usr/X11R6/lib/xscreensaver; then
479    xscreensaverhackdir=/usr/X11R6/lib/xscreensaver
480  elif test -d $prefix/libexec/xscreensaver; then
481    xscreensaverhackdir=$prefix/libexec/xscreensaver
482  elif test -d /usr/libexec/xscreensaver; then
483    xscreensaverhackdir=/usr/libexec/xscreensaver
484  elif test -d /usr/lib/xscreensaver; then
485    xscreensaverhackdir=/usr/lib/xscreensaver
486  elif test -d /usr/lib64/xscreensaver; then
487    xscreensaverhackdir=/usr/lib64/xscreensaver
488  fi
489elif test "x$with_xscreensaverhackdir" != "xno"; then
490  xscreensaverhackdir="$with_xscreensaverhackdir"
491fi
492
493if test "x$xscreensaverhackdir" != "x" ; then
494  AC_DEFINE_UNQUOTED(XSCREENSAVER_HACK_DIR, "$xscreensaverhackdir", [Define to the directory containing XScreensaver hack executables])
495  AC_MSG_RESULT([$xscreensaverhackdir])
496else
497  AC_MSG_RESULT([no])
498  AC_MSG_WARN([could not find directory containing xscreensaver hacks])
499fi
500
501dnl ---------------------------------------------------------------------------
502dnl - Check for GL
503dnl ---------------------------------------------------------------------------
504
505AC_ARG_WITH(libgl, [  --with-libgl	  build with GL support])
506have_libgl=no
507GL_LIBS=""
508
509if test x$with_libgl != xno; then
510  AC_CHECK_X_HEADER(GL/gl.h, have_gl=yes, have_gl=no)
511  if test "$have_gl" = yes ; then
512    AC_CHECK_X_HEADER(GL/glx.h, have_gl=yes, have_gl=no,
513                      [#include <GL/gl.h>])
514  fi
515
516  if test "$have_gl" = yes ; then
517    AC_CHECK_X_LIB(GL, glXChooseVisual, have_libgl=yes, have_libgl=no, -lm)
518  fi
519fi
520
521if test "x$have_libgl" = "xyes"; then
522    AC_DEFINE(HAVE_LIBGL, 1, [Define if libgl is available])
523    GL_LIBS="-lGL $GL_LIBS"
524fi
525
526dnl ---------------------------------------------------------------------------
527dnl - Check for bsd_auth(3) (OpenBSD)
528dnl ---------------------------------------------------------------------------
529have_bsdauth=no
530with_bsdauth_req=unspecified
531NEED_SETUID=no
532
533case "$host" in
534  *-openbsd*)
535    with_bsdauth=yes
536    AUTH_SCHEME=bsdauth
537    NEED_SETUID=no
538    if test "x$enable_locking" = "xyes"; then
539      with_bsdauth_req=yes
540      NEED_SETUID=yes
541    fi
542esac
543
544if test "$with_bsdauth" = yes ; then
545  AC_CACHE_CHECK([for BSD Authentication], ac_cv_bsdauth,
546    [AC_TRY_X_COMPILE([#include <stdlib.h>
547                       #include <unistd.h>
548                       #include <sys/types.h>
549                       #include <bsd_auth.h>],
550      [int ok = auth_userokay("x", 0, "x", "x");],
551      [ac_cv_bsdauth=yes],
552      [ac_cv_bsdauth=no])])
553  if test "$ac_cv_bsdauth" = yes; then
554    have_bsdauth=yes
555  fi
556fi
557
558if test "$have_bsdauth" = yes; then
559  AC_DEFINE(HAVE_BSDAUTH, 1, [Define to 1 if using bsd_auth(3) authentication])
560fi
561
562AC_SUBST(NEED_SETUID)
563
564dnl ---------------------------------------------------------------------------
565dnl - Check for PAM
566dnl ---------------------------------------------------------------------------
567
568have_pam=no
569AC_ARG_ENABLE(pam, AC_HELP_STRING([--enable-pam],
570                   [Enable PAM support @<:@default=auto@:>@],
571                   ),,enable_pam=auto)
572
573if test "x$enable_locking" = "xyes" -a "x$enable_pam" != "xno" -a "x$have_bsdauth" = "xno"; then
574AC_CHECK_LIB(pam, pam_start, have_pam=yes)
575fi
576if test "x$have_pam" = "xyes"; then
577
578    AUTH_LIBS="${AUTH_LIBS} -lpam"
579    AC_DEFINE(HAVE_PAM, 1, [Define if PAM support is included])
580
581    # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
582    have_timedwait=no
583    AC_CHECK_LIB(c, sigtimedwait, [have_timedwait=yes])
584    if test "$have_timedwait" = no ; then
585      AC_CHECK_LIB(rt, sigtimedwait, [AUTH_LIBS="${AUTH_LIBS} -lrt"])
586    fi
587
588    AC_MSG_CHECKING(how to call pam_strerror)
589    AC_CACHE_VAL(ac_cv_pam_strerror_args,
590     [AC_TRY_COMPILE([#include <stdio.h>
591                      #include <stdlib.h>
592                      #include <security/pam_appl.h>],
593                     [pam_handle_t *pamh = 0;
594                      char *s = pam_strerror(pamh, PAM_SUCCESS);],
595                     [ac_pam_strerror_args=2],
596                     [AC_TRY_COMPILE([#include <stdio.h>
597                                      #include <stdlib.h>
598                                      #include <security/pam_appl.h>],
599                                     [char *s =
600                                       pam_strerror(PAM_SUCCESS);],
601                                     [ac_pam_strerror_args=1],
602                                     [ac_pam_strerror_args=0])])
603      ac_cv_pam_strerror_args=$ac_pam_strerror_args])
604    ac_pam_strerror_args=$ac_cv_pam_strerror_args
605    if test "$ac_pam_strerror_args" = 1 ; then
606      AC_MSG_RESULT(one argument)
607    elif test "$ac_pam_strerror_args" = 2 ; then
608      AC_DEFINE(PAM_STRERROR_TWO_ARGS, 1, [Define if pam_strerror takes two arguments])
609      AC_MSG_RESULT(two arguments)
610    else
611      AC_MSG_RESULT(unknown)
612    fi
613
614fi
615AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes)
616AC_SUBST(HAVE_PAM)
617
618
619#       Check for the nine billion variants of shadow passwords...
620
621need_setuid=no
622
623have_shadow=no
624have_shadow_enhanced=no
625have_shadow_adjunct=no
626have_shadow_hpux=no
627have_passwd_helper=no
628
629with_shadow_req=unspecified
630
631AC_ARG_WITH(shadow,
632[  --with-shadow           Include support for shadow password authentication.],
633  [with_shadow="$withval"; with_shadow_req="$withval"],[with_shadow=yes])
634
635HANDLE_X_PATH_ARG(with_shadow, --with-shadow, shadow password)
636
637if test "$enable_locking" = no ; then
638  with_shadow_req=no
639  with_shadow=no
640fi
641
642
643#       Check for Sun "adjunct" passwords.
644
645if test "$with_shadow" = yes ; then
646  AC_CACHE_CHECK([for Sun-style shadow passwords], ac_cv_sun_adjunct,
647                 [AC_TRY_X_COMPILE([#include <stdlib.h>
648                                    #include <unistd.h>
649                                    #include <sys/types.h>
650                                    #include <sys/label.h>
651                                    #include <sys/audit.h>
652                                    #include <pwdadj.h>],
653                      [struct passwd_adjunct *p = getpwanam("nobody");
654                       const char *pw = p->pwa_passwd;],
655                      [ac_cv_sun_adjunct=yes],
656                      [ac_cv_sun_adjunct=no])])
657  if test "$ac_cv_sun_adjunct" = yes; then
658    have_shadow_adjunct=yes
659    have_shadow=yes
660    need_setuid=yes
661  fi
662fi
663
664
665#       Check for DEC and SCO so-called "enhanced" security.
666
667if test "$with_shadow" = yes ; then
668  AC_CACHE_CHECK([for DEC-style shadow passwords], ac_cv_enhanced_passwd,
669                 [AC_TRY_X_COMPILE([#include <stdlib.h>
670                                    #include <unistd.h>
671                                    #include <sys/types.h>
672                                    #include <pwd.h>
673                                    #include <sys/security.h>
674                                    #include <prot.h>],
675                      [struct pr_passwd *p;
676                       const char *pw;
677                       set_auth_parameters(0, 0);
678                       check_auth_parameters();
679                       p = getprpwnam("nobody");
680                       pw = p->ufld.fd_encrypt;],
681                      [ac_cv_enhanced_passwd=yes],
682                      [ac_cv_enhanced_passwd=no])])
683  if test $ac_cv_enhanced_passwd = yes; then
684    have_shadow_enhanced=yes
685    have_shadow=yes
686    need_setuid=yes
687
688    # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
689    # (I'm told it needs -lcurses too, but I don't understand why.)
690    # But on DEC, it's in -lsecurity.
691    #
692    AC_CHECK_LIB(prot, getprpwnam,
693                 [AUTH_LIBS="$AUTH_LIBS -lprot -lcurses -lx"],
694                 [AC_CHECK_LIB(security, getprpwnam,
695                               [AUTH_LIBS="$AUTH_LIBS -lsecurity"])],
696                 [-lx])
697  fi
698fi
699
700#       Check for HP's entry in the "Not Invented Here" Sweepstakes.
701
702if test "$with_shadow" = yes ; then
703  AC_CACHE_CHECK([for HP-style shadow passwords], ac_cv_hpux_passwd,
704                 [AC_TRY_X_COMPILE([#include <stdlib.h>
705                                    #include <unistd.h>
706                                    #include <sys/types.h>
707                                    #include <pwd.h>
708                                    #include <hpsecurity.h>
709                                    #include <prot.h>],
710                      [struct s_passwd *p = getspwnam("nobody");
711                       const char *pw = p->pw_passwd;],
712                      [ac_cv_hpux_passwd=yes],
713                      [ac_cv_hpux_passwd=no])])
714  if test "$ac_cv_hpux_passwd" = yes; then
715    have_shadow_hpux=yes
716    have_shadow=yes
717    need_setuid=yes
718
719    # on HPUX, bigcrypt is in -lsec
720    AC_CHECK_LIB(sec, bigcrypt, [AUTH_LIBS="$AUTH_LIBS -lsec"])
721  fi
722fi
723
724
725#       Check for FreeBSD-style shadow passwords.
726#
727#       On FreeBSD, getpwnam() and friends work just like on non-shadow-
728#       password systems -- except you only get stuff in the pw_passwd field
729#       if the running program is setuid.  So, guess that we've got this
730#       lossage to contend with if /etc/master.passwd exists, and default to
731#       a setuid installation.
732
733if test "$with_shadow" = yes ; then
734  AC_CACHE_CHECK([for FreeBSD-style shadow passwords], ac_cv_master_passwd,
735                 [if test -f /etc/master.passwd ; then
736                    ac_cv_master_passwd=yes
737                  else
738                    ac_cv_master_passwd=no
739                  fi])
740  if test "$ac_cv_master_passwd" = yes; then
741    need_setuid=yes
742  fi
743fi
744
745
746#       Check for "traditional" shadow passwords.
747
748if test "$with_shadow" = yes ; then
749  AC_CACHE_CHECK([for generic shadow passwords], ac_cv_shadow,
750                 [AC_TRY_X_COMPILE([#include <stdlib.h>
751                                    #include <unistd.h>
752                                    #include <sys/types.h>
753                                    #include <pwd.h>
754                                    #include <shadow.h>],
755                      [struct spwd *p = getspnam("nobody");
756                       const char *pw = p->sp_pwdp;],
757                      [ac_cv_shadow=yes],
758                      [ac_cv_shadow=no])])
759  if test "$ac_cv_shadow" = yes; then
760    have_shadow=yes
761    need_setuid=yes
762
763    # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
764    have_getspnam=no
765    AC_CHECK_LIB(c, getspnam, [have_getspnam=yes])
766    if test "$have_getspnam" = no ; then
767      AC_CHECK_LIB(gen, getspnam,
768                   [have_getspnam=yes; AUTH_LIBS="$AUTH_LIBS -lgen"])
769    fi
770  fi
771fi
772
773
774#       Check for other libraries needed for non-shadow passwords.
775
776if test "$enable_locking" = yes ; then
777
778  # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
779  have_crypt=no
780  AC_CHECK_LIB(c, crypt, [have_crypt=yes])
781  if test "$have_crypt" = no ; then
782    AC_CHECK_LIB(crypt, crypt,
783                 [have_crypt=yes; AUTH_LIBS="${AUTH_LIBS} -lcrypt"])
784  fi
785fi
786
787# Most of the above shadow mechanisms will have set need_setuid to yes,
788# if they were found.  But, on some systems, we need setuid even when
789# using plain old vanilla passwords.
790#
791if test "$enable_locking" = yes ; then
792  case "$host" in
793    *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
794      need_setuid=yes
795    ;;
796  esac
797fi
798
799if test "$have_shadow_adjunct" = yes ; then
800  AC_DEFINE(HAVE_ADJUNCT_PASSWD, 1, [Define if system uses adjunct shadow passwords])
801elif test "$have_shadow_enhanced" = yes ; then
802  AC_DEFINE(HAVE_ENHANCED_PASSWD, 1, [Define if system uses enhanced shadow passwords])
803elif test "$have_shadow_hpux" = yes ; then
804  AC_DEFINE(HAVE_HPUX_PASSWD, 1, [Define if system uses HPUX shadow passwords])
805elif test "$have_shadow" = yes ; then
806  AC_DEFINE(HAVE_SHADOW_PASSWD, 1, [Define if system uses traditional shadow passwords])
807fi
808
809#       Check for external password helper
810#       On SuSE, instead of having xscreensaver be a setuid program, they
811#       fork an external program that takes the password on stdin, and
812#       returns true if that password is a valid one.  Then only that
813#       smaller program needs to be setuid.
814#
815#       (Note that this external program is not a GUI: the GUI is still
816#       all in xscreensaver itself; the external program just does auth.)
817
818have_passwd_helper=no
819builtin_helper=no
820
821AC_ARG_WITH(passwd-helper,
822[  --with-passwd-helper    Include support for an external password
823                          verification helper program.],
824  [with_passwd_helper="$withval"],[with_passwd_helper=no])
825# no HANDLE_X_PATH_ARG for this one
826
827if test "$enable_locking" = no ; then
828  with_passwd_helper=no
829  builtin_helper=no
830fi
831
832case "$with_passwd_helper" in
833  ""|no) : ;;
834  /*)
835    AC_DEFINE_UNQUOTED(PASSWD_HELPER_PROGRAM, "$with_passwd_helper", [Full pathname of password helper application])
836    builtin_helper=no
837    have_passwd_helper=yes;;
838  *)
839    echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
840    exit 1
841esac
842
843if test "$need_setuid" = yes -a "$have_pam" != yes ; then
844  NEED_SETUID=yes
845else
846  NEED_SETUID=no
847fi
848AC_SUBST(NEED_SETUID)
849
850dnl ---------------------------------------------------------------------------
851dnl  Authentication scheme
852dnl ---------------------------------------------------------------------------
853
854AC_ARG_ENABLE(authentication-scheme,
855  [  --enable-authentication-scheme=[auto/pam/helper/pwent/bsdauth]  Choose a specific
856                          authentication scheme [default=auto]],,
857  enable_authentication_scheme=auto)
858
859AUTH_SCHEME="auth-pam"
860
861if test x$enable_authentication_scheme = xpam -a x$have_pam = xno ; then
862	AC_MSG_ERROR(PAM support requested but not available)
863fi
864if test x$enable_authentication_scheme = xhelper -a x$have_passwd_helper = xno ; then
865    builtin_helper=yes
866    have_passwd_helper=yes
867    AC_DEFINE_UNQUOTED(PASSWD_HELPER_PROGRAM, [PKGLIBEXECDIR "/mate-screensaver-pam-helper"], [Full pathname of password helper application])
868fi
869if test x$enable_authentication_scheme = xbsdauth -a x$have_bsdauth = xno ; then
870	AC_MSG_ERROR(bsd_auth(3) support requested but not available)
871fi
872
873if test x$enable_authentication_scheme = xpam ; then
874        AUTH_SCHEME="pam"
875elif test x$enable_authentication_scheme = xhelper ; then
876        AUTH_SCHEME="helper"
877elif test x$enable_authentication_scheme = xpwent ; then
878        AUTH_SCHEME="pwent"
879elif test x$enable_authentication_scheme = xbsdauth ; then
880	AUTH_SCHEME="bsdauth"
881elif test x$enable_authentication_scheme = xauto ; then
882	if test x$have_pam != xno ; then
883		AUTH_SCHEME="pam"
884	elif test x$have_passwd_helper != xno ; then
885		AUTH_SCHEME="helper"
886	elif test x$have_bsdauth != xno ; then
887		AUTH_SCHEME="bsdauth"
888	else
889		AUTH_SCHEME="pwent"
890        fi
891else
892	AC_MSG_ERROR(Unknown authentication scheme)
893fi
894
895AC_SUBST(AUTH_SCHEME)
896AM_CONDITIONAL(HAVE_PASSWD_HELPER, test x$have_passwd_helper = xyes)
897AM_CONDITIONAL(BUILTIN_HELPER, test x$builtin_helper = xyes)
898AC_SUBST(HAVE_PASSWD_HELPER)
899
900dnl ---------------------------------------------------------------------------
901dnl ConsoleKit
902dnl ---------------------------------------------------------------------------
903
904AC_ARG_WITH(console-kit,
905            AS_HELP_STRING([--with-console-kit],
906            [Add ConsoleKit support]),,
907            with_console_kit=auto)
908
909use_console_kit=no
910if test "x$with_console_kit" != "xno" ; then
911    use_console_kit=yes
912    AC_DEFINE(WITH_CONSOLE_KIT, 1, [ConsoleKit support])
913fi
914AM_CONDITIONAL(WITH_CONSOLE_KIT, test x$use_console_kit = xyes)
915AC_SUBST(WITH_CONSOLE_KIT)
916
917dnl ---------------------------------------------------------------------------
918dnl systemd
919dnl ---------------------------------------------------------------------------
920
921AC_ARG_WITH(systemd,
922            AS_HELP_STRING([--with-systemd],
923            [Add systemd support]),
924            [with_systemd=$withval], [with_systemd=auto])
925
926PKG_CHECK_MODULES(SYSTEMD, [libsystemd], [have_systemd=yes],
927                  [PKG_CHECK_MODULES(SYSTEMD, [libsystemd-login],
928                  [have_systemd=yes], [have_systemd=no])])
929
930if test "x$with_systemd" = "xauto" ; then
931        if test x$have_systemd = xno ; then
932                use_systemd=no
933        else
934                use_systemd=yes
935        fi
936else
937	use_systemd=$with_systemd
938fi
939
940if test "x$use_systemd" = "xyes"; then
941        if test "x$have_systemd" = "xno"; then
942                AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
943        fi
944
945        AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
946fi
947AC_SUBST(SYSTEMD_CFLAGS)
948AC_SUBST(SYSTEMD_LIBS)
949
950dnl ====================================================================
951dnl Check for elogind
952dnl
953dnl elogind is not officially supported, but since it's a subset of
954dnl systemd, it should work out of the box
955dnl ====================================================================
956
957AC_ARG_WITH(elogind,
958            AS_HELP_STRING([--with-elogind],
959            [Use libelogind instead of libsystemd-login]),
960            [with_elogind=$withval], [with_elogind=no])
961
962use_elogind=no
963if test "x$with_elogind" = "xyes"; then
964    PKG_CHECK_MODULES(LIBELOGIND,[libelogind], [use_elogind=yes], [use_elogind=no])
965
966    if test "x$use_elogind" = "xyes"; then
967        AC_DEFINE([WITH_ELOGIND], 1, [elogind support])
968        AC_DEFINE([WITH_SYSTEMD], 1, [Define to 1 to reduce ifdefs since elogind is a drop-in replacement for systemd])
969        AC_SUBST(LIBELOGIND_CFLAGS)
970        AC_SUBST(LIBELOGIND_LIBS)
971    fi
972fi
973AM_CONDITIONAL(WITH_ELOGIND, [test "x$use_elogind" = "xyes"])
974AC_SUBST(WITH_ELOGIND)
975
976dnl ---------------------------------------------------------------------------
977dnl libmatekbd
978dnl ---------------------------------------------------------------------------
979
980have_libmatekbdui=no
981AC_ARG_WITH(kbd-layout-indicator,[  --without-kbd-layout-indicator         disable keyboard layout indicator],
982            [with_kbd_layout_indicator="$withval"],[with_kbd_layout_indicator=yes])
983if test x$with_kbd_layout_indicator != xno; then
984  PKG_CHECK_MODULES(LIBMATEKBDUI, libmatekbdui >= $LIBMATEKBDUI_REQUIRED_VERSION, have_libmatekbdui=yes, have_libmatekbdui=no)
985fi
986if test "x$have_libmatekbdui" = "xyes"; then
987  AC_SUBST(LIBMATEKBDUI_CFLAGS)
988  AC_SUBST(LIBMATEKBDUI_LIBS)
989  AC_DEFINE(WITH_KBD_LAYOUT_INDICATOR, 1, [Define if keyboard layout indicator should be built])
990fi
991
992dnl ---------------------------------------------------------------------------
993dnl libnotify
994dnl ---------------------------------------------------------------------------
995
996have_libnotify=no
997AC_ARG_WITH(libnotify,[  --without-libnotify         disable libnotify support])
998if test x$with_libnotify != xno; then
999	PKG_CHECK_MODULES(LIBNOTIFY, libnotify > 0.7.0, have_libnotify=yes, have_libnotify=no)
1000fi
1001if test "x$have_libnotify" = "xyes"; then
1002  AC_SUBST(LIBNOTIFY_CFLAGS)
1003  AC_SUBST(LIBNOTIFY_LIBS)
1004  AC_DEFINE(WITH_LIBNOTIFY, 1, [Define for libnotify support])
1005fi
1006
1007dnl ---------------------------------------------------------------------------
1008dnl glib headers for pam-helper
1009dnl ---------------------------------------------------------------------------
1010
1011PKG_CHECK_MODULES(PAM_HELPER,
1012	glib-2.0 >= $GLIB_REQUIRED_VERSION)
1013AC_SUBST(PAM_HELPER_CFLAGS)
1014
1015dnl ---------------------------------------------------------------------------
1016dnl Finish
1017dnl ---------------------------------------------------------------------------
1018
1019AC_SUBST(AUTH_LIBS)
1020AC_SUBST(SAVER_LIBS)
1021AC_SUBST(GL_LIBS)
1022
1023
1024REAL_PREFIX=
1025if test "x$prefix" = "xNONE"; then
1026  REAL_PREFIX=$ac_default_prefix
1027else
1028  REAL_PREFIX=$prefix
1029fi
1030
1031## temporarily change prefix and exec_prefix
1032old_prefix=$prefix
1033prefix=$REAL_PREFIX
1034
1035if test "x$exec_prefix" = xNONE ; then
1036   REAL_EXEC_PREFIX=$REAL_PREFIX
1037else
1038   REAL_EXEC_PREFIX=$exec_prefix
1039fi
1040old_exec_prefix=$exec_prefix
1041exec_prefix=$REAL_EXEC_PREFIX
1042
1043## eval everything
1044LOCALSTATEDIR_TMP="$localstatedir"
1045EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
1046AC_SUBST(EXPANDED_LOCALSTATEDIR)
1047
1048SYSCONFDIR_TMP="$sysconfdir"
1049EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
1050AC_SUBST(EXPANDED_SYSCONFDIR)
1051
1052BINDIR_TMP="$bindir"
1053EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
1054AC_SUBST(EXPANDED_BINDIR)
1055
1056LIBDIR_TMP="$libdir"
1057EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
1058AC_SUBST(EXPANDED_LIBDIR)
1059
1060DATADIR_TMP="$datadir"
1061EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
1062AC_SUBST(EXPANDED_DATADIR)
1063
1064## put prefix and exec_prefix back
1065prefix=$old_prefix
1066exec_prefix=$old_exec_prefix
1067
1068#
1069# Enable Debug Log
1070#
1071if test "$ax_enable_debug" = "yes"; then
1072  DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
1073else
1074  if test "x$ax_enable_debug" = "xno"; then
1075    DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
1076  else
1077    DEBUG_CFLAGS=""
1078  fi
1079fi
1080AC_SUBST(DEBUG_CFLAGS)
1081
1082# Flags
1083
1084AC_SUBST(CFLAGS)
1085AC_SUBST(CPPFLAGS)
1086AC_SUBST(LDFLAGS)
1087
1088# Saver engine stuff
1089SLIDESHOW_COSMOS_DIR="${EXPANDED_DATADIR}/backgrounds/cosmos"
1090
1091AC_SUBST(SLIDESHOW_COSMOS_DIR)
1092
1093FLOATERS_FOOT_LOGO_IMAGE="${EXPANDED_DATADIR}/pixmaps/mate-logo-white.svg"
1094AC_SUBST(FLOATERS_FOOT_LOGO_IMAGE)
1095FLOATERS_FOOT_GNOME_LOGO_IMAGE="${EXPANDED_DATADIR}/pixmaps/gnome-logo-white.svg"
1096AC_SUBST(FLOATERS_FOOT_GNOME_LOGO_IMAGE)
1097
1098# Menu stuff
1099
1100MATE_SCREENSAVER_THEMES_DIR="${EXPANDED_DATADIR}/applications/screensavers"
1101AC_SUBST(MATE_SCREENSAVER_THEMES_DIR)
1102
1103# Special directories
1104# Used for .pc.in file
1105
1106privlibexecdir='${libexecdir}'/mate-screensaver
1107AC_SUBST(privlibexecdir)
1108
1109privdatadir='${datadir}'/mate-screensaver
1110AC_SUBST(privdatadir)
1111
1112themesdir='${datadir}'/applications/screensavers
1113AC_SUBST(themesdir)
1114
1115
1116# Files
1117
1118AC_OUTPUT([
1119Makefile
1120po/Makefile.in
1121src/Makefile
1122src/mate-screensaver.desktop.in
1123data/Makefile
1124data/mate-screensavers.menu
1125data/mate-screensaver.pc
1126data/org.mate.ScreenSaver.service
1127data/images/Makefile
1128data/images/cosmos/Makefile
1129savers/Makefile
1130doc/Makefile
1131doc/mate-screensaver.xml
1132helper/Makefile
1133])
1134
1135echo "
1136                    mate-screensaver $VERSION
1137                    ========================
1138
1139        prefix:                   ${prefix}
1140        exec_prefix:              ${exec_prefix}
1141        libdir:                   ${EXPANDED_LIBDIR}
1142        bindir:                   ${EXPANDED_BINDIR}
1143        sysconfdir:               ${EXPANDED_SYSCONFDIR}
1144        localstatedir:            ${EXPANDED_LOCALSTATEDIR}
1145        datadir:                  ${EXPANDED_DATADIR}
1146        PAM prefix:               ${PAM_PREFIX}
1147        source code location:     ${srcdir}
1148        compiler:                 ${CC}
1149        cflags:                   ${CFLAGS}
1150        Warning flags:            ${WARN_CFLAGS}
1151        Base libs:                ${MATE_SCREENSAVER_LIBS}
1152        Extension libs:           ${SAVER_LIBS}
1153        Maintainer mode:          ${USE_MAINTAINER_MODE}
1154        Docs enabled:             ${enable_docbook_docs}
1155
1156        GL:                       ${have_libgl}
1157
1158        Screen locking enabled:   ${enable_locking}
1159        Show keyboard indicator:  ${with_kbd_layout_indicator}
1160        systemd support:          ${use_systemd}
1161        elogind support:          ${use_elogind}
1162        ConsoleKit support:       ${use_console_kit}
1163        libnotify support:        ${have_libnotify}
1164        PAM support:              ${have_pam}
1165        bsd_auth(3) support:      ${have_bsdauth}
1166        Have shadow passwords:    ${have_shadow}
1167        Have adjunct shadow:      ${have_shadow_adjunct}
1168        Have enhanced shadow:     ${have_shadow_enhanced}
1169        Have HPUX shadow:         ${have_shadow_hpux}
1170        Have password helper:     ${have_passwd_helper}
1171        Authentication scheme:    ${AUTH_SCHEME}"
1172
1173if test "x$need_setuid" = "xyes" -a "x$have_pam" != "xyes" ; then
1174echo \
1175"        Need setuid dialog:       yes
1176"
1177else
1178echo \
1179"        Need setuid dialog:       no
1180"
1181fi
1182
1183
1184echo ""
1185