mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
Add support for GnuTLS
This commit is contained in:
36
configure
vendored
36
configure
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user