Search code examples
clinuxautotoolsautomake

Can I put my macro define to config.h by using AC_XXXX_CONFIG syntax?


I know AC_SUBST(VAR) to pass the VAR to Makefile.am.

Are there any syntax to generate my #define into config.h in configure.ac?


Solution

  • As long as you use AC_CONFIG_HEADERS - e.g., AC_CONFIG_HEADERS([config.h]) in configure.ac - the AC_DEFINE macro will generate a #define ... in the header.