1
# configure.ac for libgpg-error
2
# Copyright (C) 2003, 2004 g10 Code GmbH
4
# This file is part of libgpg-error.
6
# libgpg-error is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU Lesser General Public License as
8
# published by the Free Software Foundation; either version 2.1 of the
9
# License, or (at your option) any later version.
11
# libgpg-error is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Lesser General Public License for more details.
16
# You should have received a copy of the GNU Lesser General Public
17
# License along with this program; if not, write to the Free Software
18
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20
# (Process this file with autoconf to produce a configure script.)
21
# The following lines are used by ./autogen.sh.
23
min_automake_version="1.7.6"
24
# The gettext version is set below using AM_GNU_GETTEXT_VERSION.
26
# Version number: Remember to change it immediately *after* a release.
27
AC_INIT(libgpg-error, 0.7, bug-gnupg@gnupg.org)
28
# LT Version numbers, remember to change them just *before* a release.
29
# (Code changed: REVISION++)
30
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
31
# (Interfaces added: AGE++)
32
# (Interfaces removed: AGE=0)
33
# Note, that added error codes don't constitute an interface change.
34
LIBGPG_ERROR_LT_CURRENT=1
36
LIBGPG_ERROR_LT_REVISION=2
37
AC_SUBST(LIBGPG_ERROR_LT_CURRENT)
38
AC_SUBST(LIBGPG_ERROR_LT_AGE)
39
AC_SUBST(LIBGPG_ERROR_LT_REVISION)
43
AC_CONFIG_SRCDIR([src/err-sources.h.in])
44
AC_CONFIG_HEADER([config.h])
46
# Checks for programs.
51
# We need to compile and run a program on the build machine.
52
dnl The AC_PROG_CC_FOR_BUILD macro in the AC archive is broken for
54
dnl AC_PROG_CC_FOR_BUILD
55
AC_MSG_CHECKING(for cc for build)
56
if test "$cross_compiling" = "yes"; then
57
CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
59
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
61
AC_MSG_RESULT($CC_FOR_BUILD)
62
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
64
# Checks for libraries.
66
# Note, that autogen.sh greps for the next line.
67
AM_GNU_GETTEXT_VERSION(0.12.1)
68
AM_GNU_GETTEXT([external])
70
# Checks for header files.
72
AC_CHECK_HEADERS([stdlib.h])
74
AC_CHECK_FUNC([strerror_r], [],
75
AC_MSG_WARN([[Without strerror_r, gpg_strerror_r might not be thread-safe]]))
77
# Checks for typedefs, structures, and compiler characteristics.
80
# Substitution used for gpg-error-config
81
GPG_ERROR_CONFIG_LIBS="-lgpg-error"
82
GPG_ERROR_CONFIG_CFLAGS=""
83
AC_SUBST(GPG_ERROR_CONFIG_LIBS)
84
AC_SUBST(GPG_ERROR_CONFIG_CFLAGS)
85
AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
87
# Checks for library functions.
88
AC_CONFIG_FILES([Makefile])
89
AC_CONFIG_FILES([po/Makefile.in m4/Makefile])
90
AC_CONFIG_FILES([src/Makefile tests/Makefile])