如何使用autoconf重新生成配置文件? [英] How to regenerate configure file using autoconf?

查看:362
本文介绍了如何使用autoconf重新生成配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用autoconf重新生成配置文件,它可以工作.但是,当我通过./configure执行生成的配置文件时,会出现一些错误消息,例如

I use autoconf to regenerate the configure file, it works. But when I execute the generated configure file by ./configure, there are some error messages like

./configure: line 3713: syntax error near unexpected token `blas'
./configure: line 3713: `  withval=$with_blas; R_ARG_USE(blas)'

我用Google搜索,发现blas是一个库,但是安装后它仍然给出错误消息.我在Mac上安装了版本为autoconf (GNU Autoconf) 2.69的autoconf,我要编译的是R源https://svn.r-project.org/R/.

I googled and found that blas is a library, but it still gives the error messages after installing. I have the autoconf with version "autoconf (GNU Autoconf) 2.69" installed on my Mac, and what I am trying to compile is the R source https://svn.r-project.org/R/.

我已经运行了autoconf -f和autoreconf -f来尝试重新生成已成功生成的配置文件.但是,当我运行./configure时,错误再次发生.

I have run both autoconf -f and autoreconf -f to try to regenerate configure file which has been generated successfully. But, when I run ./configure the error happens again.

错误消息显示syntax error near unexpected token blaswithval=$with_blas; R_ARG_USE(blas).我认为问题可能出在未知功能R_ARG_USE上.我在代码库中grep R_ARG_USE,发现它已在文件m4/R.m4中定义:

The error messages say syntax error near unexpected token blas and withval=$with_blas; R_ARG_USE(blas). I think the problem maybe the unknown function R_ARG_USE. I grep R_ARG_USE in the code base and find that it is defined in the file m4/R.m4:

AC_DEFUN([R_ARG_USE],
[if test "${withval}" = no; then
  use_$1=no
else
  use_$1=yes
fi
])# R_ARG_USE

这是否意味着当我运行autoconf或autoreconf时,我错过了一些东西来让它知道m4/R.m4的存在?

Does that mean when I am running autoconf or autoreconf I miss something to let it know the existence of m4/R.m4 ?

我被困在这里将近三天,任何帮助将不胜感激.非常感谢.

I have been stuck here for almost three days, any helps will be appreciated. Thanks a lot.

推荐答案

看来我已经解决了这个问题.我使用brew install m4重新安装了gnu m4,问题已解决. 运行autoreconf -i -f后,我可以获得正确的配置文件,并且可以编译R源. 也许是我在Mac中安装的m4版本不正确.

It seems I have solved this problem. I reinstall the gnu m4 using brew install m4 and the problem solved. After running autoreconf -i -f, I can get the correct configure file and the R source can be compiled. Maybe it's the wrong version m4 I have got in Mac.

这篇关于如何使用autoconf重新生成配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