summaryrefslogtreecommitdiff
path: root/configure.in
blob: a4687191942f3c45d59c15f9744196694f05901a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
AC_INIT(daemon/gdm.h)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gdm,2.0beta4)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)

GNOME_INIT

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL

GNOME_X_CHECKS

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

dnl ## internationalization support
ALL_LINGUAS="da de es et fr ko nl no sv ru pl pt_BR uk"
AM_GNOME_GETTEXT

dnl ## Autentication scheme
have_pam=no
AC_CHECK_HEADERS(security/pam_appl.h, [
	have_pam=yes
        LIBS="$LIBS -lpam"
        AC_DEFINE(HAVE_PAM)])

if test $have_pam = no; 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)])

  # Check for shadow passwords (hack)
  AC_MSG_CHECKING("for /etc/shadow")

  if test -f /etc/shadow; then
	AC_MSG_RESULT(yes)
	AC_DEFINE(HAVE_SHADOW)
  else	
	AC_MSG_RESULT(no)
  fi

fi

# 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
	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)
	AC_CHECK_LIB(nsl, yp_get_default_domain, LIBS="$LIBS -lnsl")
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
LIBS="$LIBS $LIBWRAP_PATH"

AC_OUTPUT([
Makefile
daemon/Makefile
gui/Makefile
pixmaps/Makefile
macros/Makefile
config/Makefile
docs/Makefile
docs/C/Makefile
po/Makefile.in
intl/Makefile
stamp.h],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])