Skip to content

Commit 544281c

Browse files
committed
autoconf: Update aclocal.m4 and configure with autoreconf -i
1 parent ba1c728 commit 544281c

2 files changed

Lines changed: 144 additions & 54 deletions

File tree

src/aclocal.m4

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,45 @@
1-
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
1+
# generated automatically by aclocal 1.17 -*- Autoconf -*-
22

3-
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4-
dnl This file is free software; the Free Software Foundation
5-
dnl gives unlimited permission to copy and/or distribute it,
6-
dnl with or without modifications, as long as this notice is preserved.
3+
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
74

8-
dnl This program is distributed in the hope that it will be useful,
9-
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10-
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11-
dnl PARTICULAR PURPOSE.
5+
# This file is free software; the Free Software Foundation
6+
# gives unlimited permission to copy and/or distribute it,
7+
# with or without modifications, as long as this notice is preserved.
128

9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11+
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12+
# PARTICULAR PURPOSE.
13+
14+
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1315
# ===========================================================================
14-
# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
16+
# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
1517
# ===========================================================================
1618
#
1719
# SYNOPSIS
1820
#
19-
# AX_CHECK_GNU_MAKE()
21+
# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
2022
#
2123
# DESCRIPTION
2224
#
23-
# This macro searches for a GNU version of make. If a match is found, the
24-
# makefile variable `ifGNUmake' is set to the empty string, otherwise it
25-
# is set to "#". This is useful for including a special features in a
26-
# Makefile, which cannot be handled by other versions of make. The
27-
# variable _cv_gnu_make_command is set to the command to invoke GNU make
28-
# if it exists, the empty string otherwise.
25+
# This macro searches for a GNU version of make. If a match is found:
26+
#
27+
# * The makefile variable `ifGNUmake' is set to the empty string, otherwise
28+
# it is set to "#". This is useful for including a special features in a
29+
# Makefile, which cannot be handled by other versions of make.
30+
# * The makefile variable `ifnGNUmake' is set to #, otherwise
31+
# it is set to the empty string. This is useful for including a special
32+
# features in a Makefile, which can be handled
33+
# by other versions of make or to specify else like clause.
34+
# * The variable `_cv_gnu_make_command` is set to the command to invoke
35+
# GNU make if it exists, the empty string otherwise.
36+
# * The variable `ax_cv_gnu_make_command` is set to the command to invoke
37+
# GNU make by copying `_cv_gnu_make_command`, otherwise it is unset.
38+
# * If GNU Make is found, its version is extracted from the output of
39+
# `make --version` as the last field of a record of space-separated
40+
# columns and saved into the variable `ax_check_gnu_make_version`.
41+
# * Additionally if GNU Make is found, run shell code run-if-true
42+
# else run shell code run-if-false.
2943
#
3044
# Here is an example of its use:
3145
#
@@ -37,6 +51,8 @@ dnl PARTICULAR PURPOSE.
3751
#
3852
# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3953
# @ifGNUmake@ include $(DEPEND)
54+
# @ifGNUmake@ else
55+
# fallback code
4056
# @ifGNUmake@ endif
4157
#
4258
# Then configure.in would normally contain:
@@ -60,32 +76,35 @@ dnl PARTICULAR PURPOSE.
6076
# LICENSE
6177
#
6278
# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
79+
# Copyright (c) 2015 Enrico M. Crisostomo <enrico.m.crisostomo@gmail.com>
6380
#
6481
# Copying and distribution of this file, with or without modification, are
6582
# permitted in any medium without royalty provided the copyright notice
6683
# and this notice are preserved. This file is offered as-is, without any
6784
# warranty.
6885

69-
#serial 7
86+
#serial 12
7087

71-
AC_DEFUN([AX_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
72-
_cv_gnu_make_command='' ;
88+
AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
89+
[AC_PROG_AWK
90+
AC_CACHE_CHECK([for GNU make],[_cv_gnu_make_command],[dnl
91+
_cv_gnu_make_command="" ;
7392
dnl Search all the common names for GNU make
74-
for a in "$MAKE" make gmake gnumake ; do
75-
if test -z "$a" ; then continue ; fi ;
76-
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
77-
_cv_gnu_make_command=$a ;
78-
break;
79-
fi
80-
done ;
81-
) ;
93+
for a in "$MAKE" make gmake gnumake ; do
94+
if test -z "$a" ; then continue ; fi ;
95+
if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then
96+
_cv_gnu_make_command=$a ;
97+
AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make")
98+
ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }')
99+
break ;
100+
fi
101+
done ;])
82102
dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
83-
if test "x$_cv_gnu_make_command" != "x" ; then
84-
ifGNUmake='' ;
85-
else
86-
ifGNUmake='#' ;
87-
AC_MSG_RESULT("Not found");
88-
fi
89-
AC_SUBST(ifGNUmake)
90-
] )
103+
AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
104+
AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifnGNUmake], ["#"])])
105+
AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
106+
AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
107+
AC_SUBST([ifGNUmake])
108+
AC_SUBST([ifnGNUmake])
109+
])
91110

