[134] | 1 | |
---|
| 2 | AC_PREREQ([2.60]) |
---|
| 3 | AC_INIT([gdm], |
---|
| 4 | [2.28.1], |
---|
| 5 | [http://bugzilla.gnome.org/enter_bug.cgi?product=gdm]) |
---|
| 6 | |
---|
| 7 | AC_CONFIG_SRCDIR([daemon/gdm-manager.c]) |
---|
| 8 | |
---|
| 9 | AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 -Wall]) |
---|
| 10 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
---|
| 11 | AM_MAINTAINER_MODE |
---|
| 12 | |
---|
| 13 | # for utmpx stuff |
---|
| 14 | AC_GNU_SOURCE |
---|
| 15 | |
---|
| 16 | AC_STDC_HEADERS |
---|
| 17 | AC_PROG_CXX |
---|
| 18 | AM_PROG_CC_C_O |
---|
| 19 | AC_PROG_LIBTOOL() |
---|
| 20 | |
---|
| 21 | AC_HEADER_STDC |
---|
| 22 | |
---|
| 23 | AC_SUBST(VERSION) |
---|
| 24 | |
---|
| 25 | AM_CONFIG_HEADER(config.h) |
---|
| 26 | AC_CONFIG_MACRO_DIR([m4]) |
---|
| 27 | |
---|
| 28 | IT_PROG_INTLTOOL([0.40.0]) |
---|
| 29 | |
---|
| 30 | GNOME_DOC_INIT |
---|
| 31 | |
---|
| 32 | GETTEXT_PACKAGE=gdm |
---|
| 33 | AC_SUBST(GETTEXT_PACKAGE) |
---|
| 34 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package]) |
---|
| 35 | |
---|
| 36 | AM_GLIB_GNU_GETTEXT |
---|
| 37 | |
---|
| 38 | dnl --------------------------------------------------------------------------- |
---|
| 39 | dnl - Dependencies |
---|
| 40 | dnl --------------------------------------------------------------------------- |
---|
| 41 | |
---|
| 42 | DBUS_GLIB_REQUIRED_VERSION=0.74 |
---|
| 43 | GLIB_REQUIRED_VERSION=2.15.4 |
---|
| 44 | GTK_REQUIRED_VERSION=2.10.0 |
---|
| 45 | GSTREAMER_REQUIRED_VERSION=0.10.0 |
---|
| 46 | PANGO_REQUIRED_VERSION=1.3.0 |
---|
| 47 | LIBGLADE_REQUIRED_VERSION=1.99.2 |
---|
| 48 | SCROLLKEEPER_REQUIRED_VERSION=0.1.4 |
---|
| 49 | GCONF_REQUIRED_VERSION=2.6.1 |
---|
| 50 | GNOME_PANEL_REQUIRED_VERSION=2.0.0 |
---|
| 51 | LIBXKLAVIER_REQUIRED_VERSION=4.0 |
---|
| 52 | LIBCANBERRA_GTK_REQUIRED_VERSION=0.4 |
---|
| 53 | #FONTCONFIG_REQUIRED_VERSION=2.6.0 |
---|
| 54 | FONTCONFIG_REQUIRED_VERSION=2.5.0 |
---|
| 55 | DEVKIT_POWER_REQUIRED_VERSION=008 |
---|
| 56 | |
---|
| 57 | EXTRA_COMPILE_WARNINGS(yes) |
---|
| 58 | |
---|
| 59 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0) |
---|
| 60 | AC_SUBST(GTHREAD_CFLAGS) |
---|
| 61 | AC_SUBST(GTHREAD_LIBS) |
---|
| 62 | |
---|
| 63 | PKG_CHECK_MODULES(COMMON, |
---|
| 64 | dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION |
---|
| 65 | gobject-2.0 >= $GLIB_REQUIRED_VERSION |
---|
| 66 | gio-2.0 >= $GLIB_REQUIRED_VERSION |
---|
| 67 | ) |
---|
| 68 | AC_SUBST(COMMON_CFLAGS) |
---|
| 69 | AC_SUBST(COMMON_LIBS) |
---|
| 70 | |
---|
| 71 | PKG_CHECK_MODULES(DAEMON, |
---|
| 72 | dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION |
---|
| 73 | gobject-2.0 >= $GLIB_REQUIRED_VERSION |
---|
| 74 | gio-2.0 >= $GLIB_REQUIRED_VERSION |
---|
| 75 | ) |
---|
| 76 | AC_SUBST(DAEMON_CFLAGS) |
---|
| 77 | AC_SUBST(DAEMON_LIBS) |
---|
| 78 | |
---|
| 79 | PKG_CHECK_MODULES(XLIB, x11 xau, , |
---|
| 80 | [AC_PATH_XTRA |
---|
| 81 | if test "x$no_x" = xyes; then |
---|
| 82 | AC_MSG_ERROR("no (requires X development libraries)") |
---|
| 83 | else |
---|
| 84 | XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lXau -lX11 -lXext $X_EXTRA_LIBS" |
---|
| 85 | XLIB_CFLAGS=$X_CFLAGS |
---|
| 86 | fi]) |
---|
| 87 | AC_SUBST(XLIB_CFLAGS) |
---|
| 88 | AC_SUBST(XLIB_LIBS) |
---|
| 89 | |
---|
| 90 | PKG_CHECK_MODULES(GTK, |
---|
| 91 | gtk+-2.0 >= $GTK_REQUIRED_VERSION |
---|
| 92 | ) |
---|
| 93 | AC_SUBST(GTK_CFLAGS) |
---|
| 94 | AC_SUBST(GTK_LIBS) |
---|
| 95 | |
---|
| 96 | PKG_CHECK_MODULES(CANBERRA_GTK, |
---|
| 97 | libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED_VERSION |
---|
| 98 | ) |
---|
| 99 | AC_SUBST(GCONF_CFLAGS) |
---|
| 100 | AC_SUBST(GCONF_LIBS) |
---|
| 101 | |
---|
| 102 | PKG_CHECK_MODULES(GCONF, |
---|
| 103 | gconf-2.0 >= $GCONF_REQUIRED_VERSION |
---|
| 104 | ) |
---|
| 105 | AC_SUBST(GCONF_CFLAGS) |
---|
| 106 | AC_SUBST(GCONF_LIBS) |
---|
| 107 | |
---|
| 108 | PKG_CHECK_MODULES(DEVKIT_POWER, |
---|
| 109 | devkit-power-gobject >= $DEVKIT_POWER_REQUIRED_VERSION, |
---|
| 110 | have_devicekit_power=yes, |
---|
| 111 | have_devicekit_power=no |
---|
| 112 | ) |
---|
| 113 | if test "x$have_devicekit_power" = "xyes" ; then |
---|
| 114 | AC_DEFINE(HAVE_DEVICEKIT_POWER, [], [Define if we have DeviceKit-power]) |
---|
| 115 | fi |
---|
| 116 | AC_SUBST(HAVE_DEVICEKIT_POWER) |
---|
| 117 | AC_SUBST(DEVKIT_POWER_CFLAGS) |
---|
| 118 | AC_SUBST(DEVKIT_POWER_LIBS) |
---|
| 119 | |
---|
| 120 | PKG_CHECK_MODULES(SIMPLE_GREETER, |
---|
| 121 | dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION |
---|
| 122 | gtk+-2.0 >= $GTK_REQUIRED_VERSION |
---|
| 123 | libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION |
---|
| 124 | gconf-2.0 >= $GCONF_REQUIRED_VERSION |
---|
| 125 | fontconfig >= $FONTCONFIG_REQUIRED_VERSION |
---|
| 126 | gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION |
---|
| 127 | gstreamermm-0.10 >= $GSTREAMER_REQUIRED_VERSION |
---|
| 128 | ) |
---|
| 129 | AC_SUBST(SIMPLE_GREETER_CFLAGS) |
---|
| 130 | AC_SUBST(SIMPLE_GREETER_LIBS) |
---|
| 131 | |
---|
| 132 | PKG_CHECK_MODULES(LIBXKLAVIER, |
---|
| 133 | libxklavier >= $LIBXKLAVIER_REQUIRED_VERSION, |
---|
| 134 | have_libxklavier=yes, |
---|
| 135 | have_libxklavier=no) |
---|
| 136 | if test "x$have_libxklavier" = "xyes" ; then |
---|
| 137 | AC_DEFINE(HAVE_LIBXKLAVIER, [], [Define if we have libxklavier]) |
---|
| 138 | fi |
---|
| 139 | AM_CONDITIONAL(HAVE_LIBXKLAVIER, test x$have_libxklavier = xyes) |
---|
| 140 | AC_SUBST(HAVE_LIBXKLAVIER) |
---|
| 141 | AC_SUBST(LIBXKLAVIER_CFLAGS) |
---|
| 142 | AC_SUBST(LIBXKLAVIER_LIBS) |
---|
| 143 | |
---|
| 144 | PKG_CHECK_MODULES(SIMPLE_CHOOSER, |
---|
| 145 | dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION |
---|
| 146 | gtk+-2.0 >= $GTK_REQUIRED_VERSION |
---|
| 147 | libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION |
---|
| 148 | gconf-2.0 >= $GCONF_REQUIRED_VERSION |
---|
| 149 | ) |
---|
| 150 | AC_SUBST(SIMPLE_CHOOSER_CFLAGS) |
---|
| 151 | AC_SUBST(SIMPLE_CHOOSER_LIBS) |
---|
| 152 | |
---|
| 153 | PKG_CHECK_MODULES(APPLET, |
---|
| 154 | gtk+-2.0 >= $GTK_REQUIRED_VERSION |
---|
| 155 | libpanelapplet-2.0 >= $GNOME_PANEL_REQUIRED_VERSION |
---|
| 156 | libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION) |
---|
| 157 | AC_SUBST(APPLET_CFLAGS) |
---|
| 158 | AC_SUBST(APPLET_LIBS) |
---|
| 159 | |
---|
| 160 | PLUGIN_LIBTOOL_FLAGS="-export_dynamic -module -avoid-version" |
---|
| 161 | AC_SUBST(PLUGIN_LIBTOOL_FLAGS) |
---|
| 162 | |
---|
| 163 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
---|
| 164 | AC_PATH_XTRA |
---|
| 165 | |
---|
| 166 | # Unit testing framework |
---|
| 167 | PKG_CHECK_MODULES(CHECK, |
---|
| 168 | [check >= 0.9.4], |
---|
| 169 | have_check=yes, |
---|
| 170 | have_check=no) |
---|
| 171 | AM_CONDITIONAL([HAVE_CHECK],[test "x$CHECK_CFLAGS" != "x"]) |
---|
| 172 | |
---|
| 173 | AC_PATH_PROG(GCONFTOOL, gconftool-2) |
---|
| 174 | |
---|
| 175 | AM_GCONF_SOURCE_2 |
---|
| 176 | |
---|
| 177 | dnl --------------------------------------------------------------------------- |
---|
| 178 | dnl - Configuration file stuff |
---|
| 179 | dnl --------------------------------------------------------------------------- |
---|
| 180 | |
---|
| 181 | AC_ARG_WITH(sysconfsubdir, |
---|
| 182 | AS_HELP_STRING([--with-sysconfsubdir], |
---|
| 183 | [directory name used under sysconfdir, default=gdm]), |
---|
| 184 | sysconfsubdir=${withval}, sysconfsubdir=gdm) |
---|
| 185 | AC_SUBST(sysconfsubdir) |
---|
| 186 | |
---|
| 187 | if test x"${sysconfsubdir}" != xno -a x"${sysconfsubdir}" != x; then |
---|
| 188 | gdmconfdir='${sysconfdir}/${sysconfsubdir}' |
---|
| 189 | else |
---|
| 190 | gdmconfdir='${sysconfdir}' |
---|
| 191 | fi |
---|
| 192 | AC_SUBST(gdmconfdir) |
---|
| 193 | |
---|
| 194 | AC_ARG_WITH(dmconfdir, |
---|
| 195 | AS_HELP_STRING([--with-dmconfdir], |
---|
| 196 | [directory where Sessions are stored, default=SYSCONFDIR/dm]), |
---|
| 197 | dmconfdir=${withval}, dmconfdir=${sysconfdir}/dm) |
---|
| 198 | AC_SUBST(dmconfdir) |
---|
| 199 | |
---|
| 200 | dnl --------------------------------------------------------------------------- |
---|
| 201 | dnl - Configure arguments |
---|
| 202 | dnl --------------------------------------------------------------------------- |
---|
| 203 | |
---|
| 204 | AC_ARG_ENABLE(console-helper, |
---|
| 205 | AS_HELP_STRING([--enable-console-helper], |
---|
| 206 | [Enable PAM console helper @<:@default=auto@:>@]),, |
---|
| 207 | enable_console_helper=auto) |
---|
| 208 | |
---|
| 209 | AC_ARG_ENABLE(authentication-scheme, |
---|
| 210 | AS_HELP_STRING([--enable-authentication-scheme=@<:@pam/crypt/shadow@:>@], |
---|
| 211 | [Choose a specific authentication scheme @<:@default=auto@:>@]),, |
---|
| 212 | enable_authentication_scheme=auto) |
---|
| 213 | |
---|
| 214 | AC_ARG_WITH(xinerama, |
---|
| 215 | AS_HELP_STRING([--with-xinerama], |
---|
| 216 | [Add Xinerama support @<:@default=auto@:>@]),, |
---|
| 217 | with_xinerama=auto) |
---|
| 218 | |
---|
| 219 | AC_ARG_WITH(xdmcp, |
---|
| 220 | AS_HELP_STRING([--with-xdmcp], |
---|
| 221 | [Add XDMCP (remote login) support @<:@default=auto@:>@]),, |
---|
| 222 | with_xdmcp=auto) |
---|
| 223 | |
---|
| 224 | AC_ARG_WITH(tcp-wrappers, |
---|
| 225 | AS_HELP_STRING([--with-tcp-wrappers], |
---|
| 226 | [Use TCP Wrappers @<:@default=auto@:>@]),, |
---|
| 227 | with_tcp_wrappers=auto) |
---|
| 228 | |
---|
| 229 | AC_ARG_WITH(selinux, |
---|
| 230 | AS_HELP_STRING([--with-selinux], |
---|
| 231 | [Add SELinux support])) |
---|
| 232 | |
---|
| 233 | AC_ARG_WITH(console-kit, |
---|
| 234 | AS_HELP_STRING([--with-console-kit], |
---|
| 235 | [Add ConsoleKit support @<:@default=auto@:>@]),, |
---|
| 236 | with_console_kit=auto) |
---|
| 237 | |
---|
| 238 | AC_ARG_WITH(at-spi-registryd-directory, |
---|
| 239 | AS_HELP_STRING([--with-at-spi-registryd-directory], |
---|
| 240 | [Specify the directory of at-spi-registryd @<:@default=libexecdir@:>@])],, |
---|
| 241 | [with_at_spi_registryd_directory="\${libexecdir}"]) |
---|
| 242 | |
---|
| 243 | AT_SPI_REGISTRYD_DIR=$with_at_spi_registryd_directory |
---|
| 244 | AC_SUBST(AT_SPI_REGISTRYD_DIR) |
---|
| 245 | |
---|
| 246 | # Allow configuration of default PATH |
---|
| 247 | # |
---|
| 248 | withval="" |
---|
| 249 | AC_ARG_WITH(default-path, |
---|
| 250 | AS_HELP_STRING([--with-default-path=<PATH>], |
---|
| 251 | [PATH GDM will use as the user's default PATH]), |
---|
| 252 | [if test x$withval != x; then |
---|
| 253 | AC_MSG_RESULT("PATH ${withval} will be the default PATH.") |
---|
| 254 | fi]) |
---|
| 255 | |
---|
| 256 | if test x$withval != x; then |
---|
| 257 | GDM_SESSION_DEFAULT_PATH="$withval" |
---|
| 258 | else |
---|
| 259 | GDM_SESSION_DEFAULT_PATH="/usr/local/bin:/usr/bin:/bin" |
---|
| 260 | fi |
---|
| 261 | AC_SUBST(GDM_SESSION_DEFAULT_PATH) |
---|
| 262 | |
---|
| 263 | dnl |
---|
| 264 | dnl file that sets LANG |
---|
| 265 | dnl |
---|
| 266 | withval="" |
---|
| 267 | AC_ARG_WITH(lang-file, |
---|
| 268 | AS_HELP_STRING([--with-lang-file=<filename>], |
---|
| 269 | [file containing default language setting]), |
---|
| 270 | [if test x$withval != x; then |
---|
| 271 | AC_MSG_RESULT("System locale will be looked for in file ${withval}.") |
---|
| 272 | fi]) |
---|
| 273 | |
---|
| 274 | if test x$withval != x; then |
---|
| 275 | LANG_CONFIG_FILE="$withval" |
---|
| 276 | else |
---|
| 277 | LANG_CONFIG_FILE='${sysconfdir}/sysconfig/i18n' |
---|
| 278 | fi |
---|
| 279 | AC_SUBST(LANG_CONFIG_FILE) |
---|
| 280 | |
---|
| 281 | # stropts has been removed from glibc |
---|
| 282 | # https://bugzilla.redhat.com/show_bug.cgi?id=436349 |
---|
| 283 | AC_CHECK_HEADERS(stropts.h) |
---|
| 284 | |
---|
| 285 | dnl socklen_t may be declared, but not in a "standard" C header location |
---|
| 286 | AC_CHECK_HEADERS(sys/socket.h) |
---|
| 287 | AC_CHECK_TYPE(socklen_t,, |
---|
| 288 | AC_DEFINE(socklen_t, size_t, [Compatibility type]), |
---|
| 289 | [AC_INCLUDES_DEFAULT] |
---|
| 290 | #ifdef HAVE_SYS_SOCKET_H |
---|
| 291 | #include <sys/socket.h> |
---|
| 292 | #endif |
---|
| 293 | ) |
---|
| 294 | AC_CHECK_HEADERS(sys/sockio.h) |
---|
| 295 | AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv]) |
---|
| 296 | |
---|
| 297 | dnl checks needed for Darwin compatibility to linux **environ. |
---|
| 298 | AC_CHECK_HEADERS(crt_externs.h) |
---|
| 299 | AC_CHECK_FUNCS(_NSGetEnviron) |
---|
| 300 | |
---|
| 301 | EXTRA_DAEMON_LIBS="" |
---|
| 302 | EXTRA_SLAVE_LIBS="" |
---|
| 303 | EXTRA_CHOOSER_LIBS="" |
---|
| 304 | EXTRA_XNEST_LIBS="" |
---|
| 305 | EXTRA_FLEXI_LIBS="" |
---|
| 306 | EXTRA_DYNAMIC_LIBS="" |
---|
| 307 | EXTRA_SETUP_LIBS="" |
---|
| 308 | EXTRA_TEST_LIBS="" |
---|
| 309 | EXTRA_GREETER_LIBS="" |
---|
| 310 | |
---|
| 311 | AC_CHECK_FUNC(socket,,[ |
---|
| 312 | AC_CHECK_LIB(socket,socket, [ |
---|
| 313 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lsocket" |
---|
| 314 | EXTRA_SLAVE_LIBS="$EXTRA_SLAVE_LIBS -lsocket" |
---|
| 315 | EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lsocket" |
---|
| 316 | EXTRA_XNEST_LIBS="$EXTRA_XNEST_LIBS -lsocket" |
---|
| 317 | EXTRA_FLEXI_LIBS="$EXTRA_FLEXI_LIBS -lsocket" |
---|
| 318 | EXTRA_DYNAMIC_LIBS="$EXTRA_DYNAMIC_LIBS -lsocket" |
---|
| 319 | EXTRA_SETUP_LIBS="$EXTRA_SETUP_LIBS -lsocket" |
---|
| 320 | EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -lsocket"])]) |
---|
| 321 | AC_CHECK_FUNC(gethostbyname,,[ |
---|
| 322 | AC_CHECK_LIB(nsl,gethostbyname, [ |
---|
| 323 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lnsl" |
---|
| 324 | EXTRA_SLAVE_LIBS="$EXTRA_SLAVE_LIBS -lnsl" |
---|
| 325 | EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lnsl" |
---|
| 326 | EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -lnsl"])]) |
---|
| 327 | AC_CHECK_DECL(HOST_NAME_MAX, , |
---|
| 328 | AC_CHECK_DECL(_POSIX_HOST_NAME_MAX, |
---|
| 329 | AC_DEFINE(HOST_NAME_MAX, _POSIX_HOST_NAME_MAX, []), |
---|
| 330 | AC_DEFINE(HOST_NAME_MAX, 256, [Define to 256 if neither have HOST_NAME_MAX nor _POSIX_HOST_NAME_MAX]), |
---|
| 331 | [[#include <limits.h>]]), |
---|
| 332 | [[#include <limits.h>]]) |
---|
| 333 | AC_CHECK_FUNC(sched_yield,[ |
---|
| 334 | AC_DEFINE(HAVE_SCHED_YIELD, 1, [Define if we have sched yield])],[ |
---|
| 335 | AC_CHECK_LIB(rt,sched_yield, [ |
---|
| 336 | AC_DEFINE(HAVE_SCHED_YIELD, 1, [Define if we have sched yield]) |
---|
| 337 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lrt"], [ |
---|
| 338 | echo "No sched_yield found"])]) |
---|
| 339 | AC_CHECK_FUNC(inet_aton,,[ |
---|
| 340 | AC_CHECK_LIB(resolv,inet_aton, [ |
---|
| 341 | EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lresolv"])]) |
---|
| 342 | |
---|
| 343 | dnl --------------------------------------------------------------------------- |
---|
| 344 | dnl - Check for mkdtemp |
---|
| 345 | dnl --------------------------------------------------------------------------- |
---|
| 346 | |
---|
| 347 | mkdtemp_missing=false |
---|
| 348 | AC_CHECK_FUNC(mkdtemp, |
---|
| 349 | [AC_DEFINE([HAVE_MKDTEMP], 1, [Have GlibC function to make temp dirs])], |
---|
| 350 | mkdtemp_missing=true) |
---|
| 351 | AM_CONDITIONAL(MKDTEMP_MISSING, test x$mkdtemp_missing = xtrue) |
---|
| 352 | |
---|
| 353 | dnl --------------------------------------------------------------------------- |
---|
| 354 | dnl - Check for IPv6 |
---|
| 355 | dnl --------------------------------------------------------------------------- |
---|
| 356 | |
---|
| 357 | AC_MSG_CHECKING([whether to enable IPv6]) |
---|
| 358 | AC_ARG_ENABLE(ipv6, |
---|
| 359 | AS_HELP_STRING([--enable-ipv6], |
---|
| 360 | [Enables compilation of IPv6 code @<:@default=no@:>@]),, |
---|
| 361 | enable_ipv6=no) |
---|
| 362 | |
---|
| 363 | if test x$enable_ipv6 = xyes; then |
---|
| 364 | AC_TRY_COMPILE([ |
---|
| 365 | #include <sys/types.h> |
---|
| 366 | #include <sys/socket.h>],[ |
---|
| 367 | struct sockaddr_storage ss; |
---|
| 368 | socket(AF_INET6, SOCK_STREAM, 0) |
---|
| 369 | ], |
---|
| 370 | have_ipv6=yes, |
---|
| 371 | have_ipv6=no |
---|
| 372 | ) |
---|
| 373 | if test x$have_ipv6 = xyes; then |
---|
| 374 | have_getaddrinfo=no |
---|
| 375 | have_inet_ntop=no |
---|
| 376 | AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes) |
---|
| 377 | if test x$have_getaddrinfo != xyes; then |
---|
| 378 | for lib in bsd socket inet; do |
---|
| 379 | AC_CHECK_LIB($lib,getaddrinfo,["LIBS=$LIBS -l$lib";have_getaddrinfo=yes;break]) |
---|
| 380 | done |
---|
| 381 | fi |
---|
| 382 | |
---|
| 383 | AC_CHECK_FUNC(inet_ntop,have_inet_ntop=yes) |
---|
| 384 | if test x$have_inet_ntop != xyes; then |
---|
| 385 | for lib in bsd nsl inet; do |
---|
| 386 | AC_CHECK_LIB($lib,inet_ntop,["LIBS=$LIBS -l$lib";have_inet_ntop=yes;break]) |
---|
| 387 | done |
---|
| 388 | fi |
---|
| 389 | |
---|
| 390 | if test x$have_getaddrinfo = xyes; then |
---|
| 391 | if test x$have_inet_ntop = xyes; then |
---|
| 392 | have_ipv6=yes |
---|
| 393 | AC_DEFINE(ENABLE_IPV6, 1, [Define if we have ipv6]) |
---|
| 394 | AC_MSG_RESULT($have_ipv6) |
---|
| 395 | else |
---|
| 396 | have_ipv6=no |
---|
| 397 | AC_MSG_RESULT($have_ipv6) |
---|
| 398 | fi |
---|
| 399 | fi |
---|
| 400 | fi |
---|
| 401 | else |
---|
| 402 | AC_MSG_RESULT(no) |
---|
| 403 | fi |
---|
| 404 | |
---|
| 405 | dnl --------------------------------------------------------------------------- |
---|
| 406 | dnl - Check for GDM user |
---|
| 407 | dnl --------------------------------------------------------------------------- |
---|
| 408 | |
---|
| 409 | withval="" |
---|
| 410 | AC_ARG_WITH(user, |
---|
| 411 | AS_HELP_STRING([--with-user=<username>], |
---|
| 412 | [specify gdm's user name])) |
---|
| 413 | |
---|
| 414 | if test x$withval != x; then |
---|
| 415 | GDM_USERNAME="$withval" |
---|
| 416 | else |
---|
| 417 | GDM_USERNAME=gdm |
---|
| 418 | fi |
---|
| 419 | AC_SUBST(GDM_USERNAME) |
---|
| 420 | AC_DEFINE_UNQUOTED([GDM_USERNAME], "$GDM_USERNAME", [User to use]) |
---|
| 421 | |
---|
| 422 | dnl --------------------------------------------------------------------------- |
---|
| 423 | dnl - Check for GDM group |
---|
| 424 | dnl --------------------------------------------------------------------------- |
---|
| 425 | |
---|
| 426 | withval="" |
---|
| 427 | AC_ARG_WITH(group, |
---|
| 428 | AS_HELP_STRING([--with-group=<username>], |
---|
| 429 | [specify gdm's user name])) |
---|
| 430 | |
---|
| 431 | if test x$withval != x; then |
---|
| 432 | GDM_GROUPNAME="$withval" |
---|
| 433 | else |
---|
| 434 | GDM_GROUPNAME=gdm |
---|
| 435 | fi |
---|
| 436 | AC_SUBST(GDM_GROUPNAME) |
---|
| 437 | AC_DEFINE_UNQUOTED([GDM_GROUPNAME], "$GDM_GROUPNAME", [Group to use]) |
---|
| 438 | |
---|
| 439 | |
---|
| 440 | dnl --------------------------------------------------------------------------- |
---|
| 441 | dnl - Check for PAM stuff |
---|
| 442 | dnl --------------------------------------------------------------------------- |
---|
| 443 | |
---|
| 444 | dnl PAM prefix |
---|
| 445 | withval="" |
---|
| 446 | AC_ARG_WITH(pam-prefix, |
---|
| 447 | AS_HELP_STRING([--with-pam-prefix=<prefix>], |
---|
| 448 | [specify where pam files go]), |
---|
| 449 | [if test x$withval != x; then |
---|
| 450 | AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.") |
---|
| 451 | fi]) |
---|
| 452 | |
---|
| 453 | if test x$withval != x; then |
---|
| 454 | PAM_PREFIX="$withval" |
---|
| 455 | else |
---|
| 456 | PAM_PREFIX='${sysconfdir}' |
---|
| 457 | fi |
---|
| 458 | AC_SUBST(PAM_PREFIX) |
---|
| 459 | |
---|
| 460 | have_pam=no |
---|
| 461 | AC_CHECK_LIB(pam, pam_start, have_pam=yes) |
---|
| 462 | |
---|
| 463 | if test "x$have_pam" = "xyes"; then |
---|
| 464 | PAM_LIBS="${PAM_LIBS} -lpam" |
---|
| 465 | else |
---|
| 466 | AC_MSG_ERROR("PAM libraries not found") |
---|
| 467 | fi |
---|
| 468 | AC_SUBST(HAVE_PAM) |
---|
| 469 | AC_SUBST(PAM_LIBS) |
---|
| 470 | |
---|
| 471 | AC_CHECK_HEADERS([security/pam_modutil.h security/pam_ext.h]) |
---|
| 472 | AC_CHECK_LIB(pam, pam_syslog, [AC_DEFINE(HAVE_PAM_SYSLOG, [], [Define to 1 if you have the pam_syslog function])]) |
---|
| 473 | |
---|
| 474 | dnl test whether struct pam_message is const (Linux) or not (Sun) |
---|
| 475 | if test "x$have_pam" = "xyes"; then |
---|
| 476 | pam_appl_h="$ac_pam_includes/security/pam_appl.h" |
---|
| 477 | AC_MSG_CHECKING(for const pam_message) |
---|
| 478 | AC_EGREP_HEADER([struct pam_message], |
---|
| 479 | $pam_appl_h, |
---|
| 480 | [ AC_EGREP_HEADER([const struct pam_message], |
---|
| 481 | $pam_appl_h, |
---|
| 482 | [AC_MSG_RESULT(["const: Linux-type PAM"]) ], |
---|
| 483 | [AC_MSG_RESULT(["nonconst: Sun-type PAM"]) |
---|
| 484 | AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])] |
---|
| 485 | )], |
---|
| 486 | [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])] |
---|
| 487 | ) |
---|
| 488 | fi |
---|
| 489 | |
---|
| 490 | dnl Check if we can use the setpenv function to add specialvariable |
---|
| 491 | dnl to the environment (such as the /etc/environment file under AIX) |
---|
| 492 | AC_LINK_IFELSE([ |
---|
| 493 | AC_LANG_PROGRAM([[ |
---|
| 494 | #ifdef HAVE_USERSEC_H |
---|
| 495 | #include <usersec.h> |
---|
| 496 | #endif |
---|
| 497 | ]],[[ |
---|
| 498 | return (setpenv(NULL, (PENV_INIT | PENV_NOEXEC), NULL, NULL)); |
---|
| 499 | ]])], |
---|
| 500 | can_use_setpenv=yes, |
---|
| 501 | can_use_setpenv=no) |
---|
| 502 | |
---|
| 503 | if test x$can_use_setpenv = xyes ; then |
---|
| 504 | AC_DEFINE(CAN_USE_SETPENV,,[Define this variable if the code to use |
---|
| 505 | the setpenv function can be compiled and used]) |
---|
| 506 | fi |
---|
| 507 | |
---|
| 508 | # |
---|
| 509 | # Can we use BSD's setusercontext |
---|
| 510 | # |
---|
| 511 | AC_CHECK_HEADER(login_cap.h, [ |
---|
| 512 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" |
---|
| 513 | AC_DEFINE(HAVE_LOGINCAP, 1, [Define if we have logincap])]) |
---|
| 514 | |
---|
| 515 | # |
---|
| 516 | # Check for sys/sockio.h |
---|
| 517 | # |
---|
| 518 | AC_CHECK_HEADERS(sys/sockio.h, [ |
---|
| 519 | AC_DEFINE(HAVE_SYS_SOCKIO_H, 1, [Define if we have sys/sockio.h])]) |
---|
| 520 | |
---|
| 521 | # |
---|
| 522 | # Check for libgen.h |
---|
| 523 | # |
---|
| 524 | AC_CHECK_HEADERS(libgen.h, [ |
---|
| 525 | AC_DEFINE(HAVE_LIBGEN_H, 1, [Define if we have libgen.h])]) |
---|
| 526 | |
---|
| 527 | |
---|
| 528 | dnl --------------------------------------------------------------------------- |
---|
| 529 | dnl - Check for POSIX version of getpwnam_r |
---|
| 530 | dnl --------------------------------------------------------------------------- |
---|
| 531 | |
---|
| 532 | # Checking for a posix version of getpwnam_r |
---|
| 533 | # if we are cross compiling and can not run the test |
---|
| 534 | # assume getpwnam_r is the posix version |
---|
| 535 | # it is up to the person cross compiling to change |
---|
| 536 | # this behavior if desired |
---|
| 537 | |
---|
| 538 | AC_LANG_PUSH(C) |
---|
| 539 | AC_CACHE_CHECK([for posix getpwnam_r], |
---|
| 540 | ac_cv_func_posix_getpwnam_r, |
---|
| 541 | [AC_RUN_IFELSE([AC_LANG_PROGRAM( |
---|
| 542 | [[ |
---|
| 543 | #define _POSIX_PTHREAD_SEMANTICS |
---|
| 544 | #include <errno.h> |
---|
| 545 | #include <pwd.h> |
---|
| 546 | ]], |
---|
| 547 | [[ |
---|
| 548 | char buffer[10000]; |
---|
| 549 | struct passwd pwd, *pwptr = &pwd; |
---|
| 550 | int error; |
---|
| 551 | errno = 0; |
---|
| 552 | error = getpwnam_r ("", &pwd, buffer, |
---|
| 553 | sizeof (buffer), &pwptr); |
---|
| 554 | return (error < 0 && errno == ENOSYS) |
---|
| 555 | || error == ENOSYS; |
---|
| 556 | ]])], |
---|
| 557 | [ac_cv_func_posix_getpwnam_r=yes], |
---|
| 558 | [ac_cv_func_posix_getpwnam_r=no], |
---|
| 559 | [ac_cv_func_posix_getpwnam_r=yes] |
---|
| 560 | )]) |
---|
| 561 | AC_LANG_POP(C) |
---|
| 562 | |
---|
| 563 | if test "$ac_cv_func_posix_getpwnam_r" = yes; then |
---|
| 564 | AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1, |
---|
| 565 | [Have POSIX function getpwnam_r]) |
---|
| 566 | else |
---|
| 567 | AC_CACHE_CHECK([for nonposix getpwnam_r], |
---|
| 568 | ac_cv_func_nonposix_getpwnam_r, |
---|
| 569 | [AC_TRY_LINK([#include <pwd.h>], |
---|
| 570 | [char buffer[10000]; |
---|
| 571 | struct passwd pwd; |
---|
| 572 | getpwnam_r ("", &pwd, buffer, |
---|
| 573 | sizeof (buffer));], |
---|
| 574 | [ac_cv_func_nonposix_getpwnam_r=yes], |
---|
| 575 | [ac_cv_func_nonposix_getpwnam_r=no])]) |
---|
| 576 | if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then |
---|
| 577 | AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1, |
---|
| 578 | [Have non-POSIX function getpwnam_r]) |
---|
| 579 | fi |
---|
| 580 | fi |
---|
| 581 | |
---|
| 582 | |
---|
| 583 | dnl --------------------------------------------------------------------------- |
---|
| 584 | dnl - Check for utmp stuff |
---|
| 585 | dnl --------------------------------------------------------------------------- |
---|
| 586 | |
---|
| 587 | AC_CHECK_HEADERS(utmp.h utmpx.h libutil.h sys/param.h) |
---|
| 588 | AC_CHECK_FUNCS([getutxent updwtmpx updwtmp]) |
---|
| 589 | AC_CHECK_LIB(util, login, [ |
---|
| 590 | AC_DEFINE(HAVE_LOGIN, 1, [Define if have login]) |
---|
| 591 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ]) |
---|
| 592 | AC_CHECK_LIB(util, logout, [ |
---|
| 593 | AC_DEFINE(HAVE_LOGOUT, 1, [Define if have logout]) |
---|
| 594 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ]) |
---|
| 595 | AC_CHECK_LIB(util, logwtmp, [ |
---|
| 596 | AC_DEFINE(HAVE_LOGWTMP, 1, [Define if have logwtmp]) |
---|
| 597 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ]) |
---|
| 598 | GDM_CHECK_UTMP |
---|
| 599 | |
---|
| 600 | AC_MSG_CHECKING(if utmpx structure has ut_syslen field) |
---|
| 601 | AC_TRY_COMPILE([ |
---|
| 602 | #include <utmpx.h>],[ |
---|
| 603 | struct utmpx record; |
---|
| 604 | record.ut_syslen = sizeof (record.ut_host); |
---|
| 605 | ], |
---|
| 606 | have_ut_syslen=yes, |
---|
| 607 | have_ut_syslen=no |
---|
| 608 | ) |
---|
| 609 | if test x$have_ut_syslen = xyes; then |
---|
| 610 | AC_DEFINE(HAVE_UT_SYSLEN, 1, [Define if have ut_syslen record]) |
---|
| 611 | fi |
---|
| 612 | AC_MSG_RESULT($have_ut_syslen) |
---|
| 613 | |
---|
| 614 | |
---|
| 615 | dnl --------------------------------------------------------------------------- |
---|
| 616 | dnl - Check for Xdmcp |
---|
| 617 | dnl --------------------------------------------------------------------------- |
---|
| 618 | |
---|
| 619 | XDMCP_LIBS="" |
---|
| 620 | if test x$with_xdmcp != xno ; then |
---|
| 621 | xdmcp_save_CPPFLAGS="$CPPFLAGS" |
---|
| 622 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
---|
| 623 | AC_CHECK_HEADER(X11/Xdmcp.h, [ |
---|
| 624 | AC_CHECK_LIB(Xdmcp, XdmcpFlush, [ |
---|
| 625 | AC_DEFINE(HAVE_LIBXDMCP, 1, [Define if have libxdmcp]) |
---|
| 626 | XDMCP_LIBS="-lXdmcp" |
---|
| 627 | XDMCP_SUPPORT=yes],,[$X_LIBS -lX11 $X_EXTRA_LIBS]) |
---|
| 628 | ],,[#include <X11/Xproto.h>]) |
---|
| 629 | |
---|
| 630 | if test x$with_xdmcp = xyes -a "x$XDMCP_SUPPORT" = "x" ; then |
---|
| 631 | AC_MSG_ERROR(XDMCP support requested but XDMCP libraries not found) |
---|
| 632 | fi |
---|
| 633 | CPPFLAGS="$xdmcp_save_CPPFLAGS" |
---|
| 634 | fi |
---|
| 635 | AC_SUBST(XDMCP_LIBS) |
---|
| 636 | |
---|
| 637 | if test "x$XDMCP_SUPPORT" = "xyes" ; then |
---|
| 638 | AM_CONDITIONAL(XDMCP_SUPPORT, true) |
---|
| 639 | GDMCHOOSER=gdmchooser |
---|
| 640 | else |
---|
| 641 | # No need for TCP Wrappers in case XDMCP is disabled |
---|
| 642 | if test x$with_tcp_wrappers != xno ; then |
---|
| 643 | echo "TCP wrappers not needed if XDMCP is not enabled" |
---|
| 644 | fi |
---|
| 645 | with_tcp_wrappers=no |
---|
| 646 | AM_CONDITIONAL(XDMCP_SUPPORT, false) |
---|
| 647 | GDMCHOOSER= |
---|
| 648 | fi |
---|
| 649 | AC_SUBST(GDMCHOOSER) |
---|
| 650 | |
---|
| 651 | dnl --------------------------------------------------------------------------- |
---|
| 652 | dnl - Check OS |
---|
| 653 | dnl --------------------------------------------------------------------------- |
---|
| 654 | |
---|
| 655 | os_solaris=no |
---|
| 656 | case "$host" in |
---|
| 657 | *solaris*) os_solaris=yes |
---|
| 658 | ;; |
---|
| 659 | esac |
---|
| 660 | AM_CONDITIONAL(OS_SOLARIS, test x$os_solaris = xyes) |
---|
| 661 | |
---|
| 662 | dnl --------------------------------------------------------------------------- |
---|
| 663 | dnl - Check for TCP Wrappers for XDMCP access control |
---|
| 664 | dnl --------------------------------------------------------------------------- |
---|
| 665 | |
---|
| 666 | if test x$with_tcp_wrappers = xno ; then |
---|
| 667 | echo "TCP wrappers disabled" |
---|
| 668 | else |
---|
| 669 | LIBWRAP_PATH="" |
---|
| 670 | if test x$os_solaris = xyes ; then |
---|
| 671 | if test -f /usr/lib/libwrap.so; then |
---|
| 672 | LIBWRAP_PATH=/usr/lib/libwrap.so |
---|
| 673 | echo "Found $LIBWRAP_PATH" 1>&5 |
---|
| 674 | nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH="" |
---|
| 675 | fi |
---|
| 676 | |
---|
| 677 | if test -z "$LIBWRAP_PATH"; then |
---|
| 678 | if test -f /usr/sfw/lib/libwrap.so; then |
---|
| 679 | LIBWRAP_PATH=/usr/sfw/lib/libwrap.so |
---|
| 680 | echo "Found $LIBWRAP_PATH" 1>&5 |
---|
| 681 | nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH="" |
---|
| 682 | fi |
---|
| 683 | fi |
---|
| 684 | |
---|
| 685 | if test -z "$LIBWRAP_PATH"; then |
---|
| 686 | echo "*********************************************************" |
---|
| 687 | echo " You have a broken TCP wrappers library (setenv included)" |
---|
| 688 | echo " Please get the latest TCP wrappers package from your OS" |
---|
| 689 | echo " vendor, or recompile TCP wrappers to not include a" |
---|
| 690 | echo " setenv() implementation." |
---|
| 691 | echo |
---|
| 692 | echo "Not using TCP wrappers after all." |
---|
| 693 | echo "*********************************************************" |
---|
| 694 | else |
---|
| 695 | LIBWRAP_LIBS="-L/usr/sfw/lib -R/usr/sfw/lib -lwrap" |
---|
| 696 | AC_DEFINE(HAVE_TCPWRAPPERS, 1, [Define if have tcp wrappers]) |
---|
| 697 | fi |
---|
| 698 | else |
---|
| 699 | AC_CHECK_LIB([wrap], [hosts_ctl], [ |
---|
| 700 | LIBWRAP_LIBS="-lwrap" |
---|
| 701 | LIBWRAP_PATH=auto |
---|
| 702 | AC_DEFINE(HAVE_TCPWRAPPERS, 1, [Define if have tcp wrappers])]) |
---|
| 703 | fi |
---|
| 704 | |
---|
| 705 | AC_MSG_CHECKING([whether to use TCP wrappers]) |
---|
| 706 | if test -n "$LIBWRAP_PATH"; then |
---|
| 707 | AC_MSG_RESULT(yes) |
---|
| 708 | else |
---|
| 709 | AC_MSG_RESULT(no) |
---|
| 710 | fi |
---|
| 711 | |
---|
| 712 | dnl find out if we need -lnsl or whatever |
---|
| 713 | LIB_NSL= |
---|
| 714 | if test -n "$LIBWRAP_PATH"; then |
---|
| 715 | AC_MSG_CHECKING(whether -lwrap also requires -lnsl) |
---|
| 716 | ORIG_LIBS="$LIBS" |
---|
| 717 | LIBS="$EXTRA_DAEMON_LIBS $LIBS $LIBWRAP_LIBS" |
---|
| 718 | AC_TRY_LINK([ |
---|
| 719 | #include <tcpd.h> |
---|
| 720 | int allow_severity, deny_severity; |
---|
| 721 | ], [return hosts_access;], ,[ |
---|
| 722 | dnl try with -lnsl |
---|
| 723 | OLD_LIBS="$LIBS" |
---|
| 724 | LIBS="$LIBS -lnsl" |
---|
| 725 | AC_TRY_LINK([ |
---|
| 726 | #include <tcpd.h> |
---|
| 727 | int allow_severity, deny_severity; |
---|
| 728 | ], [return hosts_access;], LIB_NSL="-lnsl", |
---|
| 729 | LIBWRAP_PATH="") |
---|
| 730 | LIBS="$OLD_LIBS" |
---|
| 731 | ]) |
---|
| 732 | LIBS="$ORIG_LIBS" |
---|
| 733 | if test -n "$LIB_NSL"; then |
---|
| 734 | AC_MSG_RESULT(yes) |
---|
| 735 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS $LIB_NSL" |
---|
| 736 | else |
---|
| 737 | AC_MSG_RESULT(no) |
---|
| 738 | fi |
---|
| 739 | fi |
---|
| 740 | fi |
---|
| 741 | |
---|
| 742 | AC_SUBST(LIBWRAP_LIBS) |
---|
| 743 | |
---|
| 744 | |
---|
| 745 | dnl --------------------------------------------------------------------------- |
---|
| 746 | dnl - Check for XFT2 (for gdm-settings-daemon) |
---|
| 747 | dnl --------------------------------------------------------------------------- |
---|
| 748 | |
---|
| 749 | if $PKG_CONFIG --exists xft ; then |
---|
| 750 | AC_DEFINE(HAVE_XFT2,,[Define if Xft functionality is available]) |
---|
| 751 | fi |
---|
| 752 | |
---|
| 753 | |
---|
| 754 | dnl --------------------------------------------------------------------------- |
---|
| 755 | dnl - Check for Xinput |
---|
| 756 | dnl --------------------------------------------------------------------------- |
---|
| 757 | |
---|
| 758 | have_xinput= |
---|
| 759 | AC_CHECK_LIB(Xi, XOpenDevice, XINPUT_LIBS=-lXi) |
---|
| 760 | if test "x$XINPUT_LIBS" = x; then |
---|
| 761 | save_LIBS="$LIBS" |
---|
| 762 | for xinputpath in $x_libraries /usr/X11R6/lib /usr/openwin/lib; do |
---|
| 763 | LIBS="-L$xinputpath -lXi" |
---|
| 764 | if test x$os_solaris = xyes ; then |
---|
| 765 | XINPUT_RPATH_FLAGS="-R$xinputpath" |
---|
| 766 | fi |
---|
| 767 | AC_MSG_CHECKING(for -lXi in $xinputpath) |
---|
| 768 | AC_TRY_LINK([], [XOpenDevice()], [ |
---|
| 769 | AC_MSG_RESULT(yes) |
---|
| 770 | XINPUT_LIBS="$XINPUT_RPATH_FLAGS -L$xinputpath -lXi" |
---|
| 771 | LIBS="$save_LIBS" |
---|
| 772 | break],[AC_MSG_RESULT(no)]) |
---|
| 773 | done |
---|
| 774 | if test "x$XINPUT_LIBS" = x; then |
---|
| 775 | AC_MSG_ERROR(Couldn't find the XInput library. Check config.log for details) |
---|
| 776 | fi |
---|
| 777 | fi |
---|
| 778 | AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes) |
---|
| 779 | if test "x$have_xinput" = xyes; then |
---|
| 780 | AC_DEFINE(HAVE_XINPUT, 1, [Define if have xinput]) |
---|
| 781 | X_EXTRA_LIBS="$X_EXTRA_LIBS $XINPUT_LIBS" |
---|
| 782 | fi |
---|
| 783 | |
---|
| 784 | |
---|
| 785 | dnl --------------------------------------------------------------------------- |
---|
| 786 | dnl - Check for Xinerama |
---|
| 787 | dnl --------------------------------------------------------------------------- |
---|
| 788 | |
---|
| 789 | # X11 Xinerama extension |
---|
| 790 | # Check for Xinerama extension (Solaris impl or Xfree impl) |
---|
| 791 | xinerama_save_cppflags="$CPPFLAGS" |
---|
| 792 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
---|
| 793 | |
---|
| 794 | ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" |
---|
| 795 | |
---|
| 796 | if test ! x$with_xinerama = xno ; then |
---|
| 797 | # Check for XFree |
---|
| 798 | use_xfree_xinerama=yes |
---|
| 799 | AC_CHECK_LIB(Xinerama, XineramaQueryExtension, |
---|
| 800 | [AC_CHECK_HEADER(X11/extensions/Xinerama.h, |
---|
| 801 | if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then |
---|
| 802 | X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS" |
---|
| 803 | fi |
---|
| 804 | AC_DEFINE(HAVE_XFREE_XINERAMA, 1, [Define if have xfree xinerama]) |
---|
| 805 | AC_DEFINE(HAVE_XINERAMA, 1, [Define if have xinerama]) |
---|
| 806 | XINERAMA_LIBS="-lXinerama" |
---|
| 807 | XINERAMA_SUPPORT=yes, |
---|
| 808 | use_xfree_xinerama=no, |
---|
| 809 | [#include <X11/Xlib.h>])], |
---|
| 810 | use_xfree_xinerama=no, -lXext $ALL_X_LIBS) |
---|
| 811 | AC_MSG_CHECKING(for Xinerama support on XFree86) |
---|
| 812 | AC_MSG_RESULT($use_xfree_xinerama); |
---|
| 813 | |
---|
| 814 | if test x$use_xfree_xinerama = xno ; then |
---|
| 815 | if test x$os_solaris = xyes ; then |
---|
| 816 | # Check for solaris |
---|
| 817 | use_solaris_xinerama=yes |
---|
| 818 | AC_CHECK_LIB(Xext, XineramaGetInfo, |
---|
| 819 | use_solaris_xinerama=yes, use_solaris_xinerama=no, |
---|
| 820 | $ALL_X_LIBS) |
---|
| 821 | if test "x$use_solaris_xinerama" = "xyes"; then |
---|
| 822 | AC_CHECK_HEADER(X11/extensions/xinerama.h, |
---|
| 823 | if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then |
---|
| 824 | X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS" |
---|
| 825 | fi |
---|
| 826 | AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1, [Define if have Solaris xinerama]) |
---|
| 827 | AC_DEFINE(HAVE_XINERAMA, 1, [Define if have xinerama]) |
---|
| 828 | XINERAMA_LIBS="" |
---|
| 829 | XINERAMA_SUPPORT=yes, |
---|
| 830 | use_solaris_xinerama=no, |
---|
| 831 | [#include <X11/Xlib.h>]) |
---|
| 832 | fi |
---|
| 833 | AC_MSG_CHECKING(for Xinerama support on Solaris) |
---|
| 834 | AC_MSG_RESULT($use_solaris_xinerama); |
---|
| 835 | fi |
---|
| 836 | fi |
---|
| 837 | fi |
---|
| 838 | |
---|
| 839 | AC_SUBST(XINERAMA_LIBS) |
---|
| 840 | CPPFLAGS="$xinerama_save_cppflags" |
---|
| 841 | |
---|
| 842 | dnl --------------------------------------------------------------------------- |
---|
| 843 | dnl - Check for SELinux |
---|
| 844 | dnl --------------------------------------------------------------------------- |
---|
| 845 | |
---|
| 846 | if test "x$with_selinux" = "xyes" ; then |
---|
| 847 | echo "SELinux support requested (--with-selinux was given), checking prerequisites" |
---|
| 848 | if test -d /usr/local/selinux/include ; then |
---|
| 849 | echo "Found /usr/local/selinux/include, will look there for SELinux stuff as well" |
---|
| 850 | CFLAGS="$CFLAGS -I/usr/local/selinux/include" |
---|
| 851 | LDFLAGS="$LDFLAGS -L/usr/local/selinux/lib" |
---|
| 852 | fi |
---|
| 853 | AC_CHECK_HEADER(selinux/selinux.h) |
---|
| 854 | AC_CHECK_HEADER(selinux/get_context_list.h) |
---|
| 855 | AC_CHECK_LIB(attr,attr_get,/bin/true) |
---|
| 856 | # I'm anal and I don't know which versions have which symbols, |
---|
| 857 | # so I check for all the ones we use |
---|
| 858 | AC_CHECK_LIB(selinux,get_ordered_context_list,/bin/true) |
---|
| 859 | AC_CHECK_LIB(selinux,freecon,/bin/true) |
---|
| 860 | AC_CHECK_LIB(selinux,freeconary,/bin/true) |
---|
| 861 | AC_CHECK_LIB(selinux,setexeccon,/bin/true) |
---|
| 862 | AC_CHECK_LIB(selinux,is_selinux_enabled,/bin/true) |
---|
| 863 | AC_DEFINE(HAVE_SELINUX, 1, [Define if have selinux]) |
---|
| 864 | EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lselinux -lattr" |
---|
| 865 | fi |
---|
| 866 | |
---|
| 867 | dnl --------------------------------------------------------------------------- |
---|
| 868 | dnl - Check for ConsoleKit support |
---|
| 869 | dnl --------------------------------------------------------------------------- |
---|
| 870 | |
---|
| 871 | use_console_kit=no |
---|
| 872 | if test "x$with_console_kit" != "xno" ; then |
---|
| 873 | use_console_kit=yes |
---|
| 874 | AC_DEFINE(WITH_CONSOLE_KIT, 1, [Define to enable ConsoleKit support]) |
---|
| 875 | fi |
---|
| 876 | AM_CONDITIONAL(WITH_CONSOLE_KIT, test x$use_console_kit = xyes) |
---|
| 877 | AC_SUBST(WITH_CONSOLE_KIT) |
---|
| 878 | |
---|
| 879 | dnl --------------------------------------------------------------------------- |
---|
| 880 | dnl - Check for D-Bus |
---|
| 881 | dnl --------------------------------------------------------------------------- |
---|
| 882 | |
---|
| 883 | dnl - Are we specifying a different dbus root ? |
---|
| 884 | AC_ARG_WITH(dbus-sys, |
---|
| 885 | AS_HELP_STRING([--with-dbus-sys=<dir>], |
---|
| 886 | [where D-BUS system.d directory is])) |
---|
| 887 | AC_ARG_WITH(dbus-services, |
---|
| 888 | AS_HELP_STRING([--with-dbus-services=<dir>], |
---|
| 889 | [where D-BUS services directory is])) |
---|
| 890 | |
---|
| 891 | if ! test -z "$with_dbus_sys" ; then |
---|
| 892 | DBUS_SYS_DIR="$with_dbus_sys" |
---|
| 893 | else |
---|
| 894 | DBUS_SYS_DIR="$sysconfdir/dbus-1/system.d" |
---|
| 895 | fi |
---|
| 896 | AC_SUBST(DBUS_SYS_DIR) |
---|
| 897 | |
---|
| 898 | dnl --------------------------------------------------------------------------- |
---|
| 899 | dnl - Check for ISO Codes |
---|
| 900 | dnl --------------------------------------------------------------------------- |
---|
| 901 | |
---|
| 902 | AC_MSG_CHECKING([whether iso-codes has iso-639 domain]) |
---|
| 903 | if $PKG_CONFIG --variable=domains iso-codes | grep 639 >/dev/null ; then |
---|
| 904 | AC_MSG_RESULT([yes]) |
---|
| 905 | else |
---|
| 906 | AC_MSG_RESULT([no]) |
---|
| 907 | fi |
---|
| 908 | AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix]) |
---|
| 909 | ISO_CODES=iso-codes |
---|
| 910 | |
---|
| 911 | |
---|
| 912 | dnl --------------------------------------------------------------------------- |
---|
| 913 | dnl check for RBAC |
---|
| 914 | dnl --------------------------------------------------------------------------- |
---|
| 915 | |
---|
| 916 | msg_rbac_shutdown=no |
---|
| 917 | AC_ARG_ENABLE(rbac-shutdown, |
---|
| 918 | AC_HELP_STRING([--enable-rbac-shutdown=<key>], |
---|
| 919 | [Build with RBAC support specifying shutdown/reboot RBAC authentication key]), |
---|
| 920 | enable_rbac_shutdown=$enableval,enable_rbac_shutdown=no) |
---|
| 921 | |
---|
| 922 | if test "x$enable_rbac_shutdown" != "xno"; then |
---|
| 923 | RBAC_LIBS="-lsecdb -lsocket -lnsl" |
---|
| 924 | AC_DEFINE(ENABLE_RBAC_SHUTDOWN, [], [Set if we build with RBAC support]) |
---|
| 925 | AC_DEFINE_UNQUOTED(RBAC_SHUTDOWN_KEY, "$enable_rbac_shutdown", [Set if we build with RBAC support]) |
---|
| 926 | msg_rbac_shutdown="yes, using key $enable_rbac_shutdown" |
---|
| 927 | fi |
---|
| 928 | AC_SUBST(RBAC_LIBS) |
---|
| 929 | |
---|
| 930 | |
---|
| 931 | dnl --------------------------------------------------------------------------- |
---|
| 932 | dnl check for backtrace support |
---|
| 933 | dnl --------------------------------------------------------------------------- |
---|
| 934 | |
---|
| 935 | AC_CHECK_HEADERS(execinfo.h) |
---|
| 936 | |
---|
| 937 | dnl --------------------------------------------------------------------------- |
---|
| 938 | dnl - Define some variables to represent the directories we use. |
---|
| 939 | dnl --------------------------------------------------------------------------- |
---|
| 940 | |
---|
| 941 | AC_SUBST(authdir, ${localstatedir}/gdm) |
---|
| 942 | AC_SUBST(gdmlocaledir, ${gdmconfdir}) |
---|
| 943 | AC_SUBST(pixmapdir, ${datadir}/pixmaps) |
---|
| 944 | |
---|
| 945 | AC_ARG_WITH(log-dir, |
---|
| 946 | AS_HELP_STRING([--with-log-dir=<file>], |
---|
| 947 | [log dir])) |
---|
| 948 | |
---|
| 949 | if ! test -z "$with_log_dir"; then |
---|
| 950 | GDM_LOG_DIR=$with_log_dir |
---|
| 951 | else |
---|
| 952 | GDM_LOG_DIR=/var/log/gdm |
---|
| 953 | fi |
---|
| 954 | AC_SUBST(logdir, $GDM_LOG_DIR) |
---|
| 955 | |
---|
| 956 | withval="" |
---|
| 957 | AC_ARG_WITH(at-bindir, |
---|
| 958 | AS_HELP_STRING([--with-at-bindir=<PATH>] |
---|
| 959 | [PATH to Accessible Technology programs @<:@default=BINDIR@:>@])) |
---|
| 960 | |
---|
| 961 | if test x$withval != x; then |
---|
| 962 | AT_BINDIR="$withval" |
---|
| 963 | else |
---|
| 964 | AT_BINDIR='${bindir}' |
---|
| 965 | fi |
---|
| 966 | |
---|
| 967 | AC_SUBST(AT_BINDIR) |
---|
| 968 | |
---|
| 969 | withval="" |
---|
| 970 | AC_ARG_WITH(defaults_conf, |
---|
| 971 | AS_HELP_STRING([--with-defaults-conf=<FILENAME>], |
---|
| 972 | [FILENAME to give to defaults file @<:@default=DATADIR/gdm/defaults.conf@:>@])) |
---|
| 973 | |
---|
| 974 | if test x$withval != x; then |
---|
| 975 | GDM_DEFAULTS_CONF="$withval" |
---|
| 976 | else |
---|
| 977 | GDM_DEFAULTS_CONF='${datadir}/gdm/defaults.conf' |
---|
| 978 | fi |
---|
| 979 | |
---|
| 980 | AC_SUBST(GDM_DEFAULTS_CONF) |
---|
| 981 | |
---|
| 982 | withval="" |
---|
| 983 | AC_ARG_WITH(custom_conf, |
---|
| 984 | AS_HELP_STRING([--with-custom-conf=<FILENAME>], |
---|
| 985 | [FILENAME to give to custom configuration file @<:@default=GDMCONFDIR/custom.conf@:>@])) |
---|
| 986 | |
---|
| 987 | if test x$withval != x; then |
---|
| 988 | GDM_CUSTOM_CONF="$withval" |
---|
| 989 | else |
---|
| 990 | GDM_CUSTOM_CONF='${gdmconfdir}/custom.conf' |
---|
| 991 | fi |
---|
| 992 | |
---|
| 993 | AC_SUBST(GDM_CUSTOM_CONF) |
---|
| 994 | AC_SUBST(GDM_OLD_CONF, '${gdmconfdir}/gdm.conf') |
---|
| 995 | |
---|
| 996 | dnl --------------------------------------------------------------------------- |
---|
| 997 | dnl - Check for XEvIE extension support |
---|
| 998 | dnl --------------------------------------------------------------------------- |
---|
| 999 | |
---|
| 1000 | AC_ARG_WITH(xevie, |
---|
| 1001 | AS_HELP_STRING([--with-xevie], |
---|
| 1002 | [Add XEvIE Xserver extension support @<:@default=no@:>@]),, |
---|
| 1003 | with_xevie=no) |
---|
| 1004 | |
---|
| 1005 | if test x$with_xevie != xno ; then |
---|
| 1006 | XEVIE_OPTION="+extension XEVIE" |
---|
| 1007 | else |
---|
| 1008 | XEVIE_OPTION="" |
---|
| 1009 | fi |
---|
| 1010 | |
---|
| 1011 | AC_SUBST(XEVIE_OPTION) |
---|
| 1012 | AC_DEFINE_UNQUOTED(XEVIE_OPTION,"$XEVIE_OPTION",[Define xevie option]) |
---|
| 1013 | |
---|
| 1014 | dnl --------------------------------------------------------------------------- |
---|
| 1015 | dnl - Check for audit framework |
---|
| 1016 | dnl --------------------------------------------------------------------------- |
---|
| 1017 | |
---|
| 1018 | # Check for Solaris auditing API |
---|
| 1019 | # Note, Solaris auditing not supported for Solaris 9 or earlier and |
---|
| 1020 | # should not be used on these versions of Solaris if auditing is |
---|
| 1021 | # required. Solaris auditing is only supported on systems that |
---|
| 1022 | # support the ADT_USER enumeration value. |
---|
| 1023 | # |
---|
| 1024 | AC_MSG_CHECKING(for Solaris auditing API) |
---|
| 1025 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
---|
| 1026 | #include <bsm/adt.h> |
---|
| 1027 | adt_user_context = ADT_USER; |
---|
| 1028 | ]], [[]])], [ check_sun_audit=yes ], [ check_sun_audit=no ]) |
---|
| 1029 | |
---|
| 1030 | if test ${check_sun_audit} = yes |
---|
| 1031 | then |
---|
| 1032 | AC_DEFINE(HAVE_ADT, 1, [Define if have adt]) |
---|
| 1033 | PAM_LIBS="$PAM_LIBS -lbsm" |
---|
| 1034 | AC_MSG_RESULT(yes) |
---|
| 1035 | else |
---|
| 1036 | AC_MSG_RESULT(no) |
---|
| 1037 | fi |
---|
| 1038 | AM_CONDITIONAL(HAVE_ADT, test x$check_sun_audit = xyes) |
---|
| 1039 | |
---|
| 1040 | # Check for Linux auditing API |
---|
| 1041 | # |
---|
| 1042 | AC_ARG_WITH(libaudit, |
---|
| 1043 | AS_HELP_STRING([--with-libaudit], |
---|
| 1044 | [Add Linux audit support @<:@default=auto@:>@]),, |
---|
| 1045 | with_libaudit=auto) |
---|
| 1046 | |
---|
| 1047 | # libaudit detection |
---|
| 1048 | if test x$with_libaudit = xno ; then |
---|
| 1049 | have_libaudit=no; |
---|
| 1050 | else |
---|
| 1051 | # See if we have audit daemon library |
---|
| 1052 | AC_CHECK_LIB(audit, audit_log_user_message, |
---|
| 1053 | have_libaudit=yes, have_libaudit=no) |
---|
| 1054 | fi |
---|
| 1055 | |
---|
| 1056 | AM_CONDITIONAL(HAVE_LIBAUDIT, test x$have_libaudit = xyes) |
---|
| 1057 | |
---|
| 1058 | if test x$have_libaudit = xyes ; then |
---|
| 1059 | PAM_LIBS="$PAM_LIBS -laudit" |
---|
| 1060 | AC_DEFINE(HAVE_LIBAUDIT,1,[linux audit support]) |
---|
| 1061 | fi |
---|
| 1062 | |
---|
| 1063 | # |
---|
| 1064 | # Subst the extra libs |
---|
| 1065 | # |
---|
| 1066 | AC_SUBST(EXTRA_DAEMON_LIBS) |
---|
| 1067 | AC_SUBST(EXTRA_SLAVE_LIBS) |
---|
| 1068 | AC_SUBST(EXTRA_CHOOSER_LIBS) |
---|
| 1069 | AC_SUBST(EXTRA_XNEST_LIBS) |
---|
| 1070 | AC_SUBST(EXTRA_FLEXI_LIBS) |
---|
| 1071 | AC_SUBST(EXTRA_DYNAMIC_LIBS) |
---|
| 1072 | AC_SUBST(EXTRA_SETUP_LIBS) |
---|
| 1073 | AC_SUBST(EXTRA_TEST_LIBS) |
---|
| 1074 | AC_SUBST(EXTRA_GREETER_LIBS) |
---|
| 1075 | |
---|
| 1076 | # Check for Solaris logindevperm support |
---|
| 1077 | # |
---|
| 1078 | AC_CHECK_LIB(devinfo, di_devperm_login, [ |
---|
| 1079 | AC_DEFINE(HAVE_LOGINDEVPERM) |
---|
| 1080 | PAM_LIBS="$PAM_LIBS -ldevinfo" ]) |
---|
| 1081 | |
---|
| 1082 | dnl --------------------------------------------------------------------------- |
---|
| 1083 | dnl - Check for X Server location |
---|
| 1084 | dnl --------------------------------------------------------------------------- |
---|
| 1085 | |
---|
| 1086 | # First check with "! -h" for /usr/X11R6 and /usr/X11 since they often |
---|
| 1087 | # symlink to each other, and configure should use the more stable |
---|
| 1088 | # location (the real directory) if possible. |
---|
| 1089 | # |
---|
| 1090 | # On Solaris, the /usr/bin/Xserver script is used to decide whether to |
---|
| 1091 | # use Xsun or Xorg, so this is used on Solaris. |
---|
| 1092 | # |
---|
| 1093 | # When testing for /usr/X11R6, first check with "! -h" for /usr/X11R6 |
---|
| 1094 | # and /usr/X11 since they often symlink to each other, and configure |
---|
| 1095 | # should use the more stable location (the real directory) if possible. |
---|
| 1096 | # |
---|
| 1097 | if test -x /usr/X11/bin/Xserver; then |
---|
| 1098 | X_PATH="/usr/X11/bin" |
---|
| 1099 | X_SERVER_PATH="/usr/X11/bin" |
---|
| 1100 | X_SERVER="/usr/X11/bin/Xserver" |
---|
| 1101 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1102 | elif test ! -h /usr/X11R6 -a -x /usr/X11R6/bin/X; then |
---|
| 1103 | X_PATH="/usr/X11R6/bin" |
---|
| 1104 | X_SERVER_PATH="/usr/X11R6/bin" |
---|
| 1105 | X_SERVER="/usr/X11R6/bin/X" |
---|
| 1106 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1107 | elif test ! -h /usr/X11 -a -x /usr/X11/bin/X; then |
---|
| 1108 | X_PATH="/usr/X11/bin" |
---|
| 1109 | X_SERVER_PATH="/usr/X11/bin" |
---|
| 1110 | X_SERVER="/usr/X11/bin/X" |
---|
| 1111 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1112 | elif test -x /usr/X11R6/bin/X; then |
---|
| 1113 | X_PATH="/usr/X11R6/bin" |
---|
| 1114 | X_SERVER_PATH="/usr/X11R6/bin" |
---|
| 1115 | X_SERVER="/usr/X11R6/bin/X" |
---|
| 1116 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1117 | elif test -x /usr/bin/Xorg; then |
---|
| 1118 | X_PATH="/usr/bin" |
---|
| 1119 | X_SERVER_PATH="/usr/bin" |
---|
| 1120 | X_SERVER="/usr/bin/Xorg" |
---|
| 1121 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1122 | elif test -x /usr/X11/bin/X; then |
---|
| 1123 | X_PATH="/usr/X11/bin" |
---|
| 1124 | X_SERVER_PATH="/usr/X11/bin" |
---|
| 1125 | X_SERVER="/usr/X11/bin/X" |
---|
| 1126 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1127 | elif test -x /usr/openwin/bin/Xsun; then |
---|
| 1128 | # Do not add /usr/openwin/bin here because on Solaris you need |
---|
| 1129 | # /usr/openwin/bin in your PATH even if you are using the Xorg |
---|
| 1130 | # Xserver. We add this to the path below. |
---|
| 1131 | X_PATH="/usr/openwin/bin" |
---|
| 1132 | X_SERVER_PATH="/usr/openwin/bin" |
---|
| 1133 | X_SERVER="/usr/openwin/bin/Xsun" |
---|
| 1134 | X_CONFIG_OPTIONS="-audit 0 -nobanner" |
---|
| 1135 | elif test -x /opt/X11R6/bin/X; then |
---|
| 1136 | X_PATH="/opt/X11R6/bin" |
---|
| 1137 | X_SERVER_PATH="/opt/X11R6/bin" |
---|
| 1138 | X_SERVER="/opt/X11R6/bin/X" |
---|
| 1139 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1140 | elif test -x /usr/bin/X; then |
---|
| 1141 | X_PATH="/usr/bin" |
---|
| 1142 | X_SERVER_PATH="/usr/bin" |
---|
| 1143 | X_SERVER="/usr/bin/X" |
---|
| 1144 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1145 | else |
---|
| 1146 | # what to do, what to do, this is wrong, but this just sets the |
---|
| 1147 | # defaults, perhaps this user is cross compiling or some such |
---|
| 1148 | X_PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin" |
---|
| 1149 | X_SERVER_PATH="/usr/X11R6/bin" |
---|
| 1150 | X_SERVER="/usr/X11R6/bin/X" |
---|
| 1151 | X_CONFIG_OPTIONS="-audit 0" |
---|
| 1152 | fi |
---|
| 1153 | |
---|
| 1154 | dnl --------------------------------------------------------------------------- |
---|
| 1155 | dnl - Check for Xnest / Xephyr support |
---|
| 1156 | dnl --------------------------------------------------------------------------- |
---|
| 1157 | |
---|
| 1158 | # Use Xephyr if it is available. It works better than Xnest since Xephyr |
---|
| 1159 | # supports the Xserver extensions, even if on a remote machine. |
---|
| 1160 | # |
---|
| 1161 | X_XNEST_UNSCALED_FONTPATH="true" |
---|
| 1162 | if test -x $X_SERVER_PATH/Xephyr; then |
---|
| 1163 | X_XNEST_CMD="$X_SERVER_PATH/Xephyr" |
---|
| 1164 | X_XNEST_CONFIG_OPTIONS="-audit 0" |
---|
| 1165 | else |
---|
| 1166 | if test -x /usr/openwin/bin/Xnest; then |
---|
| 1167 | # If on Solaris, Xnest is only shipped with the Xsun Xserver, so |
---|
| 1168 | # use this version. |
---|
| 1169 | # |
---|
| 1170 | X_XNEST_CMD="/usr/openwin/bin/Xnest" |
---|
| 1171 | X_XNEST_CONFIG_OPTIONS="-audit 0 -name Xnest -pn" |
---|
| 1172 | X_XNEST_UNSCALED_FONTPATH="false" |
---|
| 1173 | else |
---|
| 1174 | if test -x $X_SERVER_PATH/Xnest; then |
---|
| 1175 | X_XNEST_CMD="$X_SERVER_PATH/Xnest" |
---|
| 1176 | X_XNEST_CONFIG_OPTIONS="-audit 0 -name Xnest" |
---|
| 1177 | fi |
---|
| 1178 | fi |
---|
| 1179 | fi |
---|
| 1180 | |
---|
| 1181 | dnl --------------------------------------------------------------------------- |
---|
| 1182 | dnl - Expand vars |
---|
| 1183 | dnl --------------------------------------------------------------------------- |
---|
| 1184 | |
---|
| 1185 | AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir) |
---|
| 1186 | AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) |
---|
| 1187 | AS_AC_EXPAND(DATADIR, $datadir) |
---|
| 1188 | AS_AC_EXPAND(BINDIR, $bindir) |
---|
| 1189 | AS_AC_EXPAND(SBINDIR, $sbindir) |
---|
| 1190 | AS_AC_EXPAND(LIBDIR, $libdir) |
---|
| 1191 | AS_AC_EXPAND(LIBEXECDIR, $libexecdir) |
---|
| 1192 | |
---|
| 1193 | dnl --------------------------------------------------------------------------- |
---|
| 1194 | dnl - PID file |
---|
| 1195 | dnl --------------------------------------------------------------------------- |
---|
| 1196 | |
---|
| 1197 | AC_ARG_WITH(pid-file, |
---|
| 1198 | AS_HELP_STRING([--with-pid-file=<file>], |
---|
| 1199 | [pid file])) |
---|
| 1200 | |
---|
| 1201 | if ! test -z "$with_pid_file"; then |
---|
| 1202 | GDM_PID_FILE=$with_pid_file |
---|
| 1203 | else |
---|
| 1204 | GDM_PID_FILE=/var/run/gdm.pid |
---|
| 1205 | fi |
---|
| 1206 | |
---|
| 1207 | AC_SUBST(GDM_PID_FILE) |
---|
| 1208 | AC_DEFINE_UNQUOTED(GDM_PID_FILE, "$GDM_PID_FILE", [pid file]) |
---|
| 1209 | |
---|
| 1210 | dnl --------------------------------------------------------------------------- |
---|
| 1211 | dnl - GREETER WORKING DIRECTORY |
---|
| 1212 | dnl --------------------------------------------------------------------------- |
---|
| 1213 | |
---|
| 1214 | AC_ARG_WITH(working-directory, |
---|
| 1215 | AS_HELP_STRING([--with-working-dir=<dir>], |
---|
| 1216 | [working directory])) |
---|
| 1217 | |
---|
| 1218 | if ! test -z "$with_working_directory"; then |
---|
| 1219 | GDM_WORKING_DIR=$with_working_directory |
---|
| 1220 | else |
---|
| 1221 | GDM_WORKING_DIR=${localstatedir}/lib/gdm |
---|
| 1222 | fi |
---|
| 1223 | |
---|
| 1224 | AC_SUBST(GDM_WORKING_DIR) |
---|
| 1225 | |
---|
| 1226 | dnl --------------------------------------------------------------------------- |
---|
| 1227 | dnl - Directory for X auth cookies |
---|
| 1228 | dnl --------------------------------------------------------------------------- |
---|
| 1229 | |
---|
| 1230 | AC_ARG_WITH(xauth-dir, |
---|
| 1231 | AS_HELP_STRING([--with-xauth-dir=<dir>], |
---|
| 1232 | [xauth cookie directory])) |
---|
| 1233 | |
---|
| 1234 | if ! test -z "$with_xauth_dir"; then |
---|
| 1235 | GDM_XAUTH_DIR=$with_xauth_dir |
---|
| 1236 | else |
---|
| 1237 | GDM_XAUTH_DIR=${localstatedir}/run/gdm |
---|
| 1238 | fi |
---|
| 1239 | |
---|
| 1240 | AC_SUBST(GDM_XAUTH_DIR) |
---|
| 1241 | |
---|
| 1242 | dnl --------------------------------------------------------------------------- |
---|
| 1243 | dnl - Finish |
---|
| 1244 | dnl --------------------------------------------------------------------------- |
---|
| 1245 | |
---|
| 1246 | |
---|
| 1247 | # Turn on the additional warnings last, so -Werror doesn't affect other tests. |
---|
| 1248 | |
---|
| 1249 | AC_ARG_ENABLE(more-warnings, |
---|
| 1250 | AS_HELP_STRING([--enable-more-warnings], |
---|
| 1251 | [Maximum compiler warnings]), |
---|
| 1252 | set_more_warnings="$enableval",[ |
---|
| 1253 | if test -d $srcdir/.svn; then |
---|
| 1254 | set_more_warnings=yes |
---|
| 1255 | else |
---|
| 1256 | set_more_warnings=no |
---|
| 1257 | fi]) |
---|
| 1258 | |
---|
| 1259 | AC_MSG_CHECKING(for more warnings) |
---|
| 1260 | if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then |
---|
| 1261 | AC_MSG_RESULT(yes) |
---|
| 1262 | CFLAGS="\ |
---|
| 1263 | -Wall \ |
---|
| 1264 | -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ |
---|
| 1265 | -Wnested-externs -Wpointer-arith \ |
---|
| 1266 | -Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2 \ |
---|
| 1267 | $CFLAGS" |
---|
| 1268 | |
---|
| 1269 | for option in -Wno-strict-aliasing -Wno-sign-compare; do |
---|
| 1270 | SAVE_CFLAGS="$CFLAGS" |
---|
| 1271 | CFLAGS="$CFLAGS $option" |
---|
| 1272 | AC_MSG_CHECKING([whether gcc understands $option]) |
---|
| 1273 | AC_TRY_COMPILE([], [], |
---|
| 1274 | has_option=yes, |
---|
| 1275 | has_option=no,) |
---|
| 1276 | if test $has_option = no; then |
---|
| 1277 | CFLAGS="$SAVE_CFLAGS" |
---|
| 1278 | fi |
---|
| 1279 | AC_MSG_RESULT($has_option) |
---|
| 1280 | unset has_option |
---|
| 1281 | unset SAVE_CFLAGS |
---|
| 1282 | done |
---|
| 1283 | unset option |
---|
| 1284 | else |
---|
| 1285 | AC_MSG_RESULT(no) |
---|
| 1286 | fi |
---|
| 1287 | |
---|
| 1288 | # |
---|
| 1289 | # Enable Debug |
---|
| 1290 | # |
---|
| 1291 | AC_ARG_ENABLE(debug, |
---|
| 1292 | AS_HELP_STRING([--enable-debug], |
---|
| 1293 | [turn on debugging]),, |
---|
| 1294 | enable_debug=yes) |
---|
| 1295 | |
---|
| 1296 | if test "$enable_debug" = "yes"; then |
---|
| 1297 | DEBUG_CFLAGS="-DG_ENABLE_DEBUG" |
---|
| 1298 | else |
---|
| 1299 | if test "x$enable_debug" = "xno"; then |
---|
| 1300 | DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" |
---|
| 1301 | else |
---|
| 1302 | DEBUG_CFLAGS="" |
---|
| 1303 | fi |
---|
| 1304 | fi |
---|
| 1305 | AC_SUBST(DEBUG_CFLAGS) |
---|
| 1306 | |
---|
| 1307 | # |
---|
| 1308 | # Enable Profiling |
---|
| 1309 | # |
---|
| 1310 | AC_ARG_ENABLE(profiling, |
---|
| 1311 | AS_HELP_STRING([--enable-profiling], |
---|
| 1312 | [turn on profiling]),, |
---|
| 1313 | enable_profiling=yes) |
---|
| 1314 | |
---|
| 1315 | if test "$enable_profiling" = "yes"; then |
---|
| 1316 | AC_DEFINE(ENABLE_PROFILING,1,[enable profiling]) |
---|
| 1317 | fi |
---|
| 1318 | |
---|
| 1319 | # |
---|
| 1320 | # Set SHELL to use in scripts. |
---|
| 1321 | # |
---|
| 1322 | if test x$os_solaris = xyes ; then |
---|
| 1323 | XSESSION_SHELL=/bin/ksh |
---|
| 1324 | else |
---|
| 1325 | XSESSION_SHELL=/bin/sh |
---|
| 1326 | fi |
---|
| 1327 | |
---|
| 1328 | # Set configuration choices. |
---|
| 1329 | # |
---|
| 1330 | AC_SUBST(XSESSION_SHELL) |
---|
| 1331 | AC_DEFINE_UNQUOTED(XSESSION_SHELL,"$XSESSION_SHELL",[xsession shell]) |
---|
| 1332 | AC_SUBST(SOUND_PROGRAM) |
---|
| 1333 | AC_DEFINE_UNQUOTED(SOUND_PROGRAM,"$SOUND_PROGRAM",[]) |
---|
| 1334 | |
---|
| 1335 | AC_SUBST(X_PATH) |
---|
| 1336 | AC_SUBST(X_SERVER) |
---|
| 1337 | AC_SUBST(X_SERVER_PATH) |
---|
| 1338 | AC_SUBST(X_CONFIG_OPTIONS) |
---|
| 1339 | AC_DEFINE_UNQUOTED(X_SERVER,"$X_SERVER",[]) |
---|
| 1340 | AC_DEFINE_UNQUOTED(X_SERVER_PATH,"$X_SERVER_PATH",[]) |
---|
| 1341 | AC_DEFINE_UNQUOTED(X_CONFIG_OPTIONS,"$X_CONFIG_OPTIONS", [Options used when launching xserver]) |
---|
| 1342 | |
---|
| 1343 | AC_SUBST(X_XNEST_CMD) |
---|
| 1344 | AC_SUBST(X_XNEST_CONFIG_OPTIONS) |
---|
| 1345 | AC_SUBST(X_XNEST_UNSCALED_FONTPATH) |
---|
| 1346 | AC_DEFINE_UNQUOTED(X_XNEST_CMD,"$X_XNEST_CMD",[]) |
---|
| 1347 | AC_DEFINE_UNQUOTED(X_XNEST_CONFIG_OPTIONS,"$X_XNEST_CONFIG_OPTIONS",[]) |
---|
| 1348 | AC_DEFINE_UNQUOTED(X_XNEST_UNSCALED_FONTPATH,"$X_XNEST_UNSCALED_FONTPATH",[]) |
---|
| 1349 | |
---|
| 1350 | ## Stuff for debian/changelog.in |
---|
| 1351 | #if test -e "debian/changelog"; then |
---|
| 1352 | # DEBIAN_DATESTAMP=`head -1 debian/changelog| sed -e 's/.*cvs.//' -e 's/).*//'` |
---|
| 1353 | # DEBIAN_DATE=`grep '^ --' debian/changelog | head -1 | sed -e 's/.* //'` |
---|
| 1354 | #else |
---|
| 1355 | # DEBIAN_DATESTAMP=`date +%Y%m%d%H%M%s` |
---|
| 1356 | # DEBIAN_DATE=`date -R` |
---|
| 1357 | #fi |
---|
| 1358 | # |
---|
| 1359 | #AC_SUBST(DEBIAN_DATESTAMP) |
---|
| 1360 | #AC_SUBST(DEBIAN_DATE) |
---|
| 1361 | |
---|
| 1362 | AC_CONFIG_FILES([ |
---|
| 1363 | Makefile |
---|
| 1364 | daemon/Makefile |
---|
| 1365 | docs/Makefile |
---|
| 1366 | gui/Makefile |
---|
| 1367 | gui/simple-greeter/Makefile |
---|
| 1368 | gui/simple-greeter/libnotificationarea/Makefile |
---|
| 1369 | gui/simple-chooser/Makefile |
---|
| 1370 | gui/user-switch-applet/Makefile |
---|
| 1371 | utils/Makefile |
---|
| 1372 | data/gdm.conf |
---|
| 1373 | data/Makefile |
---|
| 1374 | data/faces/Makefile |
---|
| 1375 | data/greeter-autostart/Makefile |
---|
| 1376 | data/pixmaps/Makefile |
---|
| 1377 | data/pixmaps/16x16/Makefile |
---|
| 1378 | data/pixmaps/32x32/Makefile |
---|
| 1379 | data/pixmaps/48x48/Makefile |
---|
| 1380 | common/Makefile |
---|
| 1381 | po/Makefile.in |
---|
| 1382 | tests/Makefile |
---|
| 1383 | ]) |
---|
| 1384 | |
---|
| 1385 | AC_OUTPUT |
---|
| 1386 | |
---|
| 1387 | dnl --------------------------------------------------------------------------- |
---|
| 1388 | dnl - Show summary |
---|
| 1389 | dnl --------------------------------------------------------------------------- |
---|
| 1390 | |
---|
| 1391 | echo " |
---|
| 1392 | GDM $VERSION |
---|
| 1393 | ============ |
---|
| 1394 | |
---|
| 1395 | prefix: ${prefix} |
---|
| 1396 | exec_prefix: ${exec_prefix} |
---|
| 1397 | libdir: ${libdir} |
---|
| 1398 | bindir: ${bindir} |
---|
| 1399 | sbindir: ${sbindir} |
---|
| 1400 | sysconfdir: ${sysconfdir} |
---|
| 1401 | sysconfsubdir: ${sysconfsubdir} |
---|
| 1402 | gdmconfdir: ${gdmconfdir} |
---|
| 1403 | dmconfdir: ${dmconfdir} |
---|
| 1404 | localstatedir: ${localstatedir} |
---|
| 1405 | datadir: ${datadir} |
---|
| 1406 | source code location: ${srcdir} |
---|
| 1407 | compiler: ${CC} |
---|
| 1408 | cflags: ${CFLAGS} |
---|
| 1409 | Maintainer mode: ${USE_MAINTAINER_MODE} |
---|
| 1410 | |
---|
| 1411 | user: ${GDM_USERNAME} |
---|
| 1412 | group: ${GDM_GROUPNAME} |
---|
| 1413 | |
---|
| 1414 | dbus-1 system.d dir: ${DBUS_SYS_DIR} |
---|
| 1415 | PAM prefix: ${PAM_PREFIX} |
---|
| 1416 | X server: ${X_SERVER} |
---|
| 1417 | " |
---|
| 1418 | |
---|
| 1419 | dnl TCP Wrappers support? |
---|
| 1420 | if test x"$LIBWRAP_PATH" = x ; then |
---|
| 1421 | echo \ |
---|
| 1422 | " TCP Wrappers support: no" |
---|
| 1423 | else |
---|
| 1424 | echo \ |
---|
| 1425 | " TCP Wrappers support: yes" |
---|
| 1426 | fi |
---|
| 1427 | |
---|
| 1428 | echo \ |
---|
| 1429 | " Xinerama support: ${XINERAMA_SUPPORT} |
---|
| 1430 | XDMCP support: ${XDMCP_SUPPORT} |
---|
| 1431 | SELinux support: ${with_selinux} |
---|
| 1432 | ConsoleKit support: ${use_console_kit} |
---|
| 1433 | Build with RBAC: ${msg_rbac_shutdown} |
---|
| 1434 | " |
---|