我使用的autoconf檢測Boost庫,與之相配套的autoconf-archive macros,他們正常工作與全系統的Boost庫,但失敗,如果我手工編譯升壓在我的主目錄:爲什麼autoconf沒有正確檢測到提升?
[email protected]:~/devel/spectra2$ ./configure --with-boost=/home/sb/local/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
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 ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for boostlib >= 1.31.0... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... no
checking for exit in -lboost_filesystem... (cached) no
checking for exit in -lboost_filesystem... (cached) no
configure: error: Could not link against boost_filesystem !
,你可以看,它檢測到一些庫很好,但它與boost文件系統失敗。這些是〜/ local/lib的內容:
[email protected]:~$ ls -1 /home/sb/local/lib/
libboost_filesystem.a
libboost_filesystem.so
libboost_filesystem.so.1.42.0
libboost_program_options.a
libboost_program_options.so
libboost_program_options.so.1.42.0
libboost_system.a
libboost_system.so
libboost_system.so.1.42.0
libboost_thread.a
libboost_thread.so
libboost_thread.so.1.42.0
所以圖書館就在那裏。我試着用boost-1.39和boost-1.42都沒有不同的結果,爲什麼會出現這種情況?我忘了什麼嗎?
你的猜測是正確的:boost-system已經安裝,並且在configure.ac中有一個檢查,但它是在檢查boost-filesystem之後檢查的。如果我切換訂單,一切都按預期工作。這也是autoconf-archive中的一個小文檔問題 – Kjir 2010-03-05 11:20:05
@Dmitry Yudakov請提供您的聲明的鏈接/參考。 – Qsiris 2013-08-23 07:34:51