src/configure

Lines changed: 89 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,9 @@ LIBM
651651
LIBRESOLV
652652
LIBCAP
653653
LIBEVENT
654+
ifnGNUmake
654655
ifGNUmake
656+
AWK
655657
CFLAGS_ARCH
656658
LD
657659
OBJEXT
@@ -3461,32 +3463,100 @@ if test "$OS" == "Darwin"; then
34613463
fi
34623464

34633465

3464-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
3466+
for ac_prog in gawk mawk nawk awk
3467+
do
3468+
# Extract the first word of "$ac_prog", so it can be a program name with args.
3469+
set dummy $ac_prog; ac_word=$2
3470+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3471+
printf %s "checking for $ac_word... " >&6; }
3472+
if test ${ac_cv_prog_AWK+y}
3473+
then :
3474+
printf %s "(cached) " >&6
3475+
else case e in #(
3476+
e) if test -n "$AWK"; then
3477+
ac_cv_prog_AWK="$AWK" # Let the user override the test.
3478+
else
3479+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480+
for as_dir in $PATH
3481+
do
3482+
IFS=$as_save_IFS
3483+
case $as_dir in #(((
3484+
'') as_dir=./ ;;
3485+
*/) ;;
3486+
*) as_dir=$as_dir/ ;;
3487+
esac
3488+
for ac_exec_ext in '' $ac_executable_extensions; do
3489+
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3490+
ac_cv_prog_AWK="$ac_prog"
3491+
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3492+
break 2
3493+
fi
3494+
done
3495+
done
3496+
IFS=$as_save_IFS
3497+
3498+
fi ;;
3499+
esac
3500+
fi
3501+
AWK=$ac_cv_prog_AWK
3502+
if test -n "$AWK"; then
3503+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3504+
printf "%s\n" "$AWK" >&6; }
3505+
else
3506+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3507+
printf "%s\n" "no" >&6; }
3508+
fi
3509+
3510+
3511+
test -n "$AWK" && break
3512+
done
3513+
3514+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
34653515
printf %s "checking for GNU make... " >&6; }
34663516
if test ${_cv_gnu_make_command+y}
34673517
then :
34683518
printf %s "(cached) " >&6
34693519
else case e in #(
3470-
e) _cv_gnu_make_command='' ;
3471-
for a in "$MAKE" make gmake gnumake ; do
3472-
if test -z "$a" ; then continue ; fi ;
3473-
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
3474-
_cv_gnu_make_command=$a ;
3475-
break;
3476-
fi
3477-
done ;
3478-
;;
3520+
e) _cv_gnu_make_command="" ;
3521+
for a in "$MAKE" make gmake gnumake ; do
3522+
if test -z "$a" ; then continue ; fi ;
3523+
if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then
3524+
_cv_gnu_make_command=$a ;
3525+
AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make")
3526+
ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }')
3527+
break ;
3528+
fi
3529+
done ; ;;
34793530
esac
34803531
fi
34813532
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
3482-
printf "%s\n" "$_cv_gnu_make_command" >&6; } ;
3483-
if test "x$_cv_gnu_make_command" != "x" ; then
3484-
ifGNUmake='' ;
3485-
else
3486-
ifGNUmake='#' ;
3487-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5
3488-
printf "%s\n" "\"Not found\"" >&6; };
3489-
fi
3533+
printf "%s\n" "$_cv_gnu_make_command" >&6; }
3534+
if test "x$_cv_gnu_make_command" = x""
3535+
then :
3536+
ifGNUmake="#"
3537+
else case e in #(
3538+
e) ifGNUmake="" ;;
3539+
esac
3540+
fi
3541+
if test "x$_cv_gnu_make_command" = x""
3542+
then :
3543+
ifnGNUmake=""
3544+
else case e in #(
3545+
e) ifnGNUmake="#" ;;
3546+
esac
3547+
fi
3548+
if test "x$_cv_gnu_make_command" = x""
3549+
then :
3550+
{ ax_cv_gnu_make_command=; unset ax_cv_gnu_make_command;}
3551+
else case e in #(
3552+
e) ax_cv_gnu_make_command=${_cv_gnu_make_command} ;;
3553+
esac
3554+
fi
3555+
if test "x$_cv_gnu_make_command" = x""
3556+
then :
3557+
3558+
fi
3559+
34903560

34913561

34923562

@@ -5373,6 +5443,7 @@ gives unlimited permission to copy, distribute and modify it."
53735443
53745444
ac_pwd='$ac_pwd'
53755445
srcdir='$srcdir'
5446+
AWK='$AWK'
53765447
test -n "\$AWK" || AWK=awk
53775448
_ACEOF
53785449

0 commit comments

Comments
 (0)