AC_INCLUDES_DEFAULT是一个宏,它扩展到一系列标准头文件,以及相关的autoconf-generated检查。实际上,docs说它会扩展到以下内容:
#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 在my config.h**?**中包含AC_INCLUDES_DEFAULT的内容?
发布于 2016-05-10 22:05:52
AC_INCLUDES_DEFAULT可供自动检查宏使用。它没有输出任何您可以直接在项目中使用的内容。
在我看来,那份清单似乎有点过时了。似乎不太可能有任何系统提供<strings.h>,但不再有<string.h>。我认为,总的来说,最好检查一下你实际使用的是什么,甚至更好的是,只检查你在实践中发现的不能移植到你所关心的平台上的东西。
https://stackoverflow.com/questions/37085618
复制相似问题