netinet_in_h.m4 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. # netinet_in_h.m4 serial 5
  2. dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. AC_DEFUN([gl_HEADER_NETINET_IN],
  7. [
  8. AC_CACHE_CHECK([whether <netinet/in.h> is self-contained],
  9. [gl_cv_header_netinet_in_h_selfcontained],
  10. [
  11. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[]])],
  12. [gl_cv_header_netinet_in_h_selfcontained=yes],
  13. [gl_cv_header_netinet_in_h_selfcontained=no])
  14. ])
  15. if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
  16. NETINET_IN_H=''
  17. else
  18. NETINET_IN_H='netinet/in.h'
  19. AC_CHECK_HEADERS([netinet/in.h])
  20. gl_CHECK_NEXT_HEADERS([netinet/in.h])
  21. if test $ac_cv_header_netinet_in_h = yes; then
  22. HAVE_NETINET_IN_H=1
  23. else
  24. HAVE_NETINET_IN_H=0
  25. fi
  26. AC_SUBST([HAVE_NETINET_IN_H])
  27. fi
  28. AC_SUBST([NETINET_IN_H])
  29. AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"])
  30. ])