Skip to content

Commit

Permalink
updated configure.ac
Browse files Browse the repository at this point in the history
updated configure.ac to remove CR and CRLF
  • Loading branch information
sn248 committed Dec 13, 2024
1 parent 27e380d commit 5aa837c
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 43 deletions.
Binary file added .configure.ac.swp
Binary file not shown.
Empty file modified cleanup.win
100644 → 100755
Empty file.
36 changes: 18 additions & 18 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2043,12 +2043,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
## Set R_HOME, respecting an environment variable if set
: ${R_HOME=$(R RHOME)}
if test -z "${R_HOME}"; then
as_fn_error $? "Could not determine R_HOME." "$LINENO" 5
as_fn_error $? "Could not determine R_HOME." "$LINENO" 5
fi
CXX=`"${R_HOME}/bin/R" CMD config CXX`
if test -z "${CXX}"; then
as_fn_error $? "No C++ compiler available" "$LINENO" 5
as_fn_error $? "no C++ compiler available" "$LINENO" 5
fi
CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
Expand Down Expand Up @@ -3194,9 +3194,9 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
## Default to build from source
need_to_build="yes"
## So do we need to build
## So we do need to build
if test x"${need_to_build}" != x"no"; then
# Extract the first word of "cmake", so it can be a program name with args.
# Extract the first word of "cmake", so it can be a program name with args.
set dummy cmake; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
Expand Down Expand Up @@ -3242,22 +3242,21 @@ printf "%s\n" "no" >&6; }
fi
if test x"${have_cmake}" == x"no"; then
. src/scripts/cmake_config.sh
if test -z "${CMAKE_BIN}"; then
## also error to end configure here
as_fn_error $? "Could not find 'cmake'." "$LINENO" 5
fi
fi
if test x"${have_cmake}" == x"no"; then
. src/scripts/cmake_config.sh
if test -z "${CMAKE_BIN}"; then
## also error to end configure there
as_fn_error $? "Could not find 'cmake'" "$LINENO" 5
fi
fi
## 'uname -m' on M1 give x86_64 which is ... not helping
machine=`"${R_HOME}/bin/Rscript" -e 'cat(Sys.info()["machine"])'`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using sundialr via local cmake build on ${machine} " >&5
printf "%s\n" "using sundialr via local cmake build on ${machine} " >&6; }
tools/cmake_call.sh
machine=`"${R_HOME}/bin/Rscript" -e 'cat(Sys.info()["machine"]'`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using sundialr via local camke build on ${machine} " >&5
printf "%s\n" "using sundialr via local camke build on ${machine} " >&6; }
tools/cmake_call.sh
sundialr_include=""
sundialr_libs="-lsundials_idas -lsundials_cvodes -lsundials_nvecserial -lsundials_sunlinsoldense -lsundials_sunmatrixdense -lsundials_core -lm"
sundialr_include=""
sundialr_libs="-lsundials_idas -lsundials_cvodes -lsundials_nvecserial -lsundials_sunlinsoldense -lsundials_sunmatrixdense -lsundials_core -lm"
fi
## Now use all the values
Expand Down Expand Up @@ -4418,3 +4417,4 @@ printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2
fi
42 changes: 19 additions & 23 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
## sundialr configure.ac
## sundialr -- R interface to SUNDIALS
## require at least autoconf 2.70

AC_PREREQ([2.70])
AC_INIT([sundialr],[0.1.5])

## Set R_HOME, respecting an environment variable if set
: ${R_HOME=$(R RHOME)}
if test -z "${R_HOME}"; then
AC_MSG_ERROR([Could not determine R_HOME.])
AC_MSG_ERROR([Could not determine R_HOME.])
fi

CXX=`"${R_HOME}/bin/R" CMD config CXX`
if test -z "${CXX}"; then
AC_MSG_ERROR([No C++ compiler available])
AC_MSG_ERROR([no C++ compiler available])
fi

CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
Expand All @@ -26,28 +22,28 @@ AC_PROG_CXX

## Default to build from source
need_to_build="yes"
## So do we need to build
## So we do need to build
if test x"${need_to_build}" != x"no"; then
AC_PATH_PROG(have_cmake, cmake, no)
if test x"${have_cmake}" == x"no"; then
. src/scripts/cmake_config.sh
if test -z "${CMAKE_BIN}"; then
## also error to end configure here
AC_MSG_ERROR([Could not find 'cmake'.])
fi
fi

## 'uname -m' on M1 give x86_64 which is ... not helping
machine=`"${R_HOME}/bin/Rscript" -e 'cat(Sys.info()[["machine"]])'`
AC_MSG_RESULT([using sundialr via local cmake build on ${machine} ])
tools/cmake_call.sh

sundialr_include=""
sundialr_libs="-lsundials_idas -lsundials_cvodes -lsundials_nvecserial -lsundials_sunlinsoldense -lsundials_sunmatrixdense -lsundials_core -lm"
AC_PATH_PROG(have_cmake, cmake, no)
if test x"${have_cmake}" == x"no"; then
. src/scripts/cmake_config.sh
if test -z "${CMAKE_BIN}"; then
## also error to end configure there
AC_MSG_ERROR([Could not find 'cmake'])
fi
fi

machine=`"${R_HOME}/bin/Rscript" -e 'cat(Sys.info()[["machine"]]'`
AC_MSG_RESULT([using sundialr via local cmake build on ${machine} ])
tools/cmake_call.sh

sundialr_include=""
sundialr_libs="-lsundials_idas -lsundials_cvodes -lsundials_nvecserial -lsundials_sunlinsoldense -lsundials_sunmatrixdense -lsundials_core -lm"
fi

## Now use all the values
AC_SUBST([SUNDIALR_CPPFLAGS],["$sundialr_include"])
AC_SUBST([SUNDIALR_LIBS],["$sundialr_libs"])
AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT

Empty file modified configure.win
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions inst/include/sundials/sundials_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@

#define SUN_BUILD_TYPE "Release"

#define SUN_JOB_ID "20241213103419"
#define SUN_JOB_START_TIME "20241213103419"
#define SUN_JOB_ID "20241213122453"
#define SUN_JOB_START_TIME "20241213122453"

#define SUN_TPL_LIST ""
#define SUN_TPL_LIST_SIZE ""
Expand Down

0 comments on commit 5aa837c

Please sign in to comment.