[ENet-discuss] [CMake] Autotools replacement functions?

Andrew Fenn andrewfenn at gmail.com
Wed Oct 15 17:29:54 PDT 2008


Thanks, this was really helpful. I am now just stuck on this function..

AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h,
AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))

I need something to search through an include file "socket.h", find
MSG_MAXIOVLEN and return true or false.

I've been searching but I couldn't find anything.

Regards,
Andrew

On Wed, Oct 15, 2008 at 2:41 PM, Christian Ehrlicher
<Ch.Ehrlicher at gmx.de> wrote:
>> Von: "Eric Noulard"
>> 2008/10/15 Andrew Fenn
>> > Does cmake have replacement functions for the following?
>> >
>> > AC_CHECK_MEMBER(struct msghdr.msg_flags,
>> > [AC_DEFINE(HAS_MSGHDR_FLAGS)], , [#include <sys/socket.h>])
>> >
>> > CHECK_FUNCTION_EXISTS(socklen_t HAS_SOCKLEN_T)
>> > AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], ,
>> >              #include <sys/types.h>
>> >              #include <sys/socket.h>
>> > )
>> >
>> > AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h,
>> > AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
>> > AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h,
>> > AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
>>
>> May be you can look at:
>> http://www.cmake.org/Wiki/CMake:How_To_Write_Platform_Checks
>>
>> CHECK_INCLUDE_FILES
>> CHECK_FUNCTION_EXISTS
>> CHECK_SYMBOL_EXISTS
>> CHECK_LIBRARY_EXISTS
>>
>> I did not find equivalent of
>> AC_CHECK_MEMBER
>>
>> but may be it exists and I don't know it.
> KDE is using an own Macro for this: http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/CheckStructMember.cmake
>
>
> Christian
> --
> GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
> http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
>


More information about the ENet-discuss mailing list