[Ace-users] [ace-users] Building SVN ACE on Mac OS 10.5
J.T. Conklin
jtc at acorntoolworks.com
Mon Nov 5 23:25:31 CST 2007
Doug McCorkle <mccdo at iastate.edu> writes:
>> Doug McCorkle <mccdo at iastate.edu> writes:
>> Thanks for the PRF, and the attached config.log.
>>
>> The problem is the lack of a ACE_HAS_NONCONST_FD_ISSET feature test.
>> This shouldn't be difficult to write. The ACE_Handle_Set::is_set()
>> code that it's tripping on looks like a good template from which to
>> construct such a test.
>>
> Not being too familiar with the build code can you point me to the
> files that I need to look at for this?
Hi Doug,
While there are feature tests open coded within configure.ac, it's
preferable to create an autoconf macro in one of the *.m4 files in
ACE_wrappers/m4. This isolates the test, and helps maintainability.
Of the existing *.m4' files, I think platform.m4 probably fits best,
as this is a platform specific feature test.
So we'll create a AC_CHECK_HAS_NONCONST_FD_ISSET autoconf macro. In
this, we'll try to compile a sample piece of code that will fail if
the platform has a nonconst FD_ISSET macro. We can use autoconf's
AC_COMPILE_IFELSE macro for this. This is probably close to what's
needed:
AC_DEFUN([ACE_CHECK_HAS_NONCONST_FD_ISSET],
[dnl
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([
#include <sys/socket.h>
],
[
/* put feature test code here, it should fail to compile if system
has a nonconst FD_ISSET macro. */
]),
[
# Code to be executed if code compiled successfully goes here
# (we shouldn't need anything)
],
[
# Code to be executed if code failed to compile goes here
# (this is where we define the feature test macro)
AC_DEFINE([ACE_HAS_NONCONST_FD_ISSET], 1,
[Define to 1 if system has nonconst FD_ISSET() macro.])
]
])
])
Once the new macro is added to platform.m4, it needs to be invoked.
We can do that by puting an invocation right after the calls to
ACE_FUNC_IOCTL_ARGTYPES, ACE_CHECK_FORMAT_SPECIFIERS,
ACE_CHECK_LACKS_PERFECT_MULTICAST_FILTERING, etc. around line 350.
Finally, you need to regenerate the configure script. I usually do
this with "autoreconf -ivf", which regenerates all the automake/
autoconf machinery, no matter what needs updating.
Hope this helps,
--jtc
--
J.T. Conklin
More information about the Ace-users
mailing list