Alexander Neundorf wrote:
Hi, I tried to check for the function res_init() with CHECK_FUNCTION_EXISTS(res_init HAVE_RES_INIT) This always fails, although it shouldn't. The problem is this line in resolv.h: /usr/include$ grep res_init * resolv.h:#define res_init __res_init resolv.h:int res_init __P((void)); I.e. resolv() is only a macro, the actual function name is __res_init(), but the compiler/linker doesn't know this since resolv.h is not included when compiling the test program for CHECK_FUNCTION_EXISTS(). So what can I do ?

Use the CheckSymbolExists module. It accounts for the possibility that the symbol is defined by a macro.

-Brad
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to