aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>1998-03-29 10:26:20 +0000
committerH. Peter Anvin <hpa@zytor.com>1998-03-29 10:26:20 +0000
commite1dbb9fe60aa8bf48b07ce2896838f76cc98e226 (patch)
tree87f278ba5cb3d2738aa2061a17a01a18474dfe7e /configure.in
parent43d9d88fd0160c7beecba8b78227cc7247e8d6e9 (diff)
downloadautofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.tar.gz
autofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.tar.xz
autofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.zip
Make autofs self-configuring (using autoconf)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in62
1 files changed, 62 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..b910389
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,62 @@
+# $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, enable Hesiod support,
+ 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)
+
+# 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)
+