configure.ac 51.9 KB
Newer Older
1

2
AC_PREREQ([2.60])
William Jon McCann's avatar
William Jon McCann committed
3
AC_INIT([gdm],
Ray Strode's avatar
Ray Strode committed
4
        [3.29.1],
5
        [http://bugzilla.gnome.org/enter_bug.cgi?product=gdm])
William Jon McCann's avatar
William Jon McCann committed
6 7

AC_CONFIG_SRCDIR([daemon/gdm-manager.c])
8

9
AM_INIT_AUTOMAKE([1.11.2 no-dist-gzip dist-xz tar-ustar -Wall])
10
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
11
AM_MAINTAINER_MODE([enable])
12

13 14 15
# for utmpx stuff
AC_GNU_SOURCE

William Jon McCann's avatar
William Jon McCann committed
16
AC_STDC_HEADERS
17 18 19
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_LIBTOOL()
William Jon McCann's avatar
William Jon McCann committed
20

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
## increment if the plugin interface has additions, changes, removals.
LT_CURRENT=1

## increment any time the source changes; set to
##  0 if you increment CURRENT
LT_REVISION=0

## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
## precedence over adding, so set to 0 if both happened.
LT_AGE=0

AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

William Jon McCann's avatar
William Jon McCann committed
37 38 39
AC_HEADER_STDC

AC_SUBST(VERSION)
40

41
AC_CONFIG_HEADERS(config.h)
42 43
AC_CONFIG_MACRO_DIR([m4])

44 45 46 47 48 49
# Documentation
enable_documentation=no
m4_ifdef([YELP_HELP_INIT],[
YELP_HELP_INIT
enable_documentation=yes
])
50
AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
51

52 53 54
# i18n stuff
IT_PROG_INTLTOOL([0.40.0])

55 56
GETTEXT_PACKAGE=gdm
AC_SUBST(GETTEXT_PACKAGE)
57
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package])
58 59 60 61 62

dnl ---------------------------------------------------------------------------
dnl - Dependencies
dnl ---------------------------------------------------------------------------

63
GLIB_REQUIRED_VERSION=2.36.0
William Jon McCann's avatar
William Jon McCann committed
64
GTK_REQUIRED_VERSION=2.91.1
65
LIBCANBERRA_GTK_REQUIRED_VERSION=0.4
66
ACCOUNTS_SERVICE_REQUIRED_VERSION=0.6.35
67

68 69
EXTRA_COMPILE_WARNINGS(yes)

70 71 72 73
PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)

74 75
PKG_CHECK_MODULES(COMMON,
        gobject-2.0 >= $GLIB_REQUIRED_VERSION
76
        gio-2.0 >= $GLIB_REQUIRED_VERSION
77
        gio-unix-2.0 >= $GLIB_REQUIRED_VERSION
78 79 80 81 82 83
)
AC_SUBST(COMMON_CFLAGS)
AC_SUBST(COMMON_LIBS)

PKG_CHECK_MODULES(DAEMON,
        gobject-2.0 >= $GLIB_REQUIRED_VERSION
84
        gio-2.0 >= $GLIB_REQUIRED_VERSION
85
        gio-unix-2.0 >= $GLIB_REQUIRED_VERSION
86
        accountsservice >= $ACCOUNTS_SERVICE_REQUIRED_VERSION
87
        xcb
88 89 90 91
)
AC_SUBST(DAEMON_CFLAGS)
AC_SUBST(DAEMON_LIBS)

92 93
GLIB_GSETTINGS

94
PKG_CHECK_MODULES(XLIB, x11 xau, ,
95 96 97 98
  [AC_PATH_XTRA
    if test "x$no_x" = xyes; then
      AC_MSG_ERROR("no (requires X development libraries)")
    else
99
      XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lXau -lX11 -lXext $X_EXTRA_LIBS"
100 101 102 103 104
      XLIB_CFLAGS=$X_CFLAGS
    fi])
AC_SUBST(XLIB_CFLAGS)
AC_SUBST(XLIB_LIBS)

105
PKG_CHECK_MODULES(GTK,
William Jon McCann's avatar
William Jon McCann committed
106
        gtk+-3.0 >= $GTK_REQUIRED_VERSION
107 108 109 110
)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

111
PKG_CHECK_MODULES(CANBERRA_GTK,
William Jon McCann's avatar
William Jon McCann committed
112
        libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED_VERSION
113
)
114 115
AC_SUBST(CANBERRA_GTK_CFLAGS)
AC_SUBST(CANBERRA_GTK_LIBS)
116

117 118 119 120 121
AC_ARG_WITH(selinux,
            AS_HELP_STRING([--with-selinux],
                           [Add SELinux support]),,
            with_selinux=auto)

122 123
PKG_CHECK_MODULES(LIBSELINUX, libselinux, have_selinux=yes, have_selinux=no)

124 125
use_selinux=no
if test "x$have_selinux" = "xyes" && test "x$with_selinux" != "xno" ; then
126
        AC_DEFINE(HAVE_SELINUX, 1, [Define if have selinux])
127
        use_selinux=yes
128 129 130 131
fi
AC_SUBST(LIBSELINUX_CFLAGS)
AC_SUBST(LIBSELINUX_LIBS)

132
PKG_CHECK_MODULES(SIMPLE_CHOOSER,
William Jon McCann's avatar
William Jon McCann committed
133
        gtk+-3.0 >= $GTK_REQUIRED_VERSION
134 135 136 137
)
AC_SUBST(SIMPLE_CHOOSER_CFLAGS)
AC_SUBST(SIMPLE_CHOOSER_LIBS)

138 139 140
PLUGIN_LIBTOOL_FLAGS="-export_dynamic -module -avoid-version"
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)

141 142 143
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_XTRA

144
# Unit testing framework
145 146 147 148
PKG_CHECK_MODULES(CHECK,
                  [check >= 0.9.4],
                  have_check=yes,
                  have_check=no)
149 150
AM_CONDITIONAL([HAVE_CHECK],[test "x$CHECK_CFLAGS" != "x"])

151
PKG_CHECK_MODULES(LIBGDM, glib-2.0 gio-2.0 gio-unix-2.0);
152
GOBJECT_INTROSPECTION_CHECK([0.9.12])
153 154
LIBGDM_GIR_INCLUDES="GLib-2.0 GObject-2.0 Gio-2.0"
AC_SUBST(LIBGDM_GIR_INCLUDES)
155

156 157 158
dnl ---------------------------------------------------------------------------
dnl - Configuration file stuff
dnl ---------------------------------------------------------------------------
159

160 161 162
AC_ARG_WITH(sysconfsubdir,
            AS_HELP_STRING([--with-sysconfsubdir],
                           [directory name used under sysconfdir, default=gdm]),
163 164
            sysconfsubdir=${withval}, sysconfsubdir=gdm)
AC_SUBST(sysconfsubdir)
165 166

if test x"${sysconfsubdir}" != xno -a x"${sysconfsubdir}" != x; then
167 168 169 170 171 172
    gdmconfdir='${sysconfdir}/${sysconfsubdir}'
else
    gdmconfdir='${sysconfdir}'
fi
AC_SUBST(gdmconfdir)

173 174 175
AC_ARG_WITH(dmconfdir,
            AS_HELP_STRING([--with-dmconfdir],
                           [directory where Sessions are stored, default=SYSCONFDIR/dm]),
176 177
            dmconfdir=${withval}, dmconfdir=${sysconfdir}/dm)
AC_SUBST(dmconfdir)
178

179 180 181
dnl ---------------------------------------------------------------------------
dnl - Configure arguments
dnl ---------------------------------------------------------------------------
182
AC_ARG_ENABLE(gdm-xsession,
183 184 185 186 187
              AS_HELP_STRING([--enable-gdm-xsession],
                             [Enable installing the gdm Xsession file @<:@default=no@:>@]),,
              enable_gdm_xsession=no)
AM_CONDITIONAL(ENABLE_GDM_XSESSION, test x$enable_gdm_xsession = xyes)

188 189 190
AC_ARG_ENABLE(split-authentication,
	      AS_HELP_STRING([--enable-split-authentication],
                             [Enable multiple simultaneous PAM conversations during login @<:@default=yes@:>@]),,
191
              enable_split_authentication=yes)
192
AM_CONDITIONAL(ENABLE_SPLIT_AUTHENTICATION, test x$enable_split_authentication = xyes)
193

194 195 196 197
if test x$enable_split_authentication = xyes; then
  AC_DEFINE(ENABLE_SPLIT_AUTHENTICATION, 1, [Define if split authentication is enabled])
fi

198 199 200 201 202 203 204 205 206 207
AC_ARG_ENABLE(user-display-server,
	      AS_HELP_STRING([--enable-user-display-server],
                             [Enable running X server as user @<:@default=yes@:>@]),,
              enable_user_display_server=yes)
