$NetBSD: patch-ac,v 1.14 2005/05/02 16:57:19 drochner Exp $ --- configure.orig 2005-04-19 00:11:52.000000000 +0200 +++ configure @@ -2170,7 +2170,7 @@ else fi if test "${want_R_shlib}" = yes; then - LIBR="-L\$(R_HOME)/lib -lR" + LIBR="-Wl,-R${prefix}/lib/R/lib -L\$(R_HOME)/lib -lR" else LIBR= fi @@ -21681,13 +21681,13 @@ fi ## only need ncurses if libreadline is not statically linked against it unset ac_cv_lib_readline_rl_callback_read_char -echo "$as_me:$LINENO: checking for main in -lncurses" >&5 -echo $ECHO_N "checking for main in -lncurses... $ECHO_C" >&6 -if test "${ac_cv_lib_ncurses_main+set}" = set; then +echo "$as_me:$LINENO: checking for main in -ltermcap" >&5 +echo $ECHO_N "checking for main in -ltermcap... $ECHO_C" >&6 +if test "${ac_cv_lib_termcap_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" +LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21726,35 +21726,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ncurses_main=yes + ac_cv_lib_termcap_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ncurses_main=no +ac_cv_lib_termcap_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ncurses_main" >&6 -if test $ac_cv_lib_ncurses_main = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_main" >&5 +echo "${ECHO_T}$ac_cv_lib_termcap_main" >&6 +if test $ac_cv_lib_termcap_main = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNCURSES 1 +#define HAVE_LIBTERMCAP 1 _ACEOF - LIBS="-lncurses $LIBS" + LIBS="-ltermcap $LIBS" else -echo "$as_me:$LINENO: checking for main in -ltermcap" >&5 -echo $ECHO_N "checking for main in -ltermcap... $ECHO_C" >&6 -if test "${ac_cv_lib_termcap_main+set}" = set; then +echo "$as_me:$LINENO: checking for main in -ltermlib" >&5 +echo $ECHO_N "checking for main in -ltermlib... $ECHO_C" >&6 +if test "${ac_cv_lib_termlib_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltermcap $LIBS" +LIBS="-ltermlib $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21793,35 +21793,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_termcap_main=yes + ac_cv_lib_termlib_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_termcap_main=no +ac_cv_lib_termlib_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_main" >&5 -echo "${ECHO_T}$ac_cv_lib_termcap_main" >&6 -if test $ac_cv_lib_termcap_main = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_termlib_main" >&5 +echo "${ECHO_T}$ac_cv_lib_termlib_main" >&6 +if test $ac_cv_lib_termlib_main = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBTERMCAP 1 +#define HAVE_LIBTERMLIB 1 _ACEOF - LIBS="-ltermcap $LIBS" + LIBS="-ltermlib $LIBS" else -echo "$as_me:$LINENO: checking for main in -ltermlib" >&5 -echo $ECHO_N "checking for main in -ltermlib... $ECHO_C" >&6 -if test "${ac_cv_lib_termlib_main+set}" = set; then +echo "$as_me:$LINENO: checking for main in -lncurses" >&5 +echo $ECHO_N "checking for main in -lncurses... $ECHO_C" >&6 +if test "${ac_cv_lib_ncurses_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltermlib $LIBS" +LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21860,25 +21860,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_termlib_main=yes + ac_cv_lib_ncurses_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_termlib_main=no +ac_cv_lib_ncurses_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_termlib_main" >&5 -echo "${ECHO_T}$ac_cv_lib_termlib_main" >&6 -if test $ac_cv_lib_termlib_main = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ncurses_main" >&6 +if test $ac_cv_lib_ncurses_main = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBTERMLIB 1 +#define HAVE_LIBNCURSES 1 _ACEOF - LIBS="-ltermlib $LIBS" + LIBS="-lncurses $LIBS" fi @@ -27049,6 +27049,7 @@ cat > conftest.c < conftest.c <&6 fi fi - if test "${G77}" = yes; then - ac_safe=_mieee -echo "$as_me:$LINENO: checking whether ${F77} accepts -mieee" >&5 -echo $ECHO_N "checking whether ${F77} accepts -mieee... $ECHO_C" >&6 -if eval "test \"\${r_cv_prog_f77_flag_${ac_safe}+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - -r_save_FFLAGS="${FFLAGS}" -FFLAGS="${FFLAGS} -mieee" -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "r_cv_prog_f77_flag_${ac_safe}=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "r_cv_prog_f77_flag_${ac_safe}=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -FFLAGS="${r_save_FFLAGS}" -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 - - -fi - -if eval "test \"`echo '$r_cv_prog_f77_flag_'$ac_safe`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - separator="" -test -z "${separator}" && separator=" " -if test -z "${R_XTRA_FFLAGS}"; then - R_XTRA_FFLAGS="-mieee" -else - R_XTRA_FFLAGS="${R_XTRA_FFLAGS}${separator}-mieee" -fi -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - else - ac_safe=_fpe3 -echo "$as_me:$LINENO: checking whether ${F77} accepts -fpe3" >&5 -echo $ECHO_N "checking whether ${F77} accepts -fpe3... $ECHO_C" >&6 -if eval "test \"\${r_cv_prog_f77_flag_${ac_safe}+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - -r_save_FFLAGS="${FFLAGS}" -FFLAGS="${FFLAGS} -fpe3" -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "r_cv_prog_f77_flag_${ac_safe}=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "r_cv_prog_f77_flag_${ac_safe}=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -FFLAGS="${r_save_FFLAGS}" -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 - - -fi - -if eval "test \"`echo '$r_cv_prog_f77_flag_'$ac_safe`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - separator="" -test -z "${separator}" && separator=" " -if test -z "${R_XTRA_FFLAGS}"; then - R_XTRA_FFLAGS="-fpe3" -else - R_XTRA_FFLAGS="${R_XTRA_FFLAGS}${separator}-fpe3" -fi -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - fi if test "${GXX}" = yes; then ac_safe=_mieee echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mieee" >&5 @@ -29135,6 +28991,7 @@ fi ;; fpicflags= ;; netbsd*) + fpicflags="-fPIC" if ${CPP} - -dM < /dev/null | grep __ELF__ >/dev/null ; then main_ldflags="-export-dynamic" shlib_ldflags="-shared"