最近在研究 C語言的單元測試框架,有CUnit、Check 和 CMockery;
而安裝 Cmockery的時候出現錯誤:automake-1.9' is missing on your system
安裝atuomake步驟如下:
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz
tar -fvx autoconf-2.61.tar.gz
cd autoconf-2.61
./configure
sudo make
sudo make install
完成後,安裝cMockery,成功。
之前在安裝 Cunit的時候又出現,autoheader 不是有效地shell命令,安裝好automake工具後,這個錯誤也沒有了。
好奇心起,下面來看看automake到底是幹嘛的?和autoheader有啥關係喲?
GNU Automake
是一種編程工具,可以產生供make程式使用的Makefile,用來編譯程式。它是自由軟件基金會所所製作的GNU程式的其中一項,作爲GNU建構系統的一部分。automake所產生的Makefile符合GNU編程標準。
automake是由Perl語言所寫的,必須和GNU autoconf一併使用。automake包含了以下命令:
aclocal
automake
aclocal是個泛用的程式,對於autoconf使用者是相當有用的。
這裏有詳細的介紹,我就不復制、粘貼了:http://www.linuxforum.net/books/automake.html