3 dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_HEADER_NETINET_IN],
10 AC_CACHE_CHECK([whether <netinet/in.h> is self-contained],
11 [gl_cv_header_netinet_in_h_selfcontained],
13 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[]])],
14 [gl_cv_header_netinet_in_h_selfcontained=yes],
15 [gl_cv_header_netinet_in_h_selfcontained=no])
17 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
18 GL_GENERATE_NETINET_IN_H=false
20 GL_GENERATE_NETINET_IN_H=true
21 AC_CHECK_HEADERS([netinet/in.h])
22 gl_CHECK_NEXT_HEADERS([netinet/in.h])
23 if test $ac_cv_header_netinet_in_h = yes; then
28 AC_SUBST([HAVE_NETINET_IN_H])