install below software

1. GNU automake
--> apt-get install automake

2. GNU autoconf
--> apt-get install autoconf

3. GNU m4
--> apt-get install m4

4. Perl

5. GNU Libtool (如果你需要產生 shared library)

Step :
execute autoscan to build configure.scan

$autoscan
$ls  
# you will see configure.scan

$vi configure.scan
#change to below setting
dnl Process this file with autoconf to produce a con figure script.

AC_INIT(hello.c)

AM_INIT_AUTOMAKE(hello, 1.0)

dnl Checks for programs.

AC_PROG_CC

dnl Checks for libraries.

dnl Checks for header files.

dnl Checks for typedefs, structures, and compiler ch aracteristics.

dnl Checks for library functions.

AC_OUTPUT(Makefile)

#dnl means '#'

#執行 aclocal 和 autoconf ,分別會產生 aclocal.m4 及 configure 兩個檔案

$aclocal

$autoconf

$vi Makefile.am 
AUTOMAKE_OPTIONS= foreign

bin_PROGRAMS= hello

hello_SOURCES= hello.c

#save and leave

$ automake --add-missing
$./configure
$ make

 

(from : http://blog.yam.com/ddy1280/article/494098)



arrow
arrow
    全站熱搜
    創作者介紹
    創作者 gordenhao 的頭像
    gordenhao

    高登

    gordenhao 發表在 痞客邦 留言(0) 人氣()