$NetBSD: patch-ac,v 1.36 2015/08/14 12:40:19 wen Exp $ Do not include system paths in R_LD_LIBRARY_PATH. FreeBSD 10 is not FreeBSD 1. Fix texi2any version check. --- configure.orig 2015-08-14 19:37:48.000000000 +0000 +++ configure @@ -4012,7 +4012,7 @@ fi ## As from R 3.2.0 split up -L... and -lR if test "${want_R_shlib}" = yes; then - LIBR0="-L\$(R_HOME)/lib\$(R_ARCH)" + LIBR0="-Wl,-R${prefix}/lib/R/lib\$(R_ARCH) -L\$(R_HOME)/lib\$(R_ARCH)" LIBR1=-lR else LIBR0= @@ -4078,7 +4078,7 @@ fi if test "x${want_lto}" != xno; then LTO=-flto fi -if test "x${want_lto}" == xyes; then +if test "x${want_lto}" = xyes; then LTOALL=-flto fi @@ -5272,7 +5272,7 @@ if test -z "${texi2any_version_maj}" \ elif test ${texi2any_version_maj} -gt 5; then r_cv_prog_texi2any_v5=yes elif test ${texi2any_version_maj} -lt 5 \ - || test ${texi2any_version_min} -lt 1; then + || test ${texi2any_version_maj} = 5 -a ${texi2any_version_min} -lt 1; then r_cv_prog_texi2any_v5=no else r_cv_prog_texi2any_v5=yes @@ -20496,7 +20496,7 @@ case "${host_os}" in ## look-up sequence. Such automatic override has proven to break things ## like system frameworks (e.g. ImageIO or OpenGL framework). ;; - *) + donotuse*) for arg in ${LDFLAGS}; do case "${arg}" in -L*) @@ -23170,6 +23170,11 @@ fi done ;; -[lLR]*) + case $ac_arg in + -R*) + ac_arg="${wl}$ac_arg" + ;; + esac ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then @@ -24135,6 +24140,9 @@ cat > conftest.c </dev/null ; then - main_ldflags="-export-dynamic" + main_ldflags="${wl}-export-dynamic" shlib_ldflags="-shared" else shlib_ldflags="-Bshareable" @@ -26548,22 +26565,22 @@ $as_echo "$as_me: WARNING: Use of flat n solaris*) ## SPARC has only an 8k global object table, 1024 entries on 64-bit, ## so need PIC not pic. They are the same on other Solaris platforms. - shlib_ldflags="-G" - shlib_cxxldflags="-G" if test "${GCC}" = yes; then + shlib_ldflags="-shared" + shlib_cxxldflags="-shared" cpicflags="-fPIC" ld=`${CC} -print-prog-name=ld` ldoutput=`${ld} -v 2>&1 | grep GNU` if test -n "${ldoutput}"; then main_ldflags="-Wl,-export-dynamic" - shlib_ldflags="-shared" - shlib_cxxldflags="-shared" else ## it seems gcc c 4.6.2 needs this with Solaris linker shlib_ldflags="-shared" shlib_cxxldflags="-shared" fi else + shlib_ldflags="-G" + shlib_cxxldflags="-G" cpicflags="-KPIC" if test "`basename ${CXX}`" = "CC" ; then ## Forte version 7 needs -lCstd: Forte 6 does not. @@ -26624,7 +26641,7 @@ fi : ${CPICFLAGS="${cpicflags}"} if test -z "${CPICFLAGS}"; then case "${host_os}" in - aix*|cygwin*|irix*|mingw*|osf*) + aix*|cygwin*|irix*|mingw*|osf*|darwin*) ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I could not determine CPICFLAGS." >&5 @@ -27320,6 +27337,14 @@ _ACEOF ## Cygwin has rintl but not nearbyintl for ac_func in expm1 hypot log1p log1pl log2 log10 nearbyint nearbyintl powl rint rintl do +case $ac_func in +expm1|log1p|log2|log10|nearbyint|nearbyintl|rint|rintl) + args="x" + ;; +hypot|powl) + args="x,x" + ;; +esac as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5 $as_echo_n "checking whether $ac_func exists and is declared... " >&6; } @@ -27329,24 +27354,12 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include +volatile long double x; -#ifdef F77_DUMMY_MAIN - -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } - -#endif int main () { -#ifndef $ac_func - char *p = (char *) $ac_func; -#endif - - ; - return 0; + return $ac_func($args);; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : @@ -30256,6 +30269,15 @@ cat > conftest.c <