File: configure.ac

package info (click to toggle)
gettext 0.23.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 167,652 kB
  • sloc: ansic: 532,868; sh: 68,216; perl: 28,011; makefile: 9,046; lisp: 3,184; yacc: 1,055; java: 615; cs: 589; cpp: 397; objc: 343; sed: 79; tcl: 63; xml: 40; pascal: 11; awk: 7; php: 7
file content (130 lines) | stat: -rw-r--r-- 4,106 bytes parent folder | download | duplicates (2)
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
dnl Configuration for the GNU libasprintf library
dnl Copyright (C) 2002-2024 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 3 of the License, or
dnl (at your option) 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, see <https://www.gnu.org/licenses/>.

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

AC_PREREQ([2.64])
AC_INIT([libasprintf], [1.0])
AC_CONFIG_SRCDIR([vasprintf.c])
AC_CONFIG_AUX_DIR([../../build-aux])
AM_INIT_AUTOMAKE([silent-rules])
AC_CONFIG_HEADERS([config.h])

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL

dnl Check for host type.
AC_CANONICAL_HOST

dnl Checks for compiler output filename suffixes.
AC_OBJEXT
AC_EXEEXT

dnl For a 64-bit build on AIX, AC_PROG_RANLIB is not sufficient.
gl_PROG_AR_RANLIB

dnl Early checks, assembled by gnulib.
gl_EARLY

dnl Check for build configuration.

gt_MORE_WARNINGS

gl_WOE32_DLL

LT_INIT([win32-dll])

dnl Prepares the libtool configuration for handling of Windows resources, and
dnl sets the RC variable to a program that compiles Windows resource files.
LT_LANG([Windows Resource])

dnl On native Windows and Cygwin, we can activate special Makefile rules which
dnl add version information to the shared libraries and executables.
case "$host_os" in
  mingw* | windows* | cygwin*) is_woe32=yes ;;
  *) is_woe32=no ;;
esac
AM_CONDITIONAL([WOE32], [test $is_woe32 = yes])

case "$host_os" in
  # On Cygwin, without -no-undefined, a warning is emitted and only a static
  # library is built.
  beos* | mingw* | windows* | cygwin* | os2*) LTNOUNDEF='-no-undefined' ;;
  *) LTNOUNDEF='' ;;
esac
AC_SUBST([LTNOUNDEF])

dnl Checks for libraries.

dnl Checks for header files.
AC_CHECK_HEADERS([features.h])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_LONG_LONG_INT
gt_TYPE_WINT_T
AC_TYPE_MBSTATE_T
AC_CHECK_TYPE([ptrdiff_t], ,
  [AC_DEFINE([ptrdiff_t], [long],
     [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
  ])
gl_AC_TYPE_INTMAX_T

dnl Checks for library functions.

gl_INIT
AC_CHECK_FUNCS([snprintf vasprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
dnl Use the _snprintf function only if it is declared (because on NetBSD it
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])

gl_PRINTF_POSITIONS
case "$gl_cv_func_printf_positions" in
  *yes)
    AC_DEFINE([HAVE_POSIX_PRINTF], [1],
      [Define if your printf() function supports format strings with positions.])
    ;;
esac

dnl Hide undesired symbols from the global namespace, by prefixing them with
dnl "libasprintf_".
AH_VERBATIM([0noexport], [
#define asnprintf        libasprintf_asnprintf
#define rpl_asnprintf    libasprintf_asnprintf
#define rpl_memchr       libasprintf_memchr
#define printf_fetchargs libasprintf_printf_fetchargs
#define printf_parse     libasprintf_printf_parse
#define vasnprintf       libasprintf_vasnprintf
#define rpl_vasnprintf   libasprintf_vasnprintf
#define xmax             libasprintf_xmax
#define xsum             libasprintf_xsum
#define xsum3            libasprintf_xsum3
#define xsum4            libasprintf_xsum4
])

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

AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([gnulib-lib/Makefile])

AC_OUTPUT