【发布时间】:2016-05-07 07:09:14
【问题描述】:
AC_INCLUDES_DEFAULT 是一个宏,可扩展为一堆标准头文件,以及相关的autoconf 生成的检查。事实上,文档说它扩展为:
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_STRING_H
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
如何使用configure.ac 将AC_INCLUDES_DEFAULT 的内容包含在我的config.h 中?
【问题讨论】:
-
你的意思是config.h吗?
-
AFAIK 它是自动生成的。我总是在我的项目中让它们进入 config.h。您是否启动了 autotool 项目的重新配置。如果您进入 Eclipse,请右键单击项目并选择 reconfigure project
-
是的,我知道
config.h是自动生成的。我在问如何将特定的东西放入其中。 -
我的意思是 AC_INCLUDES_DEFAULT 在我的例子中总是被添加到 config.h 中。星期一我会看看我的项目,我会给你一个反馈。
标签: c header-files autotools autoconf automake