[xslt] patch: add --with-crypto to configure
- From: "Rob Richards" <rrichards ctindustries net>
- To: <xslt gnome org>
- Subject: [xslt] patch: add --with-crypto to configure
- Date: Thu, 15 Jul 2004 09:12:54 -0400
Here's a patch which allows crypto to be disabled in configure. Default is
enabled.
Can someone verify the configure.in changes for non-win builds as I'm not a
configure guru here, though it seems to be working.
The non-win stuff was done on RH 7.2 machine so I had to change
AC_MSG_NOTICE to echo due to older tools.
Rob
Index: configure.in
===================================================================
RCS file: /cvs/gnome/libxslt/configure.in,v
retrieving revision 1.152
diff -c -r1.152 configure.in
*** configure.in 5 Jul 2004 19:55:11 -0000 1.152
--- configure.in 15 Jul 2004 11:40:50 -0000
***************
*** 215,245 ****
AC_SUBST(pythondir)
AC_SUBST(PYTHON_SUBDIR)
! dnl
! dnl check for gcrypt
! dnl
! AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
! if test "$LIBGCRYPT_CONFIG" != "no" ; then
! LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
! if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
! then
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""
- AC_MSG_NOTICE([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.])
- fi
else
! LIBGCRYPT_CFLAGS=""
! LIBGCRYPT_LIBS=""
! AC_MSG_NOTICE([Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.])
fi
!
AC_SUBST(LIBGCRYPT_CFLAGS)
AC_SUBST(LIBGCRYPT_LIBS)
dnl
dnl Debug for DV (-Wunreachable-code)
dnl
--- 215,252 ----
AC_SUBST(pythondir)
AC_SUBST(PYTHON_SUBDIR)
! 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`
! if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
! then
! LIBGCRYPT_CFLAGS=""
! LIBGCRYPT_LIBS=""
! 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.])
! echo Crypto extensions will be available.
! WITH_CRYPTO=1
! fi
! else
! LIBGCRYPT_CFLAGS=""
! LIBGCRYPT_LIBS=""
! 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
Index: libexslt/crypto.c
===================================================================
RCS file: /cvs/gnome/libxslt/libexslt/crypto.c,v
retrieving revision 1.2
diff -c -r1.2 crypto.c
*** libexslt/crypto.c 4 Jul 2004 13:53:02 -0000 1.2
--- libexslt/crypto.c 15 Jul 2004 11:40:51 -0000
***************
*** 21,26 ****
--- 21,28 ----
#include "exslt.h"
+ #ifdef EXSLT_CRYPTO_ENABLED
+
#define HASH_DIGEST_LENGTH 32
#define MD5_DIGEST_LENGTH 16
#define SHA1_DIGEST_LENGTH 20
***************
*** 731,733 ****
--- 733,737 ----
}
#endif /* defined(HAVE_CRYPTO) */
+
+ #endif /* EXSLT_CRYPTO_ENABLED */
Index: libexslt/exslt.c
===================================================================
RCS file: /cvs/gnome/libxslt/libexslt/exslt.c,v
retrieving revision 1.12
diff -c -r1.12 exslt.c
*** libexslt/exslt.c 30 Jun 2004 16:43:53 -0000 1.12
--- libexslt/exslt.c 15 Jul 2004 11:40:51 -0000
***************
*** 32,38 ****
--- 32,40 ----
void
exsltRegisterAll (void) {
exsltCommonRegister();
+ #ifdef EXSLT_CRYPTO_ENABLED
exsltCryptoRegister();
+ #endif
exsltMathRegister();
exsltSetsRegister();
exsltFuncRegister();
Index: libexslt/exslt.h
===================================================================
RCS file: /cvs/gnome/libxslt/libexslt/exslt.h,v
retrieving revision 1.14
diff -c -r1.14 exslt.h
*** libexslt/exslt.h 30 Jun 2004 16:43:53 -0000 1.14
--- libexslt/exslt.h 15 Jul 2004 11:40:51 -0000
***************
*** 72,78 ****
--- 72,80 ----
#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);
Index: libexslt/exsltconfig.h.in
===================================================================
RCS file: /cvs/gnome/libxslt/libexslt/exsltconfig.h.in,v
retrieving revision 1.6
diff -c -r1.6 exsltconfig.h.in
*** libexslt/exsltconfig.h.in 5 Nov 2003 03:16:40 -0000 1.6
--- libexslt/exsltconfig.h.in 15 Jul 2004 11:40:51 -0000
***************
*** 35,40 ****
--- 35,49 ----
#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:
*
* This macro is used to flag unused function parameters to GCC
Index: win32/configure.js
===================================================================
RCS file: /cvs/gnome/libxslt/win32/configure.js,v
retrieving revision 1.13
diff -c -r1.13 configure.js
*** win32/configure.js 9 Jun 2004 14:33:54 -0000 1.13
--- win32/configure.js 15 Jul 2004 11:40:55 -0000
***************
*** 45,50 ****
--- 45,51 ----
var withDebugger = true;
var withIconv = true;
var withZlib = false;
+ var withCrypto = true;
/* Win32 build options. */
var dirSep = "\\";
var compiler = "msvc";
***************
*** 101,106 ****
--- 102,108 ----
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,173 ****
--- 170,176 ----
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,241 ****
--- 239,246 ----
} 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,309 ****
--- 309,316 ----
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,413 ****
--- 415,421 ----
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";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]