Subject: pkg/12199: configure tests incorrectly for IPv6
To: None <gnats-bugs@gnats.netbsd.org>
From: Olaf Seibert <rhialto@polderland.nl>
List: netbsd-bugs
Date: 02/13/2001 14:11:50
>Number:         12199
>Category:       pkg
>Synopsis:       configure tests incorrectly for IPv6 (php4)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 13 05:13:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Olaf Seibert
>Release:        current pkgsrc
>Organization:
>Environment:
	
System: NetBSD klei.intern.polderland.nl 1.4.2 NetBSD 1.4.2 (KIELDRECHT) #11: Wed Jul 19 14:00:31 CEST 2000 root@kieldrecht:/usr/src/sys/arch/i386/compile/KIELDRECHT i386


>Description:
	Configure uses an incorrect test program to check for availability
	of IPv6. I noticed this for the php4 package but I'm sure it is
	a more general configure problem.

	This is the code that is used:

	#line 6338 "configure"
	#include "confdefs.h"
	#include <sys/socket.h>
	#include <netinet/in.h>
	int main() {
	struct sockaddr_in6 s; int i=AF_INET6; s
	; return 0; }

	What is missing is an #include <sys/types.h>. The compilation
	fails with messages like

	configure:6333: checking for IPv6 support
	configure:6346: cc -c -O2  -I/usr/pkg/include -I/usr/pkg/include conftest.c 1>&5
	In file included from configure:6339:
	/usr/include/sys/socket.h:186: syntax error before `u_char'
	/usr/include/sys/socket.h:214: syntax error before `u_char'
	/usr/include/sys/socket.h:216: `int64_t' undeclared here (not in a function)
	/usr/include/sys/socket.h:216: `u_char' undeclared here (not in a function)
	/usr/include/sys/socket.h:217: syntax error before `int64_t'
	...and more.
	
	This is independent of actual support of IPv6.
>How-To-Repeat:
	cd www/ap-php4 && make
	notice the configure output includes

	checking for IPv6 support: no
>Fix:
	workaround: patch configure script in each relevant case.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert - rhialto@polder --Soep van de dag, wat zal dat zijn
\X/ land.nl     --wat kan dat wezen, beter maar het ergste vrezen -Boy Bensdorp
>Release-Note:
>Audit-Trail:
>Unformatted: