dnl Process this file with autoconf to produce a configure script. dnl dnl Copyright 2001 Double Precision, Inc. See COPYING for dnl distribution information. dnl dnl $Id: configure.in,v 1.13 2003/01/30 06:33:30 mrsam Exp $ AC_INIT(webgpg.in) LPATH="$PATH:/usr/local/bin" AM_INIT_AUTOMAKE(webpgp, 0.10, 1) AM_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_AWK AC_PROG_INSTALL AC_PROG_CC AC_PROG_RANLIB AC_PROG_LN_S AC_PATH_PROG(GPG, gpg, /usr/bin/gpg, $LPATH) AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH) if test "$PERL" = "perl" then AC_MSG_ERROR(Perl is required) fi AC_CACHE_CHECK( [for gpg charset], gpg_charset, rm -rf conftestdir mkdir conftestdir GNUPGHOME=`pwd`/conftestdir export GNUPGHOME if gpg --charset utf-8 --list-keys >/dev/null 2>&1 then gpg_charset=utf-8 else gpg_charset=iso-8859-1 fi rm -rf conftestdir unset GNUPGHOME ) AC_DEFINE_UNQUOTED(GPG_CHARSET,"$gpg_charset", [ Default gpg output character set ]) VERSION="`$GPG --version | sed '2,$d;s/.* //'`" if test "$VERSION" = "" then AC_MSG_WARN(Unable to determine gpg version) else has_cert_check_level=1 case $VERSION in 1.0.4) has_cert_check_level=0 ;; 1.0.5) has_cert_check_level=0 ;; 1.0.6) has_cert_check_level=0 ;; 1.0.7) ;; *) AC_MSG_WARN(---------------------------------------------------) AC_MSG_WARN(Your version of GnuPG has not been tested with this) AC_MSG_WARN(software. This software was tested with GnuPG) AC_MSG_WARN([1.0.4 - 1.0.7]) AC_MSG_WARN([I will proceed at your own risk.]) AC_MSG_WARN(---------------------------------------------------) sleep 10 esac fi if test "$has_cert_check_level" = 1 then AC_DEFINE_UNQUOTED(GPG_HAS_CERT_CHECK_LEVEL,1, [ Whether gpg --sign-key asks for certificate trust level ]) fi rm -rf conftempdir mkdir conftempdir if gpg --homedir conftempdir --list-keys --allow-secret-key-import >/dev/null then AC_DEFINE_UNQUOTED(GPG_HAS_ALLOW_SECRET_KEY_IMPORT,1, [ Whether gpg has the --allow-secret-key-import option ]) fi rm -rf conftempdir dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h sys/wait.h sys/time.h unistd.h fcntl.h) AC_HEADER_SYS_WAIT AC_HEADER_TIME dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T dnl Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(gettimeofday) if test "$GCC" = yes ; then CFLAGS="$CFLAGS -Wall" fi CFLAGS="-I.. -I$srcdir/.. $CFLAGS" AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook) AC_OUTPUT(Makefile webgpg)