我試圖通過使安裝w/a .configure腳本變得更容易來更新一個神祕的科學F77程序到現代世界。然而,這已被證明比宣傳更困難。我正在拖拽並尖叫到21世紀的程序需要SuperMongo繪圖庫,我想弄清楚如何讓Automake找到必要的SuperMongo庫的正確路徑(libplotsub.a,libdevices.a和libutils.a)我沒有讓你友善的看着代碼的膽量,而是創建了一個框架github倉庫(https://github.com/Acetylene5/autoconf_testing)。自定義.m4宏不能與configure.ac配合使用
主程序是test.f,並調用junk.f文件。這兩個文件都包含Stuff.com公共塊。文件junk.f調用兩個函數:一個(dcopy)來自LAPACK庫,另一個(drawcurs)來自SuperMongo程序。我這樣做的原因是因爲這個快速轉入石器時代的程序使用了這些庫。
我在interwebs上找到了一個LAPACK宏(ax_lapack.m4),它似乎在我的系統上找到了LAPACK庫。我試圖將這個.m4文件複製到ax_supermongo.m4,並更改必需的名稱和目錄。不過,我不是M4專家,所以我不知道這是否正在做我想做的事。我不這麼認爲,因爲如果你看看./configure的輸出,它似乎沒有找到sm_graphics文件(ax_supermongo.m4用於SM庫位置的令牌超聲波例程):
[email protected]:~/Code/FORTRAN/testing/autoconf/master> autoreconf -i
[email protected]:~/Code/FORTRAN/testing/autoconf/master> ./configure
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether the Fortran 77 compiler works... yes
checking for Fortran 77 compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... no
checking whether /usr/local2/misc/iraf/iraf/unix/hlib/f77.sh accepts -g... yes
checking for style of include used by make... GNU
checking for gcc... gcc
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... none
checking for sgemm_... no
checking for ATL_xerbla in -latlas... no
checking for sgemm_ in -lblas... yes
checking for dgemm_ in -ldgemm... no
checking for sgemm_ in -lmkl... no
checking for sgemm_... (cached) no
checking for sgemm_ in -lcxml... no
checking for sgemm_ in -ldxml... no
checking for sgemm_ in -lscs... no
checking for sgemm_ in -lcomplib.sgimath... no
checking for sgemm_ in -lblas... (cached) yes
checking for sgemm_ in -lessl... no
checking for sgemm_ in -lblas... (cached) yes
checking build system type... x86_64-suse-linux-gnu
checking host system type... x86_64-suse-linux-gnu
checking how to get verbose linking output from /usr/local2/misc/iraf/iraf/unix/hlib/f77.sh... configure: WARNING: cannot determine how to obtain linking information from /usr/local2/misc/iraf/iraf/unix/hlib/f77.sh
checking for Fortran 77 libraries of /usr/local2/misc/iraf/iraf/unix/hlib/f77.sh...
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, extra underscore
checking for cheev_... no
checking for cheev_ in -llapack... yes
checking for sm_graphics__... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
在我的系統中,Supermongo庫駐留在:在/ usr /本地/其它/ SM/sm2_4_36/lib中/
如何讓autoconf的尋找到這個目錄,或者可能使用任何建議一命令行變量在這裏傳遞目錄?
如果您需要更多信息,請讓我知道。
凱西
如果這是Linux/HPUX-11/Solaris/AIX系統,請嘗試將LD_LIBRARY_PATH設置爲指向您的庫目錄。推測這是一個.so或.sl。它可能已經有了值,所以只是在它之前。 – cup
請務必使用標籤[tag:fortran],並在必要時添加版本以區分您的問題是否具體。例如,您不能使用Fortran 2008,而只能使用Fortran 90。 –