[Genabel-commits] r991 - branches/ProbABEL-refactoring/ProbABEL
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 29 21:58:33 CET 2012
Author: lckarssen
Date: 2012-10-29 21:58:32 +0100 (Mon, 29 Oct 2012)
New Revision: 991
Modified:
branches/ProbABEL-refactoring/ProbABEL/configure.ac
Log:
ProbABEL refactoring branch: Added check for the Eigen library to autoconf. Building using Eigen is now default. To disable use ./configure --disable-eigen
At the moment it checks for Eigen/Dense and Eigen/LU. If we include other headers as well, these should be added to the appropriate AC_CHECK_HEADERS line.
The default include path for Eigen is /usr/include/eigen3, this is where Debian/Ubuntu installs the files when installing the libeigen3-dev. To specify another path use ./configure --with-eigen-include-path=/your/path/to/eigen.
Modified: branches/ProbABEL-refactoring/ProbABEL/configure.ac
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/configure.ac 2012-10-29 12:11:27 UTC (rev 990)
+++ branches/ProbABEL-refactoring/ProbABEL/configure.ac 2012-10-29 20:58:32 UTC (rev 991)
@@ -28,8 +28,47 @@
# Checks for header files.
AC_FUNC_ALLOCA
-AC_CHECK_HEADERS([float.h inttypes.h libintl.h limits.h stddef.h stdint.h stdlib.h string.h sys/param.h wchar.h wctype.h])
+AC_CHECK_HEADERS([float.h inttypes.h libintl.h limits.h stddef.h \
+ stdint.h stdlib.h string.h sys/param.h wchar.h wctype.h])
+
+# See if we want use of the Eigen library enabled (yes by default) and if so,
+# whether we can find the library files.
+AC_ARG_ENABLE([eigen],
+ [AS_HELP_STRING([--enable-eigen], [Use the Eigen template library for fast \
+ linear algebra (Eigen can be downloaded \
+ from eigen.tuxfamily.org). This is enabled \
+ by default])],
+ [eigen=${enableval}],
+ [eigen=yes])
+
+if test "x$eigen" = "xyes"; then
+ AC_MSG_NOTICE([building using the Eigen headers enabled])
+
+ AC_ARG_WITH([eigen-include-path],
+ [AS_HELP_STRING([--with-eigen-include-path],
+ [location of the Eigen headers, defaults to /usr/include/eigen3])],
+ [CXXFLAGS+=" -I${withval} -DEIGEN"],
+ [CXXFLAGS+=' -I/usr/include/eigen3 -DEIGEN'
+ CPPFLAGS+=' -I/usr/include/eigen3'])
+ dnl AC_SUBST([EIGEN_CFLAGS])
+
+ # Check for the EIGEN header files
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADERS([Eigen/Dense Eigen/LU])
+ AC_LANG_POP([C++])
+
+ if test x$ac_cv_header_Eigen_Dense = xno; then
+ AC_MSG_ERROR([Could not find the Eigen header files. Did you specify \
+--with-eigen-include-path correctly? Or use --disable-eigen \
+to disable use of fast linear algebra.])
+ fi
+else
+ AC_MSG_NOTICE([not using Eigen for linear algebra])
+fi
+AM_CONDITIONAL([WITH_EIGEN], test "x$eigen" = "xyes")
+
+
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
@@ -44,7 +83,7 @@
# Check if we can use large (>2GB) files on 32 bit platforms
AC_SYS_LARGEFILE
if test $ac_cv_sys_file_offset_bits != 'no'; then
- CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+ CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
fi
AC_FUNC_FSEEKO
@@ -61,9 +100,9 @@
# Since pacoxph is buggy it needs to be enabled explixitly
AC_ARG_ENABLE([pacoxph],
- [ --enable-pacoxph build the pacoxph binary (still contains lots of bugs)],
- [pacoxph=${enableval}],
- [pacoxph=no])
+ [AS_HELP_STRING([--enable-pacoxph], [build the pacoxph binary (still contains lots of bugs)])],
+ [pacoxph=${enableval}],
+ [pacoxph=no])
if test "x$pacoxph" = "xyes"; then
AC_MSG_NOTICE([building of pacoxph is enabled])
More information about the Genabel-commits
mailing list