diff options
Diffstat (limited to 'gl/m4/inet_ntop.m4')
| -rw-r--r-- | gl/m4/inet_ntop.m4 | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4 index 2bbdca10..a6d219c2 100644 --- a/gl/m4/inet_ntop.m4 +++ b/gl/m4/inet_ntop.m4 | |||
| @@ -1,27 +1,28 @@ | |||
| 1 | # inet_ntop.m4 serial 9 | 1 | # inet_ntop.m4 serial 12 |
| 2 | dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| 5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
| 6 | 6 | ||
| 7 | AC_DEFUN([gl_INET_NTOP], | 7 | AC_DEFUN([gl_FUNC_INET_NTOP], |
| 8 | [ | 8 | [ |
| 9 | dnl Persuade Solaris <arpa/inet.h> to declare inet_ntop. | 9 | dnl Persuade Solaris <arpa/inet.h> to declare inet_ntop. |
| 10 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | 10 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
| 11 | 11 | ||
| 12 | gl_REPLACE_ARPA_INET_H | 12 | gl_REPLACE_ARPA_INET_H |
| 13 | 13 | ||
| 14 | dnl The AC_SEARCH_LIBS call is a hack to persuade the Solaris 8 linker to | 14 | dnl Most platforms that provide inet_ntop define it in libc. |
| 15 | dnl find inet_ntop. | 15 | dnl Solaris 8..10 provide inet_ntop in libnsl instead. |
| 16 | dnl | ||
| 17 | dnl It is the responsibility of gl_INET_NTOP's caller to arrange for | ||
| 18 | dnl -lnsl if it is needed. Normally -lnsl is not needed on Solaris 8, | ||
| 19 | dnl since inet_ntop is needed only by getaddrinfo, and getaddrinfo | ||
| 20 | dnl isn't built on Solaris 8. | ||
| 21 | gl_save_LIBS=$LIBS | 16 | gl_save_LIBS=$LIBS |
| 22 | AC_SEARCH_LIBS([inet_ntop], [nsl], [], | 17 | AC_SEARCH_LIBS([inet_ntop], [nsl], [], |
| 23 | [AC_REPLACE_FUNCS([inet_ntop])]) | 18 | [AC_REPLACE_FUNCS([inet_ntop])]) |
| 24 | LIBS=$gl_save_LIBS | 19 | LIBS=$gl_save_LIBS |
| 20 | INET_NTOP_LIB= | ||
| 21 | if test "$ac_cv_search_inet_ntop" != "no" && | ||
| 22 | test "$ac_cv_search_inet_ntop" != "none required"; then | ||
| 23 | INET_NTOP_LIB="$ac_cv_search_inet_ntop" | ||
| 24 | fi | ||
| 25 | AC_SUBST([INET_NTOP_LIB]) | ||
| 25 | 26 | ||
| 26 | gl_PREREQ_INET_NTOP | 27 | gl_PREREQ_INET_NTOP |
| 27 | ]) | 28 | ]) |
