aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
blob: 2e01cee73f616c51020fe4193d06deaddbc6ab1e (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
# $Id$
# configure.in for the autofs daemon

AC_INIT(.autofs-0.3.15)

#
# autofs installs by default in /usr
#
AC_PREFIX_DEFAULT(/usr)

#
# Programs needed for various system functions or modules
#
AF_PATH_INCLUDE(MOUNT, mount, /bin/mount, $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
AF_PATH_INCLUDE(SMBMOUNT, smbmount, , $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
AC_SUBST(HAVE_SMBMOUNT)

#
# glibc/libc 6 new libraries
#
AC_CHECK_LIB(nsl, yp_match, LIBNSL="-lnsl")
AC_SUBST(LIBNSL)

AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv")
AC_SUBST(LIBRESOLV)

#
# Hesiod support?  Hesiod is tricky, because it may live in /usr/athena
# or some equally weird place; if so, have the user specify
# --with-hesiod=/usr/athena
#
AF_tmp_ldflags="$LDFLAGS"
AC_ARG_WITH(hesiod,
--with-hesiod=DIR	  enable Hesiod support (libs and includes in DIR),
	if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
	then
		LIBHESIOD=""
	else
		LDFLAGS="$LDFLAGS -L$withval"
		LIBHESIOD="-L${withval}/lib"
		HESIOD_FLAGS="-I${withval}/include"
	fi
)	

HAVE_HESIOD=0
AC_CHECK_LIB(hesiod, hes_resolve, HAVE_HESIOD=1 LIBHESIOD="$LIBHESIOD -lhesiod")
AC_SUBST(HAVE_HESIOD)
AC_SUBST(LIBHESIOD)
AC_SUBST(HESIOD_FLAGS)
LDFLAGS="${AF_tmp_ldflags}"

# NIS+ support?
HAVE_NISPLUS=0
AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1)
AC_SUBST(HAVE_NISPLUS)

#
# Write Makefile.conf and include/config.h
#
AC_CONFIG_HEADER(include/config.h)
AC_OUTPUT(Makefile.conf)