1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-31 02:43:06 +03:00

apply patch from Rob Richards to add a normal --with-crypto configure

* configure.in libexslt/crypto.c libexslt/exslt.[ch]
  libexslt/exsltconfig.h.in win32/configure.js: apply patch from
  Rob Richards to add a normal --with-crypto configure option.
Daniel
This commit is contained in:
Daniel Veillard
2004-07-16 10:17:29 +00:00
parent cd6168c446
commit 091028da9d
7 changed files with 61 additions and 19 deletions

View File

@ -1,3 +1,9 @@
Fri Jul 16 12:14:57 CEST 2004 Daniel Veillard <daniel@veillard.com>
* configure.in libexslt/crypto.c libexslt/exslt.[ch]
libexslt/exsltconfig.h.in win32/configure.js: apply patch from
Rob Richards to add a normal --with-crypto configure option.
Tue Jul 13 22:57:43 HKT 2004 William Brack <wbrack@mmm.com.hk>
* libxslt/functions.c: added some logic to xsltKeyFunction

View File

@ -215,9 +215,13 @@ fi
AC_SUBST(pythondir)
AC_SUBST(PYTHON_SUBDIR)
dnl
dnl check for gcrypt
dnl
AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
WITH_CRYPTO=0
if test "$with_crypto" = "no" ; then
echo Disabling crypto support
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""
else
AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
if test "$LIBGCRYPT_CONFIG" != "no" ; then
LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
@ -225,21 +229,24 @@ if test "$LIBGCRYPT_CONFIG" != "no" ; then
then
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""
AC_MSG_NOTICE([gcrypt library version < 1.1.42 - Crypto extensions will not be available.])
echo gcrypt library version < 1.1.42 - Crypto extensions will not be available.
else
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
AC_MSG_NOTICE([Crypto extensions will be available.])
echo Crypto extensions will be available.
WITH_CRYPTO=1
fi
else
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""
AC_MSG_NOTICE([Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.])
echo Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.
fi
fi
AC_SUBST(WITH_CRYPTO)
AC_SUBST(LIBGCRYPT_CFLAGS)
AC_SUBST(LIBGCRYPT_LIBS)
dnl
dnl Debug for DV (-Wunreachable-code)
dnl
@ -251,6 +258,10 @@ if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ]] || \
fi
CFLAGS="-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline "
STATIC_BINARIES="-static"
if [ "${LOGNAME}" = "veillard" ]
then
LIBXML_SRC="/u/veillard/XML"
fi
else
STATIC_BINARIES=
fi

View File

@ -21,6 +21,8 @@
#include "exslt.h"
#ifdef EXSLT_CRYPTO_ENABLED
#define HASH_DIGEST_LENGTH 32
#define MD5_DIGEST_LENGTH 16
#define SHA1_DIGEST_LENGTH 20
@ -731,3 +733,5 @@ exsltCryptoRegister (void) {
}
#endif /* defined(HAVE_CRYPTO) */
#endif /* EXSLT_CRYPTO_ENABLED */

View File

@ -32,7 +32,9 @@ const int exsltLibxmlVersion = LIBXML_VERSION;
void
exsltRegisterAll (void) {
exsltCommonRegister();
#ifdef EXSLT_CRYPTO_ENABLED
exsltCryptoRegister();
#endif
exsltMathRegister();
exsltSetsRegister();
exsltFuncRegister();

View File

@ -72,7 +72,9 @@ EXSLTPUBVAR const int exsltLibxmlVersion;
#define SAXON_NAMESPACE ((const xmlChar *) "http://icl.com/saxon")
EXSLTPUBFUN void EXSLTCALL exsltCommonRegister (void);
#ifdef EXSLT_CRYPTO_ENABLED
EXSLTPUBFUN void EXSLTCALL exsltCryptoRegister (void);
#endif
EXSLTPUBFUN void EXSLTCALL exsltMathRegister (void);
EXSLTPUBFUN void EXSLTCALL exsltSetsRegister (void);
EXSLTPUBFUN void EXSLTCALL exsltFuncRegister (void);

View File

@ -34,6 +34,15 @@ extern "C" {
*/
#define LIBEXSLT_VERSION_STRING "@LIBEXSLT_VERSION_NUMBER@"
/**
* WITH_CRYPTO:
*
* Whether crypto support is configured into exslt
*/
#if @WITH_CRYPTO@
#define EXSLT_CRYPTO_ENABLED
#endif
/**
* ATTRIBUTE_UNUSED:
*

View File

@ -45,6 +45,7 @@ var withMemDebug = false;
var withDebugger = true;
var withIconv = true;
var withZlib = false;
var withCrypto = true;
/* Win32 build options. */
var dirSep = "\\";
var compiler = "msvc";
@ -101,6 +102,7 @@ function usage()
txt += " debugger: Enable external debugger support (" + (withDebugger? "yes" : "no") + ")\n";
txt += " iconv: Use iconv library (" + (withIconv? "yes" : "no") + ")\n";
txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n";
txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n";
txt += "\nWin32 build options, default value given in parentheses:\n\n";
txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n";
txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
@ -168,6 +170,7 @@ function discoverVersion()
vf.WriteLine("WITH_DEBUGGER=" + (withDebugger? "1" : "0"));
vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0"));
vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
vf.WriteLine("PREFIX=" + buildPrefix);
@ -236,6 +239,8 @@ function configureExslt()
} else if (s.search(/\@LIBEXSLT_VERSION_NUMBER\@/) != -1) {
of.WriteLine(s.replace(/\@LIBEXSLT_VERSION_NUMBER\@/,
verMajorExslt*10000 + verMinorExslt*100 + verMicroExslt*1));
} else if (s.search(/\@WITH_CRYPTO\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_CRYPTO\@/, withCrypto? "1" : "0"));
} else
of.WriteLine(ln);
}
@ -304,6 +309,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
withIconv = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "zlib")
withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "crypto")
withCrypto = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "compiler")
compiler = arg.substring(opt.length + 1, arg.length);
else if (opt == "cruntime")
@ -408,6 +415,7 @@ txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n";
txtOut += " Debugger support: " + boolToStr(withDebugger) + "\n";
txtOut += " Use iconv: " + boolToStr(withIconv) + "\n";
txtOut += " With zlib: " + boolToStr(withZlib) + "\n";
txtOut += " Crypto: " + boolToStr(withCrypto) + "\n";
txtOut += "\n";
txtOut += "Win32 build configuration\n";
txtOut += "-------------------------\n";