AC_INIT(daemon/gdm.h) dnl dnl Due to the sed scripts being split on 90 line dnl blocks, this macro needs to be right at the beggining. dnl AM_PROG_XML_I18N_TOOLS AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(gdm,2.2.2.1) AM_MAINTAINER_MODE AM_ACLOCAL_INCLUDE(macros) GDK_PIXBUF_REQUIRED=0.7.0 # find the actual value for $prefix that we'll end up with REAL_PREFIX= if test "x$prefix" = "xNONE"; then REAL_PREFIX=$ac_default_prefix else REAL_PREFIX=$prefix fi old_prefix=$prefix prefix=$REAL_PREFIX REAL_EXEC_PREFIX= if test "x$exec_prefix" = "xNONE"; then REAL_EXEC_PREFIX=$prefix else REAL_EXEC_PREFIX=$exec_prefix fi old_exec_prefix=$exec_prefix exec_prefix=$REAL_EXEC_PREFIX 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(xdmcp, [ --with-xdmcp=[auto/yes/no] Add XDMCP (remote login) support [default=auto]],, with_xdmcp=auto) AC_ARG_WITH(tcp-wrappers, [ --with-tcp-wrappers=[auto/yes/no] Use TCP Wrappers [default=auto]],, with_tcp_wrappers=auto) dnl dnl PAM prefix dnl withval="" AC_ARG_WITH(pam-prefix, [ --with-pam-prefix= specify where pam files go],[ if test x$withval != x; then AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.") fi]) if test x$withval != x; then PAM_PREFIX_UNEXPANDED="$withval" else PAM_PREFIX_UNEXPANDED="$sysconfdir" fi PAM_PREFIX=`eval echo $PAM_PREFIX_UNEXPANDED` AC_SUBST(PAM_PREFIX) AC_PATH_PROG(CONSOLE_HELPER,consolehelper,no) if test "x$CONSOLE_HELPER" = "xno" -a "x$enable_console_helper" = "xyes" ; then AC_MSG_ERROR(Console helper requested but consolehelper binary not found) fi dnl dnl Standard stuff dnl GNOME_INIT AC_ISC_POSIX AC_PROG_CC AC_STDC_HEADERS AC_ARG_PROGRAM AM_PROG_LIBTOOL GNOME_X_CHECKS AM_PATH_LIBGLADE(,,gnome) dnl Allow users to run gdmconfig using the console helper PAM stuff. if test "x$enable_console_helper" = "xyes"; then AM_CONDITIONAL(CONSOLE_HELPER, true) else AM_CONDITIONAL(CONSOLE_HELPER, false) fi AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) dnl ## internationalization support ALL_LINGUAS="az ca cs da de el es et fi fr ga gl hu it ko lt ms nl nn no pl pt_BR ro ru sk sl sv tr uk zh_CN.GB2312" dnl AM_GNOME_GETTEXT AM_GNU_GETTEXT AC_CHECK_FUNCS([setenv unsetenv clearenv]) # TCP Wrappers for XDMCP access control 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,,'`" echo "From $I, checking in dir $THEFILE for libwrap.a" 1>&5 if test -f $THEFILE/libwrap.a; then LIBWRAP_PATH=$THEFILE/libwrap.a echo "Found $LIBWRAP_PATH" 1>&5 break fi esac done if test -n "$LIBWRAP_PATH"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi if test -n "$LIBWRAP_PATH"; then nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH="" 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 AC_DEFINE(HAVE_TCPWRAPPERS) 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 AC_MSG_CHECKING(whether -lwrap requires -lnsl) ORIG_LIBS="$LIBS" LIBS="-lwrap $LIBS" AC_TRY_LINK([ #include int allow_severity, deny_severity; ], [return hosts_access;], ,[ dnl try with -lnsl OLD_LIBS="$LIBS" LIBS="$LIBS -lnsl" AC_TRY_LINK([ #include 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) 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" 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 x$have_pam = xno; then # Check if -lcrypt is necessary AC_CHECK_LIB(crypt, crypt, [ LIBS="$LIBS -lcrypt"]) # Check if crypt lives in a separate header file AC_CHECK_HEADERS(crypt.h, [ AC_DEFINE(HAVE_CRYPT)]) if test x$enable_authentication_scheme = xshadow ; then VRFY="verify-shadow" AC_DEFINE(HAVE_SHADOW) 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 AC_SUBST(VRFY) # # Xdmcp checking # XDMCP_LIBS="" if test x$with_xdmcp != xno ; then AC_CHECK_HEADER(X11/Xdmcp.h, [ AC_CHECK_LIB(Xdmcp, XdmcpFlush, [ AC_DEFINE(HAVE_LIBXDMCP) XDMCP_LIBS="-lXdmcp" XDMCP_SUPPORT=yes],, $GTK_LIBS) ]) if test x$with_xdmcp = xyes -a x$XDMCP_SUPPORT = x ; then AC_MSG_ERROR(XDMCP support requested but XDMCP libraries not found) fi fi AC_SUBST(XDMCP_LIBS) if test x$XDMCP_SUPPORT = xyes ; then AM_CONDITIONAL(XDMCP_SUPPORT, true) GDMCHOOSER=gdmchooser else AM_CONDITIONAL(XDMCP_SUPPORT, false) GDMCHOOSER= fi AC_SUBST(GDMCHOOSER) # # X11 Xinerama extension # 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 dnl AC_MSG_CHECKING(for GdkPixbuf library >= $GDK_PIXBUF_REQUIRED) PIXBUF_CFLAGS=`$GNOME_CONFIG --cflags gdk_pixbuf` PIXBUF_LIBS=`$GNOME_CONFIG --libs gdk_pixbuf` if test "x$PIXBUF_CFLAGS" != x ; then vers=`gdk-pixbuf-config --version | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` if test "$vers" -ge 0007000; then AC_MSG_RESULT(found) else AC_MSG_ERROR(You need at least GdkPixbuf version 0.7.0 for the panel) fi else AC_MSG_ERROR(Did not find GdkPixbuf installed) fi AC_SUBST(PIXBUF_CFLAGS) AC_SUBST(PIXBUF_LIBS) AC_SUBST(GDK_PIXBUF_REQUIRED) # # Configuration file foo, we need to get expanded versions of a bunch of things # if you actually know how to code shell then fix this :-) # Stolen mostly from GConf # DATADIR_TMP="$datadir" EXPANDED_DATADIR=`eval echo $DATADIR_TMP` AC_SUBST(EXPANDED_DATADIR) AC_DEFINE_UNQUOTED(EXPANDED_DATADIR,"$EXPANDED_DATADIR") PIXMAPDIR_TMP="$datadir/pixmaps" EXPANDED_PIXMAPDIR=`eval echo $PIXMAPDIR_TMP` AC_SUBST(EXPANDED_PIXMAPDIR) AC_DEFINE_UNQUOTED(EXPANDED_PIXMAPDIR,"$EXPANDED_PIXMAPDIR") BINDIR_TMP="$bindir" EXPANDED_BINDIR=`eval echo $BINDIR_TMP` AC_SUBST(EXPANDED_BINDIR) AC_DEFINE_UNQUOTED(EXPANDED_BINDIR,"$EXPANDED_BINDIR") SBINDIR_TMP="$bindir" EXPANDED_SBINDIR=`eval echo $SBINDIR_TMP` AC_SUBST(EXPANDED_SBINDIR) AC_DEFINE_UNQUOTED(EXPANDED_SBINDIR,"$EXPANDED_SBINDIR") dnl This is where the binary actually resides, dnl not the console helper link if test "x$enable_console_helper" = "xyes"; then GDMCONFIGDIR_TMP="$sbindir" else GDMCONFIGDIR_TMP="$bindir" fi EXPANDED_GDMCONFIGDIR=`eval echo $GDMCONFIGDIR_TMP` AC_SUBST(EXPANDED_GDMCONFIGDIR) AC_DEFINE_UNQUOTED(EXPANDED_GDMCONFIGDIR,"$EXPANDED_GDMCONFIGDIR") LOCALEDIR_TMP="$sysconfdir/gdm" EXPANDED_LOCALEDIR=`eval echo $LOCALEDIR_TMP` AC_SUBST(EXPANDED_LOCALEDIR) AC_DEFINE_UNQUOTED(EXPANDED_LOCALEDIR,"$EXPANDED_LOCALEDIR") AUTHDIR_TMP="$localstatedir/gdm" EXPANDED_AUTHDIR=`eval echo $AUTHDIR_TMP` AC_SUBST(EXPANDED_AUTHDIR) AC_DEFINE_UNQUOTED(EXPANDED_AUTHDIR,"$EXPANDED_AUTHDIR") SYSCONFDIR_TMP="$sysconfdir" EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP` AC_SUBST(EXPANDED_SYSCONFDIR) AC_DEFINE_UNQUOTED(EXPANDED_SYSCONFDIR,"$EXPANDED_SYSCONFDIR") SESSDIR_TMP="$sysconfdir/gdm/Sessions" EXPANDED_SESSDIR=`eval echo $SESSDIR_TMP` AC_SUBST(EXPANDED_SESSDIR) AC_DEFINE_UNQUOTED(EXPANDED_SESSDIR,"$EXPANDED_SESSDIR") ## 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) prefix=$old_prefix exec_prefix=$old_exec_prefix AC_OUTPUT([ Makefile daemon/Makefile gui/Makefile pixmaps/Makefile macros/Makefile config/Makefile docs/Makefile docs/C/Makefile docs/gdmconfig/Makefile docs/gdmconfig/C/Makefile omf-install/Makefile po/Makefile.in intl/Makefile config/gdm.conf config/Gnome config/gnomerc gdm-restart gdmconfig-security gdm.spec ]) dnl <= Configuration summary => echo "" echo "GDM2 configuration summary:" echo "===========================" echo "" dnl <= CFLAGS and LDFLAGS => echo "CFLAGS : $CFLAGS" echo "LDFLAGS : $LDFLAGS" echo "" dnl <= Prefixes => echo "prefix : $prefix" echo "sysconf dir : "`eval echo $sysconfdir` echo "bin dir : $EXPANDED_BINDIR" echo "sbin dir : $EXPANDED_SBINDIR" echo "PAM prefix : $PAM_PREFIX" echo "data dir : "`eval echo $datadir` 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 <= XDMCP => if test x"$XDMCP_SUPPORT" = xyes ; then echo "XDMCP (remote login) support : YES" else echo "XDMCP (remote login) 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 =>