httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject cvs commit: httpd-2.0/modules/tls config.m4
Date Tue, 08 May 2001 08:54:27 GMT
martin      01/05/08 01:54:26

  Modified:    modules/tls config.m4
  Log:
  Try to auto-detect the location of the OpenSSL stuff. The old logic was
  incorrect anyway (it tested for .../ssl/ssl.h and then used .../include/ssl.h).
  Now we have a configurable list of candidates, each with:
  a name, an include path, a lib path, and a list of libs.
  
  Revision  Changes    Path
  1.8       +29 -27    httpd-2.0/modules/tls/config.m4
  
  Index: config.m4
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/tls/config.m4,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- config.m4	2001/05/05 08:27:39	1.7
  +++ config.m4	2001/05/08 08:54:24	1.8
  @@ -6,36 +6,38 @@
     AC_MSG_CHECKING(for TLS/SSL library)
     AC_ARG_WITH(tls,   [  --with-tls=DIR          use a specific TLS/SSL library],
     [
  -      searchfile="$withval/inc/ssl.h"
  -      if test -f $searchfile ; then
  -          APR_ADDTO(INCLUDES, [-I$withval/inc])
  -          APR_ADDTO(LIBS, [-L$withval -lsslc])
  -          ssl_lib="SSLC"
  -      else
  -          searchfile="$withval/ssl/ssl.h"
  -          if test -f $searchfile ; then
  -              APR_ADDTO(INCLUDES, [-I$withval/include])
  -              APR_ADDTO(LIBS, [-L$withval -lssl -lcrypto])
  -              ssl_lib="OpenSSL"
  -          else
  -              searchfile="$withval/openssl/ssl.h"
  -              if test -f $searchfile ; then
  -                  APR_ADDTO(INCLUDES, [-I$withval/openssl])
  -                  APR_ADDTO(LIBS, [-L$withval -lssl -lcrypto])
  -                  ssl_lib="OpenSSL"
  -              else
  -                  searchfile="$withval/include/openssl/ssl.h"
  -                  if test -f $searchfile ; then
  -                      APR_ADDTO(INCLUDES, [-I$withval/include])
  -                      APR_ADDTO(LIBS, [-L$withval/lib -lssl -lcrypto])
  -                      ssl_lib="OpenSSL"
  -                  else
  -                      AC_MSG_ERROR(no - Unable to locate $withval/inc/ssl.h)
  -                  fi
  +      if test x"$withval" = x"yes"; then
  +          # FreeBSD has OpenSSL in /usr/{include,lib}
  +          for dir in  /usr /usr/local/openssl /usr/local/ssl
  +          do
  +              if test -d $dir && test -f $dir/lib/libcrypto.a; then
  +                  withval=$dir
  +                  break
                 fi
  +          done
  +      fi
  +      ssl_lib=unknown
  +      for params in \
  +        "OpenSSL|/include/openssl|/lib|-lssl -lcrypto" \
  +	"SSLC|/inc||-lsslc"
  +      do
  +          prod=`IFS="|"; set -- $params; echo $1`
  +          incdir=`IFS="|"; set -- $params; echo $2`
  +          libdir=`IFS="|"; set -- $params; echo $3`
  +          libs=`IFS="|"; set -- $params; echo $4`
  +          searchfile="${withval}${incdir}/ssl.h"
  +          if test -f ${searchfile} ; then
  +              APR_ADDTO(INCLUDES, [-I${withval}${incdir}])
  +              APR_ADDTO(LIBS, [-L${withval}${libdir} ${libs}])
  +              ssl_lib="${prod}"
  +              break
             fi
  +      done
  +      if test x"${ssl_lib}" = x"unknown"; then
  +        AC_MSG_ERROR(--with-tls given but no appropriate lib found)
  +      else
  +        AC_MSG_RESULT(found $ssl_lib)
         fi
  -      AC_MSG_RESULT(found $ssl_lib)
     ],[
         AC_MSG_ERROR(--with-tls not given)
     ] ) ] )
  
  
  

Mime
View raw message