$NetBSD: patch-ab,v 1.8 2000/12/27 02:34:12 fredb Exp $ --- configure.in.orig Thu Dec 14 05:49:06 2000 +++ configure.in Tue Dec 26 20:02:08 2000 @@ -90,10 +90,10 @@ if test -n "$have_tn3270" ; then AC_DEFINE_UNQUOTED(TN3270_PROGRAM, "$have_tn3270") fi -AC_CHECK_PROGS(have_perl, perl) -if test ! -n "$have_perl" ; then - AC_MSG_ERROR("Perl needs to be installed in order to compile libwww") -fi +dnlAC_CHECK_PROGS(have_perl, perl) +dnlif test ! -n "$have_perl" ; then +dnl AC_MSG_ERROR("Perl needs to be installed in order to compile libwww") +dnlfi AC_PATH_PROG(RM, rm, rm) AC_PATH_PROG(AR, ar, ar) @@ -307,7 +307,10 @@ AC_MSG_RESULT(yes) AC_DEFINE(HT_POSIX_REGEX) if test "x$withval" = "xyes"; then - AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] ) + AC_TRY_LINK([], + [ regexec(); ], + [], + [ AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] ) ] ) else AC_ADDLIB($withval) AC_TRY_LINK([], @@ -535,13 +538,17 @@ dnl Checks for libwww and OpenSSL: AC_MSG_CHECKING(whether we can find OpenSSL) dnl find the ssl library dir (empirical) -if test -d '/usr/local/ssl/lib'; then +if test -f "${prefix}/lib/libssl.a" -a -f "${prefix}/lib/libcrypto.a"; then + ssllib="-L${prefix}/lib -lssl -lcrypto" +elif test -d '/usr/local/ssl/lib'; then ssllib="-L/usr/local/ssl/lib -lssl -lcrypto" else ssllib="-L/usr/lib -lssl -lcrypto" fi dnl find the ssl include dir (empirical) -if test -d '/usr/local/ssl/include'; then +if test -d "${prefix}/include/openssl"; then + sslinc="-I${prefix}/include -I${prefix}/include/openssl" +elif test -d '/usr/local/ssl/include'; then sslinc="-I/usr/local/ssl/include" elif test -d '/usr/local/openssl/include'; then sslinc="-I/usr/local/openssl/include" --- configure.orig Wed Dec 20 05:00:17 2000 +++ configure Tue Dec 26 20:04:54 2000 @@ -2405,43 +2405,43 @@ EOF fi -for ac_prog in perl -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2414: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_have_perl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$have_perl"; then - ac_cv_prog_have_perl="$have_perl" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_have_perl="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -have_perl="$ac_cv_prog_have_perl" -if test -n "$have_perl"; then - echo "$ac_t""$have_perl" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$have_perl" && break -done - -if test ! -n "$have_perl" ; then - { echo "configure: error: "Perl needs to be installed in order to compile libwww"" 1>&2; exit 1; } -fi +#for ac_prog in perl +#do +## Extract the first word of "$ac_prog", so it can be a program name with args. +#set dummy $ac_prog; ac_word=$2 +#echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +#echo "configure:2414: checking for $ac_word" >&5 +#if eval "test \"`echo '$''{'ac_cv_prog_have_perl'+set}'`\" = set"; then +# echo $ac_n "(cached) $ac_c" 1>&6 +#else +# if test -n "$have_perl"; then +# ac_cv_prog_have_perl="$have_perl" # Let the user override the test. +#else +# IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +# ac_dummy="$PATH" +# for ac_dir in $ac_dummy; do +# test -z "$ac_dir" && ac_dir=. +# if test -f $ac_dir/$ac_word; then +# ac_cv_prog_have_perl="$ac_prog" +# break +# fi +# done +# IFS="$ac_save_ifs" +#fi +#fi +#have_perl="$ac_cv_prog_have_perl" +#if test -n "$have_perl"; then +# echo "$ac_t""$have_perl" 1>&6 +#else +# echo "$ac_t""no" 1>&6 +#fi +# +#test -n "$have_perl" && break +#done +# +#if test ! -n "$have_perl" ; then +# { echo "configure: error: "Perl needs to be installed in order to compile libwww"" 1>&2; exit 1; } +#fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 @@ -6790,8 +6790,22 @@ EOF if test "x$withval" = "xyes"; then + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* echo $ac_n "checking for regexec in -lrx""... $ac_c" 1>&6 -echo "configure:6795: checking for regexec in -lrx" >&5 +echo "configure:6809: checking for regexec in -lrx" >&5 ac_lib_var=`echo rx'_'regexec | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6830,6 +6844,8 @@ echo "$ac_t""no" 1>&6 fi +fi +rm -f conftest* else echo $ac_n "checking for $withval""... $ac_c" 1>&6 echo "configure:6836: checking for $withval" >&5 @@ -7270,13 +7286,17 @@ echo $ac_n "checking whether we can find OpenSSL""... $ac_c" 1>&6 -echo "configure:7274: checking whether we can find OpenSSL" >&5 -if test -d '/usr/local/ssl/lib'; then +echo "configure:7290: checking whether we can find OpenSSL" >&5 +if test -f "${prefix}/lib/libssl.a" -a -f "${prefix}/lib/libcrypto.a"; then + ssllib="-L${prefix}/lib -lssl -lcrypto" +elif test -d '/usr/local/ssl/lib'; then ssllib="-L/usr/local/ssl/lib -lssl -lcrypto" else ssllib="-L/usr/lib -lssl -lcrypto" fi -if test -d '/usr/local/ssl/include'; then +if test -d "${prefix}/include/openssl"; then + sslinc="-I${prefix}/include -I${prefix}/include/openssl" +elif test -d '/usr/local/ssl/include'; then sslinc="-I/usr/local/ssl/include" elif test -d '/usr/local/openssl/include'; then sslinc="-I/usr/local/openssl/include" @@ -8195,7 +8215,7 @@ s%@have_telnet@%$have_telnet%g s%@have_rlogin@%$have_rlogin%g s%@have_tn3270@%$have_tn3270%g -s%@have_perl@%$have_perl%g +s%@have_perl@%perl%g s%@RM@%$RM%g s%@AR@%$AR%g s%@MKDIR@%$MKDIR%g