Update tools/compat/configure for new path of "rpc/types.h".

Remove intermediate patch from rpcgen/Makefile.

Patch from Nick Hudson, errors from me.
This commit is contained in:
hannken 2019-06-22 13:42:53 +00:00
parent d894e04d60
commit aa8b5122a1
4 changed files with 41 additions and 19 deletions

View File

@ -4098,8 +4098,7 @@ fi
fi
for ac_header in sys/mtio.h sys/sysmacros.h sys/syslimits.h stdio_ext.h \
getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h \
sys/uio.h
getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h sys/uio.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@ -4129,13 +4128,33 @@ fi
done
for ac_header in rpc/types.h netconfig.h
for ac_header in rpc/types.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
ac_fn_c_check_header_mongrel "$LINENO" "rpc/types.h" "ac_cv_header_rpc_types_h" "$ac_includes_default"
if test "x$ac_cv_header_rpc_types_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
#define HAVE_RPC_TYPES_H 1
_ACEOF
else
echo '#include "nbtool_config.h"' >include/$ac_header.new
echo '#include "'$srcdir/../../common/include/$ac_header'"' \
>>include/$ac_header.new
if cmp include/$ac_header.new include/$ac_header >/dev/null 2>&1; then
rm -f include/$ac_header.new
else
mv -f include/$ac_header.new include/$ac_header
fi
fi
done
for ac_header in netconfig.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "netconfig.h" "ac_cv_header_netconfig_h" "$ac_includes_default"
if test "x$ac_cv_header_netconfig_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_NETCONFIG_H 1
_ACEOF
else
@ -5111,8 +5130,6 @@ else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
# include <stdlib.h>
# else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
@ -7502,3 +7519,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi

View File

@ -1,4 +1,4 @@
# $NetBSD: configure.ac,v 1.96 2019/06/19 23:33:07 kamil Exp $
# $NetBSD: configure.ac,v 1.97 2019/06/22 13:42:53 hannken Exp $
#
# Autoconf definition file for libnbcompat.
#
@ -79,13 +79,21 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/mman.h sys/param.h \
# Find headers that may not be available.
AC_HEADER_DIRENT
AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h stdio_ext.h \
getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h \
sys/uio.h)
getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h sys/uio.h)
AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
sys/endian.h sys/featuretest.h err.h inttypes.h libgen.h paths.h \
libgen.h stdint.h util.h resolv.h arpa/nameser.h,,
[test -f include/$ac_header || touch include/$ac_header])
AC_CHECK_HEADERS(rpc/types.h netconfig.h,,
AC_CHECK_HEADERS(rpc/types.h,,
[echo '#include "nbtool_config.h"' >include/$ac_header.new
echo '#include "'$srcdir/../../common/include/$ac_header'"' \
>>include/$ac_header.new
if cmp include/$ac_header.new include/$ac_header >/dev/null 2>&1; then
rm -f include/$ac_header.new
else
mv -f include/$ac_header.new include/$ac_header
fi])
AC_CHECK_HEADERS(netconfig.h,,
[echo '#include "nbtool_config.h"' >include/$ac_header.new
echo '#include "'$srcdir/../../include/$ac_header'"' \
>>include/$ac_header.new

View File

@ -1,6 +1,6 @@
/* nbtool_config.h.in. Generated from configure.ac by autoheader. */
/* $NetBSD: nbtool_config.h.in,v 1.51 2019/06/19 23:35:55 kamil Exp $ */
/* $NetBSD: nbtool_config.h.in,v 1.52 2019/06/22 13:42:53 hannken Exp $ */
#ifndef __NETBSD_NBTOOL_CONFIG_H__
#define __NETBSD_NBTOOL_CONFIG_H__

View File

@ -1,10 +1,6 @@
# $NetBSD: Makefile,v 1.5 2019/06/21 14:56:39 kamil Exp $
# $NetBSD: Makefile,v 1.6 2019/06/22 13:42:53 hannken Exp $
HOSTPROGNAME= ${_TOOL_PREFIX}rpcgen
HOST_SRCDIR= usr.bin/rpcgen
RPCGEN_INC= ${.CURDIR}/../../common/include
HOST_CPPFLAGS+= -I${RPCGEN_INC}
.include "${.CURDIR}/../Makefile.host"