guile-mecab/configure.ac

configure.ac

1
dnl Guile-Mecab --- GNU Guile bindings for mecab, yet another part of speech
2
dnl analyzer.
3
dnl Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
4
dnl
5
dnl This file is part of Guile-Mecab.
6
dnl
7
dnl Guile-Mecab is free software; you can redistribute it and/or modify it
8
dnl under the terms of the GNU General Public License as published by
9
dnl the Free Software Foundation; either version 3 of the License, or
10
dnl (at your option) any later version.
11
dnl
12
dnl Guile-Mecab is distributed in the hope that it will be useful, but
13
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
14
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
dnl General Public License for more details.
16
dnl
17
dnl You should have received a copy of the GNU General Public License
18
dnl along with Guile-Mecab.  If not, see <http://www.gnu.org/licenses/>.
19
20
AC_INIT([Guile-Mecab], [0.1.0], [], [], [https://git.lepiller.eu/guile-mecab])
21
AC_CONFIG_SRCDIR(mecab)
22
AC_CONFIG_AUX_DIR([build-aux])
23
AC_CONFIG_MACRO_DIR([m4])
24
AM_INIT_AUTOMAKE([-Wall -Werror foreign color-tests])
25
26
dnl Enable silent rules by default.
27
AM_SILENT_RULES([yes])
28
29
GUILE_PKG([3.0 2.2 2.0])
30
GUILE_PROGS
31
32
dnl (srfi srfi-64) appeared in Guile 2.0.11.
33
GUILE_MODULE_REQUIRED([srfi srfi-64])
34
GUILE_MODULE_REQUIRED([bytestructures guile])
35
36
AC_ARG_WITH(
37
   mecab-config,
38
   [  --with-mecab-config=PATH  set mecab-config location [search path]],
39
   AC_MSG_RESULT(using $with_mecab_config for mecab-config)
40
   MECAB_CONFIG=$with_mecab_config,
41
   [AC_PATH_PROGS(MECAB_CONFIG, mecab-config, no)]
42
)
43
if test $MECAB_CONFIG = "no";
44
then
45
   AC_MSG_ERROR(mecab-config is not found in your system)
46
fi
47
AC_SUBST(MECAB_CONFIG)
48
49
AC_ARG_WITH(
50
    mecab-libdir,
51
    [  --with-mecab-libdir=PATH  set mecab library location [`mecab-config prefix`/lib]],
52
    AC_MSG_RESULT(using $with_mecab_libdir for mecab libdir)
53
    MECAB_LIBDIR=$with_mecab_libdir,
54
    [MECAB_LIBDIR="`$MECAB_CONFIG --prefix`/lib"]
55
)
56
57
AC_SUBST([MECAB_LIBDIR])
58
59
AC_CONFIG_FILES([Makefile mecab/configuration.scm])
60
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
61
62
if test "$cross_compiling" != no; then
63
   GUILE_TARGET="--target=$host_alias"
64
   AC_SUBST([GUILE_TARGET])
65
fi
66
67
AC_OUTPUT
68