*** empty log message ***
[m17n/m17n-docs.git] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(m17n-docs, 1.4.0, bugs-m17n-lib@m17n.org)
3 AM_INIT_AUTOMAKE(m17n-docs, 1.4.0)
4
5 AM_MAINTAINER_MODE
6
7 # Checks for programs.
8 AC_PROG_CC
9 AC_PROG_INSTALL
10 AC_PROG_AWK
11
12 if test $USE_MAINTAINER_MODE = yes; then
13
14 # Checks for source program files.
15 AC_ARG_WITH(m17nlib,
16   [  --with-m17n-lib=DIR     directory of m17n-lib source files],
17   M17NLIB="$withval")
18
19 if test "x$M17NLIB" = "x"; then
20   if test -d ../m17n-lib; then
21     M17NLIB=../m17n-lib
22   elif test -d /usr/local/src/m17n-lib; then
23     M17NLIB=/usr/local/src/m17n-lib
24   else
25     M17NLIB=.
26   fi
27 else :
28 fi
29 AC_SUBST(M17NLIB)
30
31 # Checks for the m17n database files.
32 AC_ARG_WITH(m17ndb,
33   [  --with-m17n-db=DIR     directory of m17n-db source files],
34   M17NDB="$withval")
35
36 if test "x$M17NDB" = "x"; then
37   if test -d ../m17n-db; then
38     M17NDB=../m17n-db
39   elif test -d /usr/local/src/m17n-db; then
40     M17NDB=/usr/local/src/m17n-db
41   else
42     M17NDB=.
43   fi
44 else :
45 fi
46 AC_SUBST(M17NDB)
47
48 PKG_CHECK_MODULES(M17N, m17n-shell)
49 AC_SUBST(M17N_CFLAGS)
50 AC_SUBST(M17N_LIBS)
51
52 AC_CHECK_PROG(HAVEDOXYGEN, doxygen, yes, no)
53 AC_CHECK_PROG(RUBY, ruby, yes, no)
54 AC_CHECK_PROG(LATEX, latex, yes, no)
55 AC_CHECK_PROG(PLATEX, platex, yes, no)
56
57 OK=yes
58 if test "$HAVEDOXYGEN" = "no"; then
59   echo "Can't find a program \"doxygen\"!"
60   OK=no
61 fi
62 if test "$RUBY" = "no"; then
63   echo "Can't find a program \"ruby\"!"
64   OK=no
65 fi
66 if test "$LATEX" = "no"; then
67   echo "Can't find a program \"latex\"!"
68   OK=no
69 fi
70 if test "$PLATEX" = "no"; then
71   echo "Can't find a program \"platex\"!"
72   OK=no
73 fi
74 if test "$OK" = "no"; then
75   exit 1
76 fi
77
78 fi
79
80 AC_CONFIG_FILES([Makefile utils/Makefile])
81 AC_OUTPUT
82
83 # Print configuration message.
84 if test $USE_MAINTAINER_MODE = yes; then
85   AC_MSG_NOTICE([Find documentation source in "$M17NLIB"])
86   AC_MSG_NOTICE([Find m17n database source in "$M17NDB"])
87 fi
88
89 eval dir=${datadir}
90 AC_MSG_NOTICE([-------------------------------------------])
91 AC_MSG_NOTICE([Install documentations in these directories])
92 AC_MSG_NOTICE([-------------------------------------------])
93 AC_MSG_NOTICE([  m17n-lib.dvi:  ${dir}/m17n/docs])
94 AC_MSG_NOTICE([  m17n-lib.ps:   ${dir}/m17n/docs])
95 AC_MSG_NOTICE([  html files:    ${dir}/m17n/docs/html])
96 eval dir=${mandir}
97 AC_MSG_NOTICE([  man files:     ${dir}])