Hello Gerrit, On Mon, Oct 25, 2004 at 05:40:19PM +0200, Gerrit P. Haase wrote: > I'm sorry, I don't know enough about autoconf / m4 programming to > integrate this into autoconf. well, you don't need much special knowledge (I hope). You wrote the most of the macro for me. Then I used the definitions from the file /usr/share/autoconf/autoconf/headers.m4 as templates. (This file can be found by grepping for AC_CHECK_HEADERS.) I adapted your check. Before I try to submit it, I'd like to ask you (or others on the lists) to test it. (Delete the AN_HEADER line there are problems with it.) Thank you, Stepan Kasal
# AC_HEADER_RESOLV # ---------------- AN_HEADER(resolv.h, AC_HEADER_RESOLV) AC_DEFUN(AC_HEADER_RESOLV, [AC_CHECK_HEADERS(sys/types.h netinet/in.h arpa/nameser.h sys/socket.h) AC_CACHE_CHECK(for resolv.h, ac_cv_header_resolv_h, AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ #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_SYS_SOCKET_H # include <sys/socket.h> /* DNS HEADER struct */ #endif]]), ac_cv_header_resolv_h=yes, ac_cv_header_resolv_h=no)) if test $ac_cv_header_resolv_h = yes; then AC_DEFINE(HAVE_RESOLV_H, 1, [Define to 1 if you have the <resolv.h> header file.]) fi ])# AC_HEADER_RESOLV
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf