我是一個Windows XP(SP3)用戶,並且是Linux公用程序的新成員。 我需要使用autoconf和linux.I的其他自動工具。我的系統中安裝了以下軟件。使用Linux的汽車工具
-Msys版本1.0.11 -msysDTK-1.0.1 -msysgit -wget-1.11.4-1 -autoconf-2.68 -automake-1.11.1 -libtool-2.4.1 - libcrypt-1.1 -perl-5.8.8 -m4-1.4.14 -gettext-runtime_0.18.1.1-2_win32 -glib_2.28.1-1_win32 -glib_2.28.8-1_win32 -pkg-config_0.23- 3_win32 -pkg-config-dev_0.23-3_win32
我試過了教程的 「Introduction to自動工具」 從http://www.dwheeler.com/autotools Configure.ac用以下行創建的,
AC_INIT([hello], [0.01])
AC_OUTPUT
從MSYS殼,運行的命令
$ autoreconf -i
我得到了下面的日誌,
/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AU
TOOPTS
/usr/share/aclocal/autoopts.m4:22: run info '(automake)Extending aclocal'
/usr/share/aclocal/autoopts.m4:22: or see http://sources.redhat.com/automake/a
utomake.html#Extending-aclocal
我以前嘗試從網上其他存檔教程,即 與一個名爲hello-initial的目錄。 'hello-initial'有一個包含hello.c和hello.h的src目錄。 我使用以下行創建了Makefile.am:
SUBDIRS = src。
在src目錄,創建Makefile.am下列行,
helloprgdir=../
helloprg_PROGRAMS=hello
hello_SOURCES=hello.c
我光盤版在MSYS下的hello-初始目錄外殼,並遵循的教程,和下面的日誌,製作即,
[email protected]_1 ~
$ cd /gold/hello-initial
[email protected]_1 /gold/hello-initial
$ autoscan
[email protected]_1 /gold/hello-initial
$ aclocal
/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AU
TOOPTS
/usr/share/aclocal/autoopts.m4:22: run info '(automake)Extending aclocal'
/usr/share/aclocal/autoopts.m4:22: or see http://sources.redhat.com/automake/a
utomake.html#Extending-aclocal
configure.ac:8: warning: macro `AM_CONFIG_HEADERS' not found in library
[email protected]_1 /gold/hello-initial
$ automake -ac
configure.ac:7: installing `./install-sh'
configure.ac:7: installing `./missing'
automake: no `Makefile.am' found for any configure output.
PL幫助。 RGDS,
請,做自己和世界一個忙不要使用自動工具。例如,使用CMake來代替。 – zvrba 2012-04-16 11:10:37
+1表示轉換到CMake。 Autotools更像是autohell。當然,除非你被迫使用它們(例如貢獻給Gnome平臺)...... – 2012-04-16 11:27:48