X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-backup/blobdiff_plain/99248ed2ee402c196c3e83a19cfe6c1fa1c3cf98..ded85b765134054b8f53c6d08b100d67afdadf16:/configure.ac diff --git a/configure.ac b/configure.ac index 66d3dfc..45ddbb6 100644 --- a/configure.ac +++ b/configure.ac @@ -7,18 +7,20 @@ dnl dnl----- Licensing notice --------------------------------------------------- dnl -dnl This program is free software; you can redistribute it and/or modify +dnl This file is part of the distorted.org.uk backup suite. +dnl +dnl distorted-backup is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl -dnl This program is distributed in the hope that it will be useful, +dnl distorted-backup is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software Foundation, +dnl You should have received a copy of the GNU General Public License along +dnl with distorted-backup; if not, write to the Free Software Foundation, dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl-------------------------------------------------------------------------- @@ -37,7 +39,17 @@ dnl-------------------------------------------------------------------------- dnl C programming environment. PKG_CHECK_MODULES([mLib], [mLib >= 2.1.0]) -PKG_CHECK_MODULES([nettle], [nettle >= 2.4]) +PKG_CHECK_MODULES([nettle], [nettle >= 2.4], [], [ + ## That didn't work; unfortunately older Nettle packages don't have a + ## pkg-config dropping. Let's see whether it will work anyway. + nettlep=t + save_LIBS=$LIBS + AC_CHECK_HEADER([nettle/sha.h], [], [nettlep=nil]) + AC_CHECK_LIB([nettle], [nettle_sha256_init], [], [nettlep=nil]) + case $nettlep in + nil) AC_MSG_ERROR([Failed to find Nettle library.]) ;; + esac + nettle_CFLAGS= nettle_LIBS=-lnettle LIBS=$save_LIBS]) dnl-------------------------------------------------------------------------- dnl Perl programming environment.