diff options
author | George Lebl <jirka@5z.com> | 2001-05-13 06:44:29 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2001-05-13 06:44:29 +0000 |
commit | c241368fe21f2c9eb83dd31ddda2c9420eccfcb7 (patch) | |
tree | 6fbed0fec8b8380e1a534597b823fcb7693d75f1 /configure.in | |
parent | f289fe314afb4b0e6953cb1f1790782dd384b038 (diff) | |
download | gdm-c241368fe21f2c9eb83dd31ddda2c9420eccfcb7.tar.gz |
add configuration summary, fix libwrap detection and add configuration
Sat May 12 23:44:38 2001 George Lebl <jirka@5z.com>
* configure.in: add configuration summary, fix libwrap detection
and add configuration options to enable/disable xinerama
tcpwrappers and choose the authentication scheme
* daemon/verify-crypt.c, daemon/verify-shadow.c: don't ask for
passwords on passwordless logins, fix a leak, and make crypt
support actually compile. Also check password before testing if
the account is disabled.
* daemon/slave.c: Focus first X window with res_name "xterm" when
running the failsafe xterm session
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 173 |
1 files changed, 130 insertions, 43 deletions
diff --git a/configure.in b/configure.in index 077b8625..2e3b5e84 100644 --- a/configure.in +++ b/configure.in @@ -13,6 +13,29 @@ AM_ACLOCAL_INCLUDE(macros) GDK_PIXBUF_REQUIRED=0.7.0 +dnl +dnl Configure arguments +dnl +AC_ARG_ENABLE(console-helper, + [ --enable-console-helper=[no/yes] Enable PAM console helper [default =no]],, + enable_console_helper=no) + +AC_ARG_ENABLE(authentication-scheme, + [ --enable-authentication-scheme=[auto/pam/crypt/shadow] Choose a specific + authentication scheme [default=auto]],, + enable_authentication_scheme=auto) + +AC_ARG_WITH(xinerama, + [ --with-xinerama=[auto/yes/no] Add Xinerama support [default=auto]],, + with_xinerama=auto) + +AC_ARG_WITH(tcp-wrappers, + [ --with-tcp-wrappers=[auto/yes/no] Use TCP Wrappers [default=auto]],, + with_tcp_wrappers=auto) + +dnl +dnl Standard stuff +dnl GNOME_INIT AC_ISC_POSIX @@ -26,11 +49,6 @@ GNOME_X_CHECKS AM_PATH_LIBGLADE(,,gnome) dnl Allow users to run gdmconfig using the console helper PAM stuff. - -AC_ARG_ENABLE(console-helper, - [ --enable-console-helper=[no/yes]],, - enable_console_helper=no) - if test "x$enable_console_helper" = "xyes"; then AM_CONDITIONAL(CONSOLE_HELPER, true) else @@ -49,9 +67,12 @@ AM_GNU_GETTEXT AC_CHECK_FUNCS([setenv unsetenv clearenv]) # TCP Wrappers for XDMCP access control -AC_MSG_CHECKING("whether to use TCP wrappers") -LIBWRAP_PATH="" -for I in $LDFLAGS $LIBS -L/usr/lib; do +if test x$with_tcp_wrappers = xno ; then + echo "TCP wrappers disabled" +else + AC_MSG_CHECKING("whether to use TCP wrappers") + LIBWRAP_PATH="" + for I in $LDFLAGS $LIBS -L/usr/lib; do case "$I" in -L*) THEFILE="`echo $I | sed -e 's,^-L,,'`" @@ -62,15 +83,15 @@ for I in $LDFLAGS $LIBS -L/usr/lib; do break fi esac -done + done -if test -n "$LIBWRAP_PATH"; then + if test -n "$LIBWRAP_PATH"; then AC_MSG_RESULT(yes) -else + else AC_MSG_RESULT(no) -fi + fi -if test -n "$LIBWRAP_PATH"; then + if test -n "$LIBWRAP_PATH"; then nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH="" if test -z "$LIBWRAP_PATH"; then echo "*********************************************************" @@ -84,14 +105,16 @@ if test -n "$LIBWRAP_PATH"; then else AC_DEFINE(HAVE_TCPWRAPPERS) fi -fi -if test -n "$LIBWRAP_PATH"; then - LIBS="$LIBS -lwrap" -fi + fi + if test -n "$LIBWRAP_PATH"; then + AC_CHECK_LIB(wrap, hosts_ctl, [ + LIBS="$LIBS -lwrap"], [ + LIBS="$LIBS $LIBWRAP_PATH"]) + fi -dnl find out if we need -lnsl or whatever -LIB_NSL= -if test -n "$LIBWRAP_PATH"; then + dnl find out if we need -lnsl or whatever + LIB_NSL= + if test -n "$LIBWRAP_PATH"; then AC_MSG_CHECKING(whether -lwrap requires -lnsl) ORIG_LIBS="$LIBS" LIBS="-lwrap $LIBS" @@ -110,24 +133,35 @@ LIBWRAP_PATH="") LIBS="$OLD_LIBS" ]) LIBS="$ORIG_LIBS" -if test -n "$LIB_NSL"; then - AC_MSG_RESULT(yes) - LIBS="$LIBS $LIB_NSL" -else - AC_MSG_RESULT(no) -fi + if test -n "$LIB_NSL"; then + AC_MSG_RESULT(yes) + LIBS="$LIBS $LIB_NSL" + else + AC_MSG_RESULT(no) + fi + fi fi +AC_MSG_CHECKING("for corrupt government") +AC_MSG_RESULT(yes) + dnl ## Autentication scheme have_pam=no VRFY="verify-crypt" -AC_CHECK_HEADERS(security/pam_appl.h, [ - have_pam=yes - LIBS="$LIBS -lpam" - VRFY="verify-pam" - AC_DEFINE(HAVE_PAM)]) +if test x$enable_authentication_scheme != xcrypt -a \ + x$enable_authentication_scheme != xshadow ; then + AC_CHECK_HEADERS(security/pam_appl.h, [ + have_pam=yes + LIBS="$LIBS -lpam" + VRFY="verify-pam" + AC_DEFINE(HAVE_PAM)]) +fi + +if test x$enable_authentication_scheme = xpam -a x$have_pam = xno ; then + AC_MSG_ERROR(PAM support requested but not available) +fi -if test $have_pam = no; then +if test x$have_pam = xno; then # Check if -lcrypt is necessary AC_CHECK_LIB(crypt, crypt, [ @@ -137,15 +171,20 @@ if test $have_pam = no; then AC_CHECK_HEADERS(crypt.h, [ AC_DEFINE(HAVE_CRYPT)]) - # Check for shadow passwords (hack) - AC_MSG_CHECKING("for /etc/shadow") - - if test -f /etc/shadow; then - VRFY="verify-shadow" - AC_MSG_RESULT(yes) + if test x$enable_authentication_scheme = xshadow ; then + VRFY="verify-shadow" AC_DEFINE(HAVE_SHADOW) - else - AC_MSG_RESULT(no) + elif test x$enable_authentication_scheme != xcrypt ; then + # Check for shadow passwords (hack) + AC_MSG_CHECKING("for /etc/shadow") + + if test -f /etc/shadow; then + VRFY="verify-shadow" + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SHADOW) + else + AC_MSG_RESULT(no) + fi fi fi @@ -153,9 +192,18 @@ fi AC_SUBST(VRFY) # X11 Xinerama extension -AC_CHECK_HEADER(X11/extensions/Xinerama.h, [ - AC_CHECK_LIB(Xinerama, XineramaQueryScreens,,, $GTK_LIBS) -]) +if test x$with_xinerama != xno ; then + AC_CHECK_HEADER(X11/extensions/Xinerama.h, [ + AC_CHECK_LIB(Xinerama, XineramaQueryScreens, [ + AC_DEFINE(HAVE_LIBXINERAMA) + LIBS="$LIBS -lXinerama" + XINERAMA_SUPPORT=yes],, $GTK_LIBS) + ]) + + if test x$with_xinerama = xyes -a x$XINERAMA_SUPPORT = x ; then + AC_MSG_ERROR(Xinerama support requested but Xinerama libraries not found) + fi +fi dnl dnl GdkPixBuf @@ -282,4 +330,43 @@ debian/changelog gdm.spec ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) +dnl <= Configuration summary => + +echo "" +echo "GDM2 configuration summary:" +echo "===========================" +echo "" + +dnl <= CFLAGS and LDFLAGS => +echo "CFLAGS : $CFLAGS" +echo "LDFLAGS : $LDFLAGS" +echo "" + +dnl <= TCP Wrappers support? => +if test x"$LIBWRAP_PATH" = x ; then + echo "TCP Wrappers support : NO" +else + echo "TCP Wrappers support : YES" +fi + +dnl <= XINERAMA => +if test x"$XINERAMA_SUPPORT" = xyes ; then + echo "Xinerama support : YES" +else + echo "Xinerama support : NO" +fi + +dnl <= Console Helper => +if test "x$enable_console_helper" = "xyes"; then + echo "Console helper : YES" +else + echo "Console helper : NO" +fi + + +dnl <= Authentication scheme => +echo "Authentication scheme : $VRFY" + +echo "" +dnl <= End of configuration summary => |