On Tue, 16 Sep 2008, Benjamin Kirk wrote: >>> Will be easy, but I bet those are not most of the ones which conflict? More >>> difficult will be, for example, HAVE_STDLIB_H, which comes indirectly when >>> configure looks for <stdlib.h>. Similarly, SIZEOF_INT etc... ? >> >> I have vague memories of talking about this problem (with John?) at some >> point and deciding the solution should be simple: at the end of >> libmesh_config.h, each offending entry gets: >> >> #define LIBMESH_WHATEVER WHATEVER >> #undef WHATEVER > > For our favorite example, wouldn't that turn into > > #define HAVE_MPI > #undef HAVE_MPI > > Inside the same file, which is no good for anything outside that file for > using the definition?
Yes, and the memories are getting less vague... that must have been why I never bothered to make that change. I'd been hoping the behavior instead would be for #define HAVE_MPI 1 to subsitute until it was undefined, effectively leaving #define LIBMESH_HAVE_MPI 1 to operate on the rest of the file being compiled. For flags which are just either undefined or 1, we might still be able to do something like: #ifdef HAVE_MPI #define LIBMESH_HAVE_MPI 1 #endif #undef HAVE_MPI I don't know what could be done automatically about SIZEOF_*, though, except for testing each of their likely values in #if statements in turn. --- Roy ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
