Commit 8997e88d authored by Nils Goroll's avatar Nils Goroll Committed by Dridi Boukelmoune

Renovate autoconf and varnish.m4

this is required for autoconf 2.71, but I have kept the required
version at 2.69 and tested that the changes are compatible.

Most of the changes come from autoupdate, with this change:

AC_PROG_CC_STDC is obsolete, but older autoconf versions
do not set the highest possible c standard.

So we keep AC_PROG_CC_C99 because we actually require
c99, while AC_PROG_CC_STDC could fall back to c89

For varnish.m4, we should apply the same canonical settings
as for varnishd itself
parent c8bb85b5
AC_PREREQ(2.69)
AC_PREREQ([2.69])
AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2023 Varnish Software
Copyright 2010-2023 UPLEX - Nils Goroll Systemoptimierung])
AC_REVISION([$Id$])
AC_INIT([Varnish], [trunk], [varnish-dev@varnish-cache.org])
AC_INIT([Varnish],[trunk],[varnish-dev@varnish-cache.org])
AC_CONFIG_SRCDIR(include/miniobj.h)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
......@@ -23,7 +23,7 @@ OCFLAGS="$CFLAGS"
EXTCFLAGS="$CFLAGS"
AC_SUBST(EXTCFLAGS)
AC_CANONICAL_SYSTEM
AC_CANONICAL_TARGET
AC_LANG(C)
AM_MAINTAINER_MODE([disable])
......@@ -31,12 +31,13 @@ AM_INIT_AUTOMAKE([1.13 foreign color-tests parallel-tests subdir-objects])
AM_EXTRA_RECURSIVE_TARGETS([recheck])
AM_SILENT_RULES([yes])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
LT_INIT
# Checks for programs.
AC_GNU_SOURCE
AC_PROG_CC
AC_PROG_CC_STDC
# XXX remove the next line when AC_PREREQ >= 2.70 and
# replace with check of $ac_prog_cc_stdc
AC_PROG_CC_C99
AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
......@@ -106,7 +107,7 @@ AC_CHECK_HEADERS([umem.h])
AC_CHECK_HEADERS([stdatomic.h])
# XXX: This _may_ be for OS/X
AC_CHECK_LIBM
LT_LIB_M
AC_SUBST(LIBM)
m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([pkg.m4 missing, please install pkg-config])])
......@@ -211,7 +212,6 @@ AC_CHECK_HEADERS([ncursesw/curses.h ncursesw.h ncurses/curses.h ncurses.h curses
CFLAGS="${save_CFLAGS}"
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/endian.h])
AC_CHECK_HEADERS([sys/filio.h])
AC_CHECK_HEADERS([sys/mount.h], [], [], [#include <sys/param.h>])
......
......@@ -145,15 +145,17 @@ AC_DEFUN([_VARNISH_VMOD_LDFLAGS], [
# _VARNISH_VMOD_CONFIG
# --------------------
AC_DEFUN([_VARNISH_VMOD_CONFIG], [
dnl Check the VMOD toolchain
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([AC_LANG_C])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([_VARNISH_PKG_CONFIG])
AC_REQUIRE([_VARNISH_CHECK_DEVEL])
AC_REQUIRE([_VARNISH_CHECK_PYTHON])
AC_REQUIRE([_VARNISH_VMOD_LDFLAGS])
dnl Check the VMOD toolchain
AC_REQUIRE([AC_LANG_C])
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_CPP_WERROR])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment