42 |
extrassldir=$optarg |
extrassldir=$optarg |
43 |
;; |
;; |
44 |
--without-openssl*) |
--without-openssl*) |
45 |
|
withoutopenssl=yes |
46 |
;; |
;; |
47 |
--with-egd-socket=*) |
--with-egd-socket=*) |
48 |
extraegdpath=$optarg |
extraegdpath=$optarg |
66 |
echo "Build configuration:" |
echo "Build configuration:" |
67 |
echo " --with-x=DIR look for X Window System at DIR/include, DIR/lib" |
echo " --with-x=DIR look for X Window System at DIR/include, DIR/lib" |
68 |
echo " --with-openssl=DIR look for OpenSSL at DIR/include, DIR/lib" |
echo " --with-openssl=DIR look for OpenSSL at DIR/include, DIR/lib" |
69 |
|
echo " --without-openssl use in-tree crypto, even if OpenSSL is available" |
70 |
echo " --with-egd-socket=PATH look for Entropy Gathering Daemon socket at PATH" |
echo " --with-egd-socket=PATH look for Entropy Gathering Daemon socket at PATH" |
71 |
echo " --with-debug enable protocol debugging output" |
echo " --with-debug enable protocol debugging output" |
72 |
echo " --with-debug-kbd enable debugging of keyboard handling" |
echo " --with-debug-kbd enable debugging of keyboard handling" |
142 |
ldflags="$ldflags -lX11" |
ldflags="$ldflags -lX11" |
143 |
|
|
144 |
|
|
145 |
# Find OpenSSL installation if available |
if [ -z "$withoutopenssl" ]; then |
146 |
|
# Find OpenSSL installation if available |
147 |
ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local" |
ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local" |
148 |
|
|
149 |
for dir in $ssldirs; do |
for dir in $ssldirs; do |
150 |
if [ -f $dir/include/openssl/rc4.h ]; then |
if [ -f $dir/include/openssl/rc4.h ]; then |
151 |
ssldir=$dir |
ssldir=$dir |
152 |
break |
break |
153 |
|
fi |
154 |
|
done |
155 |
|
|
156 |
|
if [ -z "$ssldir" ]; then |
157 |
|
echo "WARNING: could not find OpenSSL headers" |
158 |
|
echo "(searched for include/openssl/rc4.h in: $ssldirs)" |
159 |
|
echo "Using in-tree crypto; installing OpenSSL is recommended." |
160 |
|
echo |
161 |
|
else |
162 |
|
echo "OpenSSL:" |
163 |
|
echo " includes $ssldir/include" |
164 |
|
echo " libraries $ssldir/lib" |
165 |
|
echo |
166 |
|
|
167 |
|
echo "CRYPTOBJ =" >>Makeconf |
168 |
|
|
169 |
|
if [ $ssldir != "/usr" ]; then |
170 |
|
cflags="$cflags -I$ssldir/include" |
171 |
|
ldflags="$ldflags -L$ssldir/lib" |
172 |
|
rpath="$rpath:$ssldir/lib" |
173 |
|
fi |
174 |
|
|
175 |
|
cflags="$cflags -DWITH_OPENSSL" |
176 |
|
ldflags="$ldflags -lcrypto" |
177 |
fi |
fi |
|
done |
|
|
|
|
|
if [ -z "$ssldir" ]; then |
|
|
echo "WARNING: could not find OpenSSL headers" |
|
|
echo "(searched for include/openssl/rc4.h in: $ssldirs)" |
|
|
echo "Using in-tree crypto; installing OpenSSL is recommended." |
|
|
echo |
|
|
else |
|
|
echo "OpenSSL:" |
|
|
echo " includes $ssldir/include" |
|
|
echo " libraries $ssldir/lib" |
|
|
echo |
|
|
|
|
|
echo "CRYPTOBJ =" >>Makeconf |
|
|
|
|
|
if [ $ssldir != "/usr" ]; then |
|
|
cflags="$cflags -I$ssldir/include" |
|
|
ldflags="$ldflags -L$ssldir/lib" |
|
|
rpath="$rpath:$ssldir/lib" |
|
|
fi |
|
|
|
|
|
cflags="$cflags -DWITH_OPENSSL" |
|
|
ldflags="$ldflags -lcrypto" |
|
178 |
fi |
fi |
179 |
|
|
180 |
|
|
181 |
# Find EGD socket if we don't have /dev/urandom or /dev/random |
# Find EGD socket if we don't have /dev/urandom or /dev/random |
182 |
|
|