Simplify handling of --with-ssl-dir.

ok djm@
This commit is contained in:
Darren Tucker 2022-02-11 20:09:32 +11:00
parent ea13fc830f
commit cd00b48cf1
1 changed files with 9 additions and 15 deletions

View File

@ -2639,23 +2639,17 @@ AC_ARG_WITH([ssl-dir],
./*|../*) withval="`pwd`/$withval" ./*|../*) withval="`pwd`/$withval"
esac esac
if test -d "$withval/lib"; then if test -d "$withval/lib"; then
if test -n "${rpath_opt}"; then libcrypto_path="${withval}/lib"
LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
else
LDFLAGS="-L${withval}/lib ${LDFLAGS}"
fi
elif test -d "$withval/lib64"; then elif test -d "$withval/lib64"; then
if test -n "${rpath_opt}"; then libcrypto_path="$withval/lib64"
LDFLAGS="-L${withval}/lib64 ${rpath_opt}${withval}/lib64 ${LDFLAGS}"
else
LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
fi
else else
if test -n "${rpath_opt}"; then # Built but not installed
LDFLAGS="-L${withval} ${rpath_opt}${withval} ${LDFLAGS}" libcrypto_path="${withval}"
else fi
LDFLAGS="-L${withval} ${LDFLAGS}" if test -n "${rpath_opt}"; then
fi LDFLAGS="-L${libcrypto_path} ${rpath_opt}${libcrypto_path} ${LDFLAGS}"
else
LDFLAGS="-L${libcrypto_path} ${LDFLAGS}"
fi fi
if test -d "$withval/include"; then if test -d "$withval/include"; then
CPPFLAGS="-I${withval}/include ${CPPFLAGS}" CPPFLAGS="-I${withval}/include ${CPPFLAGS}"