File: configure.ac

package info (click to toggle)
anthy 6300d-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,400 kB
  • ctags: 2,270
  • sloc: ansic: 17,009; sh: 13,554; lisp: 1,039; makefile: 252; ruby: 212; perl: 10
file content (60 lines) | stat: -rw-r--r-- 2,017 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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src-main/main.c)

AM_INIT_AUTOMAKE(anthy, 6300d)
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
SRCDIR=$srcdir
AC_SUBST(SRCDIR)

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