Add support for GnuTLS

This commit is contained in:
Jeroen Dekkers
2012-10-19 17:33:48 +02:00
parent b744710ee3
commit 439bb132c1
9 changed files with 440 additions and 12 deletions

36
configure vendored
View File

@@ -303,27 +303,39 @@ genConfigMake() {
}
checkLinking() {
# library-name => $1, type => $2
local oldpwd=$PWD
local tmpdir=".configure-test-$$"
mkdir $tmpdir
cd $tmpdir
cp ../maintenance/dummytool.m .
cp ../maintenance/dummytool.c .
OLDLIBS=$LIBS
for LIB in $1;do
LIBS="$LIBS -l${LIB}"
done
tmpmake="GNUmakefile"
echo >$tmpmake "include ../config.make"
echo >$tmpmake "-include ../config.make"
echo >>$tmpmake "include \$(GNUSTEP_MAKEFILES)/common.make"
echo >>$tmpmake "TOOL_NAME := linktest"
echo >>$tmpmake "linktest_OBJC_FILES := dummytool.m"
echo >>$tmpmake "linktest_TOOL_LIBS += -l$1"
echo >>$tmpmake "CTOOL_NAME := linktest"
echo >>$tmpmake "linktest_C_FILES := dummytool.c"
echo >>$tmpmake "ifeq (\$(findstring openbsd, \$(GNUSTEP_HOST_OS)), openbsd)"
echo >>$tmpmake "linktest_TOOL_LIBS += $LIBS -liconv"
echo >>$tmpmake "else"
echo >>$tmpmake "linktest_TOOL_LIBS += $LIBS"
echo >>$tmpmake "endif"
echo >>$tmpmake "SYSTEM_LIB_DIR += \$(CONFIGURE_SYSTEM_LIB_DIR)"
echo >>$tmpmake "SYSTEM_LIB_DIR += ${LINK_SYSLIBDIRS}"
echo >>$tmpmake "include \$(GNUSTEP_MAKEFILES)/tool.make"
echo >>$tmpmake "include \$(GNUSTEP_MAKEFILES)/ctool.make"
$MAKE -s messages=yes -f $tmpmake linktest >out.log 2>err.log
LINK_RESULT=$?
if test $LINK_RESULT = 0; then
echo "$2 library found: $1"
cfgwrite "HAS_LIBRARY_$1=yes"
else
if test "x$2" = "xrequired"; then
echo "failed to link $2 library: $1"
@@ -331,16 +343,22 @@ checkLinking() {
exit 1
else
echo "failed to link $2 library: $1"
cfgwrite "HAS_LIBRARY_$1=no"
LIBS=$OLDLIBS
fi
fi
cd $oldpwd
rm -rf $tmpdir
return $LINK_RESULT
}
checkDependencies() {
checkLinking "SaxObjC" required;
checkLinking "NGLdap" required;
checkLinking "gnutls" optional;
if test $? != 0; then
checkLinking "ssl" required;
fi
}
runIt() {
@@ -363,7 +381,7 @@ runIt() {
fi
else
genConfigMake;
#checkDependencies;
checkDependencies;
if test -x $NGSTREAMS_DIR/configure; then
if test $ARG_BEQUIET != 1; then