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