[Genabel-commits] r1847 - pkg/OmicABELnoMM

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 24 15:21:30 CEST 2014


Author: lckarssen
Date: 2014-10-24 15:21:29 +0200 (Fri, 24 Oct 2014)
New Revision: 1847

Modified:
   pkg/OmicABELnoMM/configure.ac
Log:
Add check for the Boost math library to OmicABELnoMM's configure.ac. If the libraries are installed in /usr/include/boost/ they will be detected automatically, else a warning is displayed.
The user can specify an alternative path using the --with-boost-include-path option to ./configure.


Modified: pkg/OmicABELnoMM/configure.ac
===================================================================
--- pkg/OmicABELnoMM/configure.ac	2014-10-24 10:25:39 UTC (rev 1846)
+++ pkg/OmicABELnoMM/configure.ac	2014-10-24 13:21:29 UTC (rev 1847)
@@ -93,6 +93,32 @@
 AC_FUNC_MALLOC
 AC_CHECK_FUNCS([clock_gettime gettimeofday memset])
 
+
+# Add an option to ./configure that allows the user to specify a path
+# to the Boost headers, also include the default Boost path to the
+# compiler flags.
+AC_ARG_WITH([boost-include-path],
+   [AS_HELP_STRING([--with-boost-include-path],
+      [location of the Boost math headers, defaults to /usr/include/boost/]
+      )
+    ],
+   [CXXFLAGS+=" -I${withval}"
+    CPPFLAGS+=" -I${withval}"],
+   [CXXFLAGS+=' -I/usr/include/boost/'
+    CPPFLAGS+=' -I/usr/include/boost/']
+)
+
+# Check for the Boost Math header files; this uses a compile check, so
+# make sure C++ is selected first.
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADER([math/distributions.hpp],
+  [],
+  [AC_MSG_ERROR([Could not find the Boost Math header files, did you \
+specify the --with-boost-include-path option correctly?])]
+)
+AC_LANG_POP([C++])
+
+
 # The user can disable building of the PDF of the manual, for example
 # if the required LaTeX packages are not installed
 AC_ARG_ENABLE([latex-doc],



More information about the Genabel-commits mailing list