Updates for moving SSL support out of main library.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11622 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-12-04 14:59:09 +00:00
parent 3cc1227360
commit a4faad69d5
12 changed files with 793 additions and 649 deletions

106
configure vendored
View file

@ -5246,7 +5246,7 @@ if test "${enable_openssl+set}" = set; then
enableval="$enable_openssl"
:
else
enable_openssl=no
enable_openssl=yes
fi
# Check whether --with-openssl-include or --without-openssl-include was given.
@ -5271,9 +5271,16 @@ libs_temp=$LIBS
if test "$openssl_incdir" != "no"; then
CPPFLAGS="$CPPFLAGS -I$openssl_incdir"
SSLFLAGS="-I$openssl_incdir"
else
SSLFLAGS=
fi
if test "$openssl_libdir" != "no"; then
LIBS="$LIBS -L$openssl_libdir"
SSLLIBS="-L$openssl_libdir"
else
SSLLIBS=
fi
if test $enable_openssl = yes; then
@ -5281,17 +5288,17 @@ if test $enable_openssl = yes; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5285: checking for $ac_hdr" >&5
echo "configure:5292: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5290 "configure"
#line 5297 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5320,11 +5327,13 @@ done
if test $ac_cv_header_openssl_ssl_h = no; then
echo "Could not find openssl headers"
echo "Check to make sure you have a recent version of openssl installed"
echo "The SSL bundle will not be built"
echo "configure: warning: Could not find openssl headers" 1>&2
echo "configure: warning: The SSL bundle will not be built" 1>&2
ssl_ok=no
else
echo $ac_n "checking for CRYPTO_malloc in -lcrypto""... $ac_c" 1>&6
echo "configure:5328: checking for CRYPTO_malloc in -lcrypto" >&5
echo "configure:5337: checking for CRYPTO_malloc in -lcrypto" >&5
ac_lib_var=`echo crypto'_'CRYPTO_malloc | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5332,7 +5341,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5336 "configure"
#line 5345 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5343,7 +5352,7 @@ int main() {
CRYPTO_malloc()
; return 0; }
EOF
if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5368,7 +5377,7 @@ fi
base_libs="$LIBS"
LIBS="$LIBS -lcrypto"
echo $ac_n "checking for ssl2_clear in -lssl""... $ac_c" 1>&6
echo "configure:5372: checking for ssl2_clear in -lssl" >&5
echo "configure:5381: checking for ssl2_clear in -lssl" >&5
ac_lib_var=`echo ssl'_'ssl2_clear | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5376,7 +5385,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lssl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5380 "configure"
#line 5389 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5387,7 +5396,7 @@ int main() {
ssl2_clear()
; return 0; }
EOF
if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5411,18 +5420,18 @@ fi
if test "$ssl_ok" = yes; then
echo "found openssl"
LIBS="$base_libs -lssl -lcrypto"
cat >> confdefs.h <<\EOF
#define HAVE_OPENSSL 1
EOF
SSLLIBS="$SSLLIBS -lssl -lcrypto"
else
SSLLIBS="$SSLLIBS -lcrypto"
echo "Could not find openssl crypto library"
echo "Check to make sure you have a recent version of openssl installed"
echo "configure: warning: Could not find openssl headers" 1>&2
echo "The SSL bundle will not be built"
echo "configure: warning: Could not find openssl libraries" 1>&2
echo "configure: warning: The SSL bundle will not be built" 1>&2
fi
echo $ac_n "checking for des_setkey in -lcipher""... $ac_c" 1>&6
echo "configure:5426: checking for des_setkey in -lcipher" >&5
echo "configure:5435: checking for des_setkey in -lcipher" >&5
ac_lib_var=`echo cipher'_'des_setkey | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5430,7 +5439,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcipher $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5434 "configure"
#line 5443 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5441,7 +5450,7 @@ int main() {
des_setkey()
; return 0; }
EOF
if { (eval echo configure:5445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5465,19 +5474,29 @@ fi
if test "$cipher_ok" = yes; then
echo "found cipher"
LIBS="$LIBS -lcipher"
SSLLIBS="$SSLLIBS -lcipher"
fi
else
echo "Could not find openssl library"
echo "Check to make sure you have a recent version of openssl installed"
echo "configure: warning: Could not find openssl headers" 1>&2
echo "The SSL bundle will not be built"
echo "configure: warning: Could not find openssl libraries" 1>&2
echo "configure: warning: The SSL bundle will not be built" 1>&2
fi
fi
else
echo "The use of openssl was disabled"
echo "The SSL bundle will not be built"
echo "configure: warning: The use of openssl was disabled" 1>&2
echo "configure: warning: The SSL bundle will not be built" 1>&2
fi
HAVE_OPENSSL=$ssl_ok
if test "$ssl_ok" = "no"; then
CPPFLAGS="$cppflags_temp";
LIBS="$libs_temp";
fi
CPPFLAGS="$cppflags_temp";
LIBS="$libs_temp";
#--------------------------------------------------------------------
# Check GMP for NSDecimal
@ -5515,17 +5534,17 @@ for ac_hdr in gmp.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5519: checking for $ac_hdr" >&5
echo "configure:5538: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5524 "configure"
#line 5543 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5553,7 +5572,7 @@ done
if test $ac_cv_header_gmp_h = yes; then
echo $ac_n "checking for mpf_abs in -lgmp""... $ac_c" 1>&6
echo "configure:5557: checking for mpf_abs in -lgmp" >&5
echo "configure:5576: checking for mpf_abs in -lgmp" >&5
ac_lib_var=`echo gmp'_'mpf_abs | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5561,7 +5580,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgmp $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5565 "configure"
#line 5584 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5572,7 +5591,7 @@ int main() {
mpf_abs()
; return 0; }
EOF
if { (eval echo configure:5576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5595,7 +5614,7 @@ fi
if test "$gmp_ok" = no; then
echo $ac_n "checking for __gmpf_abs in -lgmp""... $ac_c" 1>&6
echo "configure:5599: checking for __gmpf_abs in -lgmp" >&5
echo "configure:5618: checking for __gmpf_abs in -lgmp" >&5
ac_lib_var=`echo gmp'_'__gmpf_abs | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5603,7 +5622,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgmp $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5607 "configure"
#line 5626 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5614,7 +5633,7 @@ int main() {
__gmpf_abs()
; return 0; }
EOF
if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5656,12 +5675,12 @@ fi
for ac_func in iconv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5660: checking for $ac_func" >&5
echo "configure:5679: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5665 "configure"
#line 5684 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5685,7 +5704,7 @@ f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -5727,7 +5746,7 @@ fi
# BSDs install this lib as libgiconv
echo $ac_n "checking for main in -lgiconv""... $ac_c" 1>&6
echo "configure:5731: checking for main in -lgiconv" >&5
echo "configure:5750: checking for main in -lgiconv" >&5
ac_lib_var=`echo giconv'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5735,14 +5754,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgiconv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5739 "configure"
#line 5758 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5780,7 +5799,7 @@ EOF
else
echo $ac_n "checking for main in -liconv""... $ac_c" 1>&6
echo "configure:5784: checking for main in -liconv" >&5
echo "configure:5803: checking for main in -liconv" >&5
ac_lib_var=`echo iconv'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5788,14 +5807,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-liconv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5792 "configure"
#line 5811 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5841,7 +5860,7 @@ subdirs="Source/mframe"
# Record the version
#--------------------------------------------------------------------
echo $ac_n "checking for the version of gnustep-base we are compiling""... $ac_c" 1>&6
echo "configure:5845: checking for the version of gnustep-base we are compiling" >&5
echo "configure:5864: checking for the version of gnustep-base we are compiling" >&5
if test -f "Version"; then
. ./Version
fi
@ -6048,6 +6067,9 @@ s%@XML_CONFIG@%$XML_CONFIG%g
s%@XML_CFLAGS@%$XML_CFLAGS%g
s%@XML_LIBS@%$XML_LIBS%g
s%@HAVE_LIBXML@%$HAVE_LIBXML%g
s%@HAVE_OPENSSL@%$HAVE_OPENSSL%g
s%@SSLFLAGS@%$SSLFLAGS%g
s%@SSLLIBS@%$SSLLIBS%g
s%@HAVE_GMP@%$HAVE_GMP%g
s%@SYSTEM_DEFS@%$SYSTEM_DEFS%g
s%@subdirs@%$subdirs%g