|
|
4d476f |
autofs-5.0.7 - make yellow pages support optional
|
|
|
4d476f |
|
|
|
4d476f |
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
|
|
|
4d476f |
|
|
|
4d476f |
If rpcsvc/ypclnt.h is not available don't compile in Yellow Pages
|
|
|
4d476f |
support.
|
|
|
4d476f |
---
|
|
|
4d476f |
|
|
|
4d476f |
CHANGELOG | 1 +
|
|
|
4d476f |
Makefile.conf.in | 3 +++
|
|
|
4d476f |
configure | 16 ++++++++++++++++
|
|
|
4d476f |
configure.in | 9 +++++++++
|
|
|
4d476f |
include/config.h.in | 3 +++
|
|
|
4d476f |
lib/rpc_subs.c | 1 -
|
|
|
4d476f |
modules/Makefile | 9 +++++++--
|
|
|
4d476f |
7 files changed, 39 insertions(+), 3 deletions(-)
|
|
|
4d476f |
|
|
|
4d476f |
|
|
|
4d476f |
diff --git a/CHANGELOG b/CHANGELOG
|
|
|
4d476f |
index 1130db6..ed17163 100644
|
|
|
4d476f |
--- a/CHANGELOG
|
|
|
4d476f |
+++ b/CHANGELOG
|
|
|
4d476f |
@@ -25,6 +25,7 @@
|
|
|
4d476f |
- don't schedule new alarms after readmap.
|
|
|
4d476f |
- use numeric protocol ids instead of protoent structs.
|
|
|
4d476f |
- lib/defaults.c: use WITH_LDAP conditional around LDAP types.
|
|
|
4d476f |
+- make yellow pages support optional.
|
|
|
4d476f |
|
|
|
4d476f |
25/07/2012 autofs-5.0.7
|
|
|
4d476f |
=======================
|
|
|
4d476f |
diff --git a/Makefile.conf.in b/Makefile.conf.in
|
|
|
4d476f |
index 802318b..3766d45 100644
|
|
|
4d476f |
--- a/Makefile.conf.in
|
|
|
4d476f |
+++ b/Makefile.conf.in
|
|
|
4d476f |
@@ -43,6 +43,9 @@ NISPLUS = @HAVE_NISPLUS@
|
|
|
4d476f |
# SMBFS support: yes (1) no (0)
|
|
|
4d476f |
SMBFS = @HAVE_SMBMOUNT@
|
|
|
4d476f |
|
|
|
4d476f |
+# YellowPages support: yes (1) no (0)
|
|
|
4d476f |
+YPCLNT = @HAVE_YPCLNT@
|
|
|
4d476f |
+
|
|
|
4d476f |
# Support for calling e2fsck when mounting ext2 filesystems
|
|
|
4d476f |
EXT2FS = @HAVE_E2FSCK@
|
|
|
4d476f |
|
|
|
4d476f |
diff --git a/configure b/configure
|
|
|
4d476f |
index 3722a46..cf6428c 100755
|
|
|
4d476f |
--- a/configure
|
|
|
4d476f |
+++ b/configure
|
|
|
4d476f |
@@ -614,6 +614,7 @@ XML_FLAGS
|
|
|
4d476f |
LIBLDAP
|
|
|
4d476f |
HAVE_LDAP
|
|
|
4d476f |
LDAP_FLAGS
|
|
|
4d476f |
+HAVE_YPCLNT
|
|
|
4d476f |
HAVE_NISPLUS
|
|
|
4d476f |
EGREP
|
|
|
4d476f |
GREP
|
|
|
4d476f |
@@ -4575,6 +4576,21 @@ fi
|
|
|
4d476f |
|
|
|
4d476f |
|
|
|
4d476f |
|
|
|
4d476f |
+# YellowPages support?
|
|
|
4d476f |
+HAVE_YPCLNT=0
|
|
|
4d476f |
+ac_fn_c_check_header_mongrel "$LINENO" "rpcsvc/ypclnt.h" "ac_cv_header_rpcsvc_ypclnt_h" "$ac_includes_default"
|
|
|
4d476f |
+if test "x$ac_cv_header_rpcsvc_ypclnt_h" = xyes; then :
|
|
|
4d476f |
+ HAVE_YPCLNT=1
|
|
|
4d476f |
+fi
|
|
|
4d476f |
+
|
|
|
4d476f |
+
|
|
|
4d476f |
+
|
|
|
4d476f |
+if test "$HAVE_YPCLNT" = "1"; then
|
|
|
4d476f |
+
|
|
|
4d476f |
+$as_echo "#define HAVE_YPCLNT 1" >>confdefs.h
|
|
|
4d476f |
+
|
|
|
4d476f |
+fi
|
|
|
4d476f |
+
|
|
|
4d476f |
#
|
|
|
4d476f |
# OpenLDAP support? Expect that this may have a special directory...
|
|
|
4d476f |
#
|
|
|
4d476f |
diff --git a/configure.in b/configure.in
|
|
|
4d476f |
index 90bda62..363c376 100644
|
|
|
4d476f |
--- a/configure.in
|
|
|
4d476f |
+++ b/configure.in
|
|
|
4d476f |
@@ -213,6 +213,15 @@ HAVE_NISPLUS=0
|
|
|
4d476f |
AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1)
|
|
|
4d476f |
AC_SUBST(HAVE_NISPLUS)
|
|
|
4d476f |
|
|
|
4d476f |
+# YellowPages support?
|
|
|
4d476f |
+HAVE_YPCLNT=0
|
|
|
4d476f |
+AC_CHECK_HEADER([rpcsvc/ypclnt.h], HAVE_YPCLNT=1)
|
|
|
4d476f |
+AC_SUBST(HAVE_YPCLNT)
|
|
|
4d476f |
+if test "$HAVE_YPCLNT" = "1"; then
|
|
|
4d476f |
+ AC_DEFINE(HAVE_YPCLNT, 1,
|
|
|
4d476f |
+ [Define if using YellowPages])
|
|
|
4d476f |
+fi
|
|
|
4d476f |
+
|
|
|
4d476f |
#
|
|
|
4d476f |
# OpenLDAP support? Expect that this may have a special directory...
|
|
|
4d476f |
#
|
|
|
4d476f |
diff --git a/include/config.h.in b/include/config.h.in
|
|
|
4d476f |
index 9bdf98a..7f1c5b5 100644
|
|
|
4d476f |
--- a/include/config.h.in
|
|
|
4d476f |
+++ b/include/config.h.in
|
|
|
4d476f |
@@ -72,6 +72,9 @@
|
|
|
4d476f |
/* Define to 1 if you have the <unistd.h> header file. */
|
|
|
4d476f |
#undef HAVE_UNISTD_H
|
|
|
4d476f |
|
|
|
4d476f |
+/* Define if using YellowPages */
|
|
|
4d476f |
+#undef HAVE_YPCLNT
|
|
|
4d476f |
+
|
|
|
4d476f |
/* Use libxml2 tsd usage workaround */
|
|
|
4d476f |
#undef LIBXML2_WORKAROUND
|
|
|
4d476f |
|
|
|
4d476f |
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
|
|
|
4d476f |
index ad1d557..718caf9 100644
|
|
|
4d476f |
--- a/lib/rpc_subs.c
|
|
|
4d476f |
+++ b/lib/rpc_subs.c
|
|
|
4d476f |
@@ -27,7 +27,6 @@
|
|
|
4d476f |
#include <net/if.h>
|
|
|
4d476f |
#include <netinet/in.h>
|
|
|
4d476f |
#include <arpa/inet.h>
|
|
|
4d476f |
-#include <rpcsvc/ypclnt.h>
|
|
|
4d476f |
#include <errno.h>
|
|
|
4d476f |
#include <sys/ioctl.h>
|
|
|
4d476f |
#include <ctype.h>
|
|
|
4d476f |
diff --git a/modules/Makefile b/modules/Makefile
|
|
|
4d476f |
index 939da7c..c5deb24 100644
|
|
|
4d476f |
--- a/modules/Makefile
|
|
|
4d476f |
+++ b/modules/Makefile
|
|
|
4d476f |
@@ -5,13 +5,13 @@
|
|
|
4d476f |
-include ../Makefile.conf
|
|
|
4d476f |
include ../Makefile.rules
|
|
|
4d476f |
|
|
|
4d476f |
-SRCS := lookup_yp.c lookup_file.c lookup_program.c lookup_userhome.c \
|
|
|
4d476f |
+SRCS := lookup_file.c lookup_program.c lookup_userhome.c \
|
|
|
4d476f |
lookup_multi.c lookup_hosts.c lookup_dir.c \
|
|
|
4d476f |
parse_sun.c \
|
|
|
4d476f |
mount_generic.c mount_nfs.c mount_afs.c mount_autofs.c \
|
|
|
4d476f |
mount_changer.c mount_bind.c
|
|
|
4d476f |
|
|
|
4d476f |
-MODS := lookup_yp.so lookup_file.so lookup_program.so lookup_userhome.so \
|
|
|
4d476f |
+MODS := lookup_file.so lookup_program.so lookup_userhome.so \
|
|
|
4d476f |
lookup_multi.so lookup_hosts.so lookup_dir.so \
|
|
|
4d476f |
parse_sun.so \
|
|
|
4d476f |
mount_generic.so mount_nfs.so mount_afs.so mount_autofs.so \
|
|
|
4d476f |
@@ -37,6 +37,11 @@ ifeq ($(NISPLUS), 1)
|
|
|
4d476f |
MODS += lookup_nisplus.so
|
|
|
4d476f |
endif
|
|
|
4d476f |
|
|
|
4d476f |
+ifeq ($(YPCLNT), 1)
|
|
|
4d476f |
+ SRCS += lookup_yp.c
|
|
|
4d476f |
+ MODS += lookup_yp.so
|
|
|
4d476f |
+endif
|
|
|
4d476f |
+
|
|
|
4d476f |
ifeq ($(LDAP), 1)
|
|
|
4d476f |
SRCS += lookup_ldap.c
|
|
|
4d476f |
MODS += lookup_ldap.so
|