Bug 72081

Summary: configure failes to invalidate usability of resolv.h on sun Solaris 8
Product: [Developer tools] configure Reporter: David Rutitsky <drutitsky>
Component: generalAssignee: Stephan Kulow <coolo>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:
Attachments: Attempt at fixing the problem
The other one

Description David Rutitsky 2004-01-07 20:28:03 UTC
Version:            (using KDE KDE 3.1.94)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2 sun sparc
OS:          Solaris

both in kdenetwork-3.1.94 and kdepim-3.1.94 configure produce following error on sun solaris 8:
configure:30133: gcc -c -g3 -fno-inline    -DQT_THREAD_SUPPORT -I/usr/local/incl
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning:   as it has already been specified as a non-system directory
In file included from conftest.c:92:
/usr/include/resolv.h:209: field `nsaddr_list' has incomplete type
/usr/include/resolv.h:219: field `addr' has incomplete type
/usr/include/resolv.h:229: confused by earlier errors, bailing out
configure:30136: $? = 1

I believe the reason is that resolv.h on Solaris needs #include <netinet/in.h>
Comment 1 Thiago Macieira 2004-01-07 21:21:46 UTC
Created attachment 4032 [details]
Attempt at fixing the problem

Have I mentioned that I hate inter-header dependency? Thankfully no one
requires the headers in the *opposite* order to complicate things even further.
Comment 2 Thiago Macieira 2004-01-07 21:25:16 UTC
Created attachment 4033 [details]
The other one

For kdepim, no file has any reference to HAVE_RESOLV_H, which would indicate
that the check is unnecessary. I dare not remove the check before the release,
but maybe we can remove it later on to avoid further problems like this.

To be on the safe side, maybe including <sys/types.h> would be a good idea too.
Comment 3 Stephan Kulow 2004-01-19 22:19:24 UTC
Subject: /

CVS commit by coolo: 

autoconf is fun, isn't it
CCMAIL: 72081-done@bugs.kde.org


  M +2 -1      kdenetwork/configure.in.in   1.61
  M +2 -1      kdepim/configure.in.in   1.32


--- kdenetwork/configure.in.in  #1.60:1.61
@@ -9,5 +9,6 @@
 AC_CHECK_HEADERS(sys/file.h sys/stat.h sys/time.h sys/cdefs.h sys/sockio.h)
 AC_CHECK_HEADERS(fcntl.h unistd.h fnmatch.h sysent.h strings.h paths.h)
-AC_CHECK_HEADERS(utmp.h re_comp.h getopt.h resolv.h byteswap.h)
+AC_CHECK_HEADERS(utmp.h re_comp.h getopt.h byteswap.h)
+AC_CHECK_HEADER([resolv.h],,,[#include <netinet/in.h>])
 
 

--- kdepim/configure.in.in  #1.31:1.32
@@ -60,5 +60,6 @@
 AC_CHECK_HEADERS(sys/file.h sys/stat.h sys/time.h sys/cdefs.h sys/sockio.h)
 AC_CHECK_HEADERS(fcntl.h unistd.h fnmatch.h sysent.h strings.h paths.h)
-AC_CHECK_HEADERS(utmp.h re_comp.h getopt.h resolv.h byteswap.h)
+AC_CHECK_HEADERS(utmp.h re_comp.h getopt.h byteswap.h)
+AC_CHECK_HEADER([resolv.h],,,[#include <netinet/in.h>])