【发布时间】:2014-03-27 18:34:44
【问题描述】:
我正在尝试使用 autoconf(2.69 版)生成一个配置脚本,该脚本能够检测 boost 并为 R 包生成 Makevars 文件。
我正在使用来自 autoconf-archive 的 AX_BOOST_BASE 宏,如 here 所述。
当我运行配置脚本时,我收到以下错误:
./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 "." "./.." "./../.."
我的configure.ac文件如下:
AC_INIT([prjname], [0.1], [email@address.net])
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
如果没有AX_BOOST_BASE(... 行,配置脚本将成功终止。我的aclocal.m4如下
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])
我是一名 autotools 新手,但我觉得只有在使用 automake 时才需要 install-sh。 AX_BOOST_BASE 是否希望您使用 automake 而不仅仅是 autoconf 还是我有其他问题?
【问题讨论】:
-
迟到总比不到好 - 但我建议使用tsuna - boost.m4 来增强与自动工具的集成。它会定期更新(截至此日期),并提供系统/附加/mt 和调试版本的选项。
-
非常感谢 - 我会试一试
标签: c++ boost autotools autoconf