]> andersk Git - gssapi-openssh.git/blobdiff - openssh/contrib/findssl.sh
release new patch today
[gssapi-openssh.git] / openssh / contrib / findssl.sh
index c01f35a5ccfe5cb96755869de7e11f97da9721d5..128db74c1064b4d46d82df05e72249b7223d0e80 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/sh
 #
+# $Id$
+#
 # findssl.sh
 #      Search for all instances of OpenSSL headers and libraries
 #      and print their versions.
 #      Written by Darren Tucker (dtucker at zip dot com dot au)
 #      This file is placed in the public domain.
 #
-# $Id$
+#      Release history:
 #      2002-07-27: Initial release.
 #      2002-08-04: Added public domain notice.
 #      2003-06-24: Incorporated readme, set library paths. First cvs version.
+#      2004-12-13: Add traps to cleanup temp files, from Amarendra Godbole.
 #
 # "OpenSSL headers do not match your library" are usually caused by
 # OpenSSH's configure picking up an older version of OpenSSL headers
 CC=gcc
 STATIC=-static
 
+#
+# Cleanup on interrupt
+#
+trap 'rm -f conftest.c' INT HUP TERM
+
 #
 # Set up conftest C source
 #
@@ -81,6 +89,25 @@ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:=$DEFAULT_LIBPATH}
 LIBRARY_PATH=${LIBRARY_PATH:=$DEFAULT_LIBPATH}
 export LIBPATH LD_LIBRARY_PATH LIBRARY_PATH
 
+# not all platforms have a 'which' command
+if which ls >/dev/null 2>/dev/null; then
+    : which is defined
+else
+    which () {
+       saveIFS="$IFS"
+       IFS=:
+       for p in $PATH; do
+           if test -x "$p/$1" -a -f "$p/$1"; then
+               IFS="$saveIFS"
+               echo "$p/$1"
+               return 0
+           fi
+       done
+       IFS="$saveIFS"
+       return 1
+    }
+fi
+
 #
 # Search for OpenSSL headers and print versions
 #
This page took 0.180629 seconds and 4 git commands to generate.