d3e336c98c0b20dcd5e56305a323de1d4daa456b
[m17n/m17n-db.git] / configure.ac
1 # Copyright (C) 2003, 2004, 2005, 2006
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.3.4, bugs-m17n-lib@m17n.org)
25 AM_INIT_AUTOMAKE(m17n-db, 1.3.4)
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
66 ICONS=`cd icons; echo *.png`
67 AC_SUBST(ICONS)
68
69 AC_CONFIG_FILES([Makefile mapconv m17n-db m17n-db.pc icons/Makefile po/Makefile.in])
70 AC_OUTPUT
71
72 # Print configuration message.
73 if test "x$CHARMAPS" != "x"; then
74   echo "------------------------------------------------------------"
75   echo "Charset maps are generated from files under thie directory:"
76   echo "  $CHARMAPS/"
77   echo "------------------------------------------------------------"
78 else
79   echo "-----------ERROR-----------ERROR-----------ERROR------------"
80   echo "Can't find source files for generating charset maps."
81   echo "Run the script \"./get-glibc.sh\", and try again."
82   echo "Or, read the installation procedure in the file README."
83   echo "  --with-charmaps=--DIRECTORY-OF-GLIBC-SOURCE--/localedata/charmaps"
84   echo "-----------ERROR-----------ERROR-----------ERROR------------"
85 fi