--- configure 2023-12-10 06:20:56.000000000 +0800 +++ configure 2023-12-12 00:57:44.000000000 +0800 @@ -74,85 +74,12 @@ CMAKE_LIBRARY_PATH=`"${R_HOME}/bin/Rscript" ./tools/translate_to_cmake_flags.R CMAKE_LIBRARY_PATH "$R_LDFLAGS"` ; echo setting CMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH" -## Use ./tools/SYMENGINE_BUNDLED file as indicator so that -## this won't run on CRAN machine. -if [ ! -f ./tools/SYMENGINE_BUNDLED ]; then - echo ====== bundling SymEngine source - ./tools/bundle_symengine_source.sh - if [ $? -ne 0 ]; then - echo "./tools/bundle_symengine_source.sh exited with non-zero status" - exit 1 - fi -fi - -echo ====== Unpacking src/upstream.tar - -cd src/ -tar xf upstream.tar -cd .. - - AR=`"${R_HOME}/bin/R" CMD config AR` AR=`which $AR` RANLIB=`"${R_HOME}/bin/R" CMD config RANLIB` RANLIB=`which $RANLIB` -## If SymEngine_DIR environment variable is not set, use src/upstream -if [ -z "$SymEngine_DIR" ]; then - - echo ====== running cmake - - PKG_DIR=`pwd` - cd src/upstream - - set -x - - $CMAKE_BIN \ - -DCMAKE_AR=$AR \ - -DCMAKE_RANLIB=$RANLIB \ - \ - -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" \ - -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ - -DCMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH" \ - -DCMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH" \ - \ - -DCMAKE_BUILD_TYPE=Release \ - -DWITH_BFD=no \ - -DWITH_SYMENGINE_ASSERT=no \ - -DWITH_ECM=no \ - -DWITH_PRIMESIEVE=no \ - -DWITH_FLINT=no \ - -DWITH_ARB=no \ - -DWITH_TCMALLOC=no \ - -DWITH_OPENMP=no \ - -DWITH_PIRANHA=no \ - -DWITH_LLVM=no \ - -DWITH_MPFR=yes \ - -DWITH_MPC=no \ - -DINTEGER_CLASS=gmp \ - -DBUILD_TESTS=no \ - -DBUILD_BENCHMARKS=no \ - -DBUILD_SHARED_LIBS=no \ - -DWITH_COTIRE=no \ - . - - if [ $? -ne 0 ]; then - exit 1 - fi - - set +x - - cd $PKG_DIR - - SymEngine_DIR="$PKG_DIR"/src/upstream - echo == setting SymEngine_DIR - echo $SymEngine_DIR - DO_UPSTREAM="do_upstream" -else - # if SymEngine_DIR exists - DO_UPSTREAM= -fi echo == config PKG_LIBS and PKG_CPPFLAGS for Makevars @@ -169,13 +96,13 @@ if [ "$status_PKG_LIBS" -ne 0 ]; then echo >&2 "generating PKG_LIBS failed with 'cmake --find-package', new reset using fallback value" - PKG_LIBS_VALUE="-Lupstream/symengine -lsymengine -lmpfr -lgmp" + PKG_LIBS_VALUE="-L@PREFIX@ -lsymengine -lmpfr -lgmp" echo reset PKG_LIBS=$PKG_LIBS_VALUE fi if [ "$status_PKG_CPPFLAGS" -ne 0 ]; then echo >&2 "generating PKG_CPPFLAGS failed with 'cmake --find-package', new reset using fallback value" - PKG_CPPFLAGS_VALUE="-Iupstream" + PKG_CPPFLAGS_VALUE="-I@PREFIX@/symengine" echo reset PKG_CPPFLAGS=$PKG_CPPFLAGS_VALUE fi