How to recover a configuration file using autoconf?

I use autoconf to restore the configuration file, it works. But when I execute the generated configuration file with ./configure, there are some error messages such as

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

I googled and found that it blasis a library, but still provides error messages after installation. I have autoconf to version " autoconf (GNU Autoconf) 2.69" installed on my the Mac, and what I try to compile, is the source of the R https://svn.r-project.org/R/.


I ran autoconf -f and autoreconf -f to try to recover a configuration file that was generated successfully. But when I started ./configure, the error will repeat.

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

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

Does this mean when I run autoconf or autoreconf, I skip something to tell him about the existence of m4 / R.m4?

I’ve been stuck here for almost three days, any tips will be appreciated. Many thanks.

+4
source share
1 answer

I seem to have solved this problem. I reinstall gnu m4 with help brew install m4and the problem is resolved. After starting, autoreconf -i -fI can get the correct configuration file, and the source R can be compiled. Maybe this is the wrong version of m4 I received on Mac.

+4

All Articles