查看configure.in的內容: ------------------------------------------------ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script.
第八步 運行configure,在這一步中,通過運行自動配置設置文件configure,把Makefile.in變成了最終的Makefile。 運行的結果如下: ------------------------------------------------ [root@localhost main]# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... 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 ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands [root@localhost main]# ls aclocal.m4 config.h.in configure.in main.c Makefile.in autom4te.cache config.log configure.in~ Makefile missing autoscan.log config.status depcomp Makefile.am stamp-h1 config.h configure install-sh Makefile.am~ [root@localhost main]# ------------------------------------------------
第九步 運行 make,對配置文件Makefile進行測試一下
此時的狀態如下: ------------------------------------------------ [root@localhost main]# make cd . && /bin/sh /root/project/main/missing --run aclocal-1.10 cd . && /bin/sh /root/project/main/missing --run automake-1.10 --foreign cd . && /bin/sh /root/project/main/missing --run autoconf /bin/sh ./config.status --recheck running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... 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 ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 configure: creating ./config.status /bin/sh ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands cd . && /bin/sh /root/project/main/missing --run autoheader rm -f stamp-h1 touch config.h.in make all-am make[1]: Entering directory `/root/project/main' gcc -DHAVE_CONFIG_H -I. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c mv -f .deps/main.Tpo .deps/main.Po gcc -g -O2 -o main main.o cd . && /bin/sh ./config.status config.h config.status: creating config.h config.status: config.h is unchanged make[1]: Leaving directory `/root/project/main' [root@localhost main]# ls aclocal.m4 autoscan.log config.h.in config.status configure.in depcomp main main.o Makefile.am Makefile.in stamp-h1 autom4te.cache config.h config.log configure configure.in~ install-sh main.c Makefile Makefile.am~ missing [root@localhost main]# ------------------------------------------------