Subject: toolchain/31167: AC_CHECK_FUNCS used incorrectly in tools/compat/configure.ac
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <wiml@hhhh.org>
List: netbsd-bugs
Date: 09/06/2005 00:14:00
>Number:         31167
>Category:       toolchain
>Synopsis:       AC_CHECK_FUNCS used incorrectly in tools/compat/configure.ac
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 06 00:14:00 +0000 2005
>Originator:     W Lewis
>Release:        NetBSD 3.0_CVS (5 September 2005)
>Organization:
HHHH

>Environment:
	
	
System: OpenBSD underhill.hhhh.org 3.7 UNDERHILL#0 i386
Architecture: i386
Machine: i386
>Description:

tools/compat/configure.ac passes four parameters to AC_CHECK_FUNCS(), but
the macro only takes three. The fourth argument is apparently intended to
go into the test file's prologue (a la AC_LANG_PROGRAM). There doesn't
seem to be a way to pass that information in to AC_CHECK_FUNC[S] though.

The result is that configure incorrectly decides that my host system
does not have most of the functions it's testing (the byte-order functions
and some string functions such as strmode()). This, in turn, causes
the tools build to fail because of header-file clashes.

You can verify that the test file in the configure script does not
include the #include line from the autoconf script.

>How-To-Repeat:
Build from CVS tag netbsd-3 on OpenBSD-3.7.
Must apply patch from PR#31077 first if building from the netbsd-3 branch.

>Fix:
Can hack around it by hardcoding the values in configure.ac.