You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2001/05/10 13:48:21 UTC
Re: cvs commit: httpd-2.0/modules/ssl config.m4
fielding@apache.org writes:
> fielding 01/05/09 18:47:47
>
> Modified: . acinclude.m4 hints.m4
> modules/ssl config.m4
> Log:
> Eventually we will want to only find openssl once regardless of how
> many modules depend on it, so make the check an autoconf macro.
> Note that this still isn't being checked "the autoconf way", but it
> is better than what we have now.
>
...
> Index: acinclude.m4
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/acinclude.m4,v
> retrieving revision 1.80
> retrieving revision 1.81
> diff -u -r1.80 -r1.81
> --- acinclude.m4 2001/04/29 08:25:52 1.80
> +++ acinclude.m4 2001/05/10 01:47:45 1.81
> @@ -349,3 +349,105 @@
> apache_cxx_done=yes
> fi
> ])
> +
> +dnl
> +dnl APACHE_CHECK_SSL_TOOLKIT
> +dnl
> +dnl Find the openssl toolkit installation and check it for the right
> +dnl version, then add its flags to INCLUDES and LIBS. This should
> +dnl really be using a custom AC_TRY_COMPILE function to test the includes
> +dnl and then AC_TRY_LINK to test the libraries directly for the version,
> +dnl but that will require someone who knows how to program openssl.
> +dnl
> +AC_DEFUN(APACHE_CHECK_SSL_TOOLKIT,[
> + AC_MSG_CHECKING(for SSL/TLS toolkit base)
> + ap_ssltk_base=""
> + AC_ARG_WITH(ssl, [ --with-ssl[=DIR] SSL/TLS toolkit (OpenSSL)], [
> + if test "x$withval" != "xyes" -a "x$withval" != "x"; then
> + ap_ssltk_base="$withval"
> + fi
> + ])
> + if test "x$ap_ssltk_base" = "x"; then
> + AC_CACHE_VAL(ap_cv_ssltk,[
> + #
> + # shotgun approach: find all occurrences of the openssl program
> + #
> + ap_ssltk_try=""
> + for p in /usr/local/openssl/bin /usr/local/ssl/bin $path; do
> + if test -f "$p/openssl"; then
> + ap_ssltk_try="$ap_ssltk_try $p"
> + fi
> + done
> + if test "x$ap_ssltk_try" = "x"; then
> + AC_MSG_ERROR(['openssl' not found in path])
> + fi
> + for p in $ap_ssltk_try; do
> + ap_ssltk_version="`$p/openssl version`"
> + case "$ap_ssltk_version" in
> + *[[^0-9a-z.]][[1-9]]* | \
> + *[[^0-9a-z.]]0.9.[[6-9]]* | \
> + *[[^0-9a-z.]]0.[[1-9]][[0-9]]* )
> + ap_cv_ssltk="`(cd $p/.. && pwd)`"
> + break
> + ;;
> + *)
> + # skip because it is too old or a bad result
> + ;;
> + esac
Unfortunately this breaks AIX, Solaris, and Tru64 for unknown reasons :(
The error message:
checking whether to enable mod_ssl... no
./configure: syntax error at line 9031: `^' unexpected
Snippet from configure (line 9031 is the first one with '^':
#
# shotgun approach: find all occurrences of the openssl program
#
ap_ssltk_try=""
for p in /usr/local/openssl/bin /usr/local/ssl/bin $path; do
if test -f "$p/openssl"; then
ap_ssltk_try="$ap_ssltk_try $p"
fi
done
if test "x$ap_ssltk_try" = "x"; then
{ echo "configure: error: 'openssl' not found in path" 1>&2; exit 1; }
fi
for p in $ap_ssltk_try; do
ap_ssltk_version="`$p/openssl version`"
case "$ap_ssltk_version" in
9031-> *[^0-9a-z.][1-9]* | \
*[^0-9a-z.]0.9.[6-9]* | \
*[^0-9a-z.]0.[1-9][0-9]* )
ap_cv_ssltk="`(cd $p/.. && pwd)`"
break
;;
*)
# skip because it is too old or a bad result
;;
esac
done
if test "x$ap_cv_ssltk" = "x"; then
{ echo "configure: error: requires OpenSSL 0.9.6 or higher" 1>&2; exit 1; }
fi
This little shell script seems to work fine on Tru64, so I'm doubly confused.
---------cut here-------
ap_ssltk_version=$1
case "$ap_ssltk_version" in
*[^0-9a-z.][1-9]* | \
*[^0-9a-z.]0.9.[6-9]* | \
*[^0-9a-z.]0.[1-9][0-9]* )
echo "we got a match"
;;
*)
echo "no match"
# skip because it is too old or a bad result
;;
esac
---------cut here--------
Any suggestions?
--
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...
Re: cvs commit: httpd-2.0/modules/ssl config.m4
Posted by Jeff Trawick <tr...@bellsouth.net>.
Jeff Trawick <tr...@bellsouth.net> writes:
> This little shell script seems to work fine on Tru64, so I'm doubly confused.
>
> ---------cut here-------
> ap_ssltk_version=$1
>
> case "$ap_ssltk_version" in
> *[^0-9a-z.][1-9]* | \
> *[^0-9a-z.]0.9.[6-9]* | \
> *[^0-9a-z.]0.[1-9][0-9]* )
> echo "we got a match"
> ;;
> *)
> echo "no match"
> # skip because it is too old or a bad result
> ;;
> esac
> ---------cut here--------
No, it doesn't work with /bin/sh. I was running the
little shell script with bash :)
--
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...