--- configure.old 2009-07-31 00:12:26.000000000 -0700 +++ configure 2009-07-31 00:10:05.000000000 -0700 @@ -11763,16 +11763,23 @@ if test -n "$cf_cflags_ssl" ; then case "$cf_cflags_ssl" in #(vi *-I*) #(vi - cf_cv_header_path_ssl=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'` - ;; - *) - cf_cv_header_path_ssl=/usr/include + # if openssl pkg-config lists more than one includedir, + # primary one will be first + # (e.g. kerberos includedir may follow) + # so, pick out path following first '-I' + cf_cv_header_path_ssl=`echo "$cf_cflags_ssl" | sed -e 's/\(-I[^ ]*\).*/\1/' -e 's/.*-I//'` + cf_cv_header_path_ssl=$cf_cv_header_path_ssl/openssl ;; esac - if test -d $cf_cv_header_path_ssl/openssl ; then - cf_cv_header_path_ssl=$cf_cv_header_path_ssl/openssl + # try standard location if couldn't + # figure out path using pkg-config + if ! test -d "$cf_cv_header_path_ssl" ; then + if test -d "/usr/include/openssl" ; then + cf_cv_header_path_ssl=/usr/include/openssl + else + cf_cv_header_path_ssl=/usr/include + fi fi - cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags=