9cf3c573eed4b93b77ec9fd7e08282c71dd66b80
[m17n/m17n-db.git] / configure.ac
1 # Copyright (C) 2003, 2004
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., 59 Temple Place, Suite 330, Boston, MA
21 # 02111-1307, USA.
22
23 # Process this file with autoconf to produce a configure script.
24 AC_INIT(m17n-db, 1.1.0, bugs-m17n-db@m17n.org)
25 AM_INIT_AUTOMAKE(m17n-db, 1.1.0)
26
27 # Checks for programs.
28 AC_PROG_INSTALL
29 AC_PROG_AWK
30
31 # Checks for source data files.
32 AC_ARG_WITH(charmaps,
33   [  --with-charmaps=DIR     Directory of source files for charset maps.],
34   CHARMAPS="$withval")
35
36 AC_SUBST(CHARMAPS)
37 AC_SUBST(CHARMAP_EXT)
38 AC_SUBST(CHARMAP_CAT)
39
40 if test "x$CHARMAPS" = "x"; then
41   if test -d ./charmaps; then
42     CHARMAPS=./charmaps
43   elif test -d /usr/share/i18n/charmaps; then
44     CHARMAPS=/usr/share/i18n/charmaps
45   else
46     CHARMAPS=
47   fi
48 else :
49 fi
50
51 if test "x$CHARMAPS" != "x"; then
52   if test -r "$CHARMAPS/EUC-JP.gz"; then
53     CHARMAP_EXT=".gz"
54     CHARMAP_CAT="zcat"
55   elif test -r "$CHARMAPS/EUC-JP"; then
56     CHARMAP_EXT=
57     CHARMAP_CAT="cat"
58   else
59     CHARMAPS=
60   fi
61 else :
62 fi
63
64
65 AC_CONFIG_FILES([Makefile mapconv m17n-db])
66 AC_OUTPUT
67
68 # Print configuration message.
69 if test "x$CHARMAPS" != "x"; then
70   echo "------------------------------------------------------------"
71   echo "Charset maps are generated from files under thie directory:"
72   echo "  $CHARMAPS/"
73   echo "------------------------------------------------------------"
74 else
75   echo "-----------ERROR-----------ERROR-----------ERROR------------"
76   echo "Can't find source files for generating charset maps."
77   echo "Run the script \"./get-glibc.sh\", and try again."
78   echo "Or, read the installation procedure in the file README."
79   echo "  --with-charmaps=--DIRECTORY-OF-GLIBC-SOURCE--/localedata/charmaps"
80   echo "-----------ERROR-----------ERROR-----------ERROR------------"
81 fi