Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gettext-runtime / libasprintf / configure.ac
1 dnl Configuration for the GNU libasprintf library
2 dnl Copyright (C) 2002-2009 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 3 of the License, or
7 dnl (at your option) 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, see <http://www.gnu.org/licenses/>.
16
17 dnl Process this file with autoconf to produce a configure script.
18
19 AC_PREREQ([2.59])
20 AC_INIT([libasprintf], [1.0])
21 AC_CONFIG_SRCDIR([vasprintf.c])
22 AC_CONFIG_AUX_DIR([../../build-aux])
23 AM_INIT_AUTOMAKE([silent-rules])
24 AM_CONFIG_HEADER([config.h])
25
26 dnl Checks for programs.
27 AC_PROG_CC
28 AC_PROG_CXX
29 AC_PROG_INSTALL
30
31 dnl Check for host type.
32 AC_CANONICAL_HOST
33
34 dnl Checks for compiler output filename suffixes.
35 AC_OBJEXT
36 AC_EXEEXT
37
38 dnl Early checks, assembled by gnulib.
39 gl_EARLY
40
41 dnl Check for build configuration.
42 gl_WOE32_DLL
43 LT_INIT([win32-dll])
44 case "$host_os" in
45   # On Cygwin, without -no-undefined, a warning is emitted and only a static
46   # library is built.
47   beos* | mingw* | cygwin*) LTNOUNDEF='-no-undefined' ;;
48   *) LTNOUNDEF='' ;;
49 esac
50 AC_SUBST([LTNOUNDEF])
51
52 dnl Checks for libraries.
53
54 dnl Checks for header files.
55
56 dnl Checks for typedefs, structures, and compiler characteristics.
57 AC_C_INLINE
58 AC_TYPE_SIZE_T
59 AC_TYPE_LONG_LONG_INT
60 gt_TYPE_WCHAR_T
61 gt_TYPE_WINT_T
62 AC_CHECK_TYPE([ptrdiff_t], ,
63   [AC_DEFINE([ptrdiff_t], [long],
64      [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
65   ])
66 gt_TYPE_INTMAX_T
67 gl_XSIZE
68
69 dnl Checks for library functions.
70
71 gl_INIT
72 AC_CHECK_FUNCS([snprintf vasprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
73 dnl Use the _snprintf function only if it is declared (because on NetBSD it
74 dnl is defined as a weak alias of snprintf; we prefer to use the latter).
75 AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
76 gt_PRINTF_POSIX
77
78 dnl Check for tools needed for formatting the documentation.
79 ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
80 AC_PATH_PROG([DVIPS], [dvips], [$ac_aux_dir_abs/missing dvips])
81 AC_PATH_PROG([TEXI2PDF], [texi2pdf], [$ac_aux_dir_abs/missing texi2pdf])
82 AC_PATH_PROG([PERL], [perl], [$ac_aux_dir_abs/missing perl])
83
84 AC_CONFIG_FILES([Makefile])
85
86 AC_OUTPUT