wjastle
wjastle

Reputation: 187

autoconf boost detection with AX_BOOST_BASE

I am trying to use autoconf (ver 2.69) to generate a configure script capable of detecting boost and generating a Makevars file for an R package.

I am using the AX_BOOST_BASE macro from autoconf-archive as documented here.

When I run the configure script I obtain the following error:

./configure
checking whether the C++ compiler works... yes
checking for C++ 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 C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gsl-config... /usr/local/bin/gsl-config
checking for GSL - version >= 1.12... yes
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

My configure.ac file is as follows:

AC_INIT([prjname], [0.1], [[email protected]])
AC_CONFIG_MACRO_DIR([m4])

: ${R_HOME=`R RHOME`}
if test -z "${R_HOME}"; then
    AC_MSG_ERROR([Could not determine R_HOME])
fi

CXX=`"${R_HOME}/bin/R" CMD config CXX`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`

AC_LANG([C++])
AX_PATH_GSL([1.12], [], AC_MSG_ERROR([Could not find a useful version of GSL]))
AX_BOOST_BASE([1.41], [], AC_MSG_ERROR([Could not find a useful version of boost]))
AC_OPENMP

AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT

Without the AX_BOOST_BASE(... line the configure script terminates successfully. My aclocal.m4 as follows

m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([m4/ax_boost_base.m4])
m4_include([m4/gsl.m4])

I am an autotools novice, but I get the impression that install-sh is required only when one is using automake. Does AX_BOOST_BASE expect you are using automake rather than just autoconf or do I have another problem?

Upvotes: 3

Views: 1802

Answers (1)

Keinstein
Keinstein

Reputation: 357

configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

This indicates that some files are missing which are usually generated by autotools.

Try to run autoreconf -i -f before configure.

Upvotes: 1

Related Questions