Previous: autom4te.cache, Up: FAQ   [Contents][Index]


17.7 ¥Ø¥Ã¥À¤¬Â¸ºß¤¹¤ë¤Î¤Ë¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Þ¤»¤ó

µ¡Ç½¤ÎÄ´ºº»þ¤Ë³Ð¤¨¤Æ¤ª¤¯¤Ù¤­ºÇ¤â½ÅÍפʥ¬¥¤¥É¥é¥¤¥ó¤Ï¡¤»È¤¤¤¿¤¤¤â¤Î¤ò¤Ç¤­ ¤ë¤À¤±¿¿»÷¤Æ¤ß¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡¥»Äǰ¤Ê¤¬¤é¡¤¸Å¤¤¥Ð¡¼¥¸¥ç¥ó¤Î AC_CHECK_HEADER¤ÈAC_CHECK_HEADERS¤Ï¤³¤Î¹Í¤¨¤Ë½¾¤¦¤È¼ºÇÔ¤·¡¤ ¤½¤·¤Æ¡¤¥Ø¥Ã¥À¤ÎÄ´ºº¤Î¤¿¤á¥³¥ó¥Ñ¥¤¥é¤ÎÂå¤ï¤ê¤Ë¥×¥ê¥×¥í¥»¥Ã¥µ¤ò¸Æ¤Ó½Ð¤·¤Þ ¤¹¡¥·ë²Ì¤È¤·¤Æ¡¤¥Ø¥Ã¥À´Ö¤Ç¤ÎÈó¸ß´¹À­¤Ï¥³¥ó¥Õ¥£¥°¥ì¡¼¥·¥ç¥ó»þ¤ËÃíÌܤµ¤ì¤º¡¤ ´ÉÍý¼Ô¤Ï·ë¶É¡¤¤³¤ÎÌäÂê¤òÊ̤ξì½ê¤Ç½èÍý¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥

Autoconf 2.56¤Ç¤ÏξÊý¤ÎÄ´ºº¤ò¼Â¹Ô¤¹¤ë¤Î¤Ç¡¤¥³¥ó¥Ñ¥¤¥é¤È¥×¥ê¥×¥í¥»¥Ã¥µ¤¬ ¼õ¤±Æþ¤ì¤Ê¤¤¾ì¹ç¡¤configureÇɼê¤Ëʸ¶ç¤ò¸À¤¤¤Þ¤¹¡¥¥×¥ê¥×¥í¥»¥Ã¥µ¤Î ·ë²Ì¤òÍøÍѤ¹¤ë¤È¤­¤Ï¡¤configure.ac¤ò½¤Àµ¤¹¤ë»þ´Ö¤¬´ÉÍý¼Ô¤ËÍ¿¤¨¤é ¤ì¤Þ¤¹¡¥¤·¤«¤·¡¤¾­Íè¤Ï¥³¥ó¥Ñ¥¤¥é¤À¤±¹Í褵¤ì¤ë¤Ç¤·¤ç¤¦¡¥

°Ê²¼¤ÎÎã¤ò¹Í¤¨¤Æ²¼¤µ¤¤¡¥

$ cat number.h
typedef int number;
$ cat pi.h
const number pi = 3;
$ cat configure.ac
AC_INIT
AC_CHECK_HEADERS(pi.h)
$ autoconf -Wall
$ ./configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pi.h usability... no
checking pi.h presence... yes
configure: WARNING: pi.h: present but cannot be compiled
configure: WARNING: pi.h: check for missing prerequisite headers?
configure: WARNING: pi.h: proceeding with the preprocessor's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to bug-autoconf@gnu.org. ##
configure: WARNING:     ## ------------------------------------ ##
checking for pi.h... yes

¤³¤Î¾õ¶·¤Ç¤ÎÀµ¤·¤¤ÊýË¡¤Ï¡¤»ÍÈÖÌܤΰú¿ô¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¤¹(see Generic Headers)¡¥

$ cat configure.ac
AC_INIT
AC_CHECK_HEADERS(number.h pi.h,,,
[[#if HAVE_NUMBER_H
# include <number.h>
#endif
]])
$ autoconf -Wall
$ ./configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for number.h... yes
checking for pi.h... yes

ɬÍ×¾ò·ï¤È¤Ê¤ë¥Ø¥Ã¥À¤Î¥ê¥¹¥È¤ÏParticular Headers¡¥


Previous: autom4te.cache, Up: FAQ   [Contents][Index]