1. 程式人生 > >ubuntu下安裝autotools工具

ubuntu下安裝autotools工具

本文參考了:

http://www.linuxidc.com/wap.aspx?nid=36616&p=1&cp=2&cid=6&sp=1019

轉載請註明出處---------------謝謝

首先需要下載:

m4-1.4.14.tar.gz

autoconf-2.13.tar.gz   或者 autoconf-2.59.tar.gz

automake-1.9.6.tar.gz

安裝順序:

安裝順序是M4 ->  autoconf  -> automake  (很重要!!!!)

每個檔案的安裝:

tar -xzvf *.tar.gz  

cd 到對於的解壓後的資料夾:

./configure --prefix=/op/你的目錄---------------你的安裝目錄

make

make install

完了之後再配置好路徑:

下面是會遇到的問題......以及解決方法(自己搞的..僅供參考)

注意在安裝M4的時候會出現一個bug:

/m4-1.4.14/src/path.c:118: undefined reference to `S_ISDIR'的錯誤

據說這個bug是原始碼包的bug......

解決方案:vi ./m4-1.4.14/src/path.c 在#include”m4.h” 後新增:

#include”sys/stat.h”----再安裝m4就ok.....

安裝了m4後,然後再安裝autoconf:

我這裡試了兩個版本:autoconf-2.13.tar.gz   和  autoconf-2.59.tar.gz

一、安裝第一個autoconf-2.13.tar.gz後,然後再/etc/bash.bashrc中新增路徑,然後在,source一下配置檔案。

二、在安裝automake時遇到了問題:

checking whether autoconf is installed... yes

checking whether autoconf works... no

configure: error: The installed version of autoconf does not work.

     Please check config.log for error messages before this one.

上面呢的問題是檢測到已經安裝了autoconf但是沒有正常工作....在網上跑了一大圈,還是沒找到具體的解決方案,只能用下策了,換了一個autoconf的版本

我換用了autoconf-2.59.tar.gz ,一下就ok.....

上面的資源都會上傳,但是由於我下載時需要一點積分,因而,見諒各位,我也要點積分...諒解