X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=configure.ac;h=9ed29e0ff468096c442586a4bae0b7eac2ce07aa;hp=6d2b5b7a20f778e9ae698c5eee525ef008650e98;hb=f1ddcf0aca55660d122a40046a13483c4a06f922;hpb=1f41a1d415d2ab138050a96020ed39caa0c4e323 diff --git a/configure.ac b/configure.ac index 6d2b5b7..9ed29e0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl This file is part of the YAZ toolkit. dnl Copyright (C) 1995-2008 Index Data AC_PREREQ([2.60]) -AC_INIT([yaz],[3.0.29],[yaz-help@indexdata.dk]) +AC_INIT([yaz],[3.0.38],[yaz-help@indexdata.dk]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE([1.9]) @@ -56,15 +56,16 @@ if test "$checkBoth" = "1"; then fi AC_CHECK_FUNC([gethostbyname], ,[AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])]) dnl + dnl ------ OpenSSL AC_SUBST([SSL_CFLAGS]) AC_SUBST([SSL_LIBS]) -openssl=default +openssl=no +sslver=no AC_ARG_WITH([openssl], [ --with-openssl[=PREFIX] OpenSSL library in PREFIX], [openssl=$withval]) SSL_CFLAGS="" SSL_LIBPATH="" if test "$openssl" != "no"; then - sslver=no if test "$openssl" != "yes" -a "$openssl" != "default"; then if test -x $openssl/bin/pkg-config; then if $openssl/bin/pkg-config --exists openssl; then @@ -121,6 +122,40 @@ if test "$openssl" != "no"; then fi fi fi +dnl ------ GNU TLS +gnutls=default +AC_ARG_WITH([gnutls], [ --with-gnutls[=PREFIX] GNU TLS library in PREFIX], [gnutls=$withval]) +if test "$gnutls" != "no" -a "$sslver" = "no"; then + gnutlsver=no + if test "$gnutls" != "yes" -a "$gnutls" != "default"; then + if test -x $gnutls/bin/pkg-config; then + if $gnutls/bin/pkg-config --exists gnutls; then + SSL_CFLAGS=`$gnutls/bin/pkg-config --cflags gnutls` + SSL_LIBS="`$gnutls/bin/pkg-config --libs gnutls`" + gnutlsver=`$gnutls/bin/pkg-config --modversion gnutls` + fi + fi + else + if test "$pkgconfigpath" != "NONE"; then + if $pkgconfigpath --exists gnutls; then + SSL_CFLAGS=`$pkgconfigpath --cflags gnutls` + SSL_LIBS="`$pkgconfigpath --libs gnutls`" + gnutlsver=`$pkgconfigpath --modversion gnutls` + fi + fi + fi + AC_MSG_CHECKING([for GNU TLS]) + if test "$gnutlsver" != "no"; then + SSL_CFLAGS="-DHAVE_GNUTLS_H=1 $SSL_CFLAGS" + AC_MSG_RESULT([$gnutlsver]) + else + SSL_CFLAGS="" + AC_MSG_RESULT([None]) + if test "$gnutls" != "default"; then + AC_MSG_ERROR([GNU TLS development libraries missing]) + fi + fi +fi dnl dnl ------ GNU Readline READLINE_SHARED_LIBADD="" @@ -352,9 +387,13 @@ AC_SUBST([YAZ_SRC_ROOT]) AC_SUBST([YAZ_BUILD_ROOT]) YAZ_SRC_ROOT=`cd ${srcdir}; pwd` YAZ_BUILD_ROOT=`pwd` - -dnl ------ windows version files -WIN_FILEVERSION=`echo $PACKAGE_VERSION|tr . ,`.1 +dnl +dnl ------ versioning +dnl +WIN_FILEVERSION=`echo $PACKAGE_VERSION | awk 'BEGIN { FS = "."; } { m = $4; printf("%d,%d,%d,%d", $1, $2, $3 == "" ? "0" : $3, $4 == "" ? "1" : $4);}'` +AC_SUBST([WIN_FILEVERSION]) +YAZ_VERSION_HEX=`echo $PACKAGE_VERSION | awk 'BEGIN { FS = "."; } { printf("%x", ($1 * 256 + $2) * 256 + $3);}'` +AC_SUBST([YAZ_VERSION_HEX]) dnl dnl ------ Makefiles dnl @@ -377,6 +416,8 @@ etc/Makefile yaz-config yaz.pc Doxyfile +win/version.nsi +include/yaz/yaz-version.h ],[ sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config > util/yaz-config && chmod +x yaz-config util/yaz-config ]