Please tie this check to the function and not glibc's usage, in case other libc's (uclibc, musl, etc) implement it as part of libc itself:
```
AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1,[Define this symbol if you have getaddrinfo_a])])
```
Then in code, use: ```#if defined(HAVE_GETADDRINFO_A)```