1 dnl Configuration for the GNU libasprintf library
2 dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
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.
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.
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/>.
17 dnl Process this file with autoconf to produce a configure script.
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])
26 dnl Checks for programs.
31 dnl Check for host type.
34 dnl Checks for compiler output filename suffixes.
38 dnl Early checks, assembled by gnulib.
41 dnl Check for build configuration.
45 # On Cygwin, without -no-undefined, a warning is emitted and only a static
47 beos* | mingw* | cygwin*) LTNOUNDEF='-no-undefined' ;;
52 dnl Checks for libraries.
54 dnl Checks for header files.
56 dnl Checks for typedefs, structures, and compiler characteristics.
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.])
69 dnl Checks for library functions.
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>])
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])
84 AC_CONFIG_FILES([Makefile])