aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@091d3ff0-52bc-4db5-b7a6-18201e4c0cca>2012-05-08 15:08:22 +0000
committerknarf <knarf@091d3ff0-52bc-4db5-b7a6-18201e4c0cca>2012-05-08 15:08:22 +0000
commit0d393df27154436460b6b3fed0b32bb992933a2a (patch)
tree0779b64923649719144d29b06f9920d540460d28
parentdb99f28e4c69c09d9a7cc3220a6d89511ddbc0b3 (diff)
make sure to find a standard openssl installation - similar script to HDF5
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/OpenSSL/trunk@30 091d3ff0-52bc-4db5-b7a6-18201e4c0cca
-rw-r--r--OpenSSL.sh29
1 files changed, 21 insertions, 8 deletions
diff --git a/OpenSSL.sh b/OpenSSL.sh
index 24fcc03..225fe97 100644
--- a/OpenSSL.sh
+++ b/OpenSSL.sh
@@ -21,21 +21,34 @@ if [ -z "${OPENSSL_DIR}" ]; then
echo "OpenSSL selected, but OPENSSL_DIR not set. Checking some places..."
echo "END MESSAGE"
- for libext in a dylib; do
- FILES="include/openssl/ssl.h lib/libssl.${libext} lib/libcrypto.${libext}"
- DIRS="/usr /usr/local /opt/local"
- for dir in $DIRS; do
- OPENSSL_DIR="$dir"
- for file in $FILES; do
- if [ ! -r "$dir/$file" ]; then
- unset OPENSSL_DIR
+ DIRS="/usr /usr/local /opt/local /usr/local/packages usr/local/apps /opt/local ${HOME} c:/packages/"
+ # look into each directory
+ for dir in $DIRS; do
+ # libraries might have different file extensions
+ for libext in a so dylib; do
+ # libraries can be in /lib or /lib64
+ for libdir in lib64 lib; do
+ FILES="include/openssl/ssl.h $libdir/libssl.${libext} $libdir/libcrypto.${libext}"
+ # assume this is the one and check all needed files
+ OPENSSL_DIR="$dir"
+ for file in $FILES; do
+ # discard this directory if one file was not found
+ if [ ! -r "$dir/$file" ]; then
+ unset OPENSSL_DIR
+ break
+ fi
+ done
+ # don't look further if all files have been found
+ if [ -n "$OPENSSL_DIR" ]; then
break
fi
done
+ # don't look further if all files have been found
if [ -n "$OPENSSL_DIR" ]; then
break
fi
done
+ # don't look further if all files have been found
if [ -n "$OPENSSL_DIR" ]; then
break
fi