1dnl Configuration for the GNU libasprintf library 2dnl Copyright (C) 2002-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.52) 21AC_INIT 22AC_CONFIG_SRCDIR(vasprintf.c) 23AC_CONFIG_AUX_DIR(../../build-aux) 24AM_INIT_AUTOMAKE(libasprintf, 1.0) 25AM_CONFIG_HEADER(config.h) 26 27dnl Checks for programs. 28AC_PROG_CC 29AC_PROG_CXX 30AC_PROG_INSTALL 31 32dnl Check for host type. 33AC_CANONICAL_HOST 34 35dnl Checks for compiler output filename suffixes. 36AC_OBJEXT 37AC_EXEEXT 38 39dnl Check for build configuration. 40gl_WOE32_DLL 41AC_LIBTOOL_WIN32_DLL 42AC_PROG_LIBTOOL 43case "$host_os" in 44 # On Cygwin, without -no-undefined, a warning is emitted and only a static 45 # library is built. 46 beos* | mingw* | cygwin*) LTNOUNDEF='-no-undefined' ;; 47 *) LTNOUNDEF='' ;; 48esac 49AC_SUBST([LTNOUNDEF]) 50 51dnl Checks for libraries. 52 53dnl Checks for header files. 54 55dnl Checks for typedefs, structures, and compiler characteristics. 56AC_C_INLINE 57AC_TYPE_SIZE_T 58gl_AC_TYPE_LONG_LONG 59gt_TYPE_LONGDOUBLE 60gt_TYPE_WCHAR_T 61gt_TYPE_WINT_T 62AC_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 ]) 66gt_TYPE_INTMAX_T 67gl_XSIZE 68 69dnl Checks for library functions. 70 71AC_FUNC_ALLOCA 72dnl Define an additional variable used in the Makefile substitution. 73AC_EGREP_CPP([Need own alloca], [ 74#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H 75 Need own alloca 76#endif 77 ], 78 ALLOCA_H=alloca.h, 79 ALLOCA_H=) 80AC_SUBST([ALLOCA_H]) 81 82AC_CHECK_FUNCS([snprintf vasprintf wcslen]) 83AC_CHECK_DECLS([_snprintf]) 84gt_PRINTF_POSIX 85 86dnl Check for tools needed for formatting the documentation. 87ac_aux_dir_abs=`cd $ac_aux_dir && pwd` 88AC_PATH_PROG(DVIPS, dvips, $ac_aux_dir_abs/missing dvips) 89AC_PATH_PROG(TEXI2PDF, texi2pdf, $ac_aux_dir_abs/missing texi2pdf) 90AC_PATH_PROG(PERL, perl, $ac_aux_dir_abs/missing perl) 91 92AC_CONFIG_FILES([Makefile], 93 [FIX_MAKEFILE_COMPILE 94 FIX_MAKEFILE_INFO]) 95 96AC_OUTPUT 97