xref: /netbsd-src/external/gpl2/gettext/dist/gettext-runtime/configure.ac (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1dnl Configuration for the gettext-runtime directory of GNU gettext
2dnl Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc.
3dnl
4dnl This program is free software; you can redistribute it and/or modify
5dnl it under the terms of the GNU General Public License as published by
6dnl the Free Software Foundation; either version 2, or (at your option)
7dnl any later version.
8dnl
9dnl This program is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12dnl GNU General Public License for more details.
13dnl
14dnl You should have received a copy of the GNU General Public License
15dnl along with this program; if not, write to the Free Software Foundation,
16dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18dnl Process this file with autoconf to produce a configure script.
19
20AC_PREREQ([2.59])
21AC_INIT
22AC_CONFIG_SRCDIR(intl/dcigettext.c)
23AC_CONFIG_AUX_DIR(../build-aux)
24. $srcdir/../version.sh
25AM_INIT_AUTOMAKE(gettext-runtime, $VERSION_NUMBER)
26AM_CONFIG_HEADER(config.h)
27
28dnl Installation directories.
29test "$docdir" != '${datarootdir}/doc/${PACKAGE}' || docdir='${datarootdir}/doc/gettext'
30
31dnl Checks for programs.
32AC_PROG_CC
33AC_PROG_INSTALL
34AC_PROG_YACC
35
36gt_JAVA_CHOICE
37
38gt_JAVACOMP([1.3], [1.1])
39AC_CHECK_PROG(JAR, jar, jar)
40if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
41  BUILDJAVA=yes
42else
43  BUILDJAVA=no
44fi
45AC_SUBST(BUILDJAVA)
46
47gt_CSHARPCOMP
48if test -n "$HAVE_CSHARPCOMP" && test "$CSHARP_CHOICE" != no; then
49  BUILDCSHARP=yes
50else
51  BUILDCSHARP=no
52fi
53AC_SUBST(BUILDCSHARP)
54
55dnl Check for host type.
56AC_CANONICAL_HOST
57
58dnl Checks for compiler output filename suffixes.
59AC_OBJEXT
60AC_EXEEXT
61
62dnl Make sure we see all GNU and Solaris extensions.
63gl_EARLY
64
65dnl Check for build configuration.
66gl_WOE32_DLL
67AC_LIBTOOL_WIN32_DLL
68AC_PROG_LIBTOOL
69
70dnl Checks for libraries.
71
72dnl These are the only lines required to internationalize the package.
73dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.)
74AM_GNU_GETTEXT(use-libtool, need-ngettext)
75
76dnl Checks for header files, functions and declarations.
77gl_INIT
78AC_TYPE_SIZE_T
79AC_CHECK_FUNCS([setlocale])
80
81dnl Put some default definitions into config.h.
82AH_BOTTOM([
83/* On Windows, variables that may be in a DLL must be marked specially.  */
84#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER
85# define DLL_VARIABLE __declspec (dllimport)
86#else
87# define DLL_VARIABLE
88#endif
89
90/* Extra OS/2 (emx+gcc) defines.  */
91#ifdef __EMX__
92# include "intl/os2compat.h"
93#endif
94])
95
96dnl Check for tools needed for formatting the documentation.
97ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
98AC_PATH_PROG(PERL, perl, $ac_aux_dir_abs/missing perl)
99
100dnl Check for tools needed for formatting man pages.
101CROSS_COMPILING=$cross_compiling
102AC_SUBST(CROSS_COMPILING)
103
104dnl Checks for optional programs for the tests/lang-* tests.
105gt_PROG_ANSI_CXX
106
107dnl Checks for special libraries for the tests/test-lock test.
108dnl On some systems, sched_yield is in librt, rather than in libpthread.
109LIBSCHED=
110if test $gl_threads_api = posix; then
111  AC_CHECK_LIB(rt, sched_yield, [LIBSCHED=-lrt])
112fi
113AC_SUBST([LIBSCHED])
114
115dnl Determine whether to build libasprintf.
116AC_ARG_ENABLE(libasprintf,
117  [  --disable-libasprintf   do not build libasprintf],
118  [if test "$enableval" != no; then
119     SUBDIR_libasprintf=libasprintf
120   else
121     SUBDIR_libasprintf=
122   fi
123  ], SUBDIR_libasprintf=libasprintf)
124if test "$CXX" = ":"; then
125  SUBDIR_libasprintf=
126fi
127AM_CONDITIONAL([ENABLE_LIBASPRINTF], [test -n "$SUBDIR_libasprintf"])
128
129AC_CONFIG_SUBDIRS(libasprintf)
130
131AC_CONFIG_FILES([Makefile])
132
133AC_CONFIG_FILES([doc/Makefile])
134
135AC_CONFIG_FILES([intl/Makefile])
136
137AC_CONFIG_FILES([intl-java/Makefile])
138
139AC_CONFIG_FILES([intl-csharp/Makefile])
140
141AC_CONFIG_FILES([gnulib-lib/Makefile],
142                [FIX_MAKEFILE_COMPILE])
143
144AC_CONFIG_FILES([src/Makefile],
145                [FIX_MAKEFILE_COMPILE])
146AC_CONFIG_FILES([src/gettext.sh], [chmod a+x src/gettext.sh])
147
148AC_CONFIG_FILES([po/Makefile.in])
149
150AC_CONFIG_FILES([man/Makefile],
151                [FIX_MAKEFILE_DISTRIB])
152AC_CONFIG_FILES([man/x-to-1])
153
154AC_CONFIG_FILES([m4/Makefile])
155
156AC_CONFIG_FILES([tests/Makefile])
157
158AC_OUTPUT
159