summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorhannken <hannken@NetBSD.org>2019-06-22 13:42:53 +0000
committerhannken <hannken@NetBSD.org>2019-06-22 13:42:53 +0000
commit885345c39e56d29682d22bf6cf49ba3b526b6cdd (patch)
tree953dbed81d9e8321f7129040f53b30cedab82832 /tools
parent69d99d6c46a1ca5017d3969676bf2f3657f2289b (diff)
Update tools/compat/configure for new path of "rpc/types.h".
Remove intermediate patch from rpcgen/Makefile. Patch from Nick Hudson, errors from me.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/compat/configure36
-rw-r--r--tools/compat/configure.ac16
-rw-r--r--tools/compat/nbtool_config.h.in2
-rw-r--r--tools/rpcgen/Makefile6
4 files changed, 41 insertions, 19 deletions
diff --git a/tools/compat/configure b/tools/compat/configure
index 78bc33df782..fe8661c3c57 100755
--- a/tools/compat/configure
+++ b/tools/compat/configure
@@ -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
+
diff --git a/tools/compat/configure.ac b/tools/compat/configure.ac
index dae146eca11..d1086c97a85 100644
--- a/tools/compat/configure.ac
+++ b/tools/compat/configure.ac
@@ -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
diff --git a/tools/compat/nbtool_config.h.in b/tools/compat/nbtool_config.h.in
index b44caece724..3ffa8aa6a7d 100644
--- a/tools/compat/nbtool_config.h.in
+++ b/tools/compat/nbtool_config.h.in
@@ -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__
diff --git a/tools/rpcgen/Makefile b/tools/rpcgen/Makefile
index 111babf9e94..c7ed3798dcd 100644
--- a/tools/rpcgen/Makefile
+++ b/tools/rpcgen/Makefile
@@ -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"