From 68f72235f8f41fa949823551d8e6476057ec5bd6 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Wed, 11 Jul 2001 23:35:33 +0000 Subject: [PATCH] using NOM_PATH_FILE to look for openssl was a bad idea --- configure.in | 84 ++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/configure.in b/configure.in index 0768d99f27..79a5818128 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.273 $) +AC_REVISION($Revision: 1.274 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -273,40 +273,6 @@ AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH) # AC_C_BIGENDIAN -# -# Subroutine for searching for an ordinary file (e.g., a stylesheet) -# in a number of directories: -# -# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES) -# -# If the file FILENAME is found in one of the DIRECTORIES, the shell -# variable VARIABLE is defined to its absolute pathname. Otherwise, -# it is set to FILENAME, with no directory prefix (that's not terribly -# useful, but looks less confusing in substitutions than leaving it -# empty). The variable VARIABLE will be substituted into output files. -# - -AC_DEFUN(NOM_PATH_FILE, [ -$1="" -AC_MSG_CHECKING(for $2) -for d in $3 -do - f=$d/$2 - if test -f $f - then - $1=$f - AC_MSG_RESULT($f) - break - fi -done -if test "X[$]$1" = "X" -then - AC_MSG_RESULT("not found"); - $1=$2 -fi -AC_SUBST($1) -]) - # # was --with-openssl specified? # @@ -323,14 +289,21 @@ case "$use_openssl" in USE_OPENSSL="" ;; *) - AC_MSG_RESULT(yes) if test "$use_openssl" = "yes" then # User did not specify a path - guess it openssldirs="/usr /usr/local /usr/pkg" - NOM_PATH_FILE(use_openssl, include/openssl/opensslv.h, $openssldirs) - if test "$use_openssl" = "include/openssl/opensslv.h" + for d in $openssldirs + do + if test -f $d/include/openssl/opensslv.h + then + use_openssl=$d + break + fi + done + if test "$use_openssl" = "yes" then + AC_MSG_RESULT(not found) AC_MSG_ERROR( [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path]) fi @@ -338,7 +311,6 @@ case "$use_openssl" in USE_OPENSSL='-DOPENSSL' DST_OPENSSL_INC="-I$use_openssl/include" DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" - AC_MSG_RESULT(using openssl from $use_openssl/lib and $use_openssl/include) AC_MSG_CHECKING(OpenSSL library version) @@ -1507,6 +1479,40 @@ AC_SUBST(JADETEX) AC_PATH_PROGS(PDFJADETEX, pdfjadetex, pdfjadetex) AC_SUBST(PDFJADETEX) +# +# Subroutine for searching for an ordinary file (e.g., a stylesheet) +# in a number of directories: +# +# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES) +# +# If the file FILENAME is found in one of the DIRECTORIES, the shell +# variable VARIABLE is defined to its absolute pathname. Otherwise, +# it is set to FILENAME, with no directory prefix (that's not terribly +# useful, but looks less confusing in substitutions than leaving it +# empty). The variable VARIABLE will be substituted into output files. +# + +AC_DEFUN(NOM_PATH_FILE, [ +$1="" +AC_MSG_CHECKING(for $2) +for d in $3 +do + f=$d/$2 + if test -f $f + then + $1=$f + AC_MSG_RESULT($f) + break + fi +done +if test "X[$]$1" = "X" +then + AC_MSG_RESULT("not found"); + $1=$2 +fi +AC_SUBST($1) +]) + NOM_PATH_FILE(SGMLCATALOG, catalog, $sgmltrees) #