Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:trusteddomainproject/OpenDKIM in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
Murray S. Kucherawy committed Nov 15, 2018
2 parents 1ec9f0a + 9b79dbb commit ba29fa5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,23 @@ AC_SEARCH_LIBS(inet_ntop, resolv nsl,
AC_SEARCH_LIBS(getaddrinfo, resolv,
AC_DEFINE(HAVE_GETADDRINFO, 1,
[Define to 1 if you have the `getaddrinfo()' function.]))
# You might find res_ninit() in system libraries or in libresolv or not
# at all. The way AC_LANG_CALL finds out is it declares res_ninit() so
# it can call it, then it sees if linking fails because of unresolved
# symbols. Great, except glibc doesn't export res_ninit() -- it exports
# __res_ninit() -- res_ninit() is a macro in resolv.h. So unless we
# include resolv.h, we won't find res_ninit(), but when we do include
# it, it conflicts with AC_LANG_CALL's redeclaration. Hmm. I guess the
# only thing for it is to include resolv.h, don't redeclare res_ninit(),
# and use the proper type signature when calling it.
m4_rename([AC_LANG_CALL], [saved_AC_LANG_CALL])
m4_define([AC_LANG_CALL], [AC_LANG_PROGRAM([#include <resolv.h>],
[return res_ninit(NULL);])])
AC_SEARCH_LIBS(res_ninit, resolv,
AC_DEFINE(HAVE_RES_NINIT, 1,
[Define to 1 if you have the `res_ninit()' function.]))
AC_SEARCH_LIBS(res_sertservers, resolv bind,
m4_rename_force([saved_AC_LANG_CALL], [AC_LANG_CALL])
AC_SEARCH_LIBS(res_setservers, resolv bind,
AC_DEFINE(HAVE_RES_SETSERVERS, 1,
[Define to 1 if you have the `res_setservers()' function.]))
AC_SEARCH_LIBS(getopt_long, iberty,
Expand Down

0 comments on commit ba29fa5

Please sign in to comment.