I think I finished most of the embedding code tonight -- could you guys check it out?
http://bitbucket.org/jsquyres/hwloc-embedded/ Instead of using PLPA-style macros to rename the symbols throughout the source code, I introduced <hwloc/rename.h> that, if renaming is enabled, will #define hwloc_foo to <NEW_PREFIX>_foo. I only did a handful of names so far just to prove that it was working: #define hwloc_cpuset_alloc HWLOC_SYM_PREFIX ## cpuset_alloc #define hwloc_cpuset_free HWLOC_SYM_PREFIX ## cpuset_free #define hwloc_topology_init HWLOC_SYM_PREFIX ## topology_init #define hwloc_topology_load HWLOC_SYM_PREFIX ## topology_load #define hwloc_topology_get_depth HWLOC_SYM_PREFIX ## topology_get_depth #define hwloc_topology_destroy HWLOC_SYM_PREFIX ## topology_destroy Other changes I made were generally to cleanse the namespace: ensure that every AC_SUBST, AC_DEFINE, AC_DEFUN, and AM_CONDITIONAL all had "HWLOC_" (or, in a small number of cases, "hwloc_") as a prefix. I also consolidated all of hwloc's m4 into config/hwloc.m4 (no other .m4 files -- so that this *1* file can be acincluded in other packages). I made a test in tests/embedded/ that has its own configure.ac that includes the hwloc.m4, configures it, builds it with a new prefix ("mytest_" instead of "hwloc_") and then links against it in a trivial dummy executable. It all seems to work. Before I finish the grunt work of the #define's for all the other symbols and macros, can you guys review it and see if there's anything you hate in there? Thanks. -- Jeff Squyres jsquy...@cisco.com