我正在尝试通过使用.configure脚本更容易地安装来更新一个神秘的科学F77程序以适应现代世界。然而,事实证明,这比宣传的要困难得多。我拖入21世纪的程序需要SuperMongo绘图库,我正在尝试弄清楚如何让SuperMongo找到必要的github库(libplotsub.a、libdevices.a和libutils.a)的正确路径,而不是让您查看代码的核心,我创建了一个框架github存储库(https://github.com/Acetylene5/autoconf_testing)。
主程序是test.f,它调用junk.f文件。这两个文件都包含Stuff.com公共块。F文件调用两个函数:一个(dcopy)来自LAPACK库,另一个(drawcurs)来自SuperMongo程序。我这样做的原因是因为这个程序我快进了石器时代,使用了这两个库。
我在interwebs上发现了一个LAPACK宏(ax_lapack.m4),它似乎可以在我的系统上找到LAPACK库。我尝试将此.m4文件复制到ax_supermongo.m4,并更改必要的名称和目录。但是,我不是M4专家,所以我不知道这是不是在做我想做的事情。我不这么认为,因为如果您查看./configure的输出,它似乎没有找到sm_graphics文件( ax_supermongo.m4使用的标记supermongo例程到SM库的位置):
deen@aida44170:~/Code/FORTRAN/testing/autoconf/master> autoreconf -i
deen@aida44170:~/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/local/misc/sm/sm2_4_36/lib/
关于如何让autoconf查看此目录,或者可能使用命令行变量传递此目录,有什么建议吗?
如果你需要更多的信息,请告诉我。
凯西
发布于 2013-08-04 10:37:29
autoconf不会尝试为您查找这些库,但它生成的configure脚本会这样做。如果希望configure脚本在/usr/local/misc/sm/sm2_4_36/lib/中查找,所使用机制将取决于您的系统,但是为LDFLAGS=-L/usr/local/misc/sm/sm2_4_36/lib/形式的配置脚本提供参数是非常常见的。您可能还需要向CPPFLAGS添加一个类似的-I子句来查找头文件。
https://stackoverflow.com/questions/17911489
复制相似问题