//interface of this program
int main(int argc , char **argv){
char str_read[1024];
printf("Please INPUT something end by [ENTER]\n");
scanf("%s",str_read);
return str(str_read );
}
[cpp] view plaincopy
[root@localhost str]# ls
include src
[root@localhost str]# autoscan
autom4te: configure.ac: no such file or directory
autoscan: /usr/bin/autom4te failed with exit status: 1
[root@localhost str]# ls
autoscan.log configure.scan include src
[root@localhost str]# cp configure.scan configure.ac
修改 configure.ac
[cpp] view plaincopy
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
4、执行aclocal
[cpp] view plaincopy
[root@localhost str]# aclocal
/usr/share/aclocal/libfame.m4:6: warning: underquoted definition of AM_PATH_LIBFAME
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automa ... l#Extending-aclocal
10、执行测试:
执行./configure
[cpp] view plaincopy
[root@localhost str]# ./configure --prefix=/u
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
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 ANSI C... 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: config.h is unchanged
config.status: executing depfiles commands