summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 2a261f1ee31616640718e14101182aa5e4f3b303 (about) (plain)
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
dnl guile-xapian --- Guile bindings for Xapian
dnl Copyright © 2020, 2021 Arun Isaac <arunisaac@systemreboot.net>
dnl
dnl This file is part of guile-xapian.
dnl
dnl guile-xapian is free software: you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License as
dnl published by the Free Software Foundation, either version 2 of the
dnl License, or (at your option) any later version.
dnl
dnl guile-xapian 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 GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with guile-xapian.  If not, see
dnl <https://www.gnu.org/licenses/>.

AC_INIT([guile-xapian], [0.1.0])
AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign check-news no-dist-gzip dist-lzip])
AM_SILENT_RULES([yes])
LT_INIT

AC_PROG_CXX
AX_PKG_SWIG
GUILE_PKG([3.0 2.2])
PKG_CHECK_MODULES([GUILE], [guile-3.0],,[
    PKG_CHECK_MODULES([GUILE], [guile-2.2])
])
GUILE_PROGS
PKG_CHECK_MODULES([XAPIAN], [xapian-core])
PKG_CHECK_MODULES([ZLIB], [zlib])

# To build the website
AC_PATH_PROG([EMACS], [emacs])

dnl pkg-config does not output xapian include flags when the include
dnl path is already in CPATH. See
dnl https://unix.stackexchange.com/questions/362289/why-is-pkg-config-cflags-openssl-returning-nothing-on-rhel-6-8
dnl But, swig does not use CPATH. So, we need to invoke pkg-config
dnl again forcing it to output all include flags.
AC_SUBST([SWIG_FLAGS], [$(PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --cflags xapian-core)])

AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_CONFIG_FILES([build-aux/test-driver.scm])
AC_OUTPUT