From f46e1f257c865f5445ea48d169af7ef7c6f764aa Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sun, 4 Jan 2009 16:14:30 +0000 Subject: bumped version and updated the detection script to work with pkg-config. --- NEWS | 7 ++++++- configure.ac | 2 +- m4/libgnutls.m4 | 55 +++++++++++++++++++++++++++---------------------------- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/NEWS b/NEWS index 0685668..26fa82b 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,13 @@ -** Verison 0.5.4 (unreleased) +** Verison 0.5.4 (2009-01-04) - mod_gnutls.h: modified definition to extern to avoid compilation errors in darwin. +- Added patch to fix issue with mod_proxy. Investigation and patch by Alain + Knaff. + +- libgnutls detection uses pkg-config. + ** Version 0.5.3 (2008-10-16) - Corrected bug to allow having an OpenPGP-only web site. diff --git a/configure.ac b/configure.ac index 0ffc69b..bb2aedf 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl -AC_INIT(mod_gnutls, 0.5.3) +AC_INIT(mod_gnutls, 0.5.4) OOO_CONFIG_NICE(config.nice) MOD_GNUTLS_VERSION=AC_PACKAGE_VERSION AC_PREREQ(2.53) diff --git a/m4/libgnutls.m4 b/m4/libgnutls.m4 index 8479388..ef0bb04 100644 --- a/m4/libgnutls.m4 +++ b/m4/libgnutls.m4 @@ -11,28 +11,28 @@ dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS dnl AC_DEFUN([AM_PATH_LIBGNUTLS], [dnl -dnl Get the cflags and libraries from the libgnutls-config script +dnl Get the cflags and libraries from the pkg-config script dnl AC_ARG_WITH(libgnutls-prefix, [ --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional)], - libgnutls_config_prefix="$withval", libgnutls_config_prefix="") + pkg_config_prefix="$withval", pkg_config_prefix="") - if test x$libgnutls_config_prefix != x ; then - if test x${LIBGNUTLS_CONFIG+set} != xset ; then - LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config + if test x$pkg_config_prefix != x ; then + if test x${PKG_CONFIG+set} != xset ; then + PKG_CONFIG=$pkg_config_prefix/bin/pkg-config fi fi - AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no) + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) min_libgnutls_version=ifelse([$1], ,0.1.0,$1) AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version) no_libgnutls="" - if test "$LIBGNUTLS_CONFIG" = "no" ; then + if test "$PKG_CONFIG" = "no" ; then no_libgnutls=yes else - LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` - LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` - libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` + LIBGNUTLS_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags gnutls` + LIBGNUTLS_LIBS=`$PKG_CONFIG $pkg_config_args --libs gnutls` + pkg_config_version=`$PKG_CONFIG $pkg_config_args --modversion gnutls` ac_save_CFLAGS="$CFLAGS" @@ -41,7 +41,7 @@ AC_ARG_WITH(libgnutls-prefix, LIBS="$LIBS $LIBGNUTLS_LIBS" dnl dnl Now check if the installed libgnutls is sufficiently new. Also sanity -dnl checks the results of libgnutls-config to some extent +dnl checks the results of pkg-config to some extent dnl rm -f conf.libgnutlstest AC_TRY_RUN([ @@ -55,17 +55,17 @@ main () { system ("touch conf.libgnutlstest"); - if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) ) + if( strcmp( gnutls_check_version(NULL), "$pkg_config_version" ) ) { - printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n", - "$libgnutls_config_version", gnutls_check_version(NULL) ); - printf("*** was found! If libgnutls-config was correct, then it is best\n"); + printf("\n*** 'pkg-config --version' returned %s, but LIBGNUTLS (%s)\n", + "$pkg_config_version", gnutls_check_version(NULL) ); + printf("*** was found! If pkg-config was correct, then it is best\n"); printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); - printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n"); - printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG\n"); + printf("*** to point to the correct copy of pkg-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) ) @@ -88,10 +88,10 @@ main () printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n"); - printf("*** correct copy of libgnutls-config. (In this case, you will have to\n"); + printf("*** of LIBGNUTLS, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } @@ -112,11 +112,11 @@ main () else AC_MSG_RESULT(no) fi - if test "$LIBGNUTLS_CONFIG" = "no" ; then - echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found" + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script installed by LIBGNUTLS could not be found" echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the" - echo "*** full path to libgnutls-config." + echo "*** your path, or set the PKG_CONFIG environment variable to the" + echo "*** full path to pkg-config." else if test -f conf.libgnutlstest ; then : @@ -143,7 +143,7 @@ main () [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed" echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you" - echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ]) + echo "*** may want to edit the pkg-config script: $PKG_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -154,9 +154,8 @@ main () fi rm -f conf.libgnutlstest - LIBGNUTLS_VERSION=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` - LIBGNUTLS_PREFIX="`$LIBGNUTLS_CONFIG $libgnutls_config_args --prefix`" - GNUTLS_CERTTOOL="${LIBGNUTLS_PREFIX}/bin/certtool" + LIBGNUTLS_VERSION="$pkg_config_version" + AC_PATH_PROG(GNUTLS_CERTTOOL, certtool, no) AC_SUBST(LIBGNUTLS_CFLAGS) AC_SUBST(LIBGNUTLS_LIBS) -- cgit