自定义.m4宏无法与config.ac一起使用



我正试图通过让安装w/a.configure脚本变得更容易,将一个神秘的科学F77程序更新到现代世界。然而,事实证明,这比宣传的要困难得多。我正在把这个程序拖到21世纪,它需要SuperMongo绘图库,我正试图弄清楚如何让Automake为必要的SuperMongo库(libplotsub.a、libdevices.a和libutils.a)找到正确的路径(https://github.com/Acetylene5/autoconf_testing)。

主程序是test.f,并调用垃圾.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在sm库的位置使用的令牌supermongo例程):

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查看这个目录,或者可能使用命令行变量将目录传递到这里,有什么建议吗?

如果你需要更多信息,请告诉我。

Casey

autoconf不会为您查找库,但它生成的configure脚本会为您查找。如果您希望configure脚本在/usr/local/misc/sm/sm2_4_36/lib/中查找,您使用的机制将取决于您的系统,但为形式为LDFLAGS=-L/usr/local/misc/sm/sm2_4_36/lib/的配置脚本提供参数是非常常见的。您可能还需要在CPPFLAGS中添加一个类似的-I子句来查找头文件。

相关内容

  • 没有找到相关文章

最新更新