diff options
author | Aleksey Sanin <aleksey@src.gnome.org> | 2003-09-09 19:59:02 +0000 |
---|---|---|
committer | Aleksey Sanin <aleksey@src.gnome.org> | 2003-09-09 19:59:02 +0000 |
commit | 358548836a1ece218ecbcf13ab73ddbc443e3137 (patch) | |
tree | b8956981a56a2e1a5f26f7924deb3263b0065b47 /configure.in | |
parent | cce1030351bc78420ed485aeec76d6ab8b22965c (diff) | |
download | xmlsec1-358548836a1ece218ecbcf13ab73ddbc443e3137.tar.gz xmlsec1-358548836a1ece218ecbcf13ab73ddbc443e3137.tar.bz2 xmlsec1-358548836a1ece218ecbcf13ab73ddbc443e3137.zip |
implemented loading xmlsec-crypto libraries as plugins change build to
* Makefile.am apps/* configure.in include/* src/* tests/*: implemented
loading xmlsec-crypto libraries as plugins
* win32/: change build to allow building of more than one
xmlsec-crypto library
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 75 |
1 files changed, 62 insertions, 13 deletions
diff --git a/configure.in b/configure.in index 270ece71..84db65f8 100644 --- a/configure.in +++ b/configure.in @@ -4,6 +4,7 @@ AC_INIT(src/xmlsec.c) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST + XMLSEC_PACKAGE=xmlsec1 XMLSEC_VERSION_MAJOR=1 XMLSEC_VERSION_MINOR=1 @@ -30,10 +31,10 @@ dnl dnl Check the environment dnl AC_PROG_CC +AC_PROG_LIBTOOL AC_PROG_INSTALL AC_ARG_PROGRAM AC_STDC_HEADERS -AM_PROG_LIBTOOL AC_PATH_PROG(RM, rm, /bin/rm) AC_PATH_PROG(MV, mv, /bin/mv) AC_PATH_PROG(TAR, tar, /bin/tar) @@ -54,11 +55,10 @@ AC_CHECK_HEADERS([ansidecl.h]) AC_CHECK_HEADERS([time.h]) AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf timegm) - +AC_LIB_LTDL XMLSEC_DEFINES="" - dnl ========================================================================== dnl Specific setup for Aleksey's development environment: dnl - with xkms support (while in development) @@ -72,7 +72,7 @@ if test "$enable_development" = "yes" -o "${LOGNAME}" = "aleksey" ; then enable_xkms="yes" enable_debuging="yes" enable_pedantic="yes" - enable_static_linking="yes" +# enable_static_linking="yes" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -88,7 +88,9 @@ case "${host}" in ;; esac +dnl ========================================================================== dnl Check for __FUNCTION__ or __FUNCTION__ +dnl ========================================================================== AC_MSG_CHECKING(for __FUNCTION__ or __func__) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[char *foo = __FUNCTION__;]])], @@ -235,7 +237,7 @@ OPENSSL_PREFIX="" OPENSSL_CFLAGS="-DXMLSEC_CRYPTO=\\\"openssl\\\" -DXMLSEC_CRYPTO_OPENSSL=1" OPENSSL_LIBS="" OPENSSL_LDADDS="" -OPENSSL_CRYPTO_LIB="xmlsec1-openssl" +OPENSSL_CRYPTO_LIB="$PACKAGE-openssl" AC_MSG_CHECKING(for openssl libraries >= $OPENSSL_MIN_VERSION) AC_ARG_WITH(openssl, [ --with-openssl=[PFX] openssl location]) if test "$with_openssl" = "no" ; then @@ -327,6 +329,7 @@ else AC_MSG_RESULT(no) fi fi +AM_CONDITIONAL(OPENSSL_WITHOUT, test "x$OPENSSL_WITHOUT" = "xyes") AC_SUBST(OPENSSL_WITHOUT) AC_SUBST(OPENSSL_MIN_VERSION) AC_SUBST(OPENSSL_VERSION) @@ -348,7 +351,7 @@ GNUTLS_PREFIX="" GNUTLS_CFLAGS="-DXMLSEC_CRYPTO=\\\"gnutls\\\" -DXMLSEC_CRYPTO_GNUTLS=1" GNUTLS_LIBS="" GNUTLS_LDADDS="" -GNUTLS_CRYPTO_LIB="xmlsec1-gnutls" +GNUTLS_CRYPTO_LIB="$PACKAGE-gnutls" AC_MSG_CHECKING(for gnutls libraries >= $GNUTLS_MIN_VERSION) AC_ARG_WITH(gnutls, [ --with-gnutls=[PFX] gnutls location]) @@ -399,6 +402,7 @@ else AC_MSG_RESULT(no) fi fi +AM_CONDITIONAL(GNUTLS_WITHOUT, test "x$GNUTLS_WITHOUT" = "xyes") AC_SUBST(GNUTLS_WITHOUT) AC_SUBST(GNUTLS_MIN_VERSION) AC_SUBST(GNUTLS_VERSION) @@ -439,7 +443,7 @@ NSS_PREFIX="" NSPR_PREFIX="" NSS_LIBS_LIST="-lnss3 -lsmime3" NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4" -NSS_CRYPTO_LIB="xmlsec1-nss" +NSS_CRYPTO_LIB="$PACKAGE-nss" dnl if nss is disabled, bail out early AC_ARG_WITH(nss, [ --with-nss=[PFX] nss location]) @@ -655,7 +659,7 @@ else XMLSEC_CRYPTO_DISABLED_LIST="$XMLSEC_CRYPTO_DISABLED_LIST nss" fi fi - +AM_CONDITIONAL(NSS_WITHOUT, test "x$NSS_WITHOUT" = "xyes") AC_SUBST(NSS_WITHOUT) AC_SUBST(NSS_MIN_VERSION) AC_SUBST(MOZILLA_MIN_VERSION) @@ -847,10 +851,54 @@ fi AC_SUBST(XMLSEC_NO_XKMS) dnl ========================================================================== +dnl check if we need dynamic loading support +dnl ========================================================================== +XMLSEC_DL_INCLUDES="" +XMLSEC_DL_LIBS="" +AC_MSG_CHECKING(for xmlsec-crypto dynamic loading support) +AC_ARG_ENABLE(crypto_dl, [ --enable-crypto-dl enable dynamic loading support for xmlsec-crypto libraries (yes)]) +if test "$enable_crypto_dl" = "no" ; then + XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1" + XMLSEC_NO_CRYPTO_DYNAMIC_LOADING="1" + AC_MSG_RESULT(no) +else + XMLSEC_DL_INCLUDES="$INCLTDL" + XMLSEC_DL_LIBS="$LIBLTDL $LIBADD_DL" + XMLSEC_NO_CRYPTO_DYNAMIC_LOADING="0" + AC_MSG_RESULT(yes) +fi +AC_SUBST(XMLSEC_NO_CRYPTO_DYNAMIC_LOADING) +AC_SUBST(XMLSEC_DL_INCLUDES) +AC_SUBST(XMLSEC_DL_LIBS) + +dnl ========================================================================== +dnl check if we need dynamic loading in the xmlsec apps +dnl ========================================================================== +AC_MSG_CHECKING(for xmlsec-crypto dynamic loading support in command line tool) +AC_ARG_ENABLE(apps_crypto_dl, [ --apps_enable-crypto-dl enable dynamic loading support for xmlsec-crypto libraries in xmlsec command line tool (yes)]) +if test "z$enable_apps_crypto_dl" = "z" ; then + enable_apps_crypto_dl="$enable_crypto_dl" +fi +if test "z$enable_apps_crypto_dl" = "zno" ; then + XMLSEC_APPS_NO_CRYPTO_DYNAMIC_LOADING="1" + AC_MSG_RESULT(no) +elif test "$enable_crypto_dl" = "no" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR(xmlsec-crypto libraries dynamic loading support in xmlsec command line tool is requested but no dynamic loading in xmlsec itself is disabled) +else + XMLSEC_APP_DEFINES="$XMLSEC_APP_DEFINES -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1" + XMLSEC_APPS_NO_CRYPTO_DYNAMIC_LOADING="0" + AC_MSG_RESULT(yes) +fi +AM_CONDITIONAL(XMLSEC_APPS_NO_CRYPTO_DYNAMIC_LOADING, + test "x$XMLSEC_APPS_NO_CRYPTO_DYNAMIC_LOADING" = "x1") +AC_SUBST(XMLSEC_APPS_NO_CRYPTO_DYNAMIC_LOADING) + +dnl ========================================================================== dnl See do we need Simple Keys Manager dnl ========================================================================== AC_MSG_CHECKING(for Simple Keys Manager testing) -AC_ARG_ENABLE(skm, [ --enable-skm enable Simple Keys Manager testing(yes)]) +AC_ARG_ENABLE(skm, [ --enable-skm enable Simple Keys Manager testing (yes)]) if test "$enable_skm" = "no" ; then XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_NO_SKM_TEST=1" AC_MSG_RESULT(no) @@ -901,7 +949,7 @@ AC_MSG_CHECKING(for pedantic) AC_ARG_ENABLE(pedantic, [ --enable-pedantic enable pedantic compilation flags (no)]) if test "$enable_pedantic" = "yes" ; then dnl CFLAGS="$CFLAGS -pedantic -Wall -ansi -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 -Wredundant-decls" - CFLAGS="$CFLAGS -O -pedantic -Wall -ansi -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" + CFLAGS="$CFLAGS -O -pedantic -Wall -ansi -fno-inline -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -924,8 +972,8 @@ AC_SUBST(XMLSEC_STATIC_BINARIES) dnl ========================================================================== dnl Final steps: xmlsec config dnl ========================================================================== -XMLSEC_CORE_CFLAGS="$XMLSEC_DEFINES -I${includedir}/xmlsec1" -XMLSEC_CORE_LIBS="-lxmlsec1 " +XMLSEC_CORE_CFLAGS="$XMLSEC_DEFINES -I${includedir}/xmlsec1 $XMLSEC_DL_INCLUDES" +XMLSEC_CORE_LIBS="-lxmlsec1 $XMLSEC_DL_LIBS " AC_SUBST(XMLSEC_CORE_CFLAGS) AC_SUBST(XMLSEC_CORE_LIBS) @@ -954,6 +1002,7 @@ AC_SUBST(XMLSEC_CFLAGS) AC_SUBST(XMLSEC_LIBS) AC_SUBST(XMLSEC_DEFINES) +AC_SUBST(XMLSEC_APP_DEFINES) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) @@ -969,7 +1018,7 @@ AC_SUBST(XMLSEC_CRYPTO_LDADDS) XMLSEC_CRYPTO_PC_FILES_LIST="" for i in $XMLSEC_CRYPTO_LIST do - XMLSEC_CRYPTO_PC_FILES_LIST="$XMLSEC_CRYPTO_PC_FILES_LIST xmlsec1-$i.pc" + XMLSEC_CRYPTO_PC_FILES_LIST="$XMLSEC_CRYPTO_PC_FILES_LIST $PACKAGE-$i.pc" done AC_SUBST(XMLSEC_CRYPTO_PC_FILES_LIST) dnl ========================================================================== |