summaryrefslogtreecommitdiffstats
path: root/gettext-runtime/configure.ac
blob: 5db4242126aa4ae120e78e747512f92f8cbfc650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
dnl Configuration for the gettext-runtime directory of GNU gettext
dnl Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT
AC_CONFIG_SRCDIR(intl/dcigettext.c)
AC_CONFIG_AUX_DIR(../config)
. $srcdir/../version.sh
AM_INIT_AUTOMAKE(gettext-runtime, $VERSION_NUMBER)
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_YACC

gt_JAVACOMP
AC_CHECK_PROG(JAR, jar, jar)
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
  BUILDJAVA=yes
else
  BUILDJAVA=no
fi
AC_SUBST(BUILDJAVA)

dnl Check for host type.
AC_CANONICAL_HOST

dnl Checks for UNIX variants that set DEFS,
AC_ISC_POSIX

dnl Checks for compiler output filename suffixes.
AC_OBJEXT
AC_EXEEXT

dnl Check for build configuration.
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

AC_RELOCATABLE

AC_DEFINE(_GNU_SOURCE, 1, [Make sure we see all GNU extensions.])

dnl Checks for libraries.

dnl Checks for header files.
AC_CHECK_HEADERS(string.h)
gt_STDBOOL_H

dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

dnl Checks for library functions.
gl_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([setlocale strerror])
AC_REPLACE_FUNCS([memmove])
gt_FUNC_SETENV
gl_FUNC_STRERROR
gt_FUNC_ERROR_AT_LINE
gl_PATHMAX
gl_XREADLINK
gl_CANONICALIZE

dnl These are the only lines required to internationalize the package.
dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.)
AM_GNU_GETTEXT(use-libtool, need-ngettext)

dnl Put some default definitions into config.h.
AH_BOTTOM([
/* Extra OS/2 (emx+gcc) defines.  */
#ifdef __EMX__
# include "intl/os2compat.h"
#endif
])

dnl Check for tools needed for formatting the documentation.
ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
AC_PATH_PROG(PERL, perl, $ac_aux_dir_abs/missing perl)

dnl Check for tools needed for formatting man pages.
CROSS_COMPILING=$cross_compiling
AC_SUBST(CROSS_COMPILING)

dnl Checks for optional programs for the tests/lang-* tests.
gt_PROG_ANSI_CXX

dnl Determine whether to build libasprintf.
if test "$CXX" != ":"; then
  SUBDIR_libasprintf=libasprintf
else
  SUBDIR_libasprintf=
fi
AC_SUBST(SUBDIR_libasprintf)

AC_CONFIG_SUBDIRS(libasprintf)

AC_CONFIG_FILES([Makefile])

AC_CONFIG_FILES([doc/Makefile])

AC_CONFIG_FILES([intl/Makefile])

AC_CONFIG_FILES([intl-java/Makefile])

AC_CONFIG_FILES([lib/Makefile],
                [FIX_MAKEFILE_COMPILE([lib/Makefile])])
AC_CONFIG_FILES([lib/javacomp.sh:../gettext-tools/lib/javacomp.sh.in])

AC_CONFIG_FILES([src/Makefile],
                [FIX_MAKEFILE_COMPILE([src/Makefile])])

AC_CONFIG_FILES([po/Makefile.in])

AC_CONFIG_FILES([man/Makefile])
AC_CONFIG_FILES([man/x-to-1])

AC_CONFIG_FILES([m4/Makefile])

AC_OUTPUT