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 AC_PROG_INTLTOOL AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(gdm,2.3.90.1) AM_MAINTAINER_MODE GDK_PIXBUF_REQUIRED=1.3.1 GTK_REQUIRED=1.3.1 LIBGLADE_REQUIRED=1.99.2 LIBGNOME_REQUIRED=1.96.0 LIBGNOMEUI_REQUIRED=1.96.0 LIBGNOMECANVAS_REQUIRED=1.109.0 LIBRSVG_REQUIRED=1.1.1 LIBXML_REQUIRED=2.4.12 SCROLLKEEPER_REQUIRED=0.1.4 # 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=[auto/no/yes] Enable PAM console helper [default=auto]],, enable_console_helper=auto) 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" ; then if test "x$enable_console_helper" = "xyes" ; then AC_MSG_ERROR(Console helper requested but consolehelper binary not found) fi # if it was no, nothing happens, if it was auto, well then we're out of luck enable_console_helper=no else if test ! "x$enable_console_helper" = "xno" ; then enable_console_helper=yes fi fi dnl dnl Standard stuff dnl GNOME_COMMON_INIT AC_ISC_POSIX AC_PROG_CC AC_STDC_HEADERS dnl AC_ARG_PROGRAM AM_PROG_LIBTOOL GNOME_PLATFORM_GNOME_2(yes) GNOME_COMPILE_WARNINGS(maximum) PKG_CHECK_MODULES(DAEMON, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnome-2.0 >= $LIBGNOME_REQUIRED) AC_SUBST(DAEMON_CFLAGS) AC_SUBST(DAEMON_LIBS) PKG_CHECK_MODULES(JUSTGTK, gtk+-2.0 >= $GTK_REQUIRED) AC_SUBST(JUSTGTK_CFLAGS) AC_SUBST(JUSTGTK_LIBS) PKG_CHECK_MODULES(GUI, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED) AC_SUBST(GUI_CFLAGS) AC_SUBST(GUI_LIBS) PKG_CHECK_MODULES(GREETER, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomecanvas-2.0 >= $LIBGNOMECANVAS_REQUIRED libgnome-2.0 >= $LIBGNOMEUI_REQUIRED librsvg-2.0 >= $LIBRSVG_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED) AC_SUBST(GREETER_CFLAGS) AC_SUBST(GREETER_LIBS) PKG_CHECK_MODULES(UTILS, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED) AC_SUBST(UTILS_CFLAGS) AC_SUBST(UTILS_LIBS) dnl dnl libglade conversion script dnl AC_PATH_PROG(LIBGLADE_CONVERT, libglade-convert) if test -z $LIBGLADE_CONVERT; then AC_MSG_ERROR([libglade-convert (from libglade 2.0) is needed to build gdm.]) fi 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 ## Language Support GETTEXT_PACKAGE=gdm-2.4 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") AC_SUBST(GETTEXT_PACKAGE) dnl ## internationalization support ALL_LINGUAS="az ca cs da de el es et eu fi fr ga gl hu it ja ko lt lv ms nl nn no pl pt_BR pt ro ru sk sl sv ta tr uk zh_CN zh_TW" AM_GLIB_GNU_GETTEXT # 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 ## gdmopen building dnl There are perhaps others where this works GDMOPEN= AC_CHECK_HEADERS(linux/vt.h, [ GDMOPEN=gdmopen]) AC_SUBST(GDMOPEN) 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 GDMASKPASS= if test x$have_pam = xyes ; then AC_CHECK_HEADERS(security/pam_misc.h, [ GDMASKPASS=gdmaskpass]) fi AC_SUBST(GDMASKPASS) 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],,$JUSTGTK_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 GDMXNESTCHOOSER=gdmXnestchooser else AM_CONDITIONAL(XDMCP_SUPPORT, false) GDMCHOOSER= GDMXNESTCHOOSER= fi AC_SUBST(GDMCHOOSER) AC_SUBST(GDMXNESTCHOOSER) # # X11 Xinerama extension # XINERAMA_LIBS= if test x$with_xinerama != xno ; then AC_CHECK_HEADER(X11/extensions/Xinerama.h, [ AC_CHECK_LIB(Xinerama, XineramaQueryScreens, [ AC_DEFINE(HAVE_LIBXINERAMA) XINERAMA_LIBS="-lXinerama" XINERAMA_SUPPORT=yes],,$JUSTGTK_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 AC_SUBST(XINERAMA_LIBS) # # 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="$sbindir" 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 gui/greeter/Makefile gui/greeter/themes/Makefile gui/greeter/themes/circles/Makefile utils/Makefile pixmaps/Makefile config/Makefile docs/Makefile docs/C/Makefile docs/gdmconfig/Makefile docs/gdmconfig/C/Makefile omf-install/Makefile po/Makefile.in vicious-extensions/Makefile config/gdm.conf config/Gnome config/gnomerc gdm-restart gdm-safe-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" dnl <= Utils built => echo "Utilities built : "`echo $GDMOPEN $GDMASKPASS` echo "" dnl <= End of configuration summary =>