From 22ae85100877c8c4c5c4e1c84c143a7643f1d34c Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Sat, 26 Aug 2017 16:59:15 -0500 Subject: [PATCH 1/5] Block macOS system files from entering repo --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0a747394..1f6cda3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .Rproj.user .Rhistory .RData +.DS_Store src/*.o src/*.so src/*.dll From be5000662e773022d4dd878a9524e56ef70b1fc9 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Sat, 26 Aug 2017 18:41:20 -0500 Subject: [PATCH 2/5] Determine the appropriate OpenMP flags in configure.ac --- R/{inline.R => inline.R.in} | 4 +- cleanup | 4 +- configure | 828 +++++++++++++++++- configure.ac | 87 +- .../include/RcppArmadilloConfigGenerated.h.in | 3 + src/{Makevars => Makevars.in} | 4 +- 6 files changed, 885 insertions(+), 45 deletions(-) rename R/{inline.R => inline.R.in} (85%) rename src/{Makevars => Makevars.in} (84%) diff --git a/R/inline.R b/R/inline.R.in similarity index 85% rename from R/inline.R rename to R/inline.R.in index 75a9298d..0c03b754 100644 --- a/R/inline.R +++ b/R/inline.R.in @@ -19,11 +19,11 @@ inlineCxxPlugin <- function(...) { plugin <- Rcpp::Rcpp.plugin.maker( include.before = "#include ", - libs = "$(SHLIB_OPENMP_CFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)", + libs = "@HAVE_OPENMP_R_CFLAG@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)", package = "RcppArmadillo" ) settings <- plugin() - settings$env$PKG_CPPFLAGS <- "-I../inst/include $(SHLIB_OPENMP_CXXFLAGS)" + settings$env$PKG_CPPFLAGS <- "-I../inst/include @HAVE_OPENMP_R_CXXFLAG@" settings } diff --git a/cleanup b/cleanup index 294a0c25..b2383a5f 100755 --- a/cleanup +++ b/cleanup @@ -16,7 +16,9 @@ rm -f config.log config.status confdefs.h \ vignettes/*~ \ */*~ *~ \ inst/include/RcppArmadilloLapack.h \ - inst/include/RcppArmadilloConfigGenerated.h + inst/include/RcppArmadilloConfigGenerated.h \ + src/Makevars \ + R/inline.R rm -rf autom4te.cache/ \ vignettes/auto/ diff --git a/configure b/configure index a609807e..3e717927 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for RcppArmadillo 0.7.960.1.1. +# Generated by GNU Autoconf 2.69 for RcppArmadillo 0.7.960.1.1.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -576,16 +576,23 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='RcppArmadillo' PACKAGE_TARNAME='rcpparmadillo' -PACKAGE_VERSION='0.7.960.1.1' -PACKAGE_STRING='RcppArmadillo 0.7.960.1.1' +PACKAGE_VERSION='0.7.960.1.1.1' +PACKAGE_STRING='RcppArmadillo 0.7.960.1.1.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS +HAVE_OPENMP_R_CXXFLAG +HAVE_OPENMP_R_CFLAG +HAVE_OPENMP_WARNING HAVE_OPENMP ARMA_CRIPPLED_LAPACK HAVE_GOOD_LAPACK +OPENMP_CXXFLAGS +ac_ct_CC +CFLAGS +CC CXXCPP OBJEXT EXEEXT @@ -636,6 +643,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_openmp ' ac_precious_vars='build_alias host_alias @@ -646,7 +654,9 @@ LDFLAGS LIBS CPPFLAGS CCC -CXXCPP' +CXXCPP +CC +CFLAGS' # Initialize some variables set by options. @@ -1197,7 +1207,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures RcppArmadillo 0.7.960.1.1 to adapt to many kinds of systems. +\`configure' configures RcppArmadillo 0.7.960.1.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1259,10 +1269,16 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of RcppArmadillo 0.7.960.1.1:";; + short | recursive ) echo "Configuration of RcppArmadillo 0.7.960.1.1.1:";; 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 + Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags @@ -1272,6 +1288,8 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXXCPP C++ preprocessor + CC C compiler command + CFLAGS C compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1339,7 +1357,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -RcppArmadillo configure 0.7.960.1.1 +RcppArmadillo configure 0.7.960.1.1.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1427,11 +1445,95 @@ fi as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by RcppArmadillo $as_me 0.7.960.1.1, which was +It was created by RcppArmadillo $as_me 0.7.960.1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1785,9 +1887,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -z "${R_HOME}"; then as_fn_error $? "Could not determine R_HOME." "$LINENO" 5 fi -## Use R to set CXX and CXXFLAGS + +## Use R to set CC, CXX, CFLAGS, and CXXFLAGS +RBIN="${R_HOME}/bin/R" +CC=$(${R_HOME}/bin/R CMD config CC) +CFLAGS=$(${R_HOME}/bin/R CMD config CFLAGS) CXX=$(${R_HOME}/bin/R CMD config CXX) -CXXFLAGS=$("${R_HOME}/bin/R" CMD config CXXFLAGS) +CXXFLAGS=$(${R_HOME}/bin/R CMD config CXXFLAGS) +LIBS="${PKG_LIBS}" ## We are using C++ ac_ext=cpp @@ -2698,6 +2805,7 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ## If it is g++, we have GXX set so let's examine it if test "${GXX}" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ version is sufficient" >&5 @@ -2725,13 +2833,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking LAPACK_LIBS" >&5 $as_echo_n "checking LAPACK_LIBS... " >&6; } -## external LAPACK has the required function +## External LAPACK has the required function lapack=$(${R_HOME}/bin/R CMD config LAPACK_LIBS) hasRlapack=$(echo ${lapack} | grep lRlapack) ## internal Rlapack now the required functions if "new enough": R 3.3.0 or later newR=$("${R_HOME}/bin/Rscript" --vanilla -e 'if (getRversion() >= "3.3.0") cat("yes") else cat("no")') -## in what follows below we substitute both side of the define/undef +## In what follows below we substitute both side of the define/undef ## while this may seem a little unusual we do it to fully reproduce the ## previous bash-based implementation @@ -2759,33 +2867,701 @@ $as_echo "$as_me: WARNING: Some complex-valued LAPACK functions may not be avail fi fi -## Check for OpenMP -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenMP" >&5 -$as_echo_n "checking for OpenMP... " >&6; } -## if R has -fopenmp we should be good -allldflags=$(${R_HOME}/bin/R CMD config --ldflags) -hasOpenMP=$(echo ${allldflags} | grep -- -fopenmp) -if test x"${hasOpenMP}" == x""; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: missing" >&5 -$as_echo "missing" >&6; } - have_openmp="#define ARMA_DONT_USE_OPENMP 1" + +## Store whether openmp should be checked +supported_openmp_os=yes + +## Simplify life to avoid AC_CANONICAL_HOST headaches +OSNAME=`uname -s 2>/dev/null` + +if test "x$OSNAME" = xDarwin; then + supported_openmp_os=no +fi + +## The next part has been modified slightly from simon's OpenMP check script +## https://stat.ethz.ch/pipermail/r-devel/2010-September/058488.html + +## Account for systems with broken OMP libraries... +ac_pkg_openmp=no + +## Checks for programs +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +## Only run checks if openmp is supported on the os +if test "${supported_openmp_os}" = "yes"; then + + ## Checks for OpenMP + + OPENMP_CXXFLAGS= + # 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 $CXX option to support OpenMP" >&5 +$as_echo_n "checking for $CXX option to support OpenMP... " >&6; } +if ${ac_cv_prog_cxx_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 +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_prog_cxx_openmp='none needed' +else + ac_cv_prog_cxx_openmp='unsupported' + for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ + -Popenmp --openmp; do + ac_save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $ac_option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _OPENMP + choke me +#endif +#include +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_prog_cxx_openmp=$ac_option +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CXXFLAGS=$ac_save_CXXFLAGS + if test "$ac_cv_prog_cxx_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_cxx_openmp" >&5 +$as_echo "$ac_cv_prog_cxx_openmp" >&6; } + case $ac_cv_prog_cxx_openmp in #( + "none needed" | unsupported) + ;; #( + *) + OPENMP_CXXFLAGS=$ac_cv_prog_cxx_openmp ;; + esac + fi + + + + 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 +int +main () +{ + return omp_get_num_threads (); + ; + return 0; +} +_ACEOF + PKG_CFLAGS="${OPENMP_CFLAGS}" PKG_LIBS="${OPENMP_CFLAGS}" "${R_HOME}/bin/R" CMD SHLIB conftest.c 1>&5 2>&5 && "${R_HOME}/bin/R" --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 +fi + +if test "${ac_pkg_openmp}" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } have_openmp="#define ARMA_USE_OPENMP 1" + have_openmp_warning="" + have_openmp_r_cflag='$(SHLIB_OPENMP_CFLAGS)' + have_openmp_r_cxxflag='$(SHLIB_OPENMP_CXXFLAGS)' fi +if test "${ac_pkg_openmp}" = "no"; then + + if test "${supported_openmp_os}" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenMP support on macOS has been temporarily disabled due to detection issues with the binary." >&5 +$as_echo "$as_me: WARNING: OpenMP support on macOS has been temporarily disabled due to detection issues with the binary." >&2;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No OpenMP support. If using GCC, upgrade to >= 4.2. If using clang, upgrade to >= 3.8.0" >&5 +$as_echo "$as_me: WARNING: No OpenMP support. If using GCC, upgrade to >= 4.2. If using clang, upgrade to >= 3.8.0" >&2;} + fi + have_openmp="#define ARMA_DONT_USE_OPENMP 1" + have_openmp_warning="#define ARMA_DONT_PRINT_OPENMP_WARNING 1" + have_openmp_r_cflag="" + have_openmp_r_cxxflag="" +fi -## now use all these +## Now use all these HAVE_GOOD_LAPACK="${have_good_lapack}" ARMA_CRIPPLED_LAPACK="${arma_crippled_lapack}" HAVE_OPENMP="${have_openmp}" +HAVE_OPENMP_WARNING="${have_openmp_warning}" + +HAVE_OPENMP_R_CFLAG="${have_openmp_r_cflag}" + +HAVE_OPENMP_R_CXXFLAG="${have_openmp_r_cxxflag}" + ac_config_files="$ac_config_files inst/include/RcppArmadilloConfigGenerated.h" +# Set flags for inline.R +ac_config_files="$ac_config_files R/inline.R" + +# Also needed in the Makevars +ac_config_files="$ac_config_files src/Makevars" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -3328,7 +4104,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by RcppArmadillo $as_me 0.7.960.1.1, which was +This file was extended by RcppArmadillo $as_me 0.7.960.1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3381,7 +4157,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -RcppArmadillo config.status 0.7.960.1.1 +RcppArmadillo config.status 0.7.960.1.1.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -3492,6 +4268,8 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "inst/include/RcppArmadilloConfigGenerated.h") CONFIG_FILES="$CONFIG_FILES inst/include/RcppArmadilloConfigGenerated.h" ;; + "R/inline.R") CONFIG_FILES="$CONFIG_FILES R/inline.R" ;; + "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.ac b/configure.ac index c5214e6c..13d2bd64 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,9 @@ ## ## Licensed under GPL-2 or later -## require at least autoconf 2.61 +## Run this script using autoconf -i under the RcppArmadillo package directory + +## Require at least autoconf 2.61 AC_PREREQ(2.61) ## Process this file with autoconf to produce a configure script. @@ -19,9 +21,14 @@ AC_INIT(RcppArmadillo, m4_esyscmd_s([awk -e '/^Version:/ {print $2}' DESCRIPTION if test -z "${R_HOME}"; then AC_MSG_ERROR([Could not determine R_HOME.]) fi -## Use R to set CXX and CXXFLAGS + +## Use R to set CC, CXX, CFLAGS, and CXXFLAGS +RBIN="${R_HOME}/bin/R" +CC=$(${R_HOME}/bin/R CMD config CC) +CFLAGS=$(${R_HOME}/bin/R CMD config CFLAGS) CXX=$(${R_HOME}/bin/R CMD config CXX) -CXXFLAGS=$("${R_HOME}/bin/R" CMD config CXXFLAGS) +CXXFLAGS=$(${R_HOME}/bin/R CMD config CXXFLAGS) +LIBS="${PKG_LIBS}" ## We are using C++ AC_LANG(C++) @@ -29,6 +36,7 @@ AC_REQUIRE_CPP ## Check the C++ compiler using the CXX value set AC_PROG_CXX + ## If it is g++, we have GXX set so let's examine it if test "${GXX}" = yes; then AC_MSG_CHECKING([whether g++ version is sufficient]) @@ -51,13 +59,13 @@ fi ## Check for suitable LAPACK_LIBS AC_MSG_CHECKING([LAPACK_LIBS]) -## external LAPACK has the required function +## External LAPACK has the required function lapack=$(${R_HOME}/bin/R CMD config LAPACK_LIBS) hasRlapack=$(echo ${lapack} | grep lRlapack) ## internal Rlapack now the required functions if "new enough": R 3.3.0 or later newR=$("${R_HOME}/bin/Rscript" --vanilla -e 'if (getRversion() >= "3.3.0") cat("yes") else cat("no")') -## in what follows below we substitute both side of the define/undef +## In what follows below we substitute both side of the define/undef ## while this may seem a little unusual we do it to fully reproduce the ## previous bash-based implementation @@ -81,24 +89,73 @@ else fi fi -## Check for OpenMP -AC_MSG_CHECKING([for OpenMP]) -## if R has -fopenmp we should be good -allldflags=$(${R_HOME}/bin/R CMD config --ldflags) -hasOpenMP=$(echo ${allldflags} | grep -- -fopenmp) -if test x"${hasOpenMP}" == x""; then - AC_MSG_RESULT([missing]) - have_openmp="#define ARMA_DONT_USE_OPENMP 1" -else + +## Store whether openmp should be checked +supported_openmp_os=yes + +## Simplify life to avoid AC_CANONICAL_HOST headaches +OSNAME=`uname -s 2>/dev/null` + +if test "x$OSNAME" = xDarwin; then + supported_openmp_os=no +fi + +## The next part has been modified slightly from simon's OpenMP check script +## https://stat.ethz.ch/pipermail/r-devel/2010-September/058488.html + +## Account for systems with broken OMP libraries... +ac_pkg_openmp=no + +## Checks for programs +AC_PROG_CC + +## Only run checks if openmp is supported on the os +if test "${supported_openmp_os}" = "yes"; then + + ## Checks for OpenMP + AC_OPENMP + + if test -n "${OPENMP_CFLAGS}"; then + AC_MSG_CHECKING([whether OpenMP will work in a package]) + AC_LANG_CONFTEST( + [AC_LANG_PROGRAM([[#include ]], [[ return omp_get_num_threads (); ]])]) + PKG_CFLAGS="${OPENMP_CFLAGS}" PKG_LIBS="${OPENMP_CFLAGS}" "${R_HOME}/bin/R" CMD SHLIB conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD && "${R_HOME}/bin/R" --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 +fi + +if test "${ac_pkg_openmp}" = "yes"; then AC_MSG_RESULT([found]) have_openmp="#define ARMA_USE_OPENMP 1" + have_openmp_warning="" + have_openmp_r_cflag='$(SHLIB_OPENMP_CFLAGS)' + have_openmp_r_cxxflag='$(SHLIB_OPENMP_CXXFLAGS)' fi +if test "${ac_pkg_openmp}" = "no"; then + + if test "${supported_openmp_os}" = "no"; then + AC_MSG_WARN([OpenMP support on macOS has been temporarily disabled due to detection issues with the binary.]) + else + AC_MSG_WARN([No OpenMP support. If using GCC, upgrade to >= 4.2. If using clang, upgrade to >= 3.8.0]) + fi + have_openmp="#define ARMA_DONT_USE_OPENMP 1" + have_openmp_warning="#define ARMA_DONT_PRINT_OPENMP_WARNING 1" + have_openmp_r_cflag="" + have_openmp_r_cxxflag="" +fi -## now use all these +## Now use all these AC_SUBST([HAVE_GOOD_LAPACK],["${have_good_lapack}"]) AC_SUBST([ARMA_CRIPPLED_LAPACK], ["${arma_crippled_lapack}"]) AC_SUBST([HAVE_OPENMP], ["${have_openmp}"]) +AC_SUBST([HAVE_OPENMP_WARNING], ["${have_openmp_warning}"]) +AC_SUBST([HAVE_OPENMP_R_CFLAG], ["${have_openmp_r_cflag}"]) +AC_SUBST([HAVE_OPENMP_R_CXXFLAG], ["${have_openmp_r_cxxflag}"]) AC_CONFIG_FILES([inst/include/RcppArmadilloConfigGenerated.h]) +# Set flags for inline.R +AC_CONFIG_FILES([R/inline.R]) +# Also needed in the Makevars +AC_CONFIG_FILES([src/Makevars]) AC_OUTPUT diff --git a/inst/include/RcppArmadilloConfigGenerated.h.in b/inst/include/RcppArmadilloConfigGenerated.h.in index c1bd0211..5bfc4c27 100644 --- a/inst/include/RcppArmadilloConfigGenerated.h.in +++ b/inst/include/RcppArmadilloConfigGenerated.h.in @@ -28,4 +28,7 @@ // from configure test for OpenMP @HAVE_OPENMP@ +// disables warning if compiler does not support OpenMP +@HAVE_OPENMP_WARNING@ + #endif diff --git a/src/Makevars b/src/Makevars.in similarity index 84% rename from src/Makevars rename to src/Makevars.in index 8022bfb6..af2c4772 100644 --- a/src/Makevars +++ b/src/Makevars.in @@ -1,7 +1,7 @@ ## -*- mode: makefile; -*- -PKG_CXXFLAGS = -I../inst/include $(SHLIB_OPENMP_CXXFLAGS) -PKG_LIBS= $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) +PKG_CXXFLAGS=-I../inst/include @HAVE_OPENMP_R_CXXFLAG@ +PKG_LIBS=@HAVE_OPENMP_R_CFLAG@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) ## With R 3.1.0 or later, you can uncomment the following line to tell R to ## enable compilation with C++11 (where available) From 6921ff5c4e6e1d1caf2322be683948ad6a7acbe4 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Sat, 26 Aug 2017 18:42:52 -0500 Subject: [PATCH 3/5] Fix for the vignette engine hiccup --- DESCRIPTION | 2 +- vignettes/RcppArmadillo-sparseMatrix.Rnw | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e21c4e59..3bb45261 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -23,6 +23,6 @@ License: GPL (>= 2) LazyLoad: yes LinkingTo: Rcpp Imports: Rcpp (>= 0.11.0), stats, utils, methods -Suggests: RUnit, Matrix, pkgKitten, reticulate +Suggests: RUnit, Matrix, pkgKitten, reticulate, highlight URL: http://dirk.eddelbuettel.com/code/rcpp.armadillo.html BugReports: https://github.com/RcppCore/RcppArmadillo/issues diff --git a/vignettes/RcppArmadillo-sparseMatrix.Rnw b/vignettes/RcppArmadillo-sparseMatrix.Rnw index 2561adbc..bc7f5f41 100644 --- a/vignettes/RcppArmadillo-sparseMatrix.Rnw +++ b/vignettes/RcppArmadillo-sparseMatrix.Rnw @@ -3,7 +3,7 @@ %\VignetteIndexEntry{RcppArmadillo-sparseMatrix} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{R, C++, Armadillo, linear algebra, sparse matrix} -%\VignettePackage{RcppArmadillo} +%\VignetteDepends{RcppArmadillo} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} From 7272da378fe921fe9b972aecd06abc6de9625674 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Sat, 26 Aug 2017 18:43:08 -0500 Subject: [PATCH 4/5] Add gitignore for vignette files... --- vignettes/.gitignore | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vignettes/.gitignore diff --git a/vignettes/.gitignore b/vignettes/.gitignore new file mode 100644 index 00000000..5e469eb9 --- /dev/null +++ b/vignettes/.gitignore @@ -0,0 +1,9 @@ +RcppArmadillo-*.aux +RcppArmadillo-*.out +RcppArmadillo-*.toc +RcppArmadillo-*.bbl +RcppArmadillo-*.blg +RcppArmadillo-*.log +RcppArmadillo-*.tex +RcppArmadillo-*.pdf +unitTests-results/ \ No newline at end of file From 46270192b8e9a8a85f2a28427f185baa7cf67c4a Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Sat, 26 Aug 2017 20:04:34 -0500 Subject: [PATCH 5/5] Adds highlight dependency in travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f298854..029075dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_install: - ./run.sh bootstrap install: - - ./run.sh install_aptget r-cran-rcpp r-cran-runit r-cran-matrix r-cran-pkgkitten r-cran-jsonlite python-scipy + - ./run.sh install_aptget r-cran-rcpp r-cran-runit r-cran-matrix r-cran-pkgkitten r-cran-jsonlite python-scipy r-cran-highlight - ./run.sh install_r reticulate script: