File: configure.ac

package info (click to toggle)
anthy 7900-3.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,492 kB
  • ctags: 2,641
  • sloc: ansic: 21,074; sh: 13,626; lisp: 1,255; ruby: 385; makefile: 293; perl: 10
file content (66 lines) | stat: -rw-r--r-- 2,090 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
57
58
59
60
61
62
63
64
65
66
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src-main/main.c)

AM_INIT_AUTOMAKE(anthy, 7900)
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LIBTOOL
AM_PATH_LISPDIR

AM_CONDITIONAL(ELISP, test x$lispdir != x)

dnl without emacs. install-lispLISP does mkdir /anthy
dnl dirty hack to avoid it.
test -n "$lispdir" || lispdir="/tmp/"

lispdir="$lispdir/anthy"

test -z "$GCC" || CFLAGS="$CFLAGS -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long"

AC_ARG_ENABLE(ucs4,
 AC_HELP_STRING([--enable-ucs4], [use UCS4]), use_ucs="yes")

if test x$use_ucs = xyes; then
AC_DEFINE(USE_UCS4,,[use ucs4])
AC_CHECK_LIB(iconv, iconv)
fi

AC_MSG_CHECKING(for cannadic)
AC_ARG_WITH(cannadic,
  AC_HELP_STRING([--with-cannadic=DIR], [use cannadic in DIR]),
  [test -d "$withval" ||
    AC_MSG_ERROR(specified cannadic directory \`$withval' does not exist)
  case $withval in
    [[\\/$]]* | ?:[[\\/]]* ) ;;	# absolute path is ok
    *) with_cannadic='${top_builddir}/'$withval ;;	# adjust relative path
  esac
  result=$with_cannadic],
  [for result in '${top_builddir}/cannadic' '${top_srcdir}/cannadic' \
		 '${top_builddir}/mkanthydic' '${top_srcdir}/mkanthydic' .; do
    if (top_srcdir=$srcdir; top_builddir=.
        eval test -f \""$result/gcanna.ctd"\" ||
	eval test -f \""$result/gcannaf.ctd"\"); then
       break
    fi
  done
  with_cannadic=$result
  test "$result" = . && result='not found'])
AC_MSG_RESULT($result)
if test "$result/$with_cannadic" = "not found/."; then
  AC_MSG_WARN(cannadic not found; Anthy dictionary will not be built)
fi
CANNADIC_SRCDIR=$with_cannadic
AC_SUBST(CANNADIC_SRCDIR)dnl

AC_OUTPUT(Makefile
 src-diclib/Makefile src-worddic/Makefile 
 src-splitter/Makefile src-ordering/Makefile
 src-main/Makefile src-util/Makefile include/Makefile
 depgraph/Makefile mkanthydic/Makefile mkmatrix/Makefile
 mkworddic/Makefile mkworddic/dict.args
 cannadic/Makefile test/Makefile test/test.sh
 doc/Makefile calctrans/Makefile
 anthy-conf anthy-test-conf anthy.spec anthy.pc)