Change versions to 1.4.0.
[m17n/m17n-db.git] / configure.ac
1 # Copyright (C) 2003, 2004, 2005, 2006, 2007
2 #   National Institute of Advanced Industrial Science and Technology (AIST)
3 #   Registration Number H15PRO112
4
5 # This file is part of the m17n database; a sub-part of the m17n
6 # library.
7
8 # The m17n library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public License
10 # as published by the Free Software Foundation; either version 2.1 of
11 # the License, or (at your option) any later version.
12
13 # The m17n library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # Lesser General Public License for more details.
17
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with the m17n library; if not, write to the Free
20 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 # Boston, MA 02110-1301, USA.
22
23 # Process this file with autoconf to produce a configure script.
24 AC_INIT(m17n-db, 1.4.0, bugs-m17n-lib@m17n.org)
25 AM_INIT_AUTOMAKE(m17n-db, 1.4.0)
26 AM_GNU_GETTEXT([external])
27
28 # Checks for programs.
29 AC_PROG_INSTALL
30 AC_PROG_AWK
31
32 # Checks for source data files.
33 AC_ARG_WITH(charmaps,
34   [  --with-charmaps=DIR     Directory of source files for charset maps.],
35   CHARMAPS="$withval")
36
37 AC_SUBST(CHARMAPS)
38 AC_SUBST(CHARMAP_EXT)
39 AC_SUBST(CHARMAP_CAT)
40
41 if test "x$CHARMAPS" = "x"; then
42   if test -d ./charmaps; then
43     CHARMAPS=./charmaps
44   elif test -d /usr/share/i18n/charmaps; then
45     CHARMAPS=/usr/share/i18n/charmaps
46   else
47     CHARMAPS=
48   fi
49 else :
50 fi
51
52 if test "x$CHARMAPS" != "x"; then
53   if test -r "$CHARMAPS/EUC-JP.gz"; then
54     CHARMAP_EXT=".gz"
55     CHARMAP_CAT="zcat"
56   elif test -r "$CHARMAPS/EUC-JP"; then
57     CHARMAP_EXT=
58     CHARMAP_CAT="cat"
59   else
60     CHARMAPS=
61   fi
62 else :
63 fi
64
65 ICONS=`cd icons; echo *.png`
66 AC_SUBST(ICONS)
67
68 LANGNAME_TABLES=`cd LANGDATA; echo *.lnm`
69 AC_SUBST(LANGNAME_TABLES)
70
71 AC_CONFIG_FILES([Makefile mapconv m17n-db m17n-db.pc
72                  icons/Makefile po/Makefile.in
73                  FLT/Makefile MIM/Makefile LANGDATA/Makefile
74                  ])
75 AC_OUTPUT
76
77 # Print configuration message.
78 if test "x$CHARMAPS" != "x"; then
79   echo "------------------------------------------------------------"
80   echo "Charset maps are generated from files under thie directory:"
81   echo "  $CHARMAPS/"
82   echo "------------------------------------------------------------"
83 else
84   echo "-----------ERROR-----------ERROR-----------ERROR------------"
85   echo "Can't find source files for generating charset maps."
86   echo "Run the script \"./get-glibc.sh\", and try again."
87   echo "Or, read the installation procedure in the file README."
88   echo "  --with-charmaps=--DIRECTORY-OF-GLIBC-SOURCE--/localedata/charmaps"
89   echo "-----------ERROR-----------ERROR-----------ERROR------------"
90 fi