[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_SEARCH_LIBS with appropriate system headers
From: |
Ralf Wildenhues |
Subject: |
Re: AC_SEARCH_LIBS with appropriate system headers |
Date: |
Mon, 18 Jul 2011 08:25:59 +0200 |
Hello Zack,
* Zack Weinberg wrote on Tue, Jul 12, 2011 at 01:23:46AM CEST:
> The obvious way to detect that you're on MinGW and you need to stick
> -lws2_32 on your link line for 'ntohl' is
[...]
> AC_LANG_CONFTEST([AC_LANG_PROGRAM(
> [#ifdef _WIN32
> #include <winsock2.h>
> #else
> #include <arpa/inet.h>
> #endif],
> [return (int)ntohl(42);])])
>
> Is there a neater way to do this test than by copying the entire
> definition of AC_SEARCH_LIBS into my configure.ac (or my aclocal.m4)
> and hacking it up?
Maybe wrap your AC_SEARCH_LIBS call into
m4_pushdef([AC_LANG_CALL], [modified version that does TRT])dnl
...
m4_popdef([AC_LANG_CALL])dnl
Hope that helps.
Cheers,
Ralf