[ENet-discuss] [CMake] Autotools replacement functions?
Lee Salzman
lsalzman1 at cox.net
Wed Oct 15 18:50:10 PDT 2008
You can try just doing: #define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN
Lee
Andrew Fenn wrote:
> 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
>>
>>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
More information about the ENet-discuss
mailing list