AC_CHECK_LIB() doesn't work to check for Windows API functions due to calling
conventions, so use AC_LINK_IFELSE() instead. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@200 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
20
configure.in
20
configure.in
@@ -165,7 +165,25 @@ if test x"$bx_cv_lib_resolver" != x"not found"; then
|
|||||||
LIBS="$bx_cv_lib_resolver $LIBS"
|
LIBS="$bx_cv_lib_resolver $LIBS"
|
||||||
fi
|
fi
|
||||||
dnl This is for getting the DNS servers on Windows
|
dnl This is for getting the DNS servers on Windows
|
||||||
AC_CHECK_HEADER([iphlpapi.h], [AC_CHECK_LIB(iphlpapi, GetNetworkParams, [], [])], [], [#include <windows.h>])
|
AC_MSG_CHECKING([for the iphlpapi library])
|
||||||
|
OLDLIBS="$LIBS"
|
||||||
|
LIBS="-liphlpapi $LIBS"
|
||||||
|
AC_LINK_IFELSE([[
|
||||||
|
#include <windows.h>
|
||||||
|
#include <iphlpapi.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
ULONG buflen;
|
||||||
|
GetNetworkParams(0, &buflen);
|
||||||
|
return buflen;
|
||||||
|
}]], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_LIBIPHLPAPI, 1, [Define to 1 if you have the Windows iphlpapi library])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
LIBS="$OLDLIBS"
|
||||||
|
])
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([No resolver library found, /nslookup will be disabled.])
|
AC_MSG_WARN([No resolver library found, /nslookup will be disabled.])
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
/* Define to 1 if you have the `killpg' function. */
|
/* Define to 1 if you have the `killpg' function. */
|
||||||
#undef HAVE_KILLPG
|
#undef HAVE_KILLPG
|
||||||
|
|
||||||
/* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */
|
/* Define to 1 if you have the Windows iphlpapi library */
|
||||||
#undef HAVE_LIBIPHLPAPI
|
#undef HAVE_LIBIPHLPAPI
|
||||||
|
|
||||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||||
|
|||||||
Reference in New Issue
Block a user