[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs configure warning on MacOSX.3 +patch
From: |
Dan Hoey |
Subject: |
emacs configure warning on MacOSX.3 +patch |
Date: |
Mon, 24 Nov 2003 13:46:10 -0500 (EST) |
This is a revised version of the bug report I sent three days ago.
That report, while correct, missed some related problems.
The problem:
On MacOSX.3, the "net/if.h" header requires the "sys/socket.h" header,
which in turn requires "sys/types.h". Failure to account for this in
"configure.in" (version 1.358) leads to the dire warning
| checking net/if.h usability... no
| checking net/if.h presence... yes
| configure: WARNING: net/if.h: present but cannot be compiled
| configure: WARNING: net/if.h: check for missing prerequisite headers?
| configure: WARNING: net/if.h: proceeding with the preprocessor's result
| configure: WARNING: ## ------------------------------------ ##
| configure: WARNING: ## Report this to address@hidden ##
| configure: WARNING: ## ------------------------------------ ##
| checking for net/if.h... yes
which leads to all kinds of nonsense on bug-gnu-autoconf. The tests
for members of "struct ifreq" also give erroneous results.
The fix:
Patched configure.in (version 1.358) to clear up the error. I moved
the test for "net/if.h" up with the other header tests, and put the
appropriate code in that test and in the "struct ifreq" member tests.
Tested this with autoconf 1.57.
================================================================
The patch
% diff -c -F '^AC_' configure.in{.~1.358.~,}
================================================================
*** configure.in.~1.358.~ Sun Nov 16 13:32:34 2003
--- configure.in Mon Nov 24 13:34:52 2003
*************** AC_CHECK_DECLS([sys_siglist])
*** 1448,1453 ****
--- 1448,1463 ----
fi
fi
AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS(sys/socket.h sys/ioctl.h)
+
+ AC_CHECK_HEADERS(net/if.h, , ,[
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ ])
dnl Some systems have utime.h but don't declare the struct anyplace.
AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf,
*************** AC_CHECK_MEMBER(struct tm.tm_gmtoff,
*** 1516,1522 ****
[#include <time.h>])
AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr,
struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr,
! struct ifreq.ifr_addr], , ,[#include <net/if.h>])
dnl checks for compiler characteristics
--- 1526,1542 ----
[#include <time.h>])
AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr,
struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr,
! struct ifreq.ifr_addr], , ,[
! #ifdef HAVE_SYS_TYPES_H
! #include <sys/types.h>
! #endif
! #ifdef HAVE_SYS_SOCKET_H
! #include <sys/socket.h>
! #endif
! #ifdef HAVE_NET_IF_H
! #include <net/if.h>
! #endif
! ])
dnl checks for compiler characteristics
*************** AC_CHECK_FUNC(socket, , ok_so_far=no)
*** 2509,2516 ****
AC_DEFINE(HAVE_INET_SOCKETS, 1,
[Define to 1 if you have inet sockets.])
fi
-
- AC_CHECK_HEADERS(sys/ioctl.h net/if.h)
if test -f /usr/lpp/X11/bin/smt.exp; then
AC_DEFINE(HAVE_AIX_SMT_EXP, 1,
--- 2529,2534 ----
================================================================
Dan
address@hidden