Reputation: 2694
How can I add a prefix to all macros defined in config.h
by Autotool? For example, I want #define MYNAMESPACE_HAVE_STRING_H 1
instead of #define HAVE_STRING_H 1
. I have found a post saying that AX_PREFIX_CONFIG_H
can help but my system doesn't support this macro...
AC_CONFIG_FILES([Makefile])
AC_CONFIG_HEADERS([include/config.h])
Upvotes: 1
Views: 243
Reputation: 3240
AX_*
macros come from Autoconf Archive, in particular the one you're referring to is described in http://www.gnu.org/software/autoconf-archive/ax_prefix_config_h.html.
That is probably the best way to achieve it, just copy the latest m4 file for that macro in your project and let it be found by autoreconf
. You can refer to my write-up in Autotools Mythbuster for further details on using external macro files.
Upvotes: 2