gpgme/configure.in

190 lines
4.4 KiB
Plaintext
Raw Permalink Normal View History

2000-10-27 14:55:24 +00:00
# configure.in for GPGME
2001-04-02 08:40:32 +00:00
# Copyright (C) 2000 Werner Koch (dd9jn)
# Copyright (C) 2001 g10 Code GmbH
2000-10-27 14:55:24 +00:00
#
2001-04-02 08:40:32 +00:00
# This file is part of GPGME.
#
# GPGME is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# GPGME is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
# (Process this file with autoconf to produce a configure script.)
2000-10-27 14:55:24 +00:00
AC_REVISION($Revision$)dnl
AC_INIT(gpgme/gpgme.h)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
#############################################
# Version numbers (Remember to change them just before a release)
# 1. No interfaces changed, only implementations (good): Increment REVISION.
# 2. Interfaces added, none removed (good): Increment CURRENT, increment
# AGE, set REVISION to 0.
# 3. Interfaces removed (BAD, breaks upward compatibility): Increment
# CURRENT, set AGE and REVISION to 0.
2001-04-02 08:40:32 +00:00
AM_INIT_AUTOMAKE(gpgme,0.2.1)
LIBGPGME_LT_CURRENT=3
LIBGPGME_LT_AGE=3
2000-12-19 10:07:32 +00:00
LIBGPGME_LT_REVISION=0
2001-04-02 08:40:32 +00:00
NEED_GPG_VERSION=1.0.4f
2000-10-27 14:55:24 +00:00
##############################################
AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
AC_SUBST(LIBGPGME_LT_REVISION)
2001-01-22 20:22:41 +00:00
AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION")
2000-10-27 14:55:24 +00:00
2000-10-27 14:55:24 +00:00
dnl
dnl Checks for programs
dnl
AC_ARG_PROGRAM
dnl Don't default to build static libs
2001-04-02 08:40:32 +00:00
dnl AM_DISABLE_STATIC
2000-10-27 14:55:24 +00:00
AM_PROG_LIBTOOL
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
fi
GPG=
2000-12-06 12:17:10 +00:00
component_system=None
case "${target}" in
*-*-mingw32* | i?86-emx-os2 | i?86-*-os2*emx | i?86-*-msdosdjgpp* )
# special stuff for Windoze NT
# OS/2 with the EMX environment
# DOS with the DJGPP environment
AC_DEFINE(HAVE_DRIVE_LETTERS)
AC_DEFINE(HAVE_DOSISH_SYSTEM)
GPG='c:\\gnupg\\gpg.exe'
#component_system='COM+'
;;
*)
;;
esac
2000-10-27 14:55:24 +00:00
dnl
dnl Checks for libraries
dnl
dnl
dnl Checks for header files
dnl
2000-12-06 12:17:10 +00:00
2000-10-27 14:55:24 +00:00
dnl
dnl Checks for typedefs and structures
dnl
2000-12-06 12:17:10 +00:00
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
# We should not use them in this software;
# However jnlib/types.h needs them - so we take the easy way.
AC_CHECK_SIZEOF(unsigned short, 2)
AC_CHECK_SIZEOF(unsigned int, 4)
AC_CHECK_SIZEOF(unsigned long, 4)
if test "$ac_cv_sizeof_unsigned_short" = "0" \
|| test "$ac_cv_sizeof_unsigned_int" = "0" \
|| test "$ac_cv_sizeof_unsigned_long" = "0"; then
AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
fi
2000-10-27 14:55:24 +00:00
dnl
dnl Checks for compiler features
dnl
dnl
dnl Checks for library functions
dnl
2000-12-06 12:17:10 +00:00
dnl These are needed by libjnlib
AC_CHECK_FUNCS(memicmp stpcpy strlwr strtoul memmove stricmp)
2000-10-27 14:55:24 +00:00
dnl
dnl Checks for system services
dnl
2000-12-06 12:17:10 +00:00
if test -z "$GPG"; then
AC_PATH_PROG(GPG, gpg)
if test -z "$GPG"; then
AC_MSG_ERROR([[
2000-11-17 21:20:53 +00:00
***
*** GnuPG not found. Please install GnuPG first.
*** See http://www.gnupg.org/download.html
***
]])
fi
2000-11-17 21:20:53 +00:00
fi
AC_DEFINE_UNQUOTED(GPG_PATH, "$GPG")
2000-10-27 14:55:24 +00:00
2000-12-06 12:17:10 +00:00
dnl
dnl FIXME: check whether Bonobo is installed
dnl
2000-10-27 14:55:24 +00:00
dnl
dnl Create config files
dnl
2000-11-17 21:20:53 +00:00
dnl
2000-12-06 12:17:10 +00:00
AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")
AM_CONDITIONAL(BUILD_BONOBO, test "$component_system" = "Bonobo")
2000-11-17 21:20:53 +00:00
dnl Make the version number in gpgme/gpgme.h the same as the one here.
dnl (this is easier than to have a *.in file just for one substitution)
GNUPG_FIX_HDR_VERSION(gpgme/gpgme.h, GPGME_VERSION)
dnl Substitution used for gpgme-config
GPGME_LIBS="-L${libdir} -lgpgme"
GPGME_CFLAGS=""
AC_SUBST(GPGME_LIBS)
AC_SUBST(GPGME_CFLAGS)
2000-10-27 14:55:24 +00:00
AC_OUTPUT_COMMANDS([
chmod +x gpgme/gpgme-config
])
AC_OUTPUT([
Makefile
2000-12-06 12:17:10 +00:00
jnlib/Makefile
2000-10-27 14:55:24 +00:00
gpgme/Makefile
gpgme/gpgme-config
2000-11-07 13:32:38 +00:00
tests/Makefile
2000-12-06 12:17:10 +00:00
bonobo/Makefile
complus/Makefile
2000-10-27 14:55:24 +00:00
])
2000-12-06 12:17:10 +00:00
echo "
GPGME v${VERSION} has been configured as follows:
2001-01-22 20:22:41 +00:00
GPG version: min. $NEED_GPG_VERSION
GPG path: $GPG
Component: $component_system
2000-12-06 12:17:10 +00:00
"
2000-11-07 13:32:38 +00:00