Versions changed to 1.6.1.
[m17n/m17n-db.git] / configure.ac
1 # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
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.6.1, bugs-m17n-lib@m17n.org)
25 AM_INIT_AUTOMAKE(m17n-db, 1.6.1)
26 AM_GNU_GETTEXT([external])
27
28 # Checks for programs.
29 AC_PROG_INSTALL
30 AC_PROG_AWK
31
32 AC_CHECK_PROG(HAVE_MSGFMT, msgfmt, yes)
33 if test "x$HAVE_MSGFMT" != "xyes"; then
34   echo "  Please install the program \"msgfmt\" in advance."
35   echo "  It is usually included in the package \"gettext\"."
36   exit 1;
37 else :
38 fi
39
40 # Checks for source data files.
41 AC_ARG_WITH(charmaps,
42   [  --with-charmaps=DIR     Directory of source files for charset maps.],
43   CHARMAPS="$withval")
44
45 AC_SUBST(CHARMAPS)
46 AC_SUBST(CHARMAP_EXT)
47 AC_SUBST(CHARMAP_CAT)
48
49 if test "x$CHARMAPS" = "x"; then
50   if test -d ./charmaps; then
51     CHARMAPS=./charmaps
52   elif test -d /usr/share/i18n/charmaps; then
53     CHARMAPS=/usr/share/i18n/charmaps
54   else
55     CHARMAPS=
56   fi
57 else :
58 fi
59
60 if test "x$CHARMAPS" != "x"; then
61   if test -r "$CHARMAPS/EUC-JP.gz"; then
62     CHARMAP_EXT=".gz"
63     CHARMAP_CAT="zcat"
64   elif test -r "$CHARMAPS/EUC-JP"; then
65     CHARMAP_EXT=
66     CHARMAP_CAT="cat"
67   else
68     CHARMAPS=
69   fi
70 else :
71 fi
72
73 ICONS=`cd icons; echo *.png`
74 AC_SUBST(ICONS)
75
76 LANGNAME_TABLES=`cd LANGDATA; echo *.lnm`
77 AC_SUBST(LANGNAME_TABLES)
78
79 AC_CONFIG_FILES([Makefile mapconv m17n-db m17n-db.pc
80                  icons/Makefile po/Makefile.in
81                  FLT/Makefile MIM/Makefile LANGDATA/Makefile
82                  ])
83 AC_OUTPUT
84
85 # Print configuration message.
86 if test "x$CHARMAPS" != "x"; then
87   echo "------------------------------------------------------------"
88   echo "Charset maps are generated from files under thie directory:"
89   echo "  $CHARMAPS/"
90   echo "------------------------------------------------------------"
91 else
92   echo "-----------ERROR-----------ERROR-----------ERROR------------"
93   echo "Can't find source files for generating charset maps."
94   echo "Run the script \"./get-glibc.sh\", and try again."
95   echo "Or, read the installation procedure in the file README."
96   echo "  --with-charmaps=--DIRECTORY-OF-GLIBC-SOURCE--/localedata/charmaps"
97   echo "-----------ERROR-----------ERROR-----------ERROR------------"
98 fi