Blame extension/configure.ac

Packit 575503
dnl
Packit 575503
dnl configure.ac --- autoconf input file for gawk
Packit 575503
dnl
Packit 575503
dnl Copyright (C) 2012-2018 the Free Software Foundation, Inc.
Packit 575503
dnl
Packit 575503
dnl This file is part of GAWK, the GNU implementation of the
Packit 575503
dnl AWK Programming Language.
Packit 575503
dnl
Packit 575503
dnl GAWK is free software; you can redistribute it and/or modify
Packit 575503
dnl it under the terms of the GNU General Public License as published by
Packit 575503
dnl the Free Software Foundation; either version 3 of the License, or
Packit 575503
dnl (at your option) any later version.
Packit 575503
dnl
Packit 575503
dnl GAWK is distributed in the hope that it will be useful,
Packit 575503
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 575503
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 575503
dnl GNU General Public License for more details.
Packit 575503
dnl
Packit 575503
dnl You should have received a copy of the GNU General Public License
Packit 575503
dnl along with this program; if not, write to the Free Software
Packit 575503
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
Packit 575503
dnl
Packit 575503
Packit 575503
dnl Process this file with autoconf to produce a configure script.
Packit 575503
Packit 575503
AC_INIT([GNU Awk Bundled Extensions],[4.2.1],[bug-gawk@gnu.org],[gawk-extensions])
Packit 575503
Packit 575503
AC_PREREQ([2.69])
Packit 575503
Packit 575503
AC_CONFIG_MACRO_DIR([m4])
Packit 575503
AC_CONFIG_AUX_DIR([build-aux])
Packit 575503
Packit 575503
AM_INIT_AUTOMAKE([1.15 -Wall -Werror])
Packit 575503
Packit 575503
Packit 575503
AC_USE_SYSTEM_EXTENSIONS
Packit 575503
AC_ZOS_USS
Packit 575503
Packit 575503
INSTALL="$ac_aux_dir/install-sh -c"
Packit 575503
export INSTALL
Packit 575503
Packit 575503
SKIP_MPFR=no
Packit 575503
AC_ARG_ENABLE([mpfr],
Packit 575503
	[AS_HELP_STRING([--disable-mpfr],[do not check for MPFR])],
Packit 575503
	if test "$enableval" = no
Packit 575503
	then
Packit 575503
		SKIP_MPFR=yes
Packit 575503
	fi
Packit 575503
)
Packit 575503
Packit 575503
dnl Set the programming language for checks. Fortunately,
Packit 575503
dnl this only needs to be set once, since everything is in C.
Packit 575503
AC_LANG([C])
Packit 575503
Packit 575503
dnl initialize GNU gettext
Packit 575503
dnl this seems to help with finding MPFR on some systems, too.
Packit 575503
AM_GNU_GETTEXT([external])
Packit 575503
AM_GNU_GETTEXT_VERSION([0.19.7])
Packit 575503
AM_LANGINFO_CODESET
Packit 575503
gt_LC_MESSAGES
Packit 575503
Packit 575503
dnl checks for structure members
Packit 575503
AC_CHECK_MEMBERS([struct stat.st_blksize])
Packit 575503
Packit 575503
AM_PROG_AR
Packit 575503
AC_SYS_LARGEFILE
Packit 575503
AC_DISABLE_STATIC
Packit 575503
LT_INIT
Packit 575503
dnl AC_PROG_INSTALL
Packit 575503
Packit 575503
dnl use the same definition as the main configure script.
Packit 575503
dnl EXTENSIONDIR is exported if it was set there.
Packit 575503
dnl N.B. We must use ${libdir}/gawk instead of $pkglibdir because $pkglibdir
Packit 575503
dnl is set to ${libdir}/gawk-extensions, which is not what we want.
Packit 575503
AC_SUBST([pkgextensiondir], ['${libdir}/gawk'${EXTENSIONDIR}])
Packit 575503
Packit 575503
if test "$GCC" = yes
Packit 575503
then
Packit 575503
	CFLAGS="$CFLAGS -Wall"	# Don't add -Wextra, hurts older gcc
Packit 575503
fi
Packit 575503
Packit 575503
AC_MSG_CHECKING([for special development options])
Packit 575503
if test -f $srcdir/../.developing
Packit 575503
then
Packit 575503
	if test "$GCC" = yes
Packit 575503
	then
Packit 575503
		CFLAGS="$CFLAGS -Wall -fno-builtin -g3 -gdwarf-2"
Packit 575503
	fi
Packit 575503
	AC_MSG_RESULT([yes])
Packit 575503
else
Packit 575503
	AC_MSG_RESULT([no])
Packit 575503
fi
Packit 575503
Packit 575503
AC_CHECK_HEADERS(fnmatch.h limits.h sys/mkdev.h sys/param.h sys/select.h \
Packit 575503
		sys/statvfs.h sys/sysmacros.h sys/time.h)
Packit 575503
Packit 575503
AC_HEADER_DIRENT
Packit 575503
dnl 12/2017: AC_HEADER_MAJOR no longer works on recent Fedora / GLIBC.
Packit 575503
dnl Instead we just check for the headers in the call above.
Packit 575503
dnl AC_HEADER_MAJOR
Packit 575503
AC_HEADER_TIME
Packit 575503
Packit 575503
dnl check for mpfr support
Packit 575503
case `uname -m` in
Packit 575503
*'Power Macintosh'*)
Packit 575503
	: ;;
Packit 575503
*)
Packit 575503
	case $SKIP_MPFR in
Packit 575503
	no)	GNUPG_CHECK_MPFR
Packit 575503
		;;
Packit 575503
	esac
Packit 575503
	;;
Packit 575503
esac
Packit 575503
Packit 575503
AC_SEARCH_LIBS(fmod, m)
Packit 575503
AC_CHECK_FUNCS(fdopendir fmod fnmatch getdtablesize \
Packit 575503
		gettimeofday nanosleep select statvfs \
Packit 575503
		GetSystemTimeAsFileTime)
Packit 575503
Packit 575503
GAWK_FUNC_DIRFD
Packit 575503
GAWK_PREREQ_DIRFD
Packit 575503
Packit 575503
dnl checks for compiler characteristics
Packit 575503
AC_C_INLINE
Packit 575503
Packit 575503
AC_CONFIG_HEADERS([config.h:configh.in])
Packit 575503
AH_BOTTOM([#include "ext_custom.h"])
Packit 575503
Packit 575503
AC_CONFIG_FILES(Makefile)
Packit 575503
AC_OUTPUT