xref: /netbsd-src/external/gpl2/gettext/dist/gettext-runtime/libasprintf/configure.ac (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1*946379e7Schristosdnl Configuration for the GNU libasprintf library
2*946379e7Schristosdnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
3*946379e7Schristosdnl
4*946379e7Schristosdnl This program is free software; you can redistribute it and/or modify
5*946379e7Schristosdnl it under the terms of the GNU General Public License as published by
6*946379e7Schristosdnl the Free Software Foundation; either version 2, or (at your option)
7*946379e7Schristosdnl any later version.
8*946379e7Schristosdnl
9*946379e7Schristosdnl This program is distributed in the hope that it will be useful,
10*946379e7Schristosdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11*946379e7Schristosdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12*946379e7Schristosdnl GNU General Public License for more details.
13*946379e7Schristosdnl
14*946379e7Schristosdnl You should have received a copy of the GNU General Public License
15*946379e7Schristosdnl along with this program; if not, write to the Free Software Foundation,
16*946379e7Schristosdnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*946379e7Schristos
18*946379e7Schristosdnl Process this file with autoconf to produce a configure script.
19*946379e7Schristos
20*946379e7SchristosAC_PREREQ(2.52)
21*946379e7SchristosAC_INIT
22*946379e7SchristosAC_CONFIG_SRCDIR(vasprintf.c)
23*946379e7SchristosAC_CONFIG_AUX_DIR(../../build-aux)
24*946379e7SchristosAM_INIT_AUTOMAKE(libasprintf, 1.0)
25*946379e7SchristosAM_CONFIG_HEADER(config.h)
26*946379e7Schristos
27*946379e7Schristosdnl Checks for programs.
28*946379e7SchristosAC_PROG_CC
29*946379e7SchristosAC_PROG_CXX
30*946379e7SchristosAC_PROG_INSTALL
31*946379e7Schristos
32*946379e7Schristosdnl Check for host type.
33*946379e7SchristosAC_CANONICAL_HOST
34*946379e7Schristos
35*946379e7Schristosdnl Checks for compiler output filename suffixes.
36*946379e7SchristosAC_OBJEXT
37*946379e7SchristosAC_EXEEXT
38*946379e7Schristos
39*946379e7Schristosdnl Check for build configuration.
40*946379e7Schristosgl_WOE32_DLL
41*946379e7SchristosAC_LIBTOOL_WIN32_DLL
42*946379e7SchristosAC_PROG_LIBTOOL
43*946379e7Schristoscase "$host_os" in
44*946379e7Schristos  # On Cygwin, without -no-undefined, a warning is emitted and only a static
45*946379e7Schristos  # library is built.
46*946379e7Schristos  beos* | mingw* | cygwin*) LTNOUNDEF='-no-undefined' ;;
47*946379e7Schristos  *) LTNOUNDEF='' ;;
48*946379e7Schristosesac
49*946379e7SchristosAC_SUBST([LTNOUNDEF])
50*946379e7Schristos
51*946379e7Schristosdnl Checks for libraries.
52*946379e7Schristos
53*946379e7Schristosdnl Checks for header files.
54*946379e7Schristos
55*946379e7Schristosdnl Checks for typedefs, structures, and compiler characteristics.
56*946379e7SchristosAC_C_INLINE
57*946379e7SchristosAC_TYPE_SIZE_T
58*946379e7Schristosgl_AC_TYPE_LONG_LONG
59*946379e7Schristosgt_TYPE_LONGDOUBLE
60*946379e7Schristosgt_TYPE_WCHAR_T
61*946379e7Schristosgt_TYPE_WINT_T
62*946379e7SchristosAC_CHECK_TYPE([ptrdiff_t], ,
63*946379e7Schristos  [AC_DEFINE([ptrdiff_t], [long],
64*946379e7Schristos     [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
65*946379e7Schristos  ])
66*946379e7Schristosgt_TYPE_INTMAX_T
67*946379e7Schristosgl_XSIZE
68*946379e7Schristos
69*946379e7Schristosdnl Checks for library functions.
70*946379e7Schristos
71*946379e7SchristosAC_FUNC_ALLOCA
72*946379e7Schristosdnl Define an additional variable used in the Makefile substitution.
73*946379e7SchristosAC_EGREP_CPP([Need own alloca], [
74*946379e7Schristos#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
75*946379e7Schristos  Need own alloca
76*946379e7Schristos#endif
77*946379e7Schristos  ],
78*946379e7Schristos  ALLOCA_H=alloca.h,
79*946379e7Schristos  ALLOCA_H=)
80*946379e7SchristosAC_SUBST([ALLOCA_H])
81*946379e7Schristos
82*946379e7SchristosAC_CHECK_FUNCS([snprintf vasprintf wcslen])
83*946379e7SchristosAC_CHECK_DECLS([_snprintf])
84*946379e7Schristosgt_PRINTF_POSIX
85*946379e7Schristos
86*946379e7Schristosdnl Check for tools needed for formatting the documentation.
87*946379e7Schristosac_aux_dir_abs=`cd $ac_aux_dir && pwd`
88*946379e7SchristosAC_PATH_PROG(DVIPS, dvips, $ac_aux_dir_abs/missing dvips)
89*946379e7SchristosAC_PATH_PROG(TEXI2PDF, texi2pdf, $ac_aux_dir_abs/missing texi2pdf)
90*946379e7SchristosAC_PATH_PROG(PERL, perl, $ac_aux_dir_abs/missing perl)
91*946379e7Schristos
92*946379e7SchristosAC_CONFIG_FILES([Makefile],
93*946379e7Schristos                [FIX_MAKEFILE_COMPILE
94*946379e7Schristos                 FIX_MAKEFILE_INFO])
95*946379e7Schristos
96*946379e7SchristosAC_OUTPUT
97