1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
dnl configure.ac for GNU rec
dnl
dnl Please process this file with autoconf to get a 'configure'
dnl script.
dnl Copyright (C) 2009, 2010, 2011, 2012 Jose E. Marchesi
dnl This program 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 3 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 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, see <http://www.gnu.org/licenses/>.
AC_INIT([GNU recutils], [1.5], [bug-recutils@gnu.org])
dnl Must come before AM_INIT_AUTOMAKE
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(src/config.h)
AC_CONFIG_MACRO_DIR([m4])
dnl Autobuild
AB_INIT
gl_EARLY
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
dnl Both lex and yacc are required to generate the lexer/parser source
dnl files.
: ${LEX='flex'}
: ${LEXLIB='-lfl'}
: ${LEX_OUTPUT_ROOT='lex.yy'}
AC_ARG_VAR([LEX], [The flex implementation to use.])
AC_ARG_VAR([LEXLIB], [Options for linking with the flex runtime library.])
AC_ARG_VAR([LEX_OUTPUT_ROOT], [Base of the file name that the lexer generates.])
gl_BISON
dnl System
AC_CANONICAL_HOST
canonical=$host
gl_INIT
# GNU help2man creates man pages from --help output; in many cases, this
# is sufficient, and obviates the need to maintain man pages separately.
# However, this means invoking executables, which we generally cannot do
# when cross-compiling, so we test to avoid that (the variable
# "cross_compiling" is set by AC_PROG_CC).
if test $cross_compiling = no; then
AM_MISSING_PROG(HELP2MAN, help2man)
else
HELP2MAN=:
fi
dnl Seach for headers
AC_CHECK_HEADERS([malloc.h string.h])
dnl Search for data types
AC_CHECK_TYPE(size_t, unsigned)
AC_CHECK_TYPE(off_t, long)
dnl Search for functions
AC_FUNC_FSEEKO
dnl Search for required libraries
have_check=no
AC_CHECK_LIB([check],[suite_create],[have_check=yes],)
AM_CONDITIONAL([CHECK], [test "x$have_check" != "xno"])
if test "x$have_check" = "xyes"; then
CHECKLIBS=-lcheck
fi
AC_SUBST([CHECKLIBS])
have_curl=no
AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],)
if test "x$have_curl" = "xyes"; then
CURLLIBS=-lcurl
fi
AC_SUBST([CURLLIBS])
have_mdb=no
AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],)
if test "x$have_mdb" = "xyes"; then
MDBLIBS=-lmdb
fi
AC_SUBST([MDBLIBS])
AC_ARG_ENABLE([encryption],
AS_HELP_STRING([--enable-encryption],
[Compile recutils with encryption support (default is YES)]),
[crypt_enabled=$enableval], [crypt_enabled=yes])
crypt_support=no
if test "x$crypt_enabled" = "xyes"; then
AC_LIB_HAVE_LINKFLAGS([gcrypt],[gpg-error],[#include <gpg-error.h>])
crypt_support=$HAVE_LIBGCRYPT
if test "x$crypt_support" = "xyes"; then
AC_DEFINE([REC_CRYPT_SUPPORT],[1],[Compile encryption support])
fi
fi
AM_CONDITIONAL([CRYPT], [test "x$crypt_support" = "xyes"])
AC_SUBST([crypt_support])
have_glib=no
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0],
[have_glib=yes], [have_glib=no])
AM_CONDITIONAL([COMPILE_MDB2REC],
[test "x$have_glib" = "xyes" && test "x$have_mdb" = "xyes"])
AM_CONDITIONAL([REMOTE_DESCRIPTORS], [test "x$have_curl" = "xyes"])
dnl Check for an Algol 68 compiler
AC_ARG_ENABLE([algol68],
AS_HELP_STRING([--enable-algol68],
[Build the bindings for Algol 68 (default is NO)]),
[algol68_enabled=$enableval], [algol68_enabled=no])
if test "x$algol68_enabled" = "xyes"; then
AC_CHECK_PROGS([CA68], [ca68])
fi
AC_SUBST([CA68])
AM_CONDITIONAL([BUILD_A68],[test -n $CA68 && test "x$algol68_enabled" = "xyes"])
dnl Platform-based compilation options
compile_w32_system=no
case "${host}" in
*-mingw32*)
compile_w32_system=yes
;;
*)
;;
esac
dnl i18n with gettext
AM_GNU_GETTEXT_VERSION([0.18.1])
AM_GNU_GETTEXT([external])
dnl gcov compilation
AC_ARG_ENABLE([coverage],
AS_HELP_STRING([--enable-coverage],
[Compile the library with code coverage support (default is NO)]),
[use_gcov=$enableval], [use_gcov=no])
AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
dnl Generate output files
AC_OUTPUT(Makefile
lib/Makefile
libcsv/Makefile
src/Makefile
utils/Makefile
doc/Makefile
po/Makefile.in
torture/Makefile
torture/utils/Makefile
torture/utils/config.sh
man/Makefile
etc/Makefile
algol68/Makefile)
dnl Report warnings
if test "x$have_mdb" = "xno"; then
echo "warning: libmdb was not found in the system."
echo "warning: the mdb2rec utility won't get built."
fi
if test "x$have_glib" = "xno"; then
echo "warning: glib was not found in the system."
echo "warning: the mdb2rec utility won't get built."
fi
if test "x$crypt_support" = "xno"; then
echo "warning: building recutils without encryption support."
fi
dnl End of configure.ac
|