==============linux内核中================================
.config中定义的变量自动写到include/generated/autoconf.h
这样.config中的变量就能在c文件中使用了
例如:
.config: CONFIG_SLHC=y
include/generated/autoconf.h: #define CONFIG_SLHC 1
==============autoconfig automake工程中================================
在configure.ac的AC_INIT和AC_OUTPUT之间添加:
myval=no
AC_ARG_ENABLE(
fd650,
[AC_HELP_STRING([--enable-fd650],[Define to 1 if you are using fd650])],
[],
[]
)
myval=$enable