File: configure.in

package info (click to toggle)
mecab-jumandic 7.0-20130310-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 211,304 kB
  • sloc: sh: 508; makefile: 17
file content (56 lines) | stat: -rw-r--r-- 1,350 bytes parent folder | download
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
AC_INIT(matrix.def)
AM_INIT_AUTOMAKE(mecab-jumandic, 7.0-20130310)
AC_PROG_INSTALL
AC_SUBST(datarootdir)

AC_ARG_WITH(
    dicdir,
        [  --with-dicdir=DIR  set dicdir location ],
        AC_MSG_RESULT(using $with_dicdir for dicdir)
	MECAB_DICDIR=$with_dicdir, MECAB_DICDIR="no"
)

AC_ARG_WITH(
   mecab-config,
   [  --with-mecab-config=PATH  set mecab-config location [search path]],
   AC_MSG_RESULT(using $with_mecab_config for mecab-config)
   MECAB_CONFIG=$with_mecab_config,
   [AC_PATH_PROGS(MECAB_CONFIG, mecab-config, no)]
)

if test $MECAB_CONFIG = "no";
then
   AC_MSG_ERROR(mecab-config is not found in your system)
fi
AC_SUBST(MECAB_CONFIG)

if test $MECAB_DICDIR = "no";
then
   MECAB_DICDIR="`$MECAB_CONFIG --dicdir`/jumandic"
fi 

MECAB_DICT_INDEX="`$MECAB_CONFIG --libexecdir`/mecab-dict-index"
MECAB_MECABRC="`$MECAB_CONFIG --sysconfdir`/mecabrc"

AC_SUBST(MECAB_DICDIR)
AC_SUBST(MECAB_DICT_INDEX)
AC_SUBST(MECAB_MECABRC)

AC_ARG_WITH(
    charset,
     [  --with-charset=charset  set default charset (euc-jp/sjis/utf-8))],
      [CHARSET=${withval}], [CHARSET='utf-8']
)
CHARSET=$CHARSET
AC_SUBST(CHARSET)

MECAB_LEXICAL_DIC=`echo *.csv`
AC_SUBST(MECAB_LEXICAL_DIC)

MECAB_GENDATA="matrix.bin char.bin sys.dic unk.dic"
AC_SUBST(MECAB_GENDATA)

MECAB_PREDATA="`echo *.def` dicrc"
AC_SUBST(MECAB_PREDATA)

AC_OUTPUT([Makefile])