[Ace-users] [ace-users] Building SVN ACE on Mac OS 10.5

J.T. Conklin jtc at acorntoolworks.com
Tue Nov 6 20:22:36 CST 2007


Doug McCorkle <mccdo at iastate.edu> writes:

>> I will clean up my changes for the m4 and configure.ac file and submit
>> a patch for the first problem.
>
> When I tried to move things to the m4 file as you suggested I
> encountered problems. I get these compile errors when I run the
> bootstrap command:
>
> Putting files in AC_CONFIG_AUX_DIR, `../aux_config'.
> Putting files in AC_CONFIG_AUX_DIR, `aux_config'.
> configure.ac:286: error: possibly undefined macro: AC_DEFINE
>        If this token and others are legitimate, please use
>        m4_pattern_allow.
>        See the Autoconf documentation.
> autoreconf: /usr/bin/autoconf failed with exit status: 1

Hi Doug,

The AH_TEMPLATE() definition in config_h.m4 is not necessary.  It's
only needed if a description isn't provided with AC_DEFINE(), which
your new macro does.  It's much better this way.  All the macros in
config_h.m4 get copied into the config.h.in template, even for those
macros that aren't otherwise used.  This is ok for ACE's config.h.in,
but TAO's config.h.in is bloated unnecessarily.

But that's really a side issue.  Your problem is just a subtle problem
with quoting, which is causing the autoconf macro to be emitted in the
configure script. Fortunately the autotools catch this (by matching
AC_ in the output).  I've attached a cleaned up patch for platform.m4.
Can you try it out?

Index: platform.m4
===================================================================
--- platform.m4	(revision 79944)
+++ platform.m4	(working copy)
@@ -350,7 +350,7 @@
 esac
 
 ACE_FUNC_IOCTL_ARGTYPES
-
+ACE_CHECK_HAS_NONCONST_FD_ISSET
 ACE_CHECK_FORMAT_SPECIFIERS
 ACE_CHECK_LACKS_PERFECT_MULTICAST_FILTERING
 
@@ -487,3 +487,31 @@
 	    [Define to 1 if platform has global timezone variable])
 fi
 ])
+
+
+# ACE_HAS_NONCONST_FD_ISSET
+#
+# Checks if system has a nonconst FD_ISSET macro.
+#
+#---------------------------------------------------------------------------
+AC_DEFUN([ACE_CHECK_HAS_NONCONST_FD_ISSET],
+[dnl
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/time.h>],
+        [
+            //const fd_set* temp = new fd_set();
+            //FD_ISSET(0, const_cast< fd_set* >( temp ) );
+            const fd_set* temp = new fd_set();
+            FD_ISSET(0, temp );
+            return 0;]),
+	],
+        [
+            # 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.])
+        ]
+    )
+])



-- 
J.T. Conklin



More information about the Ace-users mailing list