--ctdldir)
CTDLDIR=$v
;;
+ --with-ssl)
+ SSL=yes
+ ;;
+ --without-ssl)
+ SSL=no
+ ;;
*)
echo $0 : unknown option $k
echo
echo ' --prefix=PREFIX Install files in PREFIX [/usr/local]'
echo ' --bindir=DIR Install executables in DIR [PREFIX/bin]'
echo ' --ctdldir=DIR Look for Citadel server in DIR [/usr/local/citadel]'
+ echo ' --with-ssl Force build with OpenSSL support [normally autodetected'
+ echo ' --without-ssl Force build without OpenSSL support [normally autodetected'
exit 1
;;
esac
[ "$CFLAGS" = "" ] && CFLAGS='-ggdb'
[ "$LDFLAGS" = "" ] && LDFLAGS=''
+# Test for OpenSSL
+[ "$SSL" != "yes" ] && [ "$SSL" != "no" ] && {
+ echo Testing for OpenSSL...
+ tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/configure.$$
+ tempcc=${tempfile}.c
+ cat >$tempcc <<!
+#include <openssl/ssl.h>
+int main(int argc, char **argv) {
+ SSL_load_error_strings();
+ exit(0);
+}
+!
+ SSL='no';
+ cc $tempcc -lssl -lcrypto -o $tempfile && $tempfile && SSL='yes'
+ rm -f $tempfile 2>/dev/null
+ rm -f $tempcc 2>/dev/null
+}
+echo SSL: $SSL
+[ "$SSL" = "yes" ] && {
+ CFLAGS=${CFLAGS}' -DHAVE_OPENSSL'
+ LDFLAGS=${LDFLAGS}' -lssl -lcrypto'
+}
+
# Output the config.mk
(