AM_CONDITIONAL(ENABLE_USER_DISPLAY_SERVER, test x$user_display_server = xyes)

if test x$enable_user_display_server = xyes; then
  AC_DEFINE(ENABLE_USER_DISPLAY_SERVER, 1, [Define if user display servers are supported])
fi

208
AC_ARG_WITH(default-pam-config,
209
	    AS_HELP_STRING([--with-default-pam-config: One of redhat, openembedded, exherbo, lfs, arch, none @<:@default=auto@:>@]))
210 211 212 213
dnl If not given, try autodetecting from release files (see NetworkManager source) 
if test x$with_default_pam_config = x; then
	AC_CHECK_FILE(/etc/redhat-release,with_default_pam_config="redhat")
	AC_CHECK_FILE(/etc/fedora-release,with_default_pam_config="redhat")
214
	AC_CHECK_FILE(/etc/exherbo-release,with_default_pam_config="exherbo")
215
	AC_CHECK_FILE(/etc/arch-release,with_default_pam_config="arch")
216
	AC_CHECK_FILE(/etc/lfs-release,with_default_pam_config="lfs")
217 218 219 220 221 222
	dnl If not autodetected, default to none
	if test x$with_default_pam_config = x; then
	  with_default_pam_config=none
	fi
fi
case x$with_default_pam_config in
223
     xredhat|xopenembedded|xexherbo|xlfs|xarch|xnone) ;;
224 225 226 227 228 229 230
     *)
       AC_MSG_ERROR([Invalid --with-default-pam-config ${with_default_pam_config}])
       exit 1
       ;;
esac
AM_CONDITIONAL(ENABLE_REDHAT_PAM_CONFIG, test x$with_default_pam_config = xredhat)
AM_CONDITIONAL(ENABLE_OPENEMBEDDED_PAM_CONFIG, test x$with_default_pam_config = xopenembedded)
231
AM_CONDITIONAL(ENABLE_EXHERBO_PAM_CONFIG, test x$with_default_pam_config = xexherbo)
232
AM_CONDITIONAL(ENABLE_LFS_PAM_CONFIG, test x$with_default_pam_config = xlfs)
233
AM_CONDITIONAL(ENABLE_ARCH_PAM_CONFIG, test x$with_default_pam_config = xarch)
234

235 236 237 238 239 240
AC_CHECK_HEADERS([security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
                 [have_pam=yes],
                 [if test "x$have_pam" = xyes ; then
                        AC_MSG_ERROR([PAM development files not found.])
                 fi])

241
AC_ARG_ENABLE(console-helper,
242 243 244
	      AS_HELP_STRING([--enable-console-helper],
                             [Enable PAM console helper @<:@default=auto@:>@]),,
              enable_console_helper=auto)
245

246
AC_ARG_ENABLE(authentication-scheme,
247 248 249
              AS_HELP_STRING([--enable-authentication-scheme=@<:@pam/crypt/shadow@:>@],
	                     [Choose a specific authentication scheme @<:@default=auto@:>@]),,
              enable_authentication_scheme=auto)
250 251

AC_ARG_WITH(xinerama,
252 253 254
            AS_HELP_STRING([--with-xinerama],
                           [Add Xinerama support @<:@default=auto@:>@]),,
            with_xinerama=auto)
255 256

AC_ARG_WITH(xdmcp,
257 258 259
            AS_HELP_STRING([--with-xdmcp],
	                   [Add XDMCP (remote login) support @<:@default=auto@:>@]),,
            with_xdmcp=auto)
260 261

AC_ARG_WITH(tcp-wrappers,
262 263 264
            AS_HELP_STRING([--with-tcp-wrappers],
                           [Use TCP Wrappers @<:@default=auto@:>@]),,
            with_tcp_wrappers=auto)
265

266

267 268 269 270
AC_ARG_WITH([systemdsystemunitdir],
            AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
                           [Directory for systemd service files]),
                [with_systemdsystemunitdir=$withval], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
271 272 273 274
AC_ARG_ENABLE(systemd-journal,
            AS_HELP_STRING([--enable-systemd-journal],
                           [Add journald support @<:@default=auto@:>@]),
            [enable_systemd_journal=$enableval], [enable_systemd_journal=auto])
275 276 277 278
AC_ARG_ENABLE(wayland-support,
	      AS_HELP_STRING([--enable-wayland-support],
                             [Enable support for wayland sessions  @<:@default=auto@:>@]),
              [enable_wayland_support=$enableval],
279
              [enable_wayland_support=yes])
280

281 282
AC_ARG_WITH(plymouth,
            AS_HELP_STRING([--with-plymouth],
283 284
                           [Add plymouth support @<:@default=yes@:>@]),,
                           [with_plymouth=yes])
285

286
AC_ARG_WITH(at-spi-registryd-directory,
287 288
            AS_HELP_STRING([--with-at-spi-registryd-directory],
	                   [Specify the directory of at-spi-registryd @<:@default=libexecdir@:>@])],,
289
            [with_at_spi_registryd_directory="${libexecdir}"])
290 291 292 293

AT_SPI_REGISTRYD_DIR=$with_at_spi_registryd_directory
AC_SUBST(AT_SPI_REGISTRYD_DIR)

294 295 296 297 298 299 300 301 302 303 304 305 306
# Allow configuration of default PATH
#
withval=""
AC_ARG_WITH(default-path,
            AS_HELP_STRING([--with-default-path=<PATH>],
	                   [PATH GDM will use as the user's default PATH]),
            [if test x$withval != x; then
               AC_MSG_RESULT("PATH ${withval} will be the default PATH.")
             fi])

if test x$withval != x; then
	GDM_SESSION_DEFAULT_PATH="$withval"
else
307
	GDM_SESSION_DEFAULT_PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
308 309 310
fi
AC_SUBST(GDM_SESSION_DEFAULT_PATH)

311 312 313 314 315
dnl
dnl file that sets LANG
dnl
withval=""
AC_ARG_WITH(lang-file,
316 317 318 319 320 321
            AS_HELP_STRING([--with-lang-file=<filename>],
	                   [file containing default language setting]),
            [if test x$withval != x; then
               AC_MSG_RESULT("System locale will be looked for in file ${withval}.")
             fi])

322 323 324
if test x$withval != x; then
	LANG_CONFIG_FILE="$withval"
else
325
	LANG_CONFIG_FILE='$(sysconfdir)/locale.conf'
326 327
fi
AC_SUBST(LANG_CONFIG_FILE)
William Jon McCann's avatar
William Jon McCann committed
328

329 330 331 332
# stropts has been removed from glibc
# https://bugzilla.redhat.com/show_bug.cgi?id=436349
AC_CHECK_HEADERS(stropts.h)

333 334 335
dnl socklen_t may be declared, but not in a "standard" C header location
AC_CHECK_HEADERS(sys/socket.h)
AC_CHECK_TYPE(socklen_t,,
336
        AC_DEFINE(socklen_t, size_t, [Compatibility type]),
337 338 339 340 341
[AC_INCLUDES_DEFAULT]
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
)
342
AC_CHECK_HEADERS(sys/sockio.h)
343 344
AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv])

345 346 347 348
dnl checks needed for Darwin compatibility to linux **environ.
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_FUNCS(_NSGetEnviron)

349 350
AC_CHECK_HEADERS(sys/vt.h)

351 352
EXTRA_DAEMON_LIBS=""
EXTRA_CHOOSER_LIBS=""
353
EXTRA_FLEXI_LIBS=""
354 355
EXTRA_DYNAMIC_LIBS=""
EXTRA_SETUP_LIBS=""
356
EXTRA_TEST_LIBS=""
357 358 359 360 361

