1 | dnl Configuration for the gettext-runtime directory of GNU gettext |
---|
2 | dnl Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. |
---|
3 | dnl |
---|
4 | dnl This program is free software; you can redistribute it and/or modify |
---|
5 | dnl it under the terms of the GNU General Public License as published by |
---|
6 | dnl the Free Software Foundation; either version 2, or (at your option) |
---|
7 | dnl any later version. |
---|
8 | dnl |
---|
9 | dnl This program is distributed in the hope that it will be useful, |
---|
10 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | dnl GNU General Public License for more details. |
---|
13 | dnl |
---|
14 | dnl You should have received a copy of the GNU General Public License |
---|
15 | dnl along with this program; if not, write to the Free Software |
---|
16 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
17 | |
---|
18 | dnl Process this file with autoconf to produce a configure script. |
---|
19 | |
---|
20 | AC_PREREQ(2.57) |
---|
21 | AC_INIT |
---|
22 | AC_CONFIG_SRCDIR(intl/dcigettext.c) |
---|
23 | AC_CONFIG_AUX_DIR(../config) |
---|
24 | . $srcdir/../version.sh |
---|
25 | AM_INIT_AUTOMAKE(gettext-runtime, $VERSION_NUMBER) |
---|
26 | AM_CONFIG_HEADER(config.h) |
---|
27 | |
---|
28 | dnl Installation directories. |
---|
29 | AC_SUBST([docdir], ['${datadir}/doc/gettext']) |
---|
30 | dnl Prefer modern Filesystem Hierarchy Standard over antiquated GNU standards. |
---|
31 | test "$mandir" != '${prefix}/man' || mandir='${datadir}/man' |
---|
32 | |
---|
33 | dnl Checks for programs. |
---|
34 | AC_PROG_CC |
---|
35 | AC_PROG_INSTALL |
---|
36 | AC_PROG_YACC |
---|
37 | |
---|
38 | gt_JAVACOMP |
---|
39 | AC_CHECK_PROG(JAR, jar, jar) |
---|
40 | if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then |
---|
41 | BUILDJAVA=yes |
---|
42 | else |
---|
43 | BUILDJAVA=no |
---|
44 | fi |
---|
45 | AC_SUBST(BUILDJAVA) |
---|
46 | |
---|
47 | gt_CSHARPCOMP |
---|
48 | if test -n "$HAVE_CSHARPCOMP" && test "$CSHARP_CHOICE" != no; then |
---|
49 | BUILDCSHARP=yes |
---|
50 | else |
---|
51 | BUILDCSHARP=no |
---|
52 | fi |
---|
53 | AC_SUBST(BUILDCSHARP) |
---|
54 | |
---|
55 | dnl Check for host type. |
---|
56 | AC_CANONICAL_HOST |
---|
57 | |
---|
58 | dnl Checks for UNIX variants that set DEFS, |
---|
59 | AC_ISC_POSIX |
---|
60 | |
---|
61 | dnl Checks for compiler output filename suffixes. |
---|
62 | AC_OBJEXT |
---|
63 | AC_EXEEXT |
---|
64 | |
---|
65 | dnl Make sure we see all GNU and Solaris extensions. |
---|
66 | AC_GNU_SOURCE |
---|
67 | gl_USE_SYSTEM_EXTENSIONS |
---|
68 | |
---|
69 | dnl Check for build configuration. |
---|
70 | AC_LIBTOOL_WIN32_DLL |
---|
71 | AC_PROG_LIBTOOL |
---|
72 | |
---|
73 | AC_RELOCATABLE |
---|
74 | |
---|
75 | dnl Checks for libraries. |
---|
76 | |
---|
77 | dnl Checks for header files. |
---|
78 | AC_CHECK_HEADERS(string.h) |
---|
79 | AM_STDBOOL_H |
---|
80 | |
---|
81 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
82 | AC_TYPE_SIZE_T |
---|
83 | |
---|
84 | dnl Checks for library functions. |
---|
85 | gl_ALLOCSA |
---|
86 | AC_FUNC_VPRINTF |
---|
87 | AC_CHECK_FUNCS([setlocale strerror]) |
---|
88 | AC_REPLACE_FUNCS([atexit memmove]) |
---|
89 | gl_GETOPT |
---|
90 | gt_FUNC_SETENV |
---|
91 | gl_FUNC_STRERROR |
---|
92 | gl_FUNC_STRTOUL |
---|
93 | gl_FUNC_GLIBC_UNLOCKED_IO |
---|
94 | gl_ERROR |
---|
95 | gl_PATHMAX |
---|
96 | gl_FUNC_READLINK |
---|
97 | gl_XREADLINK |
---|
98 | gl_CANONICALIZE |
---|
99 | |
---|
100 | dnl These are the only lines required to internationalize the package. |
---|
101 | dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.) |
---|
102 | AM_GNU_GETTEXT(use-libtool, need-ngettext) |
---|
103 | |
---|
104 | dnl Put some default definitions into config.h. |
---|
105 | AH_BOTTOM([ |
---|
106 | /* On Windows, variables that may be in a DLL must be marked specially. */ |
---|
107 | #if defined _MSC_VER && defined _DLL |
---|
108 | # define DLL_VARIABLE __declspec (dllimport) |
---|
109 | #else |
---|
110 | # define DLL_VARIABLE |
---|
111 | #endif |
---|
112 | |
---|
113 | /* Extra OS/2 (emx+gcc) defines. */ |
---|
114 | #ifdef __EMX__ |
---|
115 | # include "intl/os2compat.h" |
---|
116 | #endif |
---|
117 | ]) |
---|
118 | |
---|
119 | dnl Check for tools needed for formatting the documentation. |
---|
120 | ac_aux_dir_abs=`cd $ac_aux_dir && pwd` |
---|
121 | AC_PATH_PROG(PERL, perl, $ac_aux_dir_abs/missing perl) |
---|
122 | |
---|
123 | dnl Check for tools needed for formatting man pages. |
---|
124 | CROSS_COMPILING=$cross_compiling |
---|
125 | AC_SUBST(CROSS_COMPILING) |
---|
126 | |
---|
127 | dnl Checks for optional programs for the tests/lang-* tests. |
---|
128 | gt_PROG_ANSI_CXX |
---|
129 | |
---|
130 | dnl Determine whether to build libasprintf. |
---|
131 | AC_ARG_ENABLE(libasprintf, |
---|
132 | [ --disable-libasprintf do not build libasprintf], |
---|
133 | [if test "$enableval" != no; then |
---|
134 | SUBDIR_libasprintf=libasprintf |
---|
135 | else |
---|
136 | SUBDIR_libasprintf= |
---|
137 | fi |
---|
138 | ], SUBDIR_libasprintf=libasprintf) |
---|
139 | if test "$CXX" = ":"; then |
---|
140 | SUBDIR_libasprintf= |
---|
141 | fi |
---|
142 | AC_SUBST(SUBDIR_libasprintf) |
---|
143 | |
---|
144 | AC_CONFIG_SUBDIRS(libasprintf) |
---|
145 | |
---|
146 | AC_CONFIG_FILES([Makefile]) |
---|
147 | |
---|
148 | AC_CONFIG_FILES([doc/Makefile]) |
---|
149 | |
---|
150 | AC_CONFIG_FILES([intl/Makefile]) |
---|
151 | |
---|
152 | AC_CONFIG_FILES([intl-java/Makefile]) |
---|
153 | |
---|
154 | AC_CONFIG_FILES([intl-csharp/Makefile]) |
---|
155 | |
---|
156 | AC_CONFIG_FILES([lib/Makefile], |
---|
157 | [FIX_MAKEFILE_COMPILE]) |
---|
158 | AC_CONFIG_FILES([lib/javacomp.sh:../gettext-tools/lib/javacomp.sh.in]) |
---|
159 | AC_CONFIG_FILES([lib/csharpcomp.sh:../gettext-tools/lib/csharpcomp.sh.in]) |
---|
160 | |
---|
161 | AC_CONFIG_FILES([src/Makefile], |
---|
162 | [FIX_MAKEFILE_COMPILE]) |
---|
163 | AC_CONFIG_FILES([src/gettext.sh], [chmod a+x src/gettext.sh]) |
---|
164 | |
---|
165 | AC_CONFIG_FILES([po/Makefile.in]) |
---|
166 | |
---|
167 | AC_CONFIG_FILES([man/Makefile], |
---|
168 | [FIX_MAKEFILE_DISTRIB]) |
---|
169 | AC_CONFIG_FILES([man/x-to-1]) |
---|
170 | |
---|
171 | AC_CONFIG_FILES([m4/Makefile]) |
---|
172 | |
---|
173 | AC_OUTPUT |
---|