From: neilbrown Date: Tue, 20 Dec 2005 04:12:42 +0000 (+0000) Subject: Autogen update X-Git-Tag: nfs-utils-1-0-8-rc2~6 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ac5b03be829b4c9369ebfb07a688308721103228;p=nfs-utils.git Autogen update --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..9205d1e --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +This is a dummy AUTHORS file to make automake happy. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..09fd854 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,50 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = tools support utils linux-nfs + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ + autogen.sh \ + \ + debian/changelog \ + debian/control \ + debian/copyright \ + debian/etc.exports \ + debian/idmapd.conf \ + debian/nfs-common.conffiles \ + debian/nfs-common.default \ + debian/nfs-common.dirs \ + debian/nfs-common.files \ + debian/nfs-common.init \ + debian/nfs-common.install \ + debian/nfs-common.postinst \ + debian/nfs-common.postrm \ + debian/nfs-common.prerm \ + debian/nfs-kernel-server.NEWS \ + debian/nfs-kernel-server.conffiles \ + debian/nfs-kernel-server.default \ + debian/nfs-kernel-server.dirs \ + debian/nfs-kernel-server.init \ + debian/nfs-kernel-server.postinst \ + debian/nfs-kernel-server.postrm \ + debian/nfs-kernel-server.prerm \ + debian/nhfsstone.dirs \ + debian/nhfsstone.files \ + debian/nhfsstone.postinst \ + debian/nhfsstone.prerm \ + debian/rules \ + \ + aclocal/nfs-utils.m4 \ + aclocal/kerberos5.m4 \ + aclocal/tcp-wrappers.m4 + +install-data-hook: + if [ ! -d $(statedir) ]; then mkdir -p $(statedir); fi + touch $(statedir)/xtab; chmod 644 $(statedir)/xtab + touch $(statedir)/etab; chmod 644 $(statedir)/etab + touch $(statedir)/rmtab; chmod 644 $(statedir)/rmtab + mkdir -p $(statedir)/sm $(statedir)/sm.bak + touch $(statedir)/state + chmod go-rwx $(statedir)/sm $(statedir)/sm.bak $(statedir)/state + chown $(statduser) $(statedir)/sm $(statedir)/sm.bak $(statedir)/state diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..adb9e66 --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +This is a dummy news file to make automake happy. diff --git a/aclocal/bsdsignals.m4 b/aclocal/bsdsignals.m4 new file mode 100644 index 0000000..e951194 --- /dev/null +++ b/aclocal/bsdsignals.m4 @@ -0,0 +1,29 @@ +dnl *********** BSD vs. POSIX signal handling ************** +AC_DEFUN([AC_BSD_SIGNALS], [ + AC_MSG_CHECKING(for BSD signal semantics) + AC_CACHE_VAL(knfsd_cv_bsd_signals, + [AC_TRY_RUN([ + #include + #include + #include + + static int counter = 0; + static RETSIGTYPE handler(int num) { counter++; } + + int main() + { + int s; + if ((s = fork()) < 0) return 1; + if (s != 0) { + if (wait(&s) < 0) return 1; + return WIFSIGNALED(s)? 1 : 0; + } + + signal(SIGHUP, handler); + kill(getpid(), SIGHUP); kill(getpid(), SIGHUP); + return (counter == 2)? 0 : 1; + } + ], knfsd_cv_bsd_signals=yes, knfsd_cv_bsd_signals=no)]) dnl + AC_MSG_RESULT($knfsd_cv_bsd_signals) + test $knfsd_cv_bsd_signals = yes && AC_DEFINE(HAVE_BSD_SIGNALS, 1, [Define this if you want to use BSD signal semantics]) +])dnl diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4 new file mode 100644 index 0000000..44e99b0 --- /dev/null +++ b/aclocal/kerberos5.m4 @@ -0,0 +1,91 @@ +dnl Checks for Kerberos +dnl NOTE: while we intend to do generic gss-api, currently we +dnl have a requirement to get an initial Kerberos machine +dnl credential. Thus, the requirement for Kerberos. +dnl The Kerberos gssapi library will be dynamically loaded? +AC_DEFUN([AC_KERBEROS_V5],[ + AC_MSG_CHECKING(for Kerberos v5) + AC_ARG_WITH(krb5, + [AC_HELP_STRING([--with-krb5=DIR], [use Kerberos v5 installation in DIR])], + [ case "$withval" in + yes|no) + krb5_with="" + ;; + *) + krb5_with="$withval" + ;; + esac ] + ) + + for dir in $krb5_with /usr /usr/kerberos /usr/local /usr/local/krb5 \ + /usr/krb5 /usr/heimdal /usr/local/heimdal /usr/athena ; do + dnl This ugly hack brought on by the split installation of + dnl MIT Kerberos on Fedora Core 1 + K5CONFIG="" + if test -f $dir/bin/krb5-config; then + K5CONFIG=$dir/bin/krb5-config + elif test -f "/usr/kerberos/bin/krb5-config"; then + K5CONFIG="/usr/kerberos/bin/krb5-config" + fi + if test "$K5CONFIG" != ""; then + KRBCFLAGS=`$K5CONFIG --cflags` + KRBLIBS=`$K5CONFIG --libs gssapi` + K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($(4),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }'` + AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number]) + if test -f $dir/include/gssapi/gssapi_krb5.h -a \ + \( -f $dir/lib/libgssapi_krb5.a -o \ + -f $dir/lib/libgssapi_krb5.so \) ; then + AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries]) + KRBDIR="$dir" + dnl If we are using MIT K5 1.3.1 and before, we *MUST* use the + dnl private function (gss_krb5_ccache_name) to get correct + dnl behavior of changing the ccache used by gssapi. + dnl Starting in 1.3.2, we *DO NOT* want to use + dnl gss_krb5_ccache_name, instead we want to set KRB5CCNAME + dnl to get gssapi to use a different ccache + if test $K5VERS -le 131; then + AC_DEFINE(USE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the private function, gss_krb5_cache_name, must be used to tell the Kerberos library which credentials cache to use. Otherwise, this is done by setting the KRB5CCNAME environment variable]) + fi + gssapi_lib=gssapi_krb5 + break + dnl The following ugly hack brought on by the split installation + dnl of Heimdal Kerberos on SuSe + elif test \( -f $dir/include/heim_err.h -o\ + -f $dir/include/heimdal/heim_err.h \) -a \ + -f $dir/lib/libroken.a; then + AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries]) + KRBDIR="$dir" + gssapi_lib=gssapi + break + fi + fi + done + dnl We didn't find a usable Kerberos environment + if test "x$KRBDIR" = "x"; then + if test "x$krb5_with" = "x"; then + AC_MSG_ERROR(Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=) + else + AC_MSG_ERROR(Kerberos v5 with GSS support not found at $krb5_with) + fi + fi + AC_MSG_RESULT($KRBDIR) + + dnl Now check for functions within gssapi library + AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context, + AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS) + AC_CHECK_LIB($gssapi_lib, gss_krb5_set_allowable_enctypes, + AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES, 1, [Define this if the Kerberos GSS library supports gss_krb5_set_allowable_enctypes]), ,$KRBLIBS) + AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name, + AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIBS) + + dnl If they specified a directory and it didn't work, give them a warning + if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then + AC_MSG_WARN(Using $KRBDIR instead of requested value of $krb5_with for Kerberos!) + fi + + AC_SUBST([KRBDIR]) + AC_SUBST([KRBLIBS]) + AC_SUBST([KRBCFLAGS]) + AC_SUBST([K5VERS]) + +]) diff --git a/aclocal/nfs-utils.m4 b/aclocal/nfs-utils.m4 new file mode 100644 index 0000000..fae8b95 --- /dev/null +++ b/aclocal/nfs-utils.m4 @@ -0,0 +1,17 @@ +dnl *********** GNU libc 2 *************** +AC_DEFUN([AC_GNULIBC],[ + AC_MSG_CHECKING(for GNU libc2) + AC_CACHE_VAL(knfsd_cv_glibc2, + [AC_TRY_CPP([ + #include + #if !defined(__GLIBC__) + # error Nope + #endif + ], + knfsd_cv_glibc2=yes, knfsd_cv_glibc2=no)]) + AC_MSG_RESULT($knfsd_cv_glibc2) + if test $knfsd_cv_glibc2 = yes; then + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + CPPFLAGS_FOR_BUILD="$CPPFLAGS_FOR_BUILD -D_GNU_SOURCE" + fi +]) diff --git a/aclocal/tcp-wrappers.m4 b/aclocal/tcp-wrappers.m4 new file mode 100644 index 0000000..ce90754 --- /dev/null +++ b/aclocal/tcp-wrappers.m4 @@ -0,0 +1,52 @@ +# Check whether user wants TCP wrappers support +AC_DEFUN([AC_TCP_WRAPPERS],[ + TCPW_MSG="no" + AC_ARG_WITH(tcp-wrappers, + [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support + (optionally in PATH)], + [ + if test "x$withval" != "xno" ; then + saved_LIBS="$LIBS" + saved_LDFLAGS="$LDFLAGS" + saved_CPPFLAGS="$CPPFLAGS" + if test -n "${withval}" -a "${withval}" != "yes"; then + if test -d "${withval}/lib"; then + if test -n "${need_dash_r}"; then + LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" + else + LDFLAGS="-L${withval}/lib ${LDFLAGS}" + fi + else + if test -n "${need_dash_r}"; then + LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" + else + LDFLAGS="-L${withval} ${LDFLAGS}" + fi + fi + if test -d "${withval}/include"; then + CPPFLAGS="-I${withval}/include ${CPPFLAGS}" + else + CPPFLAGS="-I${withval} ${CPPFLAGS}" + fi + fi + LIBWRAP="-lwrap" + LIBS="$LIBWRAP $LIBS" + AC_MSG_CHECKING(for libwrap) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + int deny_severity = 0, allow_severity = 0; + ]], [[hosts_access(0);]])],[ + AC_MSG_RESULT(yes) + AC_SUBST(LIBWRAP) + AC_DEFINE([LIBWRAP], [1], [tcp-wrapper]) + TCPW_MSG="yes" + ],[ + AC_MSG_ERROR([*** libwrap missing]) + + ]) + LIBS="$saved_LIBS" + fi + ] + ) + AC_SUBST(LIBWRAP) +]) diff --git a/autogen.sh b/autogen.sh new file mode 100644 index 0000000..c89e674 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +echo -n cleaning up . + +# Clean up the generated crud +( + for FILE in compile config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs; do + if test -f $FILE; then + rm -f $FILE + fi + echo -n . + done +) + +for FILE in aclocal.m4 configure config.h.in; do + if test -f $FILE; then + rm -f $FILE + fi + echo -n . +done + +for DIR in autom4te.cache; do + if test -d $DIR; then + rm -rf $DIR + fi + echo -n . +done + +find . -type f -name 'Makefile.in' -print0 | xargs -r0 rm -f -- +find . -type f -name 'Makefile' -print0 | xargs -r0 rm -f -- + +echo ' done' + +if test x"${1}" = x"clean"; then + exit +fi + +aclocal -I aclocal +libtoolize --force --copy +autoheader +automake --add-missing --copy --gnu # -Wall +autoconf # -Wall diff --git a/configure.in b/configure.in index 43c0b46..ddb72a1 100644 --- a/configure.in +++ b/configure.in @@ -1,17 +1,19 @@ dnl Process this file with autoconf to produce a configure script. dnl -AC_INIT(rules.mk) +AC_INIT([linux nfs-utils],[1.0.8-rc2],[nfs@lists.sf.net],[nfs-utils]) +AC_CANONICAL_BUILD([]) +AC_CANONICAL_HOST([]) +AC_CONFIG_SRCDIR(tools/getiversion/getiversion.c) +AC_CONFIG_MACRO_DIR(aclocal) +AM_INIT_AUTOMAKE +AC_PREREQ(2.59) AC_PREFIX_DEFAULT(/usr) -# The nfs-utils version -VERSION="1.0.8-rc1" -AC_SUBST(VERSION) - dnl ************************************************************* dnl * Define the set of applicable options dnl ************************************************************* AC_ARG_WITH(release, - [ --with-release=XXX set release to XXX [1]], + [AC_HELP_STRING([--with-release=XXX], [set release to XXX [1]])], RELEASE=$withval, RELEASE=1) AC_SUBST(RELEASE) @@ -21,16 +23,23 @@ AC_ARG_WITH(statedir, statedir=/var/lib/nfs) AC_SUBST(statedir) AC_ARG_WITH(statduser, - [ --with-statduser=rpcuser user for statd to run under [rpcuser or nobody]], + [AC_HELP_STRING([--with-statduser=rpcuser], + [statd to run under @<:@rpcuser or nobody@:>@] + )], statduser=$withval, - if grep -s '^rpcuser:' /etc/passwd > /dev/null; then - statduser=rpcuser + if test "x$cross_compiling" = "xno"; then + if grep -s '^rpcuser:' /etc/passwd > /dev/null; then + statduser=rpcuser + else + statduser=nobody + fi else statduser=nobody fi) AC_SUBST(statduser) AC_ARG_ENABLE(nfsv3, - [ --enable-nfsv3 enable support for NFSv3], + [AC_HELP_STRING([--enable-nfsv3], + [enable support for NFSv3 @<:@default=yes@:>@])], enable_nfsv3=$enableval, enable_nfsv3=yes) if test "$enable_nfsv3" = yes; then @@ -40,7 +49,8 @@ AC_ARG_ENABLE(nfsv3, fi AC_SUBST(enable_nfsv3) AC_ARG_ENABLE(nfsv4, - [ --enable-nfsv4 enable support for NFSv4], + [AC_HELP_STRING([--enable-nfsv4], + [enable support for NFSv4 @<:@default=yes@:>@])], enable_nfsv4=$enableval, enable_nfsv4=yes) if test "$enable_nfsv4" = yes; then @@ -52,8 +62,10 @@ AC_ARG_ENABLE(nfsv4, fi AC_SUBST(IDMAPD) AC_SUBST(enable_nfsv4) + AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"]) AC_ARG_ENABLE(gss, - [ --enable-gss enable support for rpcsec_gss], + [AC_HELP_STRING([--enable-gss], + [enable support for rpcsec_gss @<:@default=yes@:>@])], enable_gss=$enableval, enable_gss=yes) if test "$enable_gss" = yes; then @@ -68,13 +80,15 @@ AC_ARG_ENABLE(gss, AC_SUBST(GSSD) AC_SUBST(SVCGSSD) AC_SUBST(enable_gss) + AM_CONDITIONAL(CONFIG_GSS, [test "$enable_gss" = "yes"]) AC_ARG_ENABLE(kprefix, - [ --enable-kprefix install progs as rpc.knfsd etc], + [AC_HELP_STRING([--enable-kprefix], [install progs as rpc.knfsd etc])], test "$enableval" = "yes" && kprefix=k, kprefix=) AC_SUBST(kprefix) AC_ARG_ENABLE(secure-statd, - [ --enable-secure-statd Only lockd can use statd (security)], + [AC_HELP_STRING([--enable-secure-statd], + [Only lockd can use statd (security)])], test "$enableval" = "yes" && secure_statd=yes, secure_statd=no) if test "$secure_statd" = yes; then @@ -82,7 +96,8 @@ AC_ARG_ENABLE(secure-statd, fi AC_SUBST(secure_statd) AC_ARG_ENABLE(rquotad, - [ --enable-rquotad enable rquotad], + [AC_HELP_STRING([--enable-rquotad], + [enable rquotad @<:@default=yes@:>@])], enable_rquotad=$enableval, enable_rquotad=yes) if test "$enable_rquotad" = yes; then @@ -90,28 +105,40 @@ AC_ARG_ENABLE(rquotad, else RQUOTAD= fi - AC_SUBST(RQUOTAD) -dnl AC_ARG_ENABLE(frob, enable frobnicator,, enable_frob=test) -AC_CONFIG_HEADER(support/include/config.h) + AM_CONDITIONAL(CONFIG_RQUOTAD, [test "$enable_rquotad" = "yes"]) + +# Check whether user wants TCP wrappers support +AC_TCP_WRAPPERS +AC_CONFIG_SRCDIR([support/include/config.h.in]) +AC_CONFIG_HEADERS([support/include/config.h]) + +# Checks for programs. +AC_PROG_CXX AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL + +if test "x$cross_compiling" = "xno"; then + CC_FOR_BUILD=${CC_FOR_BUILD-${CC-gcc}} +else + CC_FOR_BUILD=${CC_FOR_BUILD-gcc} +fi -test "${CC_FOR_BUILD+set}" = set || CC_FOR_BUILD="$CC" AC_SUBST(CC_FOR_BUILD) -AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(LD, ld) -AC_STDC_HEADERS +AC_HEADER_STDC([]) AC_GNULIBC -dnl AC_LN_SF -dnl AC_BSD_SIGNALS +AC_BSD_SIGNALS dnl ************************************************************* -dnl * Check for required librarues +dnl * Check for required libraries dnl ************************************************************* AC_CHECK_LIB(socket, main, [LIBSOCKET="-lnsl"]) AC_CHECK_LIB(nsl, main, [LIBNSL="-lnsl"]) @@ -130,126 +157,72 @@ AC_SUBST(LIBNSL) AC_SUBST(LIBCRYPT) AC_SUBST(LIBBSD) -AC_TCP_WRAPPER -AC_SUBST(LIBWRAP) - if test "$enable_gss" = yes; then dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for gss support)]) AC_CHECK_HEADERS(spkm3.h, ,[AC_MSG_WARN(could not locate SPKM3 header; will not have SPKM3 support)]) - - dnl Checks for Kerberos - dnl NOTE: while we intend to do generic gss-api, currently we - dnl have a requirement to get an initial Kerberos machine - dnl credential. Thus, the requirement for Kerberos. - dnl The Kerberos gssapi library will be dynamically loaded? - AC_MSG_CHECKING(for Kerberos v5) - AC_ARG_WITH(krb5, - [ --with-krb5=DIR use Kerberos v5 installation in DIR], - [ case "$withval" in - yes|no) - krb5_with="" - ;; - *) - krb5_with="$withval" - ;; - esac ] - ) - - for dir in $krb5_with /usr /usr/kerberos /usr/local /usr/local/krb5 \ - /usr/krb5 /usr/heimdal /usr/local/heimdal /usr/athena ; do - dnl This ugly hack brought on by the split installation of - dnl MIT Kerberos on Fedora Core 1 - K5CONFIG="" - if test -f $dir/bin/krb5-config; then - K5CONFIG=$dir/bin/krb5-config - elif test -f "/usr/kerberos/bin/krb5-config"; then - K5CONFIG="/usr/kerberos/bin/krb5-config" - fi - if test "$K5CONFIG" != ""; then - KRBINC=`$K5CONFIG --cflags` - KRBLIB=`$K5CONFIG --libs gssapi` - K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($4,v,"."); if (v[[3]] == "") v[[3]] = "0"; print v[[1]]v[[2]]v[[3]] }'` - AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number]) - if test -f $dir/include/gssapi/gssapi_krb5.h -a \ - \( -f $dir/lib/libgssapi_krb5.a -o \ - -f $dir/lib/libgssapi_krb5.so \) ; then - AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries]) - KRBDIR="$dir" - dnl If we are using MIT K5 1.3.1 and before, we *MUST* use the - dnl private function (gss_krb5_ccache_name) to get correct - dnl behavior of changing the ccache used by gssapi. - dnl Starting in 1.3.2, we *DO NOT* want to use - dnl gss_krb5_ccache_name, instead we want to set KRB5CCNAME - dnl to get gssapi to use a different ccache - if test $K5VERS -le 131; then - AC_DEFINE(USE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the private function, gss_krb5_cache_name, must be used to tell the Kerberos library which credentials cache to use. Otherwise, this is done by setting the KRB5CCNAME environment variable]) - fi - gssapi_lib=gssapi_krb5 - break - dnl The following ugly hack brought on by the split installation - dnl of Heimdal Kerberos on SuSe - elif test \( -f $dir/include/heim_err.h -o\ - -f $dir/include/heimdal/heim_err.h \) -a \ - -f $dir/lib/libroken.a; then - AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries]) - KRBDIR="$dir" - gssapi_lib=gssapi - break - fi - CFLAGS=$CFLAGS `$K5CONFIG --cflags` - fi - done - dnl We didn't find a usable Kerberos environment - if test "x$KRBDIR" = "x"; then - if test "x$krb5_with" = "x"; then - AC_MSG_ERROR(Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=) - else - AC_MSG_ERROR(Kerberos v5 with GSS support not found at $krb5_with) - fi - fi - CFLAGS="$CFLAGS `$K5CONFIG --cflags`" - AC_MSG_RESULT($KRBDIR) - dnl Now check for functions within gssapi library - AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context, - AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIB) - AC_CHECK_LIB($gssapi_lib, gss_krb5_set_allowable_enctypes, - AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES, 1, [Define this if the Kerberos GSS library supports gss_krb5_set_allowable_enctypes]), ,$KRBLIB) - AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name, - AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIB) + dnl Check for Kerberos V5 + AC_KERBEROS_V5 - dnl If they specified a directory and it didn't work, give them a warning - if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then - AC_MSG_WARN(Using $KRBDIR instead of requested value of $krb5_with for Kerberos!) - fi - - dnl This is not done until here because we need to have KRBLIB set + dnl This is not done until here because we need to have KRBLIBS set dnl "librpcsecgss=1" is so that it doesn't get added to LIBS - AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], [AC_MSG_ERROR(librpcsecgss needed for nfsv4 support)], $KRBLIB) + AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], [AC_MSG_ERROR(librpcsecgss needed for nfsv4 support)], $KRBLIBS) AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level, - AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, $KRBLIB) + AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, $KRBLIBS) - AC_SUBST([KRBDIR]) - AC_SUBST([KRBLIB]) - AC_SUBST([KRBINC]) - AC_SUBST([K5VERS]) fi dnl ************************************************************* dnl Check for headers dnl ************************************************************* -dnl AC_HAVE_HEADERS(string.h) -AC_HAVE_HEADERS(com_err.h) -AC_HAVE_HEADERS(et/com_err.h) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h \ + malloc.h memory.h netdb.h netinet/in.h paths.h \ + stdlib.h string.h sys/file.h sys/ioctl.h sys/mount.h \ + sys/param.h sys/socket.h sys/time.h sys/vfs.h \ + syslog.h unistd.h com_err.h et/com_err.h]) + +dnl ************************************************************* +dnl Checks for typedefs, structures, and compiler characteristics +dnl ************************************************************* +AC_C_CONST +AC_TYPE_UID_T +AC_C_INLINE +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM dnl ************************************************************* dnl Check for functions dnl ************************************************************* -AC_HAVE_FUNCS(innetgr) +AC_FUNC_ALLOCA +AC_FUNC_CLOSEDIR_VOID +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_GETGROUPS +AC_FUNC_GETMNTENT +AC_PROG_GCC_TRADITIONAL +AC_FUNC_LSTAT +AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK +AC_HEADER_MAJOR +#AC_FUNC_MALLOC +AC_FUNC_MEMCMP +#AC_FUNC_REALLOC +AC_FUNC_SELECT_ARGTYPES +AC_TYPE_SIGNAL +AC_FUNC_STAT +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \ + gethostbyaddr gethostbyname gethostname getmntent \ + gettimeofday hasmntopt inet_ntoa memset mkdir pathconf \ + realpath rmdir select socket strcasecmp strchr strdup \ + strerror strrchr strtol strtoul]) + dnl ************************************************************* -dnl Check for data sizes +dnl Check for data sizes (XXX These should go away with libgssapi pkg-config) dnl ************************************************************* AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) @@ -261,7 +234,80 @@ dnl Export some path names to config.h dnl ************************************************************* AC_DEFINE_UNQUOTED(NFS_STATEDIR, "$statedir", [This defines the location of the NFS state files. Warning: this must match definitions in config.mk!]) -AC_SUBST(LDFLAGS) -AC_SUBST(CXXFLAGS) +if test "x$cross_compiling" = "xno"; then + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-"$CFLAGS"} + CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-"$CXXFLAGS"} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-"$LDFLAGS"} +else + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-""} + CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-""} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} +fi + AC_SUBST(CFLAGS) -AC_OUTPUT(config.mk utils/Makefile) +AC_SUBST(CXXFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(LDFLAGS) + +AC_SUBST(CFLAGS_FOR_BUILD) +AC_SUBST(CXXFLAGS_FOR_BUILD) +AC_SUBST(CPPFLAGS_FOR_BUILD) +AC_SUBST(LDFLAGS_FOR_BUILD) + +dnl ************************************************************* +dnl Set up "global" CFLAGS +dnl ************************************************************* +dnl Use architecture-specific compile flags +dnl (We use $host and not $build in case we are cross-compiling) +dnl ************************************************************* +case $host in + alpha*) + ARCHFLAGS="-mno-fp-regs -ffixed-8" ;; + *) + ARCHFLAGS="" ;; +esac + +my_am_cflags="-Wall $ARCHFLAGS -pipe" + +AC_SUBST([AM_CPPFLAGS], ["-I\${top_srcdir}/support/include"]) +AC_SUBST([AM_CFLAGS], ["$my_am_cflags"]) + +# Make sure that $ACLOCAL_FLAGS are used during a rebuild +AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"]) + +AC_CONFIG_FILES([ + Makefile + linux-nfs/Makefile + support/Makefile + support/export/Makefile + support/include/nfs/Makefile + support/include/rpcsvc/Makefile + support/include/sys/fs/Makefile + support/include/sys/Makefile + support/include/Makefile + support/misc/Makefile + support/nfs/Makefile + tools/Makefile + tools/getiversion/Makefile + tools/getkversion/Makefile + tools/locktest/Makefile + tools/nlmtest/Makefile + tools/rpcdebug/Makefile + tools/rpcgen/Makefile + utils/Makefile + utils/exportfs/Makefile + utils/gssd/Makefile + utils/idmapd/Makefile + utils/lockd/Makefile + utils/mountd/Makefile + utils/nfsd/Makefile + utils/nfsstat/Makefile + utils/nhfsstone/Makefile + utils/rquotad/Makefile + utils/showmount/Makefile + utils/statd/Makefile + utils/svcgssd/Makefile]) +AC_OUTPUT + diff --git a/linux-nfs/Makefile.am b/linux-nfs/Makefile.am new file mode 100644 index 0000000..9c2065b --- /dev/null +++ b/linux-nfs/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in + +EXTRA_DIST = ChangeLog INSTALL KNOWNBUGS NEW README THANKS TODO + +MAINTAINERCLEANFILES = Makefile.in diff --git a/support/Makefile.am b/support/Makefile.am new file mode 100644 index 0000000..aa4d692 --- /dev/null +++ b/support/Makefile.am @@ -0,0 +1,6 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = export include misc nfs + +MAINTAINERCLEANFILES = Makefile.in + diff --git a/support/export/Makefile.am b/support/export/Makefile.am new file mode 100644 index 0000000..41769fa --- /dev/null +++ b/support/export/Makefile.am @@ -0,0 +1,46 @@ +## Process this file with automake to produce Makefile.in + +RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen + +GENFILES_CLNT = mount_clnt.c +GENFILES_XDR = mount_xdr.c +GENFILES_H = mount.h + +GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H) + +EXTRA_DIST = \ + mount.x \ + \ + keys.c + +noinst_LIBRARIES = libexport.a +libexport_a_SOURCES = client.c export.c hostname.c nfsctl.c rmtab.c \ + xtab.c mount_clnt.c mount_xdr.c +BUILT_SOURCES = $(GENFILES) + +noinst_HEADERS = mount.h + +dist-hook: + for f in $(GENFILES); do \ + rm ${distdir}/$$f; \ + done + +$(RPCGEN): + make -C $(top_srcdir)/tools/rpcgen all + +$(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -l -o $@ $< + +$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -c -o $@ $< + +$(GENFILES_H): %.h: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -h -o $@ $< + $(LN_S) ../export/mount.h $(top_builddir)/support/include/mount.h + +MAINTAINERCLEANFILES = Makefile.in + +CLEANFILES = $(GENFILES) $(top_builddir)/support/include/mount.h diff --git a/support/export/client.c b/support/export/client.c index 57176d8..c09e762 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -262,11 +264,11 @@ client_compose(struct in_addr addr) return name; } -int +int client_member(char *client, char *name) { /* check if "client" (a ',' separated list of names) - * contains 'name' as a member + * contains 'name' as a member */ int l = strlen(name); while (*client) { @@ -282,7 +284,7 @@ client_member(char *client, char *name) } -int +int name_cmp(char *a, char *b) { /* compare strings a and b, but only upto ',' in a */ diff --git a/support/export/export.c b/support/export/export.c index eedbb75..27d4440 100644 --- a/support/export/export.c +++ b/support/export/export.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/export/hostname.c b/support/export/hostname.c index 3957d80..8a23a89 100644 --- a/support/export/hostname.c +++ b/support/export/hostname.c @@ -5,7 +5,9 @@ * */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif /* #define TEST @@ -118,7 +120,7 @@ hostent_dup (struct hostent *hp) len_addr_list += align (hp->h_length, ALIGNMENT) + sizeof (char *); } - + cp = (struct hostent *) xmalloc (len_ent + len_name + len_aliases + len_addr_list); @@ -219,7 +221,7 @@ matchhostname (const char *h1, const char *h2) /* Map IP to hostname, and then map back to addr to make sure it is a - * reliable hostname + * reliable hostname */ struct hostent * get_reliable_hostbyaddr(const char *addr, int len, int type) @@ -275,7 +277,7 @@ print_host (struct hostent *hp) if (hp) { - printf ("official hostname: %s\n", hp->h_name); + printf ("official hostname: %s\n", hp->h_name); printf ("aliases:\n"); for (sp = hp->h_aliases; *sp; sp++) printf (" %s\n", *sp); diff --git a/support/export/nfsctl.c b/support/export/nfsctl.c index e9ffeb5..b74334c 100644 --- a/support/export/nfsctl.c +++ b/support/export/nfsctl.c @@ -6,7 +6,9 @@ * Copyright (C) 1995 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/export/rmtab.c b/support/export/rmtab.c index 58e59f4..15aab15 100644 --- a/support/export/rmtab.c +++ b/support/export/rmtab.c @@ -5,7 +5,9 @@ * */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/export/xtab.c b/support/export/xtab.c index eb67b0d..0ddb251 100644 --- a/support/export/xtab.c +++ b/support/export/xtab.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -149,7 +151,7 @@ xtab_append(nfs_export *exp) /* * rename newfile onto oldfile unless - * they are identical + * they are identical */ static void cond_rename(char *newfile, char *oldfile) { diff --git a/support/include/Makefile.am b/support/include/Makefile.am new file mode 100644 index 0000000..33ecc3c --- /dev/null +++ b/support/include/Makefile.am @@ -0,0 +1,20 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = nfs rpcsvc sys + +noinst_HEADERS = \ + exportfs.h \ + ha-callout.h \ + misc.h \ + nfslib.h \ + rpcdispatch.h \ + rpcmisc.h \ + rpcsec.h \ + tcpwrapper.h \ + version.h \ + xio.h \ + xlog.h \ + xmalloc.h \ + ypupdate.h + +MAINTAINERCLEANFILES = Makefile.in diff --git a/support/include/config.h.in b/support/include/config.h.in index 769afff..6aa74d9 100644 --- a/support/include/config.h.in +++ b/support/include/config.h.in @@ -1,70 +1,339 @@ -/* Define this if you have standard C headers - */ -#undef STDC_HEADERS +/* support/include/config.h.in. Generated from configure.in by autoheader. */ -/* Define this if you have string.h */ -#undef HAVE_STRING_H +/* Define to 1 if the `closedir' function returns void instead of `int'. */ +#undef CLOSEDIR_VOID -/* Define this if you have com_err.h */ -#undef HAVE_COM_ERR_H +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END -/* Define this if you have */ -#undef HAVE_ET_COM_ERR_H +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA -/* Define this if you have netgroup support - */ -#undef HAVE_INNETGR +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ +#undef GETGROUPS_T -/* Define this if you want NFSv3 support compiled in - */ -#undef NFS3_SUPPORTED +/* Define this if you want rpcsec_gss support compiled in */ +#undef GSS_SUPPORTED -/* This defines the location of the NFS state files - * Warning: these must match definitions in config.mk! - */ -#define NFS_STATEDIR "/var/lib/nfs" +/* Define to 1 if you have the `alarm' function. */ +#undef HAVE_ALARM -/* Define this if you want to enable various security - * checks in statd. These checks basically keep anyone - * but lockd from using this service. - */ -#undef RESTRICTED_STATD +/* Define to 1 if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA -/* Define this if you have */ -#undef HAVE_SPKM3_H +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H -/* Define this if you want support for rpcsec_gss with - * the MIT krb5 mechanism compiled in */ -#undef HAVE_KRB5 +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define to 1 if you have the `atexit' function. */ +#undef HAVE_ATEXIT + +/* Define this if the rpcsec_gss library has the function + authgss_set_debug_level */ +#undef HAVE_AUTHGSS_SET_DEBUG_LEVEL + +/* Define this if you want to use BSD signal semantics */ +#undef HAVE_BSD_SIGNALS + +/* Define to 1 if you have the header file. */ +#undef HAVE_COM_ERR_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define to 1 if you have the `dup2' function. */ +#undef HAVE_DUP2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_ET_COM_ERR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_EVENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H -/* Define this if you want support for rpcsec_gss with - * the Heimdal krb5 mechanism compiled in */ +/* Define to 1 if you have the `fdatasync' function. */ +#undef HAVE_FDATASYNC + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the `ftruncate' function. */ +#undef HAVE_FTRUNCATE + +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if your system has a working `getgroups' function. */ +#undef HAVE_GETGROUPS + +/* Define to 1 if you have the `gethostbyaddr' function. */ +#undef HAVE_GETHOSTBYADDR + +/* Define to 1 if you have the `gethostbyname' function. */ +#undef HAVE_GETHOSTBYNAME + +/* Define to 1 if you have the `gethostname' function. */ +#undef HAVE_GETHOSTNAME + +/* Define to 1 if you have the `getmntent' function. */ +#undef HAVE_GETMNTENT + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define this if the Kerberos GSS library supports gss_krb5_ccache_name */ +#undef HAVE_GSS_KRB5_CCACHE_NAME + +/* Define to 1 if you have the `hasmntopt' function. */ +#undef HAVE_HASMNTOPT + +/* Define this if you have Heimdal Kerberos libraries */ #undef HAVE_HEIMDAL -/* Define this if the Kerberos gssapi library has function - * gss_krb5_export_lucid_sec_context */ +/* Define to 1 if you have the `inet_ntoa' function. */ +#undef HAVE_INET_NTOA + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define this if you have MIT Kerberos libraries */ +#undef HAVE_KRB5 + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBINTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if `lstat' has the bug that it succeeds when given the + zero-length file name argument. */ +#undef HAVE_LSTAT_EMPTY_STRING_BUG + +/* Define this if the Kerberos GSS library supports + gss_krb5_export_lucid_sec_context */ #undef HAVE_LUCID_CONTEXT_SUPPORT -/* Define this if the Kerberos gssapi library has function - * gss_krb5_set_allowable_enctypes */ +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `mkdir' function. */ +#undef HAVE_MKDIR + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFSIDMAP_H + +/* Define to 1 if you have the `pathconf' function. */ +#undef HAVE_PATHCONF + +/* Define to 1 if you have the header file. */ +#undef HAVE_PATHS_H + +/* Define to 1 if you have the `realpath' function. */ +#undef HAVE_REALPATH + +/* Define to 1 if you have the `rmdir' function. */ +#undef HAVE_RMDIR + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define this if the Kerberos GSS library supports + gss_krb5_set_allowable_enctypes */ #undef HAVE_SET_ALLOWABLE_ENCTYPES -/* Define this if the Kerberos gssapi library has function - * gss_krb5_cache_name */ -#undef HAVE_GSS_KRB5_CCACHE_NAME +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET -/* Define this if the rpcsec_gss library has the function - * authgss_set_debug_level */ -#undef HAVE_AUTHGSS_SET_DEBUG_LEVEL +/* Define to 1 if you have the header file. */ +#undef HAVE_SPKM3_H -/* Define this if we want to use the private Kerberos - * gssapi library function, gss_krb5_cache_name, to - * specify the credentials cache file to be used by - * the gssapi library. - * (For MIT releases 1.3.1 and before, this must - * be defined. For later releases we can simply - * set the KRB5CCNAME environment variable.) */ -#undef USE_GSS_KRB5_CCACHE_NAME +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +#undef HAVE_STAT_EMPTY_STRING_BUG + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strrchr' function. */ +#undef HAVE_STRRCHR + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define this as the Kerberos version number */ +#undef KRB5_VERSION + +/* tcp-wrapper */ +#undef LIBWRAP + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +#undef LSTAT_FOLLOWS_SLASHED_SYMLINK + +/* Define to 1 if `major', `minor', and `makedev' are declared in . + */ +#undef MAJOR_IN_MKDEV + +/* Define to 1 if `major', `minor', and `makedev' are declared in + . */ +#undef MAJOR_IN_SYSMACROS + +/* Define this if you want NFSv3 support compiled in */ +#undef NFS3_SUPPORTED + +/* Define this if you want NFSv4 support compiled in */ +#undef NFS4_SUPPORTED + +/* This defines the location of the NFS state files. Warning: this must match + definitions in config.mk! */ +#undef NFS_STATEDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define this if you want to enable various security checks in statd. These + checks basically keep anyone but lockd from using this service. */ +#undef RESTRICTED_STATD + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to the type of arg 1 for `select'. */ +#undef SELECT_TYPE_ARG1 + +/* Define to the type of args 2, 3 and 4 for `select'. */ +#undef SELECT_TYPE_ARG234 + +/* Define to the type of arg 5 for `select'. */ +#undef SELECT_TYPE_ARG5 /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT @@ -77,3 +346,55 @@ /* The size of a `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define this if the private function, gss_krb5_cache_name, must be used to + tell the Kerberos library which credentials cache to use. Otherwise, this + is done by setting the KRB5CCNAME environment variable */ +#undef USE_GSS_KRB5_CCACHE_NAME + +/* Version number of package */ +#undef VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `long' if does not define. */ +#undef off_t + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned' if does not define. */ +#undef size_t + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork diff --git a/support/include/nfs/Makefile.am b/support/include/nfs/Makefile.am new file mode 100644 index 0000000..9903ba1 --- /dev/null +++ b/support/include/nfs/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in + +noinst_HEADERS = debug.h export.h nfs.h + +MAINTAINERCLEANFILES = Makefile.in diff --git a/support/include/nfslib.h b/support/include/nfslib.h index a1932a5..8c83262 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -9,7 +9,9 @@ #ifndef NFSLIB_H #define NFSLIB_H -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -57,7 +59,7 @@ enum cle_maptypes { /* * Data related to a single exports entry as returned by getexportent. - * FIXME: export options should probably be parsed at a later time to + * FIXME: export options should probably be parsed at a later time to * allow overrides when using exportfs. */ struct exportent { diff --git a/support/include/rpcsvc/Makefile.am b/support/include/rpcsvc/Makefile.am new file mode 100644 index 0000000..252bf8f --- /dev/null +++ b/support/include/rpcsvc/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in + +noinst_HEADERS = nfs_prot.h + +MAINTAINERCLEANFILES = Makefile.in diff --git a/support/include/sys/Makefile.am b/support/include/sys/Makefile.am new file mode 100644 index 0000000..aead11d --- /dev/null +++ b/support/include/sys/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = fs + +MAINTAINERCLEANFILES = Makefile.in diff --git a/support/include/sys/fs/Makefile.am b/support/include/sys/fs/Makefile.am new file mode 100644 index 0000000..9d5fa43 --- /dev/null +++ b/support/include/sys/fs/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in + +noinst_HEADERS = ext2fs.h + +MAINTAINERCLEANFILES = Makefile.in diff --git a/support/misc/Makefile.am b/support/misc/Makefile.am new file mode 100644 index 0000000..1048580 --- /dev/null +++ b/support/misc/Makefile.am @@ -0,0 +1,6 @@ +## Process this file with automake to produce Makefile.in + +noinst_LIBRARIES = libmisc.a +libmisc_a_SOURCES = tcpwrapper.c from_local.c mountpoint.c + +MAINTAINERCLEANFILES = Makefile.in diff --git a/support/misc/tcpwrapper.c b/support/misc/tcpwrapper.c index d8a742f..ebe63e1 100644 --- a/support/misc/tcpwrapper.c +++ b/support/misc/tcpwrapper.c @@ -31,8 +31,10 @@ * Computing Science, Eindhoven University of Technology, The Netherlands. */ -#include "tcpwrapper.h" - +#ifdef HAVE_CONFIG_H +#include +#endif +#include #include #include #include @@ -55,8 +57,15 @@ int deny_severity = LOG_WARNING; /* A handful of macros for "readability". */ +#ifdef HAVE_LIBWRAP /* coming from libwrap.a (tcp_wrappers) */ extern int hosts_ctl(char *daemon, char *name, char *addr, char *user); +#else +int hosts_ctl(char *daemon, char *name, char *addr, char *user) +{ + return 0; +} +#endif #define legal_port(a,p) \ (ntohs((a)->sin_port) < IPPORT_RESERVED || (p) >= IPPORT_RESERVED) diff --git a/support/nfs/Makefile.am b/support/nfs/Makefile.am new file mode 100644 index 0000000..bb8bc41 --- /dev/null +++ b/support/nfs/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +noinst_LIBRARIES = libnfs.a +libnfs_a_SOURCES = exports.c rmtab.c xio.c rpcmisc.c rpcdispatch.c \ + xlog.c xmalloc.c wildmat.c nfssvc.c nfsclient.c \ + nfsexport.c getfh.c nfsctl.c lockdsvc.c \ + svc_socket.c cacheio.c closeall.c + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ + clients.c \ + keytab.c \ + ypupdate_xdr.c diff --git a/support/nfs/exports.c b/support/nfs/exports.c index d0f63b0..5d8cf5e 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -14,7 +14,9 @@ * as is, with no warranty expressed or implied. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/getfh.c b/support/nfs/getfh.c index aacba52..81266fd 100644 --- a/support/nfs/getfh.c +++ b/support/nfs/getfh.c @@ -10,7 +10,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/lockdsvc.c b/support/nfs/lockdsvc.c index 532e721..ca1e862 100644 --- a/support/nfs/lockdsvc.c +++ b/support/nfs/lockdsvc.c @@ -6,9 +6,11 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif -#include "nfslib.h" +#include int lockdsvc() diff --git a/support/nfs/nfsclient.c b/support/nfs/nfsclient.c index 5886484..5322409 100644 --- a/support/nfs/nfsclient.c +++ b/support/nfs/nfsclient.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include "nfslib.h" diff --git a/support/nfs/nfsctl.c b/support/nfs/nfsctl.c index c04588f..89fa1a4 100644 --- a/support/nfs/nfsctl.c +++ b/support/nfs/nfsctl.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/nfsexport.c b/support/nfs/nfsexport.c index 782cc50..aa0e49b 100644 --- a/support/nfs/nfsexport.c +++ b/support/nfs/nfsexport.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/nfssvc.c b/support/nfs/nfssvc.c index 67089be..38240a0 100644 --- a/support/nfs/nfssvc.c +++ b/support/nfs/nfssvc.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/rmtab.c b/support/nfs/rmtab.c index b7be6ba..4cbd285 100644 --- a/support/nfs/rmtab.c +++ b/support/nfs/rmtab.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/rpcdispatch.c b/support/nfs/rpcdispatch.c index e798ea5..3d34774 100644 --- a/support/nfs/rpcdispatch.c +++ b/support/nfs/rpcdispatch.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996, Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c index 1c02364..c7bff40 100644 --- a/support/nfs/rpcmisc.c +++ b/support/nfs/rpcmisc.c @@ -12,7 +12,9 @@ * as is, with no warranty expressed or implied. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/wildmat.c b/support/nfs/wildmat.c index 8f7b760..ba53b3a 100644 --- a/support/nfs/wildmat.c +++ b/support/nfs/wildmat.c @@ -36,7 +36,9 @@ ** on. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include diff --git a/support/nfs/xio.c b/support/nfs/xio.c index 3850aab..4a3f181 100644 --- a/support/nfs/xio.c +++ b/support/nfs/xio.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/xlog.c b/support/nfs/xlog.c index d59f27f..1bbfd19 100644 --- a/support/nfs/xlog.c +++ b/support/nfs/xlog.c @@ -15,7 +15,9 @@ * as is, with no warranty expressed or implied. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/nfs/xmalloc.c b/support/nfs/xmalloc.c index 9523afc..e9fd7c7 100644 --- a/support/nfs/xmalloc.c +++ b/support/nfs/xmalloc.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/support/rpc/include/Makefile.am b/support/rpc/include/Makefile.am new file mode 100644 index 0000000..fef4b5e --- /dev/null +++ b/support/rpc/include/Makefile.am @@ -0,0 +1,3 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = rpc diff --git a/support/rpc/include/rpc/Makefile.am b/support/rpc/include/rpc/Makefile.am new file mode 100644 index 0000000..2928664 --- /dev/null +++ b/support/rpc/include/rpc/Makefile.am @@ -0,0 +1,17 @@ +## Process this file with automake to produce Makefile.in + +noinst_HEADERS = \ + auth_gss.h \ + auth.h \ + auth_unix.h \ + clnt.h \ + pmap_clnt.h \ + pmap_prot.h \ + pmap_rmt.h \ + rpc.h \ + rpc_des.h \ + rpc_msg.h \ + svc.h \ + svc_auth.h \ + types.h \ + xdr.h diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000..c4c9875 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = getiversion getkversion locktest rpcdebug rpcgen nlmtest + +MAINTAINERCLEANFILES = Makefile.in diff --git a/tools/getiversion/Makefile.am b/tools/getiversion/Makefile.am new file mode 100644 index 0000000..7d7172e --- /dev/null +++ b/tools/getiversion/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in + +CC=$(CC_FOR_BUILD) +LIBTOOL = @LIBTOOL@ --tag=CC + +noinst_PROGRAMS = getiversion +getiversion_SOURCES = getiversion.c +getiversion_CFLAGS=$(CFLAGS_FOR_BUILD) +getiversion_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include +getiversion_LDFLAGS=$(LDFLAGS_FOR_BUILD) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/tools/getiversion/getiversion.c b/tools/getiversion/getiversion.c index e9cb391..fdaf102 100644 --- a/tools/getiversion/getiversion.c +++ b/tools/getiversion/getiversion.c @@ -4,11 +4,22 @@ * Get version number for an inode on an ext2 file system. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif +#ifdef HAVE_SYS_IOCTL_H #include +#endif + +#ifdef HAVE_UNISTD_H #include +#endif + +#ifdef HAVE_FCNTL_H #include +#endif + #include #include diff --git a/tools/getkversion/Makefile.am b/tools/getkversion/Makefile.am new file mode 100644 index 0000000..4f89892 --- /dev/null +++ b/tools/getkversion/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in + +CC=$(CC_FOR_BUILD) +LIBTOOL = @LIBTOOL@ --tag=CC + +noinst_PROGRAMS = getkversion +getkversion_SOURCES = getkversion.c +getkversion_CFLAGS=$(CFLAGS_FOR_BUILD) +getkversion_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) +getkversion_LDFLAGS=$(LDFLAGS_FOR_BUILD) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/tools/getkversion/getkversion.c b/tools/getkversion/getkversion.c index f8faf0a..abe1705 100644 --- a/tools/getkversion/getkversion.c +++ b/tools/getkversion/getkversion.c @@ -4,7 +4,9 @@ * running on a different kernel. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am new file mode 100644 index 0000000..3156815 --- /dev/null +++ b/tools/locktest/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in + +CC=$(CC_FOR_BUILD) +LIBTOOL = @LIBTOOL@ --tag=CC + +noinst_PROGRAMS = testlk +testlk_SOURCES = testlk.c +testlk_CFLAGS=$(CFLAGS_FOR_BUILD) +testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) +testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/tools/locktest/testlk.c b/tools/locktest/testlk.c index 47eb40a..b392f71 100644 --- a/tools/locktest/testlk.c +++ b/tools/locktest/testlk.c @@ -1,4 +1,6 @@ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/tools/nlmtest/Makefile.am b/tools/nlmtest/Makefile.am new file mode 100644 index 0000000..fbf9fb3 --- /dev/null +++ b/tools/nlmtest/Makefile.am @@ -0,0 +1,7 @@ +## Process this file with automake to produce Makefile.in + +EXTRA_DIST = \ + README \ + host.h \ + nlm_prot.x \ + nlmtest.c diff --git a/tools/rpcdebug/Makefile.am b/tools/rpcdebug/Makefile.am new file mode 100644 index 0000000..409c98f --- /dev/null +++ b/tools/rpcdebug/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +CC=$(CC_FOR_BUILD) +LIBTOOL = @LIBTOOL@ --tag=CC + +EXTRA_DIST= neat_idea.c + +noinst_PROGRAMS = rpcdebug +rpcdebug_SOURCES = rpcdebug.c +rpcdebug_CFLAGS=$(CFLAGS_FOR_BUILD) +rpcdebug_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include +rpcdebug_LDFLAGS=$(LDFLAGS_FOR_BUILD) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/tools/rpcdebug/neat_idea.c b/tools/rpcdebug/neat_idea.c index ddaee2e..7ca9d6f 100644 --- a/tools/rpcdebug/neat_idea.c +++ b/tools/rpcdebug/neat_idea.c @@ -11,7 +11,9 @@ * Copyright (C) 1996, Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/tools/rpcdebug/rpcdebug.c b/tools/rpcdebug/rpcdebug.c index bbe57b1..89e0f35 100644 --- a/tools/rpcdebug/rpcdebug.c +++ b/tools/rpcdebug/rpcdebug.c @@ -15,7 +15,7 @@ * */ -#include "config.h" +/* #include "config.h" */ #include #include @@ -23,6 +23,7 @@ #include #include #include +#include #include #include /* RPC debug flags diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am new file mode 100644 index 0000000..51a2bfa --- /dev/null +++ b/tools/rpcgen/Makefile.am @@ -0,0 +1,18 @@ +## Process this file with automake to produce Makefile.in + +CC=$(CC_FOR_BUILD) +LIBTOOL = @LIBTOOL@ --tag=CC + +noinst_PROGRAMS = rpcgen +rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ + rpc_parse.c rpc_scan.c rpc_svcout.c rpc_tblout.c \ + rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \ + rpc_scan.h rpc_util.h + +rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD) +rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD) +rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD) + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = rpcgen.new.1 diff --git a/utils/Makefile.am b/utils/Makefile.am new file mode 100644 index 0000000..79f1270 --- /dev/null +++ b/utils/Makefile.am @@ -0,0 +1,28 @@ +## Process this file with automake to produce Makefile.in + +OPTDIRS = + +if CONFIG_RQUOTAD +OPTDIRS += rquotad +endif + +if CONFIG_NFSV4 +OPTDIRS += idmapd +endif + +if CONFIG_GSS +OPTDIRS += gssd svcgssd +endif + +SUBDIRS = \ + exportfs \ + lockd \ + mountd \ + nfsd \ + nfsstat \ + nhfsstone \ + showmount \ + statd \ + $(OPTDIRS) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/exportfs/Makefile.am b/utils/exportfs/Makefile.am new file mode 100644 index 0000000..d0226fc --- /dev/null +++ b/utils/exportfs/Makefile.am @@ -0,0 +1,15 @@ +## Process this file with automake to produce Makefile.in + +man5_MANS = exports.man +man7_MANS = nfsd.man +man8_MANS = exportfs.man + +EXTRA_DIST = $(man5_MANS) $(man7_MANS) $(man8_MANS) +sbin_PROGRAMS = exportfs +exportfs_SOURCES = exportfs.c +exportfs_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBWRAP) $(LIBNSL) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index c7a9a0e..c3ba997 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -8,7 +8,9 @@ * Extensive changes, 1999, Neil Brown */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/gssd/Makefile.am b/utils/gssd/Makefile.am new file mode 100644 index 0000000..6b01a72 --- /dev/null +++ b/utils/gssd/Makefile.am @@ -0,0 +1,83 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = gssd.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = gssd + +EXTRA_DIST = \ + $(man8_MANS) \ + gss_clnt_send_err.c \ + gss_destroy_creds + +gssd_SOURCES = \ + context.c \ + context_heimdal.c \ + err_util.c \ + gss_oids.c \ + gss_util.c \ + gssd.c \ + gssd_main_loop.c \ + gssd_proc.c \ + krb5_util.c \ + \ + context.h \ + err_util.h \ + gss_oids.h \ + gss_util.h \ + gssd.h \ + krb5_util.h \ + write_bytes.h + +gssd_LDADD = -lrpcsecgss -lgssapi -ldl $(KRBLIBS) +gssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib + +gssd_CPPFLAGS = -I$(top_srcdir)/support/rpc/include \ + $(AM_CPPFLAGS) $(CPPFLAGS) + +gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \ + $(KRBCFLAGS) + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/idmapd/Makefile.am b/utils/idmapd/Makefile.am new file mode 100644 index 0000000..586ac9a --- /dev/null +++ b/utils/idmapd/Makefile.am @@ -0,0 +1,70 @@ +## Process this file with automake to produce Makefile.in + +man5_MANS = idmapd.conf.man +man8_MANS = idmapd.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = idmapd + +EXTRA_DIST = \ + $(man5_MANS) \ + $(man8_MANS) \ + idmapd.conf + +idmapd_SOURCES = \ + atomicio.c \ + cfg.c \ + idmapd.c \ + setproctitle.c \ + strlcat.c \ + strlcpy.c \ + \ + cfg.h \ + nfs_idmap.h \ + queue.h + +idmapd_LDADD = -levent -lnfsidmap ../../support/nfs/libnfs.a + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man5 install-man8 install-man-links +uninstall-man: uninstall-man5 uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/lockd/Makefile.am b/utils/lockd/Makefile.am new file mode 100644 index 0000000..e1546a4 --- /dev/null +++ b/utils/lockd/Makefile.am @@ -0,0 +1,55 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = lockd.man +EXTRA_DIST = $(man8_MANS) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = lockd +lockd_SOURCES = lockd.c +lockd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/lockd/lockd.c b/utils/lockd/lockd.c index 49183d2..71b31b0 100644 --- a/utils/lockd/lockd.c +++ b/utils/lockd/lockd.c @@ -6,13 +6,17 @@ * */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include #include #include -#include "nfslib.h" +#include + + static void usage(const char *); @@ -23,7 +27,7 @@ main(int argc, char **argv) if (argc > 1) usage (argv [0]); - + if (chdir(NFS_STATEDIR)) { fprintf(stderr, "%s: chdir(%s) failed: %s\n", argv [0], NFS_STATEDIR, strerror(errno)); diff --git a/utils/mountd/Makefile.am b/utils/mountd/Makefile.am new file mode 100644 index 0000000..dd400fd --- /dev/null +++ b/utils/mountd/Makefile.am @@ -0,0 +1,61 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = mountd.man +EXTRA_DIST = $(man8_MANS) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = mountd + +mountd_SOURCES = mountd.c mount_dispatch.c auth.c rmtab.c cache.c \ + svc_run.c mountd.h +mountd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBBSD) $(LIBWRAP) $(LIBNSL) +mountd_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_builddir)/support/include \ + -I$(top_srcdir)/support/export + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index 4e1cdbd..44d9980 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 34f949c..5285e10 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -6,7 +6,10 @@ * and listen for requests (using my_svc_run) * */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/mountd/mount_dispatch.c b/utils/mountd/mount_dispatch.c index e87831a..f00c0c5 100644 --- a/utils/mountd/mount_dispatch.c +++ b/utils/mountd/mount_dispatch.c @@ -4,7 +4,9 @@ * Copyright (C) 1995 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #ifdef HAVE_TCP_WRAPPER #include "tcpwrapper.h" diff --git a/utils/mountd/mount_xdr.c b/utils/mountd/mount_xdr.c index 87adfa6..a0fefcb 100644 --- a/utils/mountd/mount_xdr.c +++ b/utils/mountd/mount_xdr.c @@ -4,9 +4,11 @@ * Originally generated by rpcgen; edited to get rid of warnings. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif -#include "mount.h" +#include inline bool_t xdr_fhandle(XDR *xdrs, fhandle objp) diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 8a2f413..9cf2a1f 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/mountd/rmtab.c b/utils/mountd/rmtab.c index 90fbef4..f641a96 100644 --- a/utils/mountd/rmtab.c +++ b/utils/mountd/rmtab.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/mountd/svc_run.c b/utils/mountd/svc_run.c index a1ef74a..7a8a595 100644 --- a/utils/mountd/svc_run.c +++ b/utils/mountd/svc_run.c @@ -43,7 +43,11 @@ * This is the RPC server side idle loop. * Wait for input, call server program. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include "xlog.h" diff --git a/utils/nfsd/Makefile.am b/utils/nfsd/Makefile.am new file mode 100644 index 0000000..445e3fd --- /dev/null +++ b/utils/nfsd/Makefile.am @@ -0,0 +1,56 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = nfsd.man +EXTRA_DIST = $(man8_MANS) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = nfsd + +nfsd_SOURCES = nfsd.c +nfsd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c index 78143ed..05506ee 100644 --- a/utils/nfsd/nfsd.c +++ b/utils/nfsd/nfsd.c @@ -7,7 +7,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/nfsstat/Makefile.am b/utils/nfsstat/Makefile.am new file mode 100644 index 0000000..becb108 --- /dev/null +++ b/utils/nfsstat/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = nfsstat.man +EXTRA_DIST = $(man8_MANS) + +sbin_PROGRAMS = nfsstat +nfsstat_SOURCES = nfsstat.c +nfsstat_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c index 613e53a..4b45c46 100644 --- a/utils/nfsstat/nfsstat.c +++ b/utils/nfsstat/nfsstat.c @@ -4,7 +4,9 @@ * Copyright (C) 1995-2005 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #define NFSSVCSTAT "/proc/net/rpc/nfsd" #define NFSCLTSTAT "/proc/net/rpc/nfs" diff --git a/utils/nhfsstone/Makefile.am b/utils/nhfsstone/Makefile.am new file mode 100644 index 0000000..43e9fda --- /dev/null +++ b/utils/nhfsstone/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = nhfsstone.man nhfsrun.man nhfsnums.man nhfsgraph.man +EXTRA_DIST = $(man8_MANS) DISCLAIMER README.linux + +dist_sbin_SCRIPTS = nhfsrun nhfsnums nhfsgraph + +sbin_PROGRAMS = nhfsstone +nhfsstone_SOURCES = nhfsstone.c +nhfsstone_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/rquotad/Makefile.am b/utils/rquotad/Makefile.am new file mode 100644 index 0000000..b478fad --- /dev/null +++ b/utils/rquotad/Makefile.am @@ -0,0 +1,61 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = rquotad.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = rquotad + +EXTRA_DIST = rquota.x $(man8_MANS) NEW README.okir + +rquotad_SOURCES = rquota_server.c rquota_svc.c rquota_xdr.c quotactl.c \ + hasquota.c mntent.h pathnames.h rquota.h +rquotad_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBBSD) $(LIBWRAP) $(LIBNSL) +rquotad_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_srcdir)/support/export + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/rquotad/hasquota.c b/utils/rquotad/hasquota.c index f93e90a..d2d8115 100644 --- a/utils/rquotad/hasquota.c +++ b/utils/rquotad/hasquota.c @@ -19,7 +19,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif #define _LINUX_QUOTA_VERSION 1 #include diff --git a/utils/rquotad/quotactl.c b/utils/rquotad/quotactl.c index 30e68a4..8966335 100644 --- a/utils/rquotad/quotactl.c +++ b/utils/rquotad/quotactl.c @@ -18,7 +18,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/rquotad/rquota_server.c b/utils/rquotad/rquota_server.c index 45f351f..32e5cba 100644 --- a/utils/rquotad/rquota_server.c +++ b/utils/rquotad/rquota_server.c @@ -18,7 +18,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif #define _LINUX_QUOTA_VERSION 1 #include diff --git a/utils/rquotad/rquota_svc.c b/utils/rquotad/rquota_svc.c index 1d07c1c..0785551 100644 --- a/utils/rquotad/rquota_svc.c +++ b/utils/rquotad/rquota_svc.c @@ -18,7 +18,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif #ifdef HAVE_TCP_WRAPPER #include "tcpwrapper.h" diff --git a/utils/rquotad/rquota_xdr.c b/utils/rquotad/rquota_xdr.c index 6e68bd4..46eb1e1 100644 --- a/utils/rquotad/rquota_xdr.c +++ b/utils/rquotad/rquota_xdr.c @@ -1,4 +1,6 @@ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include "rquota.h" diff --git a/utils/showmount/Makefile.am b/utils/showmount/Makefile.am new file mode 100644 index 0000000..077b2c7 --- /dev/null +++ b/utils/showmount/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = showmount.man +EXTRA_DIST = $(man8_MANS) + +sbin_PROGRAMS = showmount +showmount_SOURCES = showmount.c +showmount_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a +showmount_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_builddir)/support/export + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/showmount/showmount.c b/utils/showmount/showmount.c index 92c6ef9..8fb58a2 100644 --- a/utils/showmount/showmount.c +++ b/utils/showmount/showmount.c @@ -13,7 +13,9 @@ * GNU General Public License for more details. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/statd/Makefile.am b/utils/statd/Makefile.am new file mode 100644 index 0000000..26800ea --- /dev/null +++ b/utils/statd/Makefile.am @@ -0,0 +1,91 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = statd.man + +RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen + +GENFILES_CLNT = sm_inter_clnt.c +GENFILES_SVC = sm_inter_svc.c +GENFILES_XDR = sm_inter_xdr.c +GENFILES_H = sm_inter.h + +GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = statd +statd_SOURCES = callback.c notlist.c log.c misc.c monitor.c notify.c \ + simu.c stat.c statd.c state.c svc_run.c rmtcall.c \ + sm_inter_clnt.c sm_inter_svc.c sm_inter_xdr.c log.h \ + notlist.h statd.h system.h version.h sm_inter.h +BUILT_SOURCES = $(GENFILES) +statd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBWRAP) $(LIBNSL) + +EXTRA_DIST = sim_sm_inter.x sm_inter.x $(man8_MANS) COPYRIGHT simulate.c + +$(RPCGEN): + make -C ../../tools/rpcgen all + +$(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -l -o $@ $< + +$(GENFILES_SVC): %_svc.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -m -o $@ $< + +$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -c -o $@ $< + +$(GENFILES_H): %.h: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -h -o $@ $< + +MAINTAINERCLEANFILES = Makefile.in + +CLEANFILES = $(GENFILES) + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/statd/callback.c b/utils/statd/callback.c index 0947727..8a85ce9 100644 --- a/utils/statd/callback.c +++ b/utils/statd/callback.c @@ -6,7 +6,9 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include "statd.h" #include "notlist.h" diff --git a/utils/statd/log.c b/utils/statd/log.c index 008f036..408807e 100644 --- a/utils/statd/log.c +++ b/utils/statd/log.c @@ -12,7 +12,9 @@ * 260295 okir started with simply syslog logging. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/statd/misc.c b/utils/statd/misc.c index a3752bb..fd201b4 100644 --- a/utils/statd/misc.c +++ b/utils/statd/misc.c @@ -6,7 +6,9 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index 40e8f49..8348473 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -7,7 +7,9 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/statd/notify.c b/utils/statd/notify.c index ffe2da6..d7aa1dd 100644 --- a/utils/statd/notify.c +++ b/utils/statd/notify.c @@ -10,7 +10,9 @@ * NSM notify list handling. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/statd/notlist.c b/utils/statd/notlist.c index 0ef5491..4f52b1d 100644 --- a/utils/statd/notlist.c +++ b/utils/statd/notlist.c @@ -12,7 +12,9 @@ * Simple list management for notify list */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include "misc.h" diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c index a45705b..809d1ad 100644 --- a/utils/statd/rmtcall.c +++ b/utils/statd/rmtcall.c @@ -20,7 +20,9 @@ * it won't if it's worth its money). */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/utils/statd/simu.c b/utils/statd/simu.c index 78a6ee2..9d685ad 100644 --- a/utils/statd/simu.c +++ b/utils/statd/simu.c @@ -4,7 +4,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif + #include "statd.h" #include "notlist.h" diff --git a/utils/statd/stat.c b/utils/statd/stat.c index 7d9d1b1..bcd3550 100644 --- a/utils/statd/stat.c +++ b/utils/statd/stat.c @@ -5,7 +5,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "statd.h" diff --git a/utils/statd/statd.c b/utils/statd/statd.c index f61914d..8ebb808 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -7,7 +7,11 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif + +#include #include #include #include diff --git a/utils/statd/statd.h b/utils/statd/statd.h index d9d5d3d..225cc8b 100644 --- a/utils/statd/statd.h +++ b/utils/statd/statd.h @@ -5,7 +5,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif + #include "sm_inter.h" #include "system.h" #include "log.h" diff --git a/utils/statd/state.c b/utils/statd/state.c index c241985..a6a4077 100644 --- a/utils/statd/state.c +++ b/utils/statd/state.c @@ -6,7 +6,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c index 597b68d..67bb05c 100644 --- a/utils/statd/svc_run.c +++ b/utils/statd/svc_run.c @@ -47,7 +47,11 @@ * This is the RPC server side idle loop. * Wait for input, call server program. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include "statd.h" diff --git a/utils/svcgssd/Makefile.am b/utils/svcgssd/Makefile.am new file mode 100644 index 0000000..4c0a0f8 --- /dev/null +++ b/utils/svcgssd/Makefile.am @@ -0,0 +1,93 @@ +## Process this file with automake to produce Makefile.in + +LINKSRCS = \ + err_util.c \ + gss_util.c \ + gss_oids.c \ + context.c \ + context_heimdal.c + +man8_MANS = svcgssd.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = svcgssd + +EXTRA_DIST = $(man8_MANS) + +svcgssd_SOURCES = \ + cacheio.c \ + svcgssd.c \ + svcgssd_main_loop.c \ + svcgssd_mech2file.c \ + svcgssd_proc.c \ + $(LINKSRCS) \ + cacheio.h \ + svcgssd.h + +svcgssd_LDADD = \ + ../../support/nfs/libnfs.a \ + -lrpcsecgss -lgssapi -lnfsidmap \ + -ldl $(KRBLIBS) + +svcgssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib + +svcgssd_CPPFLAGS = -I$(top_srcdir)/support/rpc/include \ + $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_srcdir)/utils/gssd + +svcgssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \ + $(KRBCFLAGS) + +BUILT_SOURCES = $(LINKSRCS) + +MAINTAINERCLEANFILES = Makefile.in + +CLEANFILES = $(LINKSRCS) + +LINKDIR = $(top_srcdir)/utils/gssd + +$(LINKSRCS): %: + ln -sf $(LINKDIR)/$@ $@ + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +####################################################################### +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) +