AC_CHECK_FUNC(socket,,[
	      AC_CHECK_LIB(socket,socket, [
			   EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lsocket"
			   EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lsocket"
362
			   EXTRA_FLEXI_LIBS="$EXTRA_FLEXI_LIBS -lsocket"
363
			   EXTRA_DYNAMIC_LIBS="$EXTRA_DYNAMIC_LIBS -lsocket"
364 365
			   EXTRA_SETUP_LIBS="$EXTRA_SETUP_LIBS -lsocket"
			   EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -lsocket"])])
366 367 368
AC_CHECK_FUNC(gethostbyname,,[
	      AC_CHECK_LIB(nsl,gethostbyname, [
			   EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lnsl"
369 370
			   EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lnsl"
			   EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -lnsl"])])
371
AC_CHECK_DECL(HOST_NAME_MAX,,[
372 373 374
             AC_CHECK_DECL(_POSIX_HOST_NAME_MAX,
                           AC_DEFINE(HOST_NAME_MAX, _POSIX_HOST_NAME_MAX, []),
                           AC_DEFINE(HOST_NAME_MAX, 256, [Define to 256 if neither have HOST_NAME_MAX nor _POSIX_HOST_NAME_MAX]),
375
                           [[#include <limits.h>]])],
376
             [[#include <limits.h>]])
377
AC_CHECK_FUNC(sched_yield,[
378
	      AC_DEFINE(HAVE_SCHED_YIELD, 1, [Define if we have sched yield])],[
379
	      AC_CHECK_LIB(rt,sched_yield, [
380
			   AC_DEFINE(HAVE_SCHED_YIELD, 1, [Define if we have sched yield])
381 382 383 384 385 386
			   EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lrt"], [
			   echo "No sched_yield found"])])
AC_CHECK_FUNC(inet_aton,,[
	      AC_CHECK_LIB(resolv,inet_aton, [
			   EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lresolv"])])

387 388 389 390 391 392 393 394 395
dnl ---------------------------------------------------------------------------
dnl - Check for mkdtemp
dnl ---------------------------------------------------------------------------

mkdtemp_missing=false
AC_CHECK_FUNC(mkdtemp,
    [AC_DEFINE([HAVE_MKDTEMP], 1, [Have GlibC function to make temp dirs])],
    mkdtemp_missing=true)
AM_CONDITIONAL(MKDTEMP_MISSING, test x$mkdtemp_missing = xtrue)
396 397 398 399 400

dnl ---------------------------------------------------------------------------
dnl - Check for IPv6
dnl ---------------------------------------------------------------------------

401
AC_MSG_CHECKING([whether to enable IPv6])
402 403 404 405 406
AC_ARG_ENABLE(ipv6,
              AS_HELP_STRING([--enable-ipv6],
                             [Enables compilation of IPv6 code @<:@default=no@:>@]),,
              enable_ipv6=no)

407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436
if test x$enable_ipv6 = xyes; then
  AC_TRY_COMPILE([
    #include <sys/types.h>
    #include <sys/socket.h>],[
    struct sockaddr_storage ss;
    socket(AF_INET6, SOCK_STREAM, 0)
    ],
    have_ipv6=yes,
    have_ipv6=no
    )
  if test x$have_ipv6 = xyes; then
    have_getaddrinfo=no
    have_inet_ntop=no
    AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
    if test x$have_getaddrinfo != xyes; then
      for lib in bsd socket inet; do
        AC_CHECK_LIB($lib,getaddrinfo,["LIBS=$LIBS -l$lib";have_getaddrinfo=yes;break])
      done
    fi

    AC_CHECK_FUNC(inet_ntop,have_inet_ntop=yes)
    if test x$have_inet_ntop != xyes; then
      for lib in bsd nsl inet; do
        AC_CHECK_LIB($lib,inet_ntop,["LIBS=$LIBS -l$lib";have_inet_ntop=yes;break])
      done
    fi

    if test x$have_getaddrinfo = xyes; then
      if test x$have_inet_ntop = xyes; then
        have_ipv6=yes
437
        AC_DEFINE(ENABLE_IPV6, 1, [Define if we have ipv6])
438 439 440 441 442 443 444 445 446 447 448
        AC_MSG_RESULT($have_ipv6)
      else
        have_ipv6=no
        AC_MSG_RESULT($have_ipv6)
      fi
    fi
  fi
else
  AC_MSG_RESULT(no)
fi

449
dnl ---------------------------------------------------------------------------
450
dnl - Check for GDM user
451 452
dnl ---------------------------------------------------------------------------

453 454 455 456 457 458 459 460 461 462 463 464 465
withval=""
AC_ARG_WITH(user,
            AS_HELP_STRING([--with-user=<username>],
                           [specify gdm's user name]))

if test x$withval != x; then
	GDM_USERNAME="$withval"
else
	GDM_USERNAME=gdm
fi
AC_SUBST(GDM_USERNAME)
AC_DEFINE_UNQUOTED([GDM_USERNAME], "$GDM_USERNAME", [User to use])

466 467 468 469
dnl ---------------------------------------------------------------------------
dnl - Check for GDM group
dnl ---------------------------------------------------------------------------

470 471
withval=""
AC_ARG_WITH(group,
472 473
            AS_HELP_STRING([--with-group=<group>],
                           [specify gdm's group name]))
474 475 476 477 478 479 480 481 482

if test x$withval != x; then
	GDM_GROUPNAME="$withval"
else
	GDM_GROUPNAME=gdm
fi
AC_SUBST(GDM_GROUPNAME)
AC_DEFINE_UNQUOTED([GDM_GROUPNAME], "$GDM_GROUPNAME", [Group to use])

483

484
dnl ---------------------------------------------------------------------------
485
dnl - Check for PAM stuff
486 487
dnl ---------------------------------------------------------------------------

488
dnl PAM prefix (configuration files)
489 490
withval=""
AC_ARG_WITH(pam-prefix,
491 492 493 494 495 496
            AS_HELP_STRING([--with-pam-prefix=<prefix>],
                           [specify where pam files go]),
            [if test x$withval != x; then
               AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.")
             fi])

497 498 499 500 501 502 503
if test x$withval != x; then
	PAM_PREFIX="$withval"
else
	PAM_PREFIX='${sysconfdir}'
fi
AC_SUBST(PAM_PREFIX)

504 505 506 507 508 509 510 511
dnl PAM dir (dynamic modules)
AC_ARG_WITH([pam-mod-dir],
            [AS_HELP_STRING([--with-pam-mod-dir=DIR],
                            [directory to install pam modules in])],
            [], [with_pam_mod_dir='${libdir}/security'])
PAM_MOD_DIR="$with_pam_mod_dir"
AC_SUBST(PAM_MOD_DIR)

512
have_pam=no
513
AC_CHECK_LIB(pam, pam_start, have_pam=yes)
514

515 516
if test "x$have_pam" = "xyes"; then
        PAM_LIBS="${PAM_LIBS} -lpam"
517 518
else
	AC_MSG_ERROR("PAM libraries not found")
519
fi
520 521
AC_SUBST(HAVE_PAM)
AC_SUBST(PAM_LIBS)
522

523 524
AC_CHECK_HEADERS([security/pam_modutil.h security/pam_ext.h])
AC_CHECK_LIB(pam, pam_syslog, [AC_DEFINE(HAVE_PAM_SYSLOG, [], [Define to 1 if you have the pam_syslog function])])
525

526 527 528 529 530 531 532 533 534 535 536 537 538 539
dnl test whether struct pam_message is const (Linux) or not (Sun)
if test "x$have_pam" = "xyes"; then
   pam_appl_h="$ac_pam_includes/security/pam_appl.h"
   AC_MSG_CHECKING(for const pam_message)
   AC_EGREP_HEADER([struct pam_message],
      $pam_appl_h,
      [ AC_EGREP_HEADER([const struct pam_message],
                        $pam_appl_h,
                        [AC_MSG_RESULT(["const: Linux-type PAM"]) ],
                        [AC_MSG_RESULT(["nonconst: Sun-type PAM"])
                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
                        )],
       [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])]
       )
540 541 542 543 544 545 546 547 548
   AC_CHECK_DECL(PAM_BINARY_PROMPT,
                 [supports_pam_extensions=yes],
                 [supports_pam_extensions=no],
                 #include <security/pam_appl.h>
                )
fi
if test "x$supports_pam_extensions" = "xyes" ; then
	AM_CONDITIONAL(SUPPORTS_PAM_EXTENSIONS, true)
	AC_DEFINE(SUPPORTS_PAM_EXTENSIONS, 1, [Define if PAM supports GDMs custom extensions])
549
fi
550

551 552 553 554 555 556 557 558
AC_CHECK_LIB(keyutils, keyctl_read, [
        AC_DEFINE(HAVE_KEYUTILS, 1, [Define if have keyutils])
        KEYUTILS_LIBS="-lkeyutils"
        KEYUTILS_CFLAGS=""
])
AC_SUBST(KEYUTILS_LIBS)
AC_SUBST(KEYUTILS_CFLAGS)

559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
dnl Check if we can use the setpenv function to add specialvariable
dnl to the environment (such as the /etc/environment file under AIX)
AC_LINK_IFELSE([
	AC_LANG_PROGRAM([[
		#ifdef HAVE_USERSEC_H
		#include <usersec.h>
		#endif
		]],[[
		return (setpenv(NULL, (PENV_INIT | PENV_NOEXEC), NULL, NULL));
		]])],
	can_use_setpenv=yes,
	can_use_setpenv=no)

if test x$can_use_setpenv = xyes ; then
	AC_DEFINE(CAN_USE_SETPENV,,[Define this variable if the code to use
		the setpenv function can be compiled and used])
fi

#
# Can we use BSD's setusercontext
#
AC_CHECK_HEADER(login_cap.h, [
		EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil"
582
		AC_DEFINE(HAVE_LOGINCAP, 1, [Define if we have logincap])])
583 584 585 586 587

#
# Check for sys/sockio.h
#
AC_CHECK_HEADERS(sys/sockio.h, [
588
		 AC_DEFINE(HAVE_SYS_SOCKIO_H, 1, [Define if we have sys/sockio.h])])
589

590 591 592 593
#
# Check for libgen.h
#
AC_CHECK_HEADERS(libgen.h, [
594
		 AC_DEFINE(HAVE_LIBGEN_H, 1, [Define if we have libgen.h])])
595

596

597 598 599 600
dnl ---------------------------------------------------------------------------
dnl - Check for POSIX version of getpwnam_r
dnl ---------------------------------------------------------------------------

601 602 603 604 605
# Checking for a posix version of getpwnam_r
# if we are cross compiling and can not run the test
# assume getpwnam_r is the posix version
# it is up to the person cross compiling to change
# this behavior if desired
606

607 608 609 610 611
AC_LANG_PUSH(C)
AC_CACHE_CHECK([for posix getpwnam_r],
		ac_cv_func_posix_getpwnam_r,
		[AC_RUN_IFELSE([AC_LANG_PROGRAM(
[[
612
#define _POSIX_PTHREAD_SEMANTICS
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650
#include <errno.h>
#include <pwd.h>
]],
[[
    char buffer[10000];
    struct passwd pwd, *pwptr = &pwd;
    int error;
    errno = 0;
    error = getpwnam_r ("", &pwd, buffer,
                        sizeof (buffer), &pwptr);
   return (error < 0 && errno == ENOSYS)
	   || error == ENOSYS;
]])],
	[ac_cv_func_posix_getpwnam_r=yes],
	[ac_cv_func_posix_getpwnam_r=no],
        [ac_cv_func_posix_getpwnam_r=yes]
)])
AC_LANG_POP(C)

if test "$ac_cv_func_posix_getpwnam_r" = yes; then
	AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
		[Have POSIX function getpwnam_r])
else
	AC_CACHE_CHECK([for nonposix getpwnam_r],
		ac_cv_func_nonposix_getpwnam_r,
		[AC_TRY_LINK([#include <pwd.h>],
                      	[char buffer[10000];
                       	struct passwd pwd;
                       	getpwnam_r ("", &pwd, buffer, 
                               		sizeof (buffer));],
			[ac_cv_func_nonposix_getpwnam_r=yes],
			[ac_cv_func_nonposix_getpwnam_r=no])])
		if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
		AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
			[Have non-POSIX function getpwnam_r])
	fi
fi

651 652 653 654 655

dnl ---------------------------------------------------------------------------
dnl - Check for utmp stuff
dnl ---------------------------------------------------------------------------

656
AC_CHECK_HEADERS(utmp.h utmpx.h libutil.h sys/param.h)
657
AC_CHECK_FUNCS([getutxent updwtmpx updwtmp])
658
AC_CHECK_LIB(util, login, [
659
		   AC_DEFINE(HAVE_LOGIN, 1, [Define if have login])
660 661
		       EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
AC_CHECK_LIB(util, logout, [
662
		   AC_DEFINE(HAVE_LOGOUT, 1, [Define if have logout])
663 664
		       EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
AC_CHECK_LIB(util, logwtmp, [
665
	  	   AC_DEFINE(HAVE_LOGWTMP, 1, [Define if have logwtmp])
666
		       EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
667
GDM_CHECK_UTMP
668

669 670 671 672 673 674 675 676 677 678
AC_MSG_CHECKING(if utmpx structure has ut_syslen field)
AC_TRY_COMPILE([
  #include <utmpx.h>],[
  struct utmpx record;
  record.ut_syslen = sizeof (record.ut_host);
  ],
  have_ut_syslen=yes,
  have_ut_syslen=no
  )
if test x$have_ut_syslen = xyes; then
679
  AC_DEFINE(HAVE_UT_SYSLEN, 1, [Define if have ut_syslen record])
680 681 682
fi
AC_MSG_RESULT($have_ut_syslen)

683 684 685 686 687

dnl ---------------------------------------------------------------------------
dnl - Check for Xdmcp
dnl ---------------------------------------------------------------------------

688 689 690 691 692 693
XDMCP_LIBS=""
if test x$with_xdmcp != xno ; then
	xdmcp_save_CPPFLAGS="$CPPFLAGS"
	CPPFLAGS="$CPPFLAGS $X_CFLAGS"
	AC_CHECK_HEADER(X11/Xdmcp.h, [
		AC_CHECK_LIB(Xdmcp, XdmcpFlush, [
694
		     	AC_DEFINE(HAVE_LIBXDMCP, 1, [Define if have libxdmcp])
695 696 697 698
		     	XDMCP_LIBS="-lXdmcp"
		     	XDMCP_SUPPORT=yes],,[$X_LIBS -lX11 $X_EXTRA_LIBS])
	],,[#include <X11/Xproto.h>])

699
	if test x$with_xdmcp = xyes -a "x$XDMCP_SUPPORT" = "x" ; then
700 701 702 703 704 705
		AC_MSG_ERROR(XDMCP support requested but XDMCP libraries not found)
	fi
	CPPFLAGS="$xdmcp_save_CPPFLAGS"
fi
AC_SUBST(XDMCP_LIBS)

706
if test "x$XDMCP_SUPPORT" = "xyes" ; then
707 708 709 710 711 712 713 714 715 716 717 718 719
	AM_CONDITIONAL(XDMCP_SUPPORT, true)
	GDMCHOOSER=gdmchooser
else
        # No need for TCP Wrappers in case XDMCP is disabled
        if test x$with_tcp_wrappers != xno ; then
	        echo "TCP wrappers not needed if XDMCP is not enabled"
        fi
	with_tcp_wrappers=no
	AM_CONDITIONAL(XDMCP_SUPPORT, false)
	GDMCHOOSER=
fi
AC_SUBST(GDMCHOOSER)

720 721 722 723 724 725 726 727 728 729
dnl ---------------------------------------------------------------------------
dnl - Check OS
dnl ---------------------------------------------------------------------------

os_solaris=no
case "$host" in
   *solaris*) os_solaris=yes
   ;;
esac
AM_CONDITIONAL(OS_SOLARIS, test x$os_solaris = xyes)
730 731 732 733 734

dnl ---------------------------------------------------------------------------
dnl - Check for TCP Wrappers for XDMCP access control
dnl ---------------------------------------------------------------------------

735 736 737 738
if test x$with_tcp_wrappers = xno ; then
	echo "TCP wrappers disabled"
else
  LIBWRAP_PATH=""
739
  if test x$os_solaris = xyes ; then
740 741
	if test -f /usr/lib/libwrap.so; then
		LIBWRAP_PATH=/usr/lib/libwrap.so
742
		echo "Found $LIBWRAP_PATH" 1>&5
743 744
		nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH=""
        fi
745

746 747 748 749 750 751 752
	if test -z "$LIBWRAP_PATH"; then
		if test -f /usr/sfw/lib/libwrap.so; then
			LIBWRAP_PATH=/usr/sfw/lib/libwrap.so
			echo "Found $LIBWRAP_PATH" 1>&5
			nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH=""
        	fi
        fi
753 754 755 756 757 758 759 760 761 762 763

	if test -z "$LIBWRAP_PATH"; then
		echo "*********************************************************"
	        echo " You have a broken TCP wrappers library (setenv included)"
		echo " Please get the latest TCP wrappers package from your OS"
		echo " vendor, or recompile TCP wrappers to not include a"
		echo " setenv() implementation."
		echo
		echo "Not using TCP wrappers after all."
		echo "*********************************************************"
	else
764
		LIBWRAP_LIBS="-L/usr/sfw/lib -R/usr/sfw/lib -lwrap"
765
		AC_DEFINE(HAVE_TCPWRAPPERS, 1, [Define if have tcp wrappers])
766
	fi
767 768 769 770
  else
 	AC_CHECK_LIB([wrap], [hosts_ctl], [
 	LIBWRAP_LIBS="-lwrap"
 	LIBWRAP_PATH=auto
771
 	AC_DEFINE(HAVE_TCPWRAPPERS, 1, [Define if have tcp wrappers])])
772 773 774 775 776 777 778
  fi
 
  AC_MSG_CHECKING([whether to use TCP wrappers])
  if test -n "$LIBWRAP_PATH"; then
        AC_MSG_RESULT(yes)
  else
        AC_MSG_RESULT(no)
779 780
  fi

781 782 783
  dnl find out if we need -lnsl or whatever
  LIB_NSL=
  if test -n "$LIBWRAP_PATH"; then
784 785
		AC_MSG_CHECKING(whether -lwrap also requires -lnsl)
		ORIG_LIBS="$LIBS"
786
		LIBS="$EXTRA_DAEMON_LIBS $LIBS $LIBWRAP_LIBS"
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807
		AC_TRY_LINK([
#include <tcpd.h>
int allow_severity, deny_severity;
], [return hosts_access;], ,[
dnl try with -lnsl
OLD_LIBS="$LIBS"
LIBS="$LIBS -lnsl"
AC_TRY_LINK([
#include <tcpd.h>
int allow_severity, deny_severity;
], [return hosts_access;], LIB_NSL="-lnsl",
LIBWRAP_PATH="")
LIBS="$OLD_LIBS"
])
		LIBS="$ORIG_LIBS"
		if test -n "$LIB_NSL"; then
			AC_MSG_RESULT(yes)
			EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS $LIB_NSL"
		else
			AC_MSG_RESULT(no)
		fi
808
  fi
809 810
fi

811
AC_SUBST(LIBWRAP_LIBS)
812

813 814 815 816 817 818 819 820 821 822

dnl ---------------------------------------------------------------------------
dnl - Check for XFT2 (for gdm-settings-daemon)
dnl ---------------------------------------------------------------------------

if $PKG_CONFIG --exists xft ; then
  AC_DEFINE(HAVE_XFT2,,[Define if Xft functionality is available])
fi


823 824 825
dnl ---------------------------------------------------------------------------
dnl - Check for Xinput
dnl ---------------------------------------------------------------------------
826 827 828 829 830 831 832

have_xinput=
AC_CHECK_LIB(Xi, XOpenDevice, XINPUT_LIBS=-lXi)
if test "x$XINPUT_LIBS" = x; then
  save_LIBS="$LIBS"
  for xinputpath in $x_libraries /usr/X11R6/lib /usr/openwin/lib; do
    LIBS="-L$xinputpath -lXi"
833 834 835
    if test x$os_solaris = xyes ; then
       XINPUT_RPATH_FLAGS="-R$xinputpath"
    fi
836
    AC_MSG_CHECKING(for -lXi in $xinputpath)
837
    AC_TRY_LINK([], [XOpenDevice()], [
838 839 840 841 842 843 844
	AC_MSG_RESULT(yes)
	XINPUT_LIBS="$XINPUT_RPATH_FLAGS -L$xinputpath -lXi"
        LIBS="$save_LIBS"
	break],[AC_MSG_RESULT(no)])
  done
  if test "x$XINPUT_LIBS" = x; then
    AC_MSG_ERROR(Couldn't find the XInput library. Check config.log for details)
845
  fi
846 847 848
fi
AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes)
if test "x$have_xinput" = xyes; then
849
   AC_DEFINE(HAVE_XINPUT, 1, [Define if have xinput])
850 851 852
   X_EXTRA_LIBS="$X_EXTRA_LIBS $XINPUT_LIBS"
fi

853 854 855 856 857

dnl ---------------------------------------------------------------------------
dnl - Check for Xinerama
dnl ---------------------------------------------------------------------------

858 859 860 861 862 863 864 865
# X11 Xinerama extension
# Check for Xinerama extension (Solaris impl or Xfree impl)
xinerama_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"

ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"

if test ! x$with_xinerama = xno ; then
866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884
  # Check for XFree
  use_xfree_xinerama=yes
  AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
         [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
                       if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
                          X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
                       fi
                       AC_DEFINE(HAVE_XFREE_XINERAMA, 1, [Define if have xfree xinerama])
                       AC_DEFINE(HAVE_XINERAMA, 1, [Define if have xinerama])
                       XINERAMA_LIBS="-lXinerama"
                       XINERAMA_SUPPORT=yes,
                       use_xfree_xinerama=no,
                       [#include <X11/Xlib.h>])],
         use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
  AC_MSG_CHECKING(for Xinerama support on XFree86)
  AC_MSG_RESULT($use_xfree_xinerama);

  if test x$use_xfree_xinerama = xno ; then
    if test x$os_solaris = xyes ; then
885 886 887 888 889 890 891 892 893 894
	# Check for solaris
	use_solaris_xinerama=yes
	AC_CHECK_LIB(Xext, XineramaGetInfo,
                     use_solaris_xinerama=yes, use_solaris_xinerama=no,
                     $ALL_X_LIBS)
	if test "x$use_solaris_xinerama" = "xyes"; then
            AC_CHECK_HEADER(X11/extensions/xinerama.h,
                            if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
 				X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
                            fi
895 896
                            AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1, [Define if have Solaris xinerama])
                            AC_DEFINE(HAVE_XINERAMA, 1, [Define if have xinerama])
897 898 899 900 901 902 903
		     	    XINERAMA_LIBS=""
		     	    XINERAMA_SUPPORT=yes,
                            use_solaris_xinerama=no,
                            [#include <X11/Xlib.h>])
	fi
        AC_MSG_CHECKING(for Xinerama support on Solaris)
	AC_MSG_RESULT($use_solaris_xinerama);
904
    fi
905
  fi
906 907 908 909 910
fi

AC_SUBST(XINERAMA_LIBS)
CPPFLAGS="$xinerama_save_cppflags"

911 912 913 914
dnl ---------------------------------------------------------------------------
dnl - Check for systemd support
dnl ---------------------------------------------------------------------------

915
PKG_CHECK_MODULES(SYSTEMD,
916
                  [libsystemd])
917

918 919
AC_SUBST(SYSTEMD_CFLAGS)
AC_SUBST(SYSTEMD_LIBS)
920

921
PKG_CHECK_MODULES(JOURNALD,
922
                  [libsystemd],
923 924 925
                  [have_journald=yes], [have_journald=no])

if test "x$enable_systemd_journal" = "xauto" ; then
926
        if test x$have_journald = xno ; then
927
                use_journald=no
928 929
        else
                use_journald=yes
930
        fi
931

932 933 934 935 936 937 938 939 940 941 942 943 944 945
else
        use_journald="$enable_systemd_journal"
fi

if test "x$use_journald" != "xno" ; then
        if test "x$have_journald" = "xno"; then
                AC_MSG_ERROR([journald support explicitly required, but journald not found])
        fi

        AC_DEFINE(ENABLE_SYSTEMD_JOURNAL, 1, [Define to enable systemd journal support])
fi
AC_SUBST(JOURNALD_CFLAGS)
AC_SUBST(JOURNALD_LIBS)

946
if test "x$enable_wayland_support" != "xno" ; then
947 948 949
        AC_DEFINE(ENABLE_WAYLAND_SUPPORT, 1, [Define to enable wayland support])
fi

950 951 952 953
AC_PATH_PROG(SYSTEMD_X_SERVER, systemd-multi-seat-x, [/lib/systemd/systemd-multi-seat-x], [/lib/systemd:/usr/lib/systemd:$PATH])
AC_SUBST(SYSTEMD_X_SERVER)
AC_DEFINE_UNQUOTED(SYSTEMD_X_SERVER,"$SYSTEMD_X_SERVER",[Path to systemd X server wrapper])

954 955 956 957
if test "x$with_systemdsystemunitdir" != xno; then
        AC_SUBST(SYSTEMD_SYSTEM_UNIT_DIR, [$with_systemdsystemunitdir])
fi

Ray Strode's avatar
Ray Strode committed
958 959
AM_CONDITIONAL(INSTALL_SYSTEMD_UNITS, test x$with_systemdsystemunitdir != xno)

960 961 962 963 964 965 966 967 968
dnl ---------------------------------------------------------------------------
dnl - Check for plymouth support
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(PLYMOUTH,
                  [ply-boot-client],
                  [have_plymouth=yes], [have_plymouth=no])

if test "x$with_plymouth" = "xauto" ; then
        if test x$have_plymouth = xno ; then
969
                use_plymouth=no
970 971 972 973 974 975 976
        else
                use_plymouth=yes
        fi
else
        use_plymouth="$with_plymouth"
fi

977
PLYMOUTH_QUIT_SERVICE=""
978 979
if test "x$use_plymouth" != "xno" ; then
        if test "x$have_plymouth" = "xno"; then
980
                AC_MSG_ERROR([Plymouth support explicitly required, but plymouth not found])
981 982 983
        fi

        AC_DEFINE(WITH_PLYMOUTH, 1, [Define to enable plymouth support])
984
        PLYMOUTH_QUIT_SERVICE="plymouth-quit.service"
985 986 987
fi
AC_SUBST(PLYMOUTH_CFLAGS)
AC_SUBST(PLYMOUTH_LIBS)
988
AC_SUBST(PLYMOUTH_QUIT_SERVICE)
989

990
dnl ---------------------------------------------------------------------------
991
dnl - Check for D-Bus
992 993 994 995
dnl ---------------------------------------------------------------------------

dnl - Are we specifying a different dbus root ?
AC_ARG_WITH(dbus-sys,
996 997
            AS_HELP_STRING([--with-dbus-sys=<dir>],
	                   [where D-BUS system.d directory is]))
998
AC_ARG_WITH(dbus-services,
999 1000 1001
            AS_HELP_STRING([--with-dbus-services=<dir>],
	                   [where D-BUS services directory is]))

1002 1003 1004 1005 1006 1007 1008
if ! test -z "$with_dbus_sys" ; then
        DBUS_SYS_DIR="$with_dbus_sys"
else
        DBUS_SYS_DIR="$sysconfdir/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)

1009
dnl ---------------------------------------------------------------------------
1010
dnl - Check for ISO Codes
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020
dnl ---------------------------------------------------------------------------

AC_MSG_CHECKING([whether iso-codes has iso-639 domain])
if $PKG_CONFIG --variable=domains iso-codes | grep 639 >/dev/null ; then
	AC_MSG_RESULT([yes])
else
	AC_MSG_RESULT([no])
fi
AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
ISO_CODES=iso-codes
1021

1022

1023 1024 1025 1026 1027 1028
dnl ---------------------------------------------------------------------------
dnl check for RBAC
dnl ---------------------------------------------------------------------------

msg_rbac_shutdown=no
AC_ARG_ENABLE(rbac-shutdown,
1029 1030 1031 1032
              AC_HELP_STRING([--enable-rbac-shutdown=<key>],
	                     [Build with RBAC support specifying shutdown/reboot RBAC authentication key]),
              enable_rbac_shutdown=$enableval,enable_rbac_shutdown=no)

1033 1034 1035 1036 1037 1038 1039 1040 1041
if test "x$enable_rbac_shutdown" != "xno"; then
        RBAC_LIBS="-lsecdb -lsocket -lnsl"
        AC_DEFINE(ENABLE_RBAC_SHUTDOWN, [], [Set if we build with RBAC support])
        AC_DEFINE_UNQUOTED(RBAC_SHUTDOWN_KEY, "$enable_rbac_shutdown", [Set if we build with RBAC support])
        msg_rbac_shutdown="yes, using key $enable_rbac_shutdown"
fi
AC_SUBST(RBAC_LIBS)


1042 1043 1044 1045 1046 1047
dnl ---------------------------------------------------------------------------
dnl check for backtrace support
dnl ---------------------------------------------------------------------------

AC_CHECK_HEADERS(execinfo.h)

1048 1049 1050 1051 1052 1053
dnl ---------------------------------------------------------------------------
dnl check for process control
dnl ---------------------------------------------------------------------------

AC_CHECK_HEADERS(sys/prctl.h)

1054 1055 1056 1057
dnl ---------------------------------------------------------------------------
dnl - Define some variables to represent the directories we use.
dnl ---------------------------------------------------------------------------

1058 1059
AC_SUBST(gdmlocaledir, ${gdmconfdir})
AC_SUBST(pixmapdir, ${datadir}/pixmaps)
1060

1061 1062 1063
AC_ARG_WITH(log-dir,
            AS_HELP_STRING([--with-log-dir=<file>],
                           [log dir]))
1064 1065 1066 1067 1068 1069 1070 1071

if ! test -z "$with_log_dir"; then
   GDM_LOG_DIR=$with_log_dir
else
   GDM_LOG_DIR=/var/log/gdm
fi
AC_SUBST(logdir, $GDM_LOG_DIR)

1072 1073
withval=""
AC_ARG_WITH(at-bindir,
1074 1075
            AS_HELP_STRING([--with-at-bindir=<PATH>]
                           [PATH to Accessible Technology programs @<:@default=BINDIR@:>@]))
1076 1077 1078 1079

if test x$withval != x; then
	AT_BINDIR="$withval"
else
1080
	AT_BINDIR='${bindir}'
1081 1082 1083 1084 1085
fi

AC_SUBST(AT_BINDIR)

withval=""
1086
AC_ARG_WITH(defaults_conf,
1087 1088
            AS_HELP_STRING([--with-defaults-conf=<FILENAME>],
                           [FILENAME to give to defaults file @<:@default=DATADIR/gdm/defaults.conf@:>@]))
1089 1090

if test x$withval != x; then
1091
	GDM_DEFAULTS_CONF="$withval"
1092
else
1093
	GDM_DEFAULTS_CONF='${datadir}/gdm/defaults.conf'
1094 1095
fi

1096 1097 1098 1099
AC_SUBST(GDM_DEFAULTS_CONF)

withval=""
AC_ARG_WITH(custom_conf,
1100 1101
            AS_HELP_STRING([--with-custom-conf=<FILENAME>],
                           [FILENAME to give to custom configuration file @<:@default=GDMCONFDIR/custom.conf@:>@]))
1102 1103 1104 1105

if test x$withval != x; then
	GDM_CUSTOM_CONF="$withval"
else
1106
	GDM_CUSTOM_CONF='${gdmconfdir}/custom.conf'
1107 1108 1109
fi

AC_SUBST(GDM_CUSTOM_CONF)
1110
AC_SUBST(GDM_OLD_CONF, '${gdmconfdir}/gdm.conf')
1111

1112 1113 1114 1115 1116 1117 1118 1119
AC_ARG_WITH(gnome-settings-daemon-directory,
              [AC_HELP_STRING([--with-gnome-settings-daemon-directory],
                              [Specify the directory of gnome-settings-daemon used by the chooser @<:@default=libexecdir@:>@])],,
                              [with_gnome_settings_daemon_directory="\${libexecdir}"])

GNOME_SETTINGS_DAEMON_DIR=$with_gnome_settings_daemon_directory
AC_SUBST(GNOME_SETTINGS_DAEMON_DIR)

1120 1121 1122 1123 1124 1125 1126 1127
AC_ARG_WITH(check-accelerated-directory,
              [AC_HELP_STRING([--with-check-accelerated-directory],
                              [Specify the directory of gnome-session-check-accelerated @<:@default=libexecdir@:>@])],,
                              [with_check_accelerated_directory="\${libexecdir}"])

CHECK_ACCELERATED_DIR=$with_check_accelerated_directory
AC_SUBST(CHECK_ACCELERATED_DIR)

1128 1129 1130
dnl ---------------------------------------------------------------------------
dnl - Check for XEvIE extension support
dnl ---------------------------------------------------------------------------
1131

1132
AC_ARG_WITH(xevie,
1133 1134 1135
            AS_HELP_STRING([--with-xevie],
                           [Add XEvIE Xserver extension support @<:@default=no@:>@]),,
            with_xevie=no)
1136 1137 1138 1139 1140 1141 1142 1143

if test x$with_xevie != xno ; then
	XEVIE_OPTION="+extension XEVIE"
else
	XEVIE_OPTION=""
fi

AC_SUBST(XEVIE_OPTION)
1144
AC_DEFINE_UNQUOTED(XEVIE_OPTION,"$XEVIE_OPTION",[Define xevie option])
1145

1146 1147 1148 1149
dnl ---------------------------------------------------------------------------
dnl - Check for audit framework
dnl ---------------------------------------------------------------------------

1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163
# Check for Solaris auditing API
# Note, Solaris auditing not supported for Solaris 9 or earlier and
# should not be used on these versions of Solaris if auditing is
# required.  Solaris auditing is only supported on systems that
# support the ADT_USER enumeration value.
#
AC_MSG_CHECKING(for Solaris auditing API)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <bsm/adt.h>
adt_user_context = ADT_USER;
]], [[]])], [ check_sun_audit=yes ], [ check_sun_audit=no ])

if test ${check_sun_audit} = yes
then
1164
   AC_DEFINE(HAVE_ADT, 1, [Define if have adt])
1165
   PAM_LIBS="$PAM_LIBS -lbsm"
1166 1167 1168 1169
   AC_MSG_RESULT(yes)
else
   AC_MSG_RESULT(no)
fi
1170 1171 1172 1173 1174
AM_CONDITIONAL(HAVE_ADT, test x$check_sun_audit = xyes)

# Check for Linux auditing API
#
AC_ARG_WITH(libaudit,
1175 1176 1177
            AS_HELP_STRING([--with-libaudit],
                           [Add Linux audit support @<:@default=auto@:>@]),,
            with_libaudit=auto)
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193

# libaudit detection
if test x$with_libaudit = xno ; then
    have_libaudit=no;
else
    # See if we have audit daemon library
    AC_CHECK_LIB(audit, audit_log_user_message,
                 have_libaudit=yes, have_libaudit=no)
fi

AM_CONDITIONAL(HAVE_LIBAUDIT, test x$have_libaudit = xyes)

if test x$have_libaudit = xyes ; then
    PAM_LIBS="$PAM_LIBS -laudit"
    AC_DEFINE(HAVE_LIBAUDIT,1,[linux audit support])
fi
1194

1195 1196 1197 1198 1199
#
# Subst the extra libs
#
AC_SUBST(EXTRA_DAEMON_LIBS)
AC_SUBST(EXTRA_CHOOSER_LIBS)
1200
AC_SUBST(EXTRA_FLEXI_LIBS)
1201 1202
AC_SUBST(EXTRA_DYNAMIC_LIBS)
AC_SUBST(EXTRA_SETUP_LIBS)
1203
AC_SUBST(EXTRA_TEST_LIBS)
1204

1205 1206 1207 1208 1209 1210
# Check for Solaris logindevperm support
#
AC_CHECK_LIB(devinfo, di_devperm_login, [
                        AC_DEFINE(HAVE_LOGINDEVPERM)
                            PAM_LIBS="$PAM_LIBS -ldevinfo" ])

1211 1212 1213 1214
dnl ---------------------------------------------------------------------------
dnl - Check for X Server location
dnl ---------------------------------------------------------------------------

1215 1216 1217 1218
# First check with "! -h" for /usr/X11R6 and /usr/X11 since they often
# symlink to each other, and configure should use the more stable
# location (the real directory) if possible.
#
1219 1220 1221 1222 1223 1224 1225
# On Solaris, the /usr/bin/Xserver script is used to decide whether to
# use Xsun or Xorg, so this is used on Solaris.
#
# When testing for /usr/X11R6, first check with "! -h" for /usr/X11R6
# and /usr/X11 since they often symlink to each other, and configure
# should use the more stable location (the real directory) if possible.
#
1226 1227 1228 1229 1230
if test -x /usr/bin/X; then
   X_PATH="/usr/bin"
   X_SERVER_PATH="/usr/bin"
   X_SERVER="/usr/bin/X"
elif test -x /usr/X11/bin/Xserver; then
1231 1232 1233 1234
   X_PATH="/usr/X11/bin"
   X_SERVER_PATH="/usr/X11/bin"
   X_SERVER="/usr/X11/bin/Xserver"
elif test ! -h /usr/X11R6 -a -x /usr/X11R6/bin/X; then
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245
   X_PATH="/usr/X11R6/bin"
   X_SERVER_PATH="/usr/X11R6/bin"
   X_SERVER="/usr/X11R6/bin/X"
elif test ! -h /usr/X11 -a -x /usr/X11/bin/X; then
   X_PATH="/usr/X11/bin"
   X_SERVER_PATH="/usr/X11/bin"
   X_SERVER="/usr/X11/bin/X"
elif test -x /usr/X11R6/bin/X; then
   X_PATH="/usr/X11R6/bin"
   X_SERVER_PATH="/usr/X11R6/bin"
   X_SERVER="/usr/X11R6/bin/X"
1246 1247 1248 1249
elif test -x /usr/bin/Xorg; then
   X_PATH="/usr/bin"
   X_SERVER_PATH="/usr/bin"
   X_SERVER="/usr/bin/Xorg"
1250 1251 1252 1253 1254
elif test -x /usr/X11/bin/X; then
   X_PATH="/usr/X11/bin"
   X_SERVER_PATH="/usr/X11/bin"
   X_SERVER="/usr/X11/bin/X"
elif test -x /usr/openwin/bin/Xsun; then
1255
   # Do not add /usr/openwin/bin here because on Solaris you need
1256 1257
   # /usr/openwin/bin in your PATH even if you are using the Xorg
   # Xserver.  We add this to the path below.
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268
   X_PATH="/usr/openwin/bin"
   X_SERVER_PATH="/usr/openwin/bin"
   X_SERVER="/usr/openwin/bin/Xsun"
elif test -x /opt/X11R6/bin/X; then
   X_PATH="/opt/X11R6/bin"
   X_SERVER_PATH="/opt/X11R6/bin"
   X_SERVER="/opt/X11R6/bin/X"
else
   # what to do, what to do, this is wrong, but this just sets the
   # defaults, perhaps this user is cross compiling or some such
   X_PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin"
1269 1270
   X_SERVER_PATH="/usr/bin"
   X_SERVER="/usr/bin/X"
1271 1272
fi

1273 1274 1275 1276 1277 1278 1279 1280
dnl ---------------------------------------------------------------------------
dnl - Check if Xorg is new enough to require '-listen tcp' (1.17)
dnl ---------------------------------------------------------------------------

if $PKG_CONFIG --atleast-version=1.17 xorg-server; then
   AC_DEFINE([HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY], [], [XServer disables tcp access by default])
fi

1281
dnl ---------------------------------------------------------------------------
1282
dnl - Expand vars
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292
dnl ---------------------------------------------------------------------------

AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
AS_AC_EXPAND(DATADIR, $datadir)
AS_AC_EXPAND(BINDIR, $bindir)
AS_AC_EXPAND(SBINDIR, $sbindir)
AS_AC_EXPAND(LIBDIR, $libdir)
AS_AC_EXPAND(LIBEXECDIR, $libexecdir)

1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303
dnl ---------------------------------------------------------------------------
dnl - runtime directory
dnl ---------------------------------------------------------------------------

AC_ARG_WITH([run-dir],
            AS_HELP_STRING([--with-run-dir=<file>],
                           [runtime directory]))

if ! test -z "$with_run_dir"; then
   GDM_RUN_DIR=$with_run_dir
else
1304
   GDM_RUN_DIR=${localstatedir}/run/gdm
1305 1306 1307 1308
fi

AC_SUBST([GDM_RUN_DIR])

1309 1310 1311
dnl ---------------------------------------------------------------------------
dnl - PID file
dnl ---------------------------------------------------------------------------
1312

1313 1314 1315
AC_ARG_WITH(pid-file,
            AS_HELP_STRING([--with-pid-file=<file>],
                           [pid file]))
1316 1317 1318 1319

if ! test -z "$with_pid_file"; then
   GDM_PID_FILE=$with_pid_file
else
1320
   GDM_PID_FILE=$GDM_RUN_DIR/gdm.pid
1321 1322
fi

Luca Bruno's avatar
Luca Bruno committed
1323
AS_AC_EXPAND(GDM_PID_FILE, "$GDM_PID_FILE")
1324 1325
AC_DEFINE_UNQUOTED(GDM_PID_FILE, "$GDM_PID_FILE", [pid file])

1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336
dnl ---------------------------------------------------------------------------
dnl - ran once marker
dnl ---------------------------------------------------------------------------

AC_ARG_WITH(ran-once-marker-directory,
            AS_HELP_STRING([--with-ran-once-marker-directory=<dir>],
                           [ran once marker directory]))

if ! test -z "$with_ran_once_marker_directory"; then
   GDM_RAN_ONCE_MARKER_DIR=$with_ran_once_marker_directory
else
1337
   GDM_RAN_ONCE_MARKER_DIR=$GDM_RUN_DIR
1338 1339
fi
AC_SUBST(GDM_RAN_ONCE_MARKER_DIR)
1340 1341
AS_AC_EXPAND(GDM_RAN_ONCE_MARKER_DIR_EXPANDED, $GDM_RAN_ONCE_MARKER_DIR)
AC_DEFINE_UNQUOTED(GDM_RAN_ONCE_MARKER_DIR, "$GDM_RAN_ONCE_MARKER_DIR_EXPANDED", [ran once marker dir])
1342 1343 1344

GDM_RAN_ONCE_MARKER_FILE="$GDM_RAN_ONCE_MARKER_DIR/ran-once-marker"
AC_SUBST(GDM_RAN_ONCE_MARKER_FILE)
1345 1346
AS_AC_EXPAND(GDM_RAN_ONCE_MARKER_FILE_EXPANDED, $GDM_RAN_ONCE_MARKER_FILE)
AC_DEFINE_UNQUOTED(GDM_RAN_ONCE_MARKER_FILE, "$GDM_RAN_ONCE_MARKER_FILE_EXPANDED", [ran once marker file])
1347

1348 1349 1350 1351
dnl ---------------------------------------------------------------------------
dnl - GREETER WORKING DIRECTORY
dnl ---------------------------------------------------------------------------

1352 1353 1354
AC_ARG_WITH(working-directory,
            AS_HELP_STRING([--with-working-dir=<dir>],
                           [working directory]))
1355 1356 1357 1358 1359 1360 1361 1362 1363

if ! test -z "$with_working_directory"; then
   GDM_WORKING_DIR=$with_working_directory
else
   GDM_WORKING_DIR=${localstatedir}/lib/gdm
fi

AC_SUBST(GDM_WORKING_DIR)

Ray Strode's avatar
Ray Strode committed
1364 1365 1366 1367
dnl ---------------------------------------------------------------------------
dnl - Directory for X auth cookies
dnl ---------------------------------------------------------------------------

1368 1369 1370
AC_ARG_WITH(xauth-dir,
            AS_HELP_STRING([--with-xauth-dir=<dir>],
                           [xauth cookie directory]))
Ray Strode's avatar
Ray Strode committed
1371 1372 1373 1374

if ! test -z "$with_xauth_dir"; then
   GDM_XAUTH_DIR=$with_xauth_dir
else
1375
   GDM_XAUTH_DIR=$GDM_RUN_DIR
Ray Strode's avatar
Ray Strode committed
1376 1377 1378 1379
fi

AC_SUBST(GDM_XAUTH_DIR)

1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390
dnl ---------------------------------------------------------------------------
dnl - Directory for greeter screenshot
dnl ---------------------------------------------------------------------------

AC_ARG_WITH(screenshot-dir,
            AS_HELP_STRING([--with-screenshot-dir=<dir>],
                           [directory to store greeter screenshot]))

if ! test -z "$with_screenshot_dir"; then
   GDM_SCREENSHOT_DIR=$with_screenshot_dir
else
1391
   GDM_SCREENSHOT_DIR=$GDM_RUN_DIR/greeter
1392 1393 1394 1395
fi

AC_SUBST(GDM_SCREENSHOT_DIR)

1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413
dnl ---------------------------------------------------------------------------
dnl - runtime conf
dnl ---------------------------------------------------------------------------

withval=""
AC_ARG_WITH(runtime_conf,
            AS_HELP_STRING([--with-runtime-conf=<FILENAME>],
                           [FILENAME to give to runtime configuration file @<:@default=GDM_RUN_DIR/custom.conf@:>@]))

if test x$withval != x; then
	GDM_RUNTIME_CONF="$withval"
else
	GDM_RUNTIME_CONF="$GDM_RUN_DIR/custom.conf"
fi

AC_SUBST(GDM_RUNTIME_CONF)


1414 1415 1416 1417 1418 1419 1420 1421
dnl ---------------------------------------------------------------------------
dnl - Finish
dnl ---------------------------------------------------------------------------


# Turn on the additional warnings last, so -Werror doesn't affect other tests.

AC_ARG_ENABLE(more-warnings,
1422 1423 1424
              AS_HELP_STRING([--enable-more-warnings],
                             [Maximum compiler warnings]),
              set_more_warnings="$enableval",[
1425
	      if test -d $srcdir/.git; then
1426 1427 1428 1429 1430
	        set_more_warnings=yes
	      else
	        set_more_warnings=no
              fi])

1431 1432 1433 1434 1435 1436 1437
AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
        AC_MSG_RESULT(yes)
        CFLAGS="\
        -Wall \
        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
        -Wnested-externs -Wpointer-arith \
1438
        -Wcast-align -Wsign-compare \
1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459
        $CFLAGS"

        for option in -Wno-strict-aliasing -Wno-sign-compare; do
                SAVE_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS $option"
                AC_MSG_CHECKING([whether gcc understands $option])
                AC_TRY_COMPILE([], [],
                        has_option=yes,
                        has_option=no,)
                if test $has_option = no; then
                        CFLAGS="$SAVE_CFLAGS"
                fi
                AC_MSG_RESULT($has_option)
                unset has_option
                unset SAVE_CFLAGS
        done
        unset option
else
        AC_MSG_RESULT(no)
fi

1460
#
1461 1462 1463
# Enable Debug
#
AC_ARG_ENABLE(debug,
1464 1465 1466 1467
              AS_HELP_STRING([--enable-debug],
                             [turn on debugging]),,
              enable_debug=yes)

1468 1469 1470 1471 1472 1473 1474 1475
if test "$enable_debug" = "yes"; then
	DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
else
	if test "x$enable_debug" = "xno"; then
		DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
  	else
    		DEBUG_CFLAGS=""
  	fi
1476
fi
1477
AC_SUBST(DEBUG_CFLAGS)
1478

1479 1480 1481 1482
#
# Enable Profiling
#
AC_ARG_ENABLE(profiling,
1483 1484 1485 1486
              AS_HELP_STRING([--enable-profiling],
                             [turn on profiling]),,
              enable_profiling=yes)

1487 1488 1489 1490
if test "$enable_profiling" = "yes"; then
    AC_DEFINE(ENABLE_PROFILING,1,[enable profiling])
fi

1491 1492 1493 1494 1495 1496 1497 1498 1499
#
# Set SHELL to use in scripts.
#
if test x$os_solaris = xyes ; then
   XSESSION_SHELL=/bin/ksh
else
   XSESSION_SHELL=/bin/sh
fi

1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513
#
# Set VT to use for initial server
#
AC_ARG_WITH(initial-vt,
        AS_HELP_STRING([--with-initial-vt=<nr>],
                [Initial virtual terminal to use]))
if ! test -z "$with_initial_vt"; then
        GDM_INITIAL_VT="$with_initial_vt"
else
        GDM_INITIAL_VT="1"
fi
AC_SUBST(GDM_INITIAL_VT)
AC_DEFINE_UNQUOTED(GDM_INITIAL_VT, "$GDM_INITIAL_VT", [Initial Virtual Terminal])

1514 1515
# Set configuration choices.
#
1516
AC_SUBST(XSESSION_SHELL)
1517
AC_DEFINE_UNQUOTED(XSESSION_SHELL,"$XSESSION_SHELL",[xsession shell])
1518
AC_SUBST(SOUND_PROGRAM)
1519
AC_DEFINE_UNQUOTED(SOUND_PROGRAM,"$SOUND_PROGRAM",[])
1520 1521 1522 1523

AC_SUBST(X_PATH)
AC_SUBST(X_SERVER)
AC_SUBST(X_SERVER_PATH)
1524 1525
AC_DEFINE_UNQUOTED(X_SERVER,"$X_SERVER",[])
AC_DEFINE_UNQUOTED(X_SERVER_PATH,"$X_SERVER_PATH",[])
1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538

## Stuff for debian/changelog.in
#if test -e "debian/changelog"; then
#  DEBIAN_DATESTAMP=`head -1 debian/changelog| sed -e 's/.*cvs.//' -e 's/).*//'`
#  DEBIAN_DATE=`grep '^ --' debian/changelog | head -1 | sed -e 's/.*  //'`
#else
#  DEBIAN_DATESTAMP=`date +%Y%m%d%H%M%s`
#  DEBIAN_DATE=`date -R`
#fi
#
#AC_SUBST(DEBIAN_DATESTAMP)
#AC_SUBST(DEBIAN_DATE)

1539
AC_CONFIG_FILES([
1540
Makefile
1541 1542
pam-extensions/Makefile
pam-extensions/gdm-pam-extensions.pc
1543
daemon/Makefile
1544
docs/Makefile
1545
chooser/Makefile
1546 1547
libgdm/Makefile
libgdm/gdm.pc
1548
utils/Makefile
1549
pam_gdm/Makefile
1550
data/gdm.conf
1551
data/Makefile
1552
data/applications/Makefile
1553
data/autostart/Makefile
William Jon McCann's avatar
William Jon McCann committed
1554 1555 1556 1557
data/pixmaps/Makefile
data/pixmaps/16x16/Makefile
data/pixmaps/32x32/Makefile
data/pixmaps/48x48/Makefile
1558
data/dconf/gdm
1559
common/Makefile
1560
po/Makefile.in
1561
tests/Makefile
1562 1563
])

1564 1565
AC_OUTPUT

1566 1567 1568
dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------
1569

1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584
echo "
                    GDM $VERSION
                    ============

	prefix:                   ${prefix}
	exec_prefix:              ${exec_prefix}
        libdir:                   ${libdir}
        bindir:                   ${bindir}
        sbindir:                  ${sbindir}
        sysconfdir:               ${sysconfdir}
        sysconfsubdir:            ${sysconfsubdir}
        gdmconfdir:               ${gdmconfdir}
        dmconfdir:                ${dmconfdir}
        localstatedir:            ${localstatedir}
        datadir:                  ${datadir}
1585
	gnome-settings-daemon location: ${with_gnome_settings_daemon_directory}
1586
	gnome-session-check-accel location: ${with_check_accelerated_directory}
1587 1588 1589 1590 1591
	source code location:	  ${srcdir}
	compiler:		  ${CC}
	cflags:		          ${CFLAGS}
        Maintainer mode:          ${USE_MAINTAINER_MODE}

1592 1593 1594
        user:                     ${GDM_USERNAME}
        group:                    ${GDM_GROUPNAME}

1595 1596
        dbus-1 system.d dir:      ${DBUS_SYS_DIR}
        PAM prefix:               ${PAM_PREFIX}
1597
        PAM module dir:           ${PAM_MOD_DIR}
1598
        PAM config:               ${with_default_pam_config}
1599 1600 1601 1602 1603 1604 1605
        X server:                 ${X_SERVER}
"

dnl TCP Wrappers support?
if test x"$LIBWRAP_PATH" = x ; then
	echo \
"        TCP Wrappers support:     no"
1606
else
1607
	echo \
1608
"        TCP Wrappers support:     yes"
1609 1610
fi

1611 1612 1613
echo \
"        Xinerama support:         ${XINERAMA_SUPPORT}
        XDMCP support:            ${XDMCP_SUPPORT}
1614
        SELinux support:          ${use_selinux}
1615
        systemd unit dir:         ${with_systemdsystemunitdir}
1616
        plymouth support:         ${use_plymouth}
1617
        wayland support:          ${enable_wayland_support}
1618
        Build with RBAC:          ${msg_rbac_shutdown}
1619
        Initial VT:               ${GDM_INITIAL_VT}
1620
        Enable documentation:     ${enable_documentation}
1621
        Install GDM's Xsession:   ${enable_gdm_xsession}
1622
"