2
2
dnl configure.ac --- autoconf input file for gawk
4
dnl Copyright (C) 2012-2021, 2023 the Free Software Foundation, Inc.
4
dnl Copyright (C) 2012, 2013 the Free Software Foundation, Inc.
6
6
dnl This file is part of GAWK, the GNU implementation of the
7
7
dnl AWK Programming Language.
24
24
dnl Process this file with autoconf to produce a configure script.
26
AC_INIT([GNU Awk Bundled Extensions],[5.3.0],[bug-gawk@gnu.org],[gawk-extensions])
30
AC_CONFIG_MACRO_DIR([../m4])
31
AC_CONFIG_AUX_DIR([../build-aux])
33
AM_INIT_AUTOMAKE([1.16 -Wall -Werror])
35
SKIP_PERSIST_MALLOC=no
37
[AS_HELP_STRING([--disable-pma],[do not build gawk with the persistent memory allocator])],
38
if test "$enableval" = no
40
SKIP_PERSIST_MALLOC=yes
26
AC_INIT([GNU Awk Bundled Extensions], 4.1.0, bug-gawk@gnu.org, gawk-extensions)
28
AC_CONFIG_MACRO_DIR([m4])
29
AC_CONFIG_AUX_DIR([build-aux])
45
31
AC_USE_SYSTEM_EXTENSIONS
48
33
INSTALL="$ac_aux_dir/install-sh -c"
53
[AS_HELP_STRING([--disable-mpfr],[do not check for MPFR])],
54
if test "$enableval" = no
60
dnl Set the programming language for checks. Fortunately,
61
dnl this only needs to be set once, since everything is in C.
64
dnl initialize GNU gettext
65
dnl this seems to help with finding MPFR on some systems, too.
36
AM_INIT_AUTOMAKE([-Wall -Werror])
66
38
AM_GNU_GETTEXT([external])
67
AM_GNU_GETTEXT_VERSION([0.20.2])
39
AM_GNU_GETTEXT_VERSION([0.18.1])
71
41
dnl checks for structure members
72
42
AC_CHECK_MEMBERS([struct stat.st_blksize])
76
GAWK_USE_PERSISTENT_MALLOC
77
LT_INIT([win32-dll disable-static])
78
48
dnl AC_PROG_INSTALL
80
dnl use the same definition as the main configure script.
81
dnl EXTENSIONDIR is exported if it was set there.
82
dnl N.B. We must use ${libdir}/gawk instead of $pkglibdir because $pkglibdir
83
dnl is set to ${libdir}/gawk-extensions, which is not what we want.
84
AC_SUBST([pkgextensiondir], ['${libdir}/gawk'${EXTENSIONDIR}])
50
AC_SUBST([pkgextensiondir], ['${libdir}/gawk'])
86
52
if test "$GCC" = yes
88
CFLAGS="$CFLAGS -Wall" # Don't add -Wextra, hurts older gcc
54
CFLAGS="$CFLAGS -Wall -Wextra"
91
57
AC_MSG_CHECKING([for special development options])
94
60
if test "$GCC" = yes
96
CFLAGS="$CFLAGS -Wall -fno-builtin"
62
CFLAGS="$CFLAGS -Wall -fno-builtin -g3 -gdwarf-2"
98
64
AC_MSG_RESULT([yes])
100
66
AC_MSG_RESULT([no])
101
CFLAGS="$CFLAGS -DNDEBUG" # turn off assertions
104
AC_CHECK_HEADERS(fnmatch.h limits.h sys/mkdev.h sys/param.h sys/select.h \
105
sys/statvfs.h sys/sysmacros.h sys/time.h)
108
AC_CHECK_HEADERS_ONCE([sys/time.h])
111
dnl check for mpfr support
117
AC_SEARCH_LIBS(fmod, m)
118
AC_CHECK_FUNCS(fdopendir fmod fnmatch getdtablesize \
119
clock_gettime gettimeofday \
120
nanosleep select statvfs \
121
GetSystemTimeAsFileTime strptime)
70
AC_CHECK_HEADERS(dirent.h fnmatch.h limits.h time.h sys/time.h sys/select.h sys/param.h)
72
AC_CHECK_FUNCS(fdopendir fnmatch gettimeofday \
73
getdtablesize nanosleep select GetSystemTimeAsFileTime)
129
81
AC_CONFIG_HEADERS([config.h:configh.in])
130
AH_BOTTOM([#include "ext_custom.h"])
132
AC_CONFIG_FILES(Makefile po/Makefile.in)
83
AC_CONFIG_FILES(Makefile)
134
if test "$GCC" = yes &&
135
test -f $srcdir/../.developing &&
136
grep -i debug $srcdir/../.developing > /dev/null
138
sed -e '/-O2/s///' -e '/^CFLAGS = /s//&${DEBUG} /' Makefile > foo