hliu
hliu

Reputation: 1047

How to regenerate configure file using autoconf?

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)'

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/.


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.

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

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.

Upvotes: 4

Views: 4034

Answers (1)

hliu
hliu

Reputation: 1047

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.

Upvotes: 6

Related Questions