After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 309866 - Wrong check for resolv.h in configure.in on the Mac
Wrong check for resolv.h in configure.in on the Mac
Status: RESOLVED FIXED
Product: ORBit2
Classification: Deprecated
Component: general
2.12.x
Other Mac OS
: Normal normal
: ---
Assigned To: Shreyas Srinivasan
Shreyas Srinivasan
: 409500 609889 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-07-09 05:23 UTC by Michèle Garoche
Modified: 2013-05-14 11:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Patch for finding resolv.h (2.46 KB, patch)
2005-07-26 03:01 UTC, Michèle Garoche
none Details | Review
Patch to find resolv.h (1.97 KB, patch)
2005-07-28 15:17 UTC, Michèle Garoche
none Details | Review

Description Michèle Garoche 2005-07-09 05:23:20 UTC
Version details: version 2.12.2
Distribution/Version: Mac OS X 10.4, also on Mac OS X 10.3

Find a Mac
run configure on it for orbit2

Warning in configure:

You'll get this warning:

checking resolv.h usability... no
checking resolv.h presence... yes
configure: WARNING: resolv.h: present but cannot be compiled
configure: WARNING: resolv.h:     check for missing prerequisite headers?
configure: WARNING: resolv.h: see the Autoconf documentation
configure: WARNING: resolv.h:     section "Present But Cannot Be Compiled"
configure: WARNING: resolv.h: proceeding with the preprocessor's result
configure: WARNING: resolv.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##

Actually there is a missing header: netinet/in.h needs to be included before resolv.h on the Mac.

There were discussion on this from other systems on gnu.org, here: <http://lists.gnu.org/archive/
html/autoconf/2004-10/msg00055.html>.

Next, a new m4 macro was added, here: <<http://lists.gnu.org/archive/html/autoconf-patches/
2004-11/txtlQ6dKl0J2i.txt>

Would it be possible to use this check on orbit2, instead of the actual one?
Comment 1 Luis Villa 2005-07-21 21:59:47 UTC
Michele: you'd probably have to provide a patch; i don't think any of the
developers of orbit test/build on a mac, so no one is likely to be able to do it
themselves. :/
Comment 2 Michael Meeks 2005-07-22 09:09:59 UTC
Shreyas - any thoughts ?
Comment 3 Michèle Garoche 2005-07-26 03:01:39 UTC
Created attachment 49753 [details] [review]
Patch for finding resolv.h
Comment 4 Michael Meeks 2005-07-26 09:24:10 UTC
I'd prefer to see all the checks in-line and not using acinclude.m5.
Also:
+dnl AC_CHECK_HEADERS(arpa/nameser.h resolv.h)
+AC_CHECK_HEADERS([arpa/nameser.h netinet/in.h sys/socket.h sys/types.h])

don't leave commented out crud in there.
Also - why have the AC_CHECK_HEADERS when the AC_HEADER_RESOLV seems to do a
similar thing ?

Shreyas - can you take this over ?
Comment 5 Michèle Garoche 2005-07-28 15:17:42 UTC
Created attachment 49883 [details] [review]
Patch to find resolv.h

New patch, conforming to the new macro in autoconf
Comment 6 Michèle Garoche 2005-07-28 15:19:38 UTC
I don't know much about m4 macros.

Here's a new patch, conforming to the one finally put in December 2004 in
autoconf cvs (It removes the check for sys/socket.h, which does not seem to be
needed).

I've removed the comment, deleted the old AC_CHECK_HEADERS, and inserted the
macro inline, as well as removed the usage of acinclude.m4.

Comment 7 Daniel Macks 2006-09-07 02:21:06 UTC
Still busted in orbit 2.14.3.
Comment 8 Kjartan Maraas 2006-11-10 13:49:23 UTC
And the patch is mangled so I can't apply it or even make sense of it as it is now.
Comment 9 Michèle Garoche 2006-11-10 17:34:43 UTC
Here's the exact AC_HEADER_RESOLV from headers.m4 in released autoconf 2.60:

# AC_HEADER_RESOLV
# ----------------
# According to http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?resolver+3
# (or http://www.chemie.fu-berlin.de/cgi-bin/man/sgi_irix?resolver+3),
# sys/types.h, netinet/in.h and arpa/nameser.h are required on IRIX.
# netinet/in.h is needed on Cygwin, too.
# With Solaris 9, netdb.h is required, to get symbols like HOST_NOT_FOUND.
#
AN_HEADER(resolv.h,	[AC_HEADER_RESOLV])
AC_DEFUN([AC_HEADER_RESOLV],
[AC_CHECK_HEADERS(sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h,
		  [], [],
[[#if HAVE_SYS_TYPES_H
#  include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#  include <netinet/in.h>   /* inet_ functions / structs */
#endif
#ifdef HAVE_ARPA_NAMESER_H
#  include <arpa/nameser.h> /* DNS HEADER struct */
#endif
#ifdef HAVE_NETDB_H
#  include <netdb.h>
#endif]])
])# AC_HEADER_RESOLV


It would not be too much difficult to integrate it in orbit2. That's what I tried to do with the patch, but not an expert here, as I already said.
Comment 10 Daniel Macks 2006-11-17 23:30:37 UTC
If that AC_DEFUN is already present in headers.m4, then you can probably just add AC_DEFUN to configure.in and let the standard autotools handle the rest. That's why system-wide .m4 files are made available.
Comment 11 Daniel Macks 2006-11-17 23:31:54 UTC
If an AC_DEFUN for that function is already present in headers.m4, then you can probably just add that command (AC_HEADER_RESOLV) to configure.in and let the standard autotools handle the rest. That's why system-wide .m4 files are made available.
Comment 12 Michèle Garoche 2006-11-18 01:14:11 UTC
At the time I reported this bug, autoconf 2.60 was not released yet.

The AC_DEFUN for resolv.h was only added in autoconf 2.60, and this version of ORBIT2 uses an older version of autoconf.

So that, two cases here apply:

1 - The autoconf version on the system is 2.60, then configure should be changed to include AC_HEADER_RESOLV and it will do the right job.

2 - The autoconf version is older than 2.60 and there is a need to define this "new" macro in configure.in.

One can object that autoconf is already at version 2.60 in Fink, and probably also in MacPorts, but this is not the case on the native system (2.59).

Comment 13 Kjartan Maraas 2008-05-25 12:05:14 UTC
I guess we could bump the required version of autoconf to 2.60 by now? It's almost two years old.
Comment 14 Daniel Macks 2009-07-30 01:09:46 UTC
ping. 2.63 is quite standard for gnome2.26ish. But more importantly...

configure: WARNING: resolv.h: proceeding with the preprocessor's result
configure: WARNING: resolv.h: in the future, the compiler will take precedence

"the future" it mentions is here now, as of autoconf-8.64 (just released). So ORBit2-2.14.7 builds without some resolver functionality if autogen'ed with ac8.64 because this test now (unlike before) does not lead to defining HAVE_RESOLV_H.
Comment 15 André Klapper 2010-03-27 19:23:09 UTC
*** Bug 609889 has been marked as a duplicate of this bug. ***
Comment 16 André Klapper 2010-03-27 19:28:03 UTC
*** Bug 409500 has been marked as a duplicate of this bug. ***
Comment 17 Kjartan Maraas 2013-05-14 11:47:12 UTC
Closing this now since surely the toolchain on most systems should be able to handle this now. Raised the autoconf requirement to 2.60 and added AC_HEADER_RESOLV.