summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/util/pod2mantest
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-09-05 12:49:42 +0000
committermarkus <markus@openbsd.org>2002-09-05 12:49:42 +0000
commitc2453e8dd61d594a6fd76c96e4328bea4eff0679 (patch)
tree751b7284ce2d1bba2c7df0f32149fbdd95f06c61 /lib/libcrypto/util/pod2mantest
parentAllow kernels with no display device configured to link. Found by marc@ (diff)
downloadwireguard-openbsd-c2453e8dd61d594a6fd76c96e4328bea4eff0679.tar.xz
wireguard-openbsd-c2453e8dd61d594a6fd76c96e4328bea4eff0679.zip
import openssl-0.9.7-beta1
Diffstat (limited to 'lib/libcrypto/util/pod2mantest')
-rw-r--r--lib/libcrypto/util/pod2mantest53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/libcrypto/util/pod2mantest b/lib/libcrypto/util/pod2mantest
new file mode 100644
index 00000000000..79aefafac0a
--- /dev/null
+++ b/lib/libcrypto/util/pod2mantest
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# This script is used by test/Makefile.ssl to check whether a sane 'pod2man'
+# is installed.
+# ('make install' should not try to run 'pod2man' if it does not exist or if
+# it is a broken 'pod2man' version that is known to cause trouble. if we find
+# the system 'pod2man' to be broken, we use our own copy instead)
+#
+# In any case, output an appropriate command line for running (or not
+# running) pod2man.
+
+
+IFS=:
+try_without_dir=true
+# First we try "pod2man", then "$dir/pod2man" for each item in $PATH.
+for dir in dummy:$PATH; do
+ if [ "$try_without_dir" = true ]; then
+ # first iteration
+ pod2man=pod2man
+ try_without_dir=false
+ else
+ # second and later iterations
+ pod2man="$dir/pod2man"
+ if [ ! -f "$pod2man" ]; then # '-x' is not available on Ultrix
+ pod2man=''
+ fi
+ fi
+
+ if [ ! "$pod2man" = '' ]; then
+ failure=none
+
+
+ if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | grep '^MARKER - ' >/dev/null 2>&1; then
+ failure=MultilineTest
+ fi
+
+
+ if [ "$failure" = none ]; then
+ echo "$pod2man"
+ exit 0
+ fi
+
+ echo "$pod2man does not work properly ('$failure' failed). Looking for another pod2man ..." >&2
+ fi
+done
+
+echo "No working pod2man found. Consider installing a new version." >&2
+if [ "$1" = ignore ]; then
+ echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2
+ echo "util/pod2man.pl"
+ exit 0
+fi
+exit 1