[Rsiena-commits] r311 - in pkg/RSienaTest: . src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Sep 4 13:35:12 CEST 2017
Author: fschoenen
Date: 2017-09-04 13:35:11 +0200 (Mon, 04 Sep 2017)
New Revision: 311
Modified:
pkg/RSienaTest/ChangeLog
pkg/RSienaTest/DESCRIPTION
pkg/RSienaTest/configure
pkg/RSienaTest/configure.ac
pkg/RSienaTest/src/Makevars.in
Log:
configure.ac check for openmp
Modified: pkg/RSienaTest/ChangeLog
===================================================================
--- pkg/RSienaTest/ChangeLog 2017-09-04 10:33:04 UTC (rev 310)
+++ pkg/RSienaTest/ChangeLog 2017-09-04 11:35:11 UTC (rev 311)
@@ -1,3 +1,7 @@
+2017-09-04 R-Forge Revision 311
+Changes in RSienaTest:
+ * configure.ac: add openmp test for macOS El Capitan compatibility
+
2017-09-03 R-Forge Revision 310 / package version 1.2-2
Changes in RSiena and RSienaTest:
* Score test and sienaGOF corrected for the case that some parameters are
Modified: pkg/RSienaTest/DESCRIPTION
===================================================================
--- pkg/RSienaTest/DESCRIPTION 2017-09-04 10:33:04 UTC (rev 310)
+++ pkg/RSienaTest/DESCRIPTION 2017-09-04 11:35:11 UTC (rev 311)
@@ -2,7 +2,7 @@
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
Version: 1.2-2
-Date: 2017-09-03
+Date: 2017-09-04
Author: Ruth Ripley, Krists Boitmanis, Tom A.B. Snijders, Felix Schoenenberger
Depends: R (>= 2.15.0), utils
Imports: Matrix, tcltk, lattice, parallel, MASS, RUnit, methods
Modified: pkg/RSienaTest/configure
===================================================================
--- pkg/RSienaTest/configure 2017-09-04 10:33:04 UTC (rev 310)
+++ pkg/RSienaTest/configure 2017-09-04 11:35:11 UTC (rev 311)
@@ -620,10 +620,11 @@
#endif"
ac_subst_vars='LTLIBOBJS
+PKG_SOURCES
PKG_LIBS
PKG_CPPFLAGS
-PKG_SOURCES
ORTED
+OPENMP_CFLAGS
LIBOBJS
EGREP
GREP
@@ -680,6 +681,7 @@
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_openmp
with_mpi_include_path
with_mpi_lib_path
with_mpi_type
@@ -1313,6 +1315,12 @@
esac
cat <<\_ACEOF
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-openmp do not use OpenMP
+
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
@@ -2254,7 +2262,17 @@
-# Checks (autoscan) {{{1
+# Find R home and set CC/CFLAGS. This is required for the custom openmp test.
+R_HOME=`R RHOME`
+if test -z "${R_HOME}"; then
+ as_fn_error $? "could not determine R_HOME" "$LINENO" 5
+fi
+RBIN="${R_HOME}/bin/R"
+CC=`"${RBIN}" CMD config CC`;
+CFLAGS=`"${RBIN}" CMD config CFLAGS`
+LIBS="${PKG_LIBS}"
+
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3301,7 +3319,6 @@
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Checks for header files
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -3713,7 +3730,6 @@
done
-# Checks for typedefs, structures, and compiler characteristics
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
if ${ac_cv_header_stdbool_h+:} false; then :
@@ -3910,7 +3926,6 @@
fi
-# Checks for library functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
$as_echo_n "checking for error_at_line... " >&6; }
if ${ac_cv_lib_error_at_line+:} false; then :
@@ -4143,78 +4158,199 @@
done
-# Args (mpi discovery) {{{1
+##
+## OpenMP
+##
+## Based on the autoconf.ac from the `randomForestSRC` package.
+##
+
+ OPENMP_CFLAGS=
+ # Check whether --enable-openmp was given.
+if test "${enable_openmp+set}" = set; then :
+ enableval=$enable_openmp;
+fi
+
+ if test "$enable_openmp" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5
+$as_echo_n "checking for $CC option to support OpenMP... " >&6; }
+if ${ac_cv_prog_c_openmp+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifndef _OPENMP
+ choke me
+#endif
+#include <omp.h>
+int main () { return omp_get_num_threads (); }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_prog_c_openmp='none needed'
+else
+ ac_cv_prog_c_openmp='unsupported'
+ for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
+ -Popenmp --openmp; do
+ ac_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $ac_option"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifndef _OPENMP
+ choke me
+#endif
+#include <omp.h>
+int main () { return omp_get_num_threads (); }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_prog_c_openmp=$ac_option
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS=$ac_save_CFLAGS
+ if test "$ac_cv_prog_c_openmp" != unsupported; then
+ break
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5
+$as_echo "$ac_cv_prog_c_openmp" >&6; }
+ case $ac_cv_prog_c_openmp in #(
+ "none needed" | unsupported)
+ ;; #(
+ *)
+ OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;;
+ esac
+ fi
+
+
+
+ac_pkg_openmp=no
+if test -n "${OPENMP_CFLAGS}"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenMP will work in a package" >&5
+$as_echo_n "checking whether OpenMP will work in a package... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <omp.h>
+int
+main ()
+{
+return omp_get_num_threads();
+
+ ;
+ return 0;
+}
+_ACEOF
+ PKG_CFLAGS="${OPENMP_CFLAGS}" PKG_LIBS="${OPENMP_CFLAGS}" "$RBIN" CMD SHLIB conftest.c 1>&5 2>&5 \
+ && "$RBIN" --vanilla -q -e "dyn.load(paste('conftest',.Platform\$dynlib.ext,sep=''))" 1>&5 2>&5 \
+ && ac_pkg_openmp=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pkg_openmp}" >&5
+$as_echo "${ac_pkg_openmp}" >&6; }
+fi
+
+# If ${ac_pkg_openmp} = "yes" then we have OMP, otherwise it will be "no".
+if test "${ac_pkg_openmp}" = no; then
+ OPENMP_CFLAGS=''
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenMP does NOT appear to be supported on this system." >&5
+$as_echo "$as_me: WARNING: OpenMP does NOT appear to be supported on this system." >&2;}
+else
+ OPENMP_CFLAGS="$OPENMP_CFLAGS -DHAVE_OPENMP"
+fi
+
+
+
+##
+## MPI
+##
+## Based on the autoconf.ac from the Rmpi package
+## <http://www.stats.uwo.ca/faculty/yu/Rmpi/>.
+##
MPI=yes
+# mpi discovery by argument or environment
+
+if test -n "${MPI_INCLUDE_PATH}" ; then
+ MPI_INCLUDE_PATH="${MPI_INCLUDE_PATH}"
+ echo "Setting MPI include path from MPI_INCLUDE_PATH"
+fi
+
+if test -n "${MPI_LIB_PATH}" ; then
+ MPI_LIB_PATH="${MPI_LIB_PATH}"
+ echo "Setting MPI lib path from MPI_LIB_PATH"
+fi
+
+if test -n "${MPI_TYPE}" ; then
+ MPI_TYPE="${MPI_TYPE}"
+ echo "Setting MPI type from MPI_TYPE"
+fi
+
+
# Check whether --with-mpi-include-path was given.
if test "${with_mpi_include_path+set}" = set; then :
- withval=$with_mpi_include_path; if test "${withval}" != "no" ; then
- MPI_INCLUDE_PATH="${withval}"
- if test ! -f "${MPI_INCLUDE_PATH}/mpi.h"; then
- as_fn_error $? "Value of --with-include-path does not contain mpi.h" "$LINENO" 5
- fi
- else
- if test -n "${MPI_INCLUDE_PATH}" ; then
- MPI_INCLUDE_PATH="${MPI_INCLUDE_PATH}"
- if test ! -f "${MPI_INCLUDE_PATH}/mpi.h"; then
- as_fn_error $? "Value of MPI_INCLUDE_PATH does not contain mpi.h" "$LINENO" 5
- fi
- echo "Setting MPI include path from MPI_INCLUDE_PATH"
- fi
- fi
+ withval=$with_mpi_include_path;
+ if test "${withval}" != "no" ; then
+ MPI_INCLUDE_PATH="${withval}"
+ fi
+
fi
# Check whether --with-mpi-lib-path was given.
if test "${with_mpi_lib_path+set}" = set; then :
- withval=$with_mpi_lib_path; if test "${withval}" != "no" ; then
- MPI_LIB_PATH="${withval}"
- else
- if test -n "${MPI_LIB_PATH}" ; then
- MPI_LIB_PATH="${MPI_LIB_PATH}"
- echo "Setting MPI lib path from MPI_LIB_PATH"
- fi
- fi
+ withval=$with_mpi_lib_path;
+ if test "${withval}" != "no" ; then
+ MPI_LIB_PATH="${withval}"
+ fi
+
fi
+
+# Check whether --with-mpi-type was given.
+if test "${with_mpi_type+set}" = set; then :
+ withval=$with_mpi_type;
+ if test "${withval}" != "no" ; then
+ MPI_TYPE="${withval}"
+ fi
+
+fi
+
+
if test -n "${MPI_INCLUDE_PATH}" -a -n "${MPI_LIB_PATH}" ; then
+ if test ! -f "${MPI_INCLUDE_PATH}/mpi.h"; then
+ as_fn_error $? "Value of MPI_INCLUDE_PATH does not contain mpi.h" "$LINENO" 5
+ fi
MPI_INCLUDES="-I${MPI_INCLUDE_PATH}"
MPI_LIBS="-L${MPI_LIB_PATH}"
elif test -n "${MPI_INCLUDE_PATH}" -o -n "${MPI_LIB_PATH}" ; then
as_fn_error $? "Must specify both the include and lib path" "$LINENO" 5
fi
-
-# Check whether --with-mpi-type was given.
-if test "${with_mpi_type+set}" = set; then :
- withval=$with_mpi_type; if test "${withval}" != "no" ; then
- MPI_TYPE="${withval}"
- else
- if test -n "${MPI_TYPE}" ; then
- MPI_TYPE="${MPI_TYPE}"
- echo "Setting MPI type from MPI_TYPE"
- fi
- fi
-fi
-
-
+# auto configure if not set by user
if test -z "${MPI_INCLUDE_PATH}" ; then
# Check whether --with-mpi-root was given.
if test "${with_mpi_root+set}" = set; then :
- withval=$with_mpi_root; if test "${withval}" != "no" ; then
- MPI_ROOT="${withval}"
- MPI_INCLUDE_PATH="${MPI_ROOT}/include"
- MPI_LIB_PATH="${MPI_ROOT}/lib"
- fi
+ withval=$with_mpi_root;
+ if test "${withval}" != "no" ; then
+ MPI_ROOT="${withval}"
+ MPI_INCLUDE_PATH="${MPI_ROOT}/include"
+ MPI_LIB_PATH="${MPI_ROOT}/lib"
+ fi
+
fi
if test -z "$MPI_ROOT" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi root directory" >&5
+ # auto configure MPI_ROOT, (MPI_TYPE, MPI_INCLUDE_PATH)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi root directory" >&5
$as_echo_n "checking for mpi root directory... " >&6; }
for d in /opt/lib /usr/lib /usr /usr/local/lib /usr/local \
/usr/lib64/mpi/gcc/openmpi; do
@@ -4276,7 +4412,8 @@
fi
if test -n "$MPI_ROOT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5
+ # auto configure MPI_INCLUDE_PATH
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5
$as_echo_n "checking for mpi.h... " >&6; }
for d in include include/openmpi include/lam ; do
if test -f ${MPI_ROOT}/$d/mpi.h ; then
@@ -4428,6 +4565,8 @@
$as_echo "$MPI_LIB_PATH" >&6; }
fi
fi
+
+# end auto configure type
if test -z $MPI_TYPE ; then
if test -d ${MPI_ROOT}/openmpi; then MPI_TYPE="OPENMPI"
elif test -d ${MPI_ROOT}/lib/openmpi; then MPI_TYPE="OPENMPI"
@@ -4626,18 +4765,10 @@
MPI_DEFS="$MPI_DEFS -DMAC"
fi
-<<<<<<< .mine
if test "$MPI" = "yes" ; then
PKG_CPPFLAGS="$MPI_INCLUDES $MPI_DEFS"
-||||||| .r305
-PKG_CPPFLAGS="$MPI_INCLUDES $MPI_DEFS"
-=======
->>>>>>> .r309
-
- PKG_CPPFLAGS="$MPI_INCLUDES $MPI_DEFS"
-
case "$MPI_TYPE" in
OPENMPI) PKG_LIBS="-lmpi_cxx -lmpi ${MPI_LIBS}";;
LAM) PKG_LIBS="-lmpi_cxx -llam ${MPI_LIBS}";;
@@ -4655,10 +4786,11 @@
PKG_LIBS=
fi
-PKG_SOURCES=$(cat src/sources.list)
+# substitute externalized source list
+PKG_SOURCES=$(cat src/sources.list)
ac_config_files="$ac_config_files src/Makevars"
Modified: pkg/RSienaTest/configure.ac
===================================================================
--- pkg/RSienaTest/configure.ac 2017-09-04 10:33:04 UTC (rev 310)
+++ pkg/RSienaTest/configure.ac 2017-09-04 11:35:11 UTC (rev 311)
@@ -1,12 +1,11 @@
-# vim:fdm=marker:
-
-# Based on the autoconf.ac from the Rmpi package
-# <http://www.stats.uwo.ca/faculty/yu/Rmpi/>. Run `autoconf` to produce the
-# 'configure' script.
#
+# After changing this file run `autoconf` to produce the 'configure' script.
+#
+# MPI discovery options for the build process:
+#
# - Run with automatic detection: `R CMD INSTALL {pkg}`
#
-# - Run with a prefix folder. Subfolders will be searched for binarys.
+# - Run with a prefix folder. Subfolders will be searched for binarys.
# `R CMD INSTALL {pkg} --configure-args=--with-mpi=/path/to/location`
#
# - Fully specify paths and type.
@@ -19,89 +18,139 @@
AC_INIT([RSienaTest], 1.1-289)
AC_CONFIG_SRCDIR([src])
-# Checks (autoscan) {{{1
+# Find R home and set CC/CFLAGS. This is required for the custom openmp test.
+R_HOME=`R RHOME`
+if test -z "${R_HOME}"; then
+ AC_MSG_ERROR([could not determine R_HOME])
+fi
+RBIN="${R_HOME}/bin/R"
+CC=`"${RBIN}" CMD config CC`;
+CFLAGS=`"${RBIN}" CMD config CFLAGS`
+LIBS="${PKG_LIBS}"
+
+
AC_PROG_CXX
AC_PROG_CC
-# Checks for header files
AC_CHECK_HEADERS([sys/time.h unistd.h])
-# Checks for typedefs, structures, and compiler characteristics
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])
-# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_HEADER_MAJOR
AC_FUNC_REALLOC
AC_CHECK_FUNCS([clock_gettime gettimeofday memmove memset pow select sqrt])
-# Args (mpi discovery) {{{1
+##
+## OpenMP
+##
+## Based on the autoconf.ac from the `randomForestSRC` package.
+##
+AC_OPENMP
+
+ac_pkg_openmp=no
+if test -n "${OPENMP_CFLAGS}"; then
+ AC_MSG_CHECKING([whether OpenMP will work in a package])
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM(
+ [[#include <omp.h>]],
+ [[return omp_get_num_threads();]]
+ )])
+ PKG_CFLAGS="${OPENMP_CFLAGS}" PKG_LIBS="${OPENMP_CFLAGS}" "$RBIN" CMD SHLIB conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD \
+ && "$RBIN" --vanilla -q -e "dyn.load(paste('conftest',.Platform\$dynlib.ext,sep=''))" 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD \
+ && ac_pkg_openmp=yes
+ AC_MSG_RESULT([${ac_pkg_openmp}])
+fi
+
+# If ${ac_pkg_openmp} = "yes" then we have OMP, otherwise it will be "no".
+if test "${ac_pkg_openmp}" = no; then
+ OPENMP_CFLAGS=''
+ AC_MSG_WARN([OpenMP does NOT appear to be supported on this system.])
+else
+ OPENMP_CFLAGS="$OPENMP_CFLAGS -DHAVE_OPENMP"
+fi
+
+AC_SUBST(OPENMP_CFLAGS)
+
+##
+## MPI
+##
+## Based on the autoconf.ac from the Rmpi package
+## <http://www.stats.uwo.ca/faculty/yu/Rmpi/>.
+##
+MPI=yes
+
+# mpi discovery by argument or environment
+
+if test -n "${MPI_INCLUDE_PATH}" ; then
+ MPI_INCLUDE_PATH="${MPI_INCLUDE_PATH}"
+ echo "Setting MPI include path from MPI_INCLUDE_PATH"
+fi
+
+if test -n "${MPI_LIB_PATH}" ; then
+ MPI_LIB_PATH="${MPI_LIB_PATH}"
+ echo "Setting MPI lib path from MPI_LIB_PATH"
+fi
+
+if test -n "${MPI_TYPE}" ; then
+ MPI_TYPE="${MPI_TYPE}"
+ echo "Setting MPI type from MPI_TYPE"
+fi
+
dnl --with-mpi-include-path
-MPI=yes
AC_ARG_WITH([mpi-include-path],
- AS_HELP_STRING([--with-mpi-include-path=DIR], [location of MPI header files]),
- [if test "${withval}" != "no" ; then
- MPI_INCLUDE_PATH="${withval}"
- if test ! -f "${MPI_INCLUDE_PATH}/mpi.h"; then
- AC_MSG_ERROR([Value of --with-include-path does not contain mpi.h])
- fi
- else
- if test -n "${MPI_INCLUDE_PATH}" ; then
- MPI_INCLUDE_PATH="${MPI_INCLUDE_PATH}"
- if test ! -f "${MPI_INCLUDE_PATH}/mpi.h"; then
- AC_MSG_ERROR([Value of MPI_INCLUDE_PATH does not contain mpi.h])
- fi
- echo "Setting MPI include path from MPI_INCLUDE_PATH"
- fi
- fi])
+ AS_HELP_STRING([--with-mpi-include-path=DIR], [location of MPI header files]),
+ [
+ if test "${withval}" != "no" ; then
+ MPI_INCLUDE_PATH="${withval}"
+ fi
+ ])
dnl --with-mpi-lib-path
AC_ARG_WITH([mpi-lib-path],
- AS_HELP_STRING([--with-mpi-lib-path=DIR], [location of MPI library files]),
- [if test "${withval}" != "no" ; then
- MPI_LIB_PATH="${withval}"
- else
- if test -n "${MPI_LIB_PATH}" ; then
- MPI_LIB_PATH="${MPI_LIB_PATH}"
- echo "Setting MPI lib path from MPI_LIB_PATH"
- fi
- fi])
+ AS_HELP_STRING([--with-mpi-lib-path=DIR], [location of MPI library files]),
+ [
+ if test "${withval}" != "no" ; then
+ MPI_LIB_PATH="${withval}"
+ fi
+ ])
+dnl --with-mpi-type
+AC_ARG_WITH([mpi-type],
+ AS_HELP_STRING([--with-mpi-type=MPI_TYPE], [the type of MPI: OPENMPI, LAM or MPICH]),
+ [
+ if test "${withval}" != "no" ; then
+ MPI_TYPE="${withval}"
+ fi
+ ])
+
if test -n "${MPI_INCLUDE_PATH}" -a -n "${MPI_LIB_PATH}" ; then
+ if test ! -f "${MPI_INCLUDE_PATH}/mpi.h"; then
+ AC_MSG_ERROR([Value of MPI_INCLUDE_PATH does not contain mpi.h])
+ fi
MPI_INCLUDES="-I${MPI_INCLUDE_PATH}"
MPI_LIBS="-L${MPI_LIB_PATH}"
elif test -n "${MPI_INCLUDE_PATH}" -o -n "${MPI_LIB_PATH}" ; then
AC_MSG_ERROR([Must specify both the include and lib path])
fi
-dnl --with-mpi-type
-AC_ARG_WITH([mpi-type],
- AS_HELP_STRING([--with-mpi-type=MPI_TYPE], [the type of MPI: OPENMPI, LAM or MPICH]),
- [if test "${withval}" != "no" ; then
- MPI_TYPE="${withval}"
- else
- if test -n "${MPI_TYPE}" ; then
- MPI_TYPE="${MPI_TYPE}"
- echo "Setting MPI type from MPI_TYPE"
- fi
- fi])
-
-dnl begin auto configure paths
+# auto configure if not set by user
if test -z "${MPI_INCLUDE_PATH}" ; then
dnl --with-mpi-root
- AC_ARG_WITH(mpi-root,
- AS_HELP_STRING([--with-mpi-root=DIR], [location of top-level MPI directory]),
- [if test "${withval}" != "no" ; then
- MPI_ROOT="${withval}"
- MPI_INCLUDE_PATH="${MPI_ROOT}/include"
- MPI_LIB_PATH="${MPI_ROOT}/lib"
- fi])
+ AC_ARG_WITH([mpi-root],
+ AS_HELP_STRING([--with-mpi-root=DIR], [location of top-level MPI directory]),
+ [
+ if test "${withval}" != "no" ; then
+ MPI_ROOT="${withval}"
+ MPI_INCLUDE_PATH="${MPI_ROOT}/include"
+ MPI_LIB_PATH="${MPI_ROOT}/lib"
+ fi
+ ])
if test -z "$MPI_ROOT" ; then
- dnl auto configure MPI_ROOT, (MPI_TYPE, MPI_INCLUDE_PATH)
+ # auto configure MPI_ROOT, (MPI_TYPE, MPI_INCLUDE_PATH)
AC_MSG_CHECKING([for mpi root directory])
for d in /opt/lib /usr/lib /usr /usr/local/lib /usr/local \
/usr/lib64/mpi/gcc/openmpi; do
@@ -162,7 +211,7 @@
fi
if test -n "$MPI_ROOT"; then
- dnl auto configure MPI_INCLUDE_PATH
+ # auto configure MPI_INCLUDE_PATH
AC_MSG_CHECKING([for mpi.h])
for d in include include/openmpi include/lam ; do
if test -f ${MPI_ROOT}/$d/mpi.h ; then
@@ -217,7 +266,8 @@
AC_MSG_RESULT([$MPI_LIB_PATH])
fi
fi
-dnl end auto configure paths
+
+# end auto configure type
if test -z $MPI_TYPE ; then
if test -d ${MPI_ROOT}/openmpi; then MPI_TYPE="OPENMPI"
elif test -d ${MPI_ROOT}/lib/openmpi; then MPI_TYPE="OPENMPI"
@@ -293,10 +343,11 @@
PKG_LIBS=
fi
-PKG_SOURCES=$(cat src/sources.list)
-
-AC_SUBST(PKG_SOURCES)
AC_SUBST(PKG_CPPFLAGS)
AC_SUBST(PKG_LIBS)
+# substitute externalized source list
+PKG_SOURCES=$(cat src/sources.list)
+AC_SUBST(PKG_SOURCES)
+
AC_OUTPUT(src/Makevars)
Modified: pkg/RSienaTest/src/Makevars.in
===================================================================
--- pkg/RSienaTest/src/Makevars.in 2017-09-04 10:33:04 UTC (rev 310)
+++ pkg/RSienaTest/src/Makevars.in 2017-09-04 11:35:11 UTC (rev 311)
@@ -7,9 +7,9 @@
OBJECTS = $(SOURCES:.cpp=.o)
SOURCES = @PKG_SOURCES@
-PKG_CPPFLAGS = $(SHLIB_OPENMP_CXXFLAGS) -I. $(RNGSTREAMS_CPP) $(EIGEN_CPP) @PKG_CPPFLAGS@
+PKG_CPPFLAGS = -I. $(RNGSTREAMS_CPP) $(EIGEN_CPP) @PKG_CPPFLAGS@ @OPENMP_CFLAGS@
# -UNDEBUG -DR_LEGACY -DPROFILER
-PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(ARCHLIB) @PKG_LIBS@
+PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(ARCHLIB) @PKG_LIBS@ @OPENMP_CFLAGS@
# -lprofiler -ltcmalloc
all: $(SHLIB)
More information about the Rsiena-commits
mailing list