yp_get_default_domain problem with HP-UX11.0
Neil Hoggarth
neil.hoggarth at physiol.ox.ac.uk
Wed Aug 9 11:03:10 GMT 2000
On Tue, 8 Aug 2000, A L Palacios wrote:
> Under HP-UX 11.0 when trying to "configure --with-automount",
> "yp_get_default_domain" doesn't get defined since it can't find it.
> The problem is due to introduction of new NIS lib "libnsl" which
> has "yp_get_default_domain".
yp_get_default_domain() gets missed on RedHat Linux (and probably other
platforms), for exactly the same reason.
> Workaround is to add "#define HAVE_YP_GET_DOMAIN 1" in
> ~source/include/config.h and "LIBS= -lgen -lsec -lnsl" in Makefile.
Yep, BTDT.
It would be nice if a proper fix for this could be incorporated into the
next release?
I have a patch to configure.in which allows the Samba configure script
to find yp_get_default_domain() in libnsl. I attach below a unified
context diff against CVS HEAD branch. There is a (very similar) diff
against the 2.0.7 release sources in the samba-patches database, if
anyone wants it (http://samba.org/samba-patches?findid=106).
I've tested the resulting 2.0.7 configure script on against various
other platforms (with and without libnsl) and it looks clean to me.
Regards,
--
Neil Hoggarth Departmental Computer Officer
<neil.hoggarth at physiol.ox.ac.uk> Laboratory of Physiology
http://www.physiol.ox.ac.uk/~njh/ University of Oxford, UK
--- configure.in.orig Tue Jul 11 12:16:45 2000
+++ configure.in Wed Aug 9 11:39:52 2000
@@ -349,6 +349,14 @@
fi
fi
+###############################################
+# test for where we get get_yp_default_domain() from
+AC_CHECK_FUNCS(yp_get_default_domain)
+if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
+ AC_CHECK_LIB(nsl, yp_get_default_domain, [LIBS="$LIBS -lnsl";
+ AC_DEFINE(HAVE_YP_GET_DEFAULT_DOMAIN)])
+fi
+
# Check if we have execl, if not we need to compile smbrun.
AC_CHECK_FUNCS(execl)
if test x"$ac_cv_func_execl" = x"no"; then
@@ -364,7 +372,7 @@
AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf)
AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64)
AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64)
-AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid yp_get_default_domain getpwanam)
+AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl)
# syscall() is needed for smbwrapper.
More information about the samba-technical
mailing list