summaryrefslogtreecommitdiff
path: root/contrib/findssl.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-02-19 22:44:25 +1100
committerDarren Tucker <dtucker@zip.com.au>2007-02-19 22:44:25 +1100
commit53ced25d6185b4a02305e9d4bf648113155dde07 (patch)
tree0cf74a6241f04785790546eda1f13269e28af1bc /contrib/findssl.sh
parent1629c07c0725fd5cc533c9664b8e8add27a81c69 (diff)
- (dtucker) [contrib/findssl.sh] Add "which" as a shell function since some
platforms don't have it. Patch from dleonard at vintela.com.
Diffstat (limited to 'contrib/findssl.sh')
-rw-r--r--contrib/findssl.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/contrib/findssl.sh b/contrib/findssl.sh
index 716abced5..263fd2644 100644
--- a/contrib/findssl.sh
+++ b/contrib/findssl.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $Id: findssl.sh,v 1.3 2004/12/13 07:08:33 dtucker Exp $ 3# $Id: findssl.sh,v 1.4 2007/02/19 11:44:25 dtucker Exp $
4# 4#
5# findssl.sh 5# findssl.sh
6# Search for all instances of OpenSSL headers and libraries 6# Search for all instances of OpenSSL headers and libraries
@@ -89,6 +89,25 @@ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:=$DEFAULT_LIBPATH}
89LIBRARY_PATH=${LIBRARY_PATH:=$DEFAULT_LIBPATH} 89LIBRARY_PATH=${LIBRARY_PATH:=$DEFAULT_LIBPATH}
90export LIBPATH LD_LIBRARY_PATH LIBRARY_PATH 90export LIBPATH LD_LIBRARY_PATH LIBRARY_PATH
91 91
92# not all platforms have a 'which' command
93if which ls >/dev/null 2>/dev/null; then
94 : which is defined
95else
96 which () {
97 saveIFS="$IFS"
98 IFS=:
99 for p in $PATH; do
100 if test -x "$p/$1" -a -f "$p/$1"; then
101 IFS="$saveIFS"
102 echo "$p/$1"
103 return 0
104 fi
105 done
106 IFS="$saveIFS"
107 return 1
108 }
109fi
110
92# 111#
93# Search for OpenSSL headers and print versions 112# Search for OpenSSL headers and print versions
94# 113#