From nobody Fri May 3 06:34:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1608742685; cv=none; d=zohomail.com; s=zohoarc; b=Txot6XYNi9vg8yQz6MMweFhDwrtMFQXv0CFZkPLvPVz4sYagrOtPVrIGnwVUWAsKnbwYGdSCSuJdj2ZDmyO1USX5MY5NolX2X5XpRM0HRwQh/dO3Mp9RzuzwFOMILnsjhN74V3vJ4zTweWI9pM2507ab63ctPtpxdbGP8uPikDk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608742685; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=FB/eqJTtRtSGqc9/Y2YpKzfJn4ilCcVLi0d01EM5AnE=; b=N80TqHcAAERb2Jqabmoi8UfV/38UdZmbf9iQ4Eqn4FYaDQM9MVw/gnzK7CH1elLmosDTZcRHI43hLX8iOkPoyf2YQfyqppMx+nc1JISqcRogJ0JURrbbDLXCnAFYG4xBCjClm+mJnL1PG2CBpwoOBUdGVvJC1pS3S5vLzIHlHdw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1608742685346181.21875920465868; Wed, 23 Dec 2020 08:58:05 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.58536.103046 (Exim 4.92) (envelope-from ) id 1ks7SL-0003PK-Fb; Wed, 23 Dec 2020 16:57:45 +0000 Received: by outflank-mailman (output) from mailman id 58536.103046; Wed, 23 Dec 2020 16:57:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ks7SL-0003PD-CD; Wed, 23 Dec 2020 16:57:45 +0000 Received: by outflank-mailman (input) for mailman id 58536; Wed, 23 Dec 2020 16:57:44 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ks7SK-0003P8-D6 for xen-devel@lists.xenproject.org; Wed, 23 Dec 2020 16:57:44 +0000 Received: from mx1.somlen.de (unknown [89.238.87.226]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id fdf84dfb-656f-4fa2-ad13-5b1a7f7e29c3; Wed, 23 Dec 2020 16:57:36 +0000 (UTC) Received: by mx1.somlen.de with ESMTPSA id DBDCAC3AF0B; Wed, 23 Dec 2020 17:57:34 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fdf84dfb-656f-4fa2-ad13-5b1a7f7e29c3 From: Maximilian Engelhardt To: xen-devel@lists.xenproject.org Cc: Maximilian Engelhardt , Ian Jackson , Wei Liu , Jan Beulich Subject: [XEN PATCH v2] docs: set date to SOURCE_DATE_EPOCH if available Date: Wed, 23 Dec 2020 17:56:53 +0100 Message-Id: <8b4564696cae00041848af8c5793172b80edadd5.1608742171.git.maxi@daemonizer.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable check if a GNU date that supports the '-u -d @...' options and syntax or a BSD date are available. If so, use the appropriate options for the date command to produce a custom date if SOURCE_DATE_EPOCH is defined. If SOURCE_DATE_EPOCH is not defined or no suitable date command was found, use the current date. This enables reproducible builds. Signed-off-by: Maximilian Engelhardt Changes in v2: - add capability detection for the 'date' command using ax_prog_date.m4 - add information about detected date command to config/Docs.mk - only call a supported date command in docs/Makefile --- Please note the ax_prog_date.m4 macro is taken from the autoconf-archive repository [1] and it's license is GPL v3 or later with an exception for the generated configure script. [1]=C2=A0https://www.gnu.org/software/autoconf-archive/ --- config/Docs.mk.in | 3 + docs/Makefile | 16 +++- docs/configure | 213 +++++++++++++++++++++++++++++++++++++++++++++ docs/configure.ac | 9 ++ m4/ax_prog_date.m4 | 139 +++++++++++++++++++++++++++++ 5 files changed, 379 insertions(+), 1 deletion(-) create mode 100644 m4/ax_prog_date.m4 diff --git a/config/Docs.mk.in b/config/Docs.mk.in index e76e5cd5ff..cc2abd8fcc 100644 --- a/config/Docs.mk.in +++ b/config/Docs.mk.in @@ -7,3 +7,6 @@ POD2HTML :=3D @POD2HTML@ POD2TEXT :=3D @POD2TEXT@ PANDOC :=3D @PANDOC@ PERL :=3D @PERL@ + +# Variables +DATE_TYPE_AT :=3D @DATE_TYPE_AT@ diff --git a/docs/Makefile b/docs/Makefile index 8de1efb6f5..c79fe0b63e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,21 @@ include $(XEN_ROOT)/Config.mk -include $(XEN_ROOT)/config/Docs.mk =20 VERSION :=3D $(shell $(MAKE) -C $(XEN_ROOT)/xen --no-print-directory xenv= ersion) -DATE :=3D $(shell date +%Y-%m-%d) + +DATE_FMT :=3D +%Y-%m-%d +ifdef SOURCE_DATE_EPOCH +ifeq ($(DATE_TYPE_AT),GNU) +DATE :=3D $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)") +else +ifeq ($(DATE_TYPE_AT),BSD) +DATE :=3D $(shell date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)") +else +DATE :=3D $(shell date "$(DATE_FMT)") +endif +endif +else +DATE :=3D $(shell date "$(DATE_FMT)") +endif =20 DOC_ARCHES :=3D arm x86_32 x86_64 MAN_SECTIONS :=3D 1 5 7 8 diff --git a/docs/configure b/docs/configure index f55268564e..9c3218f560 100755 --- a/docs/configure +++ b/docs/configure @@ -587,6 +587,7 @@ PACKAGE_URL=3D'https://www.xen.org/' ac_unique_file=3D"misc/xen-command-line.pandoc" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +DATE_TYPE_AT PERL PANDOC POD2TEXT @@ -1808,6 +1809,86 @@ case "$host_os" in esac =20 =20 +# Fetched from https://git.savannah.gnu.org/gitweb/?p=3Dautoconf-archive.g= it;a=3Dblob_plain;f=3Dm4/ax_prog_date.m4 +# Commit ID: fd1d25c14855037f6ccd7dbc7fe9ae5fc9bea8f4 +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +# https://www.gnu.org/software/autoconf-archive/ax_prog_date.html +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +# +# SYNOPSIS +# +# AX_PROG_DATE() +# +# DESCRIPTION +# +# This macro tries to determine the type of the date (1) command and some +# of its non-standard capabilities. +# +# The type is determined as follow: +# +# * If the version string contains "GNU", then: +# - The variable ax_cv_prog_date_gnu is set to "yes". +# - The variable ax_cv_prog_date_type is set to "gnu". +# +# * If date supports the "-v 1d" option, then: +# - The variable ax_cv_prog_date_bsd is set to "yes". +# - The variable ax_cv_prog_date_type is set to "bsd". +# +# * If both previous checks fail, then: +# - The variable ax_cv_prog_date_type is set to "unknown". +# +# The following capabilities of GNU date are checked: +# +# * If date supports the --date arg option, then: +# - The variable ax_cv_prog_date_gnu_date is set to "yes". +# +# * If date supports the --utc arg option, then: +# - The variable ax_cv_prog_date_gnu_utc is set to "yes". +# +# The following capabilities of BSD date are checked: +# +# * If date supports the -v 1d option, then: +# - The variable ax_cv_prog_date_bsd_adjust is set to "yes". +# +# * If date supports the -r arg option, then: +# - The variable ax_cv_prog_date_bsd_date is set to "yes". +# +# All the aforementioned variables are set to "no" before a check is +# performed. +# +# LICENSE +# +# Copyright (c) 2017 Enrico M. Crisostomo +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gener= al +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 3 + + =20 =20 test "x$prefix" =3D "xNONE" && prefix=3D$ac_default_prefix @@ -2267,6 +2348,138 @@ then as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5 fi =20 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU date" >&5 +$as_echo_n "checking for GNU date... " >&6; } +if ${ax_cv_prog_date_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_prog_date_gnu=3Dno + if date --version 2>/dev/null | head -1 | grep -q GNU + then + ax_cv_prog_date_gnu=3Dyes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_date_gnu" >&5 +$as_echo "$ax_cv_prog_date_gnu" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD date" >&5 +$as_echo_n "checking for BSD date... " >&6; } +if ${ax_cv_prog_date_bsd+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_prog_date_bsd=3Dno + if date -v 1d > /dev/null 2>&1 + then + ax_cv_prog_date_bsd=3Dyes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_date_bsd" >&5 +$as_echo "$ax_cv_prog_date_bsd" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for date type" >&5 +$as_echo_n "checking for date type... " >&6; } +if ${ax_cv_prog_date_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_prog_date_type=3Dunknown + if test "x${ax_cv_prog_date_gnu}" =3D "xyes" + then + ax_cv_prog_date_type=3Dgnu + elif test "x${ax_cv_prog_date_bsd}" =3D "xyes" + then + ax_cv_prog_date_type=3Dbsd + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_date_type" >&5 +$as_echo "$ax_cv_prog_date_type" >&6; } + if test "x$ax_cv_prog_date_gnu" =3D xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GNU date sup= ports --date" >&5 +$as_echo_n "checking whether GNU date supports --date... " >&6; } +if ${ax_cv_prog_date_gnu_date+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_prog_date_gnu_date=3Dno + if date --date=3D@1512031231 > /dev/null 2>&1 + then + ax_cv_prog_date_gnu_date=3Dyes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_date_gnu_date= " >&5 +$as_echo "$ax_cv_prog_date_gnu_date" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GNU date sup= ports --utc" >&5 +$as_echo_n "checking whether GNU date supports --utc... " >&6; } +if ${ax_cv_prog_date_gnu_utc+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_prog_date_gnu_utc=3Dno + if date --utc > /dev/null 2>&1 + then + ax_cv_prog_date_gnu_utc=3Dyes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_date_gnu_utc"= >&5 +$as_echo "$ax_cv_prog_date_gnu_utc" >&6; } + +fi + if test "x$ax_cv_prog_date_bsd" =3D xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BSD date sup= ports -r" >&5 +$as_echo_n "checking whether BSD date supports -r... " >&6; } +if ${ax_cv_prog_date_bsd_date+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_prog_date_bsd_date=3Dno + if date -r 1512031231 > /dev/null 2>&1 + then + ax_cv_prog_date_bsd_date=3Dyes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_date_bsd_date= " >&5 +$as_echo "$ax_cv_prog_date_bsd_date" >&6; } + +fi + if test "x$ax_cv_prog_date_bsd" =3D xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BSD date sup= ports -v" >&5 +$as_echo_n "checking whether BSD date supports -v... " >&6; } +if ${ax_cv_prog_date_bsd_adjust+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_prog_date_bsd_adjust=3Dno + if date -v 1d > /dev/null 2>&1 + then + ax_cv_prog_date_bsd_adjust=3Dyes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_date_bsd_adju= st" >&5 +$as_echo "$ax_cv_prog_date_bsd_adjust" >&6; } + +fi + +if test "$ax_cv_prog_date_gnu_date:$ax_cv_prog_date_gnu_utc" =3D yes:yes; = then : + DATE_TYPE_AT=3D"GNU" +else + if test "x$ax_cv_prog_date_bsd_date" =3D xyes; then : + DATE_TYPE_AT=3D"BSD" +else + DATE_TYPE_AT=3D"Unknown" +fi +fi + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/docs/configure.ac b/docs/configure.ac index cb5a6eaa4c..c87471e706 100644 --- a/docs/configure.ac +++ b/docs/configure.ac @@ -17,6 +17,7 @@ m4_include([../m4/docs_tool.m4]) m4_include([../m4/path_or_fail.m4]) m4_include([../m4/features.m4]) m4_include([../m4/paths.m4]) +m4_include([../m4/ax_prog_date.m4]) =20 AX_XEN_EXPAND_CONFIG() =20 @@ -29,4 +30,12 @@ AX_DOCS_TOOL_PROG([PANDOC], [pandoc]) AC_ARG_VAR([PERL], [Path to Perl parser]) AX_PATH_PROG_OR_FAIL([PERL], [perl]) =20 +AX_PROG_DATE +AS_IF([test "$ax_cv_prog_date_gnu_date:$ax_cv_prog_date_gnu_utc" =3D yes:y= es], + [DATE_TYPE_AT=3D"GNU"], + [AS_IF([test "x$ax_cv_prog_date_bsd_date" =3D xyes], + [DATE_TYPE_AT=3D"BSD"], + [DATE_TYPE_AT=3D"Unknown"])]) +AC_SUBST([DATE_TYPE_AT]) + AC_OUTPUT() diff --git a/m4/ax_prog_date.m4 b/m4/ax_prog_date.m4 new file mode 100644 index 0000000000..675412bac2 --- /dev/null +++ b/m4/ax_prog_date.m4 @@ -0,0 +1,139 @@ +# Fetched from https://git.savannah.gnu.org/gitweb/?p=3Dautoconf-archive.g= it;a=3Dblob_plain;f=3Dm4/ax_prog_date.m4 +# Commit ID: fd1d25c14855037f6ccd7dbc7fe9ae5fc9bea8f4 +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +# https://www.gnu.org/software/autoconf-archive/ax_prog_date.html +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +# +# SYNOPSIS +# +# AX_PROG_DATE() +# +# DESCRIPTION +# +# This macro tries to determine the type of the date (1) command and some +# of its non-standard capabilities. +# +# The type is determined as follow: +# +# * If the version string contains "GNU", then: +# - The variable ax_cv_prog_date_gnu is set to "yes". +# - The variable ax_cv_prog_date_type is set to "gnu". +# +# * If date supports the "-v 1d" option, then: +# - The variable ax_cv_prog_date_bsd is set to "yes". +# - The variable ax_cv_prog_date_type is set to "bsd". +# +# * If both previous checks fail, then: +# - The variable ax_cv_prog_date_type is set to "unknown". +# +# The following capabilities of GNU date are checked: +# +# * If date supports the --date arg option, then: +# - The variable ax_cv_prog_date_gnu_date is set to "yes". +# +# * If date supports the --utc arg option, then: +# - The variable ax_cv_prog_date_gnu_utc is set to "yes". +# +# The following capabilities of BSD date are checked: +# +# * If date supports the -v 1d option, then: +# - The variable ax_cv_prog_date_bsd_adjust is set to "yes". +# +# * If date supports the -r arg option, then: +# - The variable ax_cv_prog_date_bsd_date is set to "yes". +# +# All the aforementioned variables are set to "no" before a check is +# performed. +# +# LICENSE +# +# Copyright (c) 2017 Enrico M. Crisostomo +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gener= al +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 3 + +AC_DEFUN([AX_PROG_DATE], [dnl + AC_CACHE_CHECK([for GNU date], [ax_cv_prog_date_gnu], [ + ax_cv_prog_date_gnu=3Dno + if date --version 2>/dev/null | head -1 | grep -q GNU + then + ax_cv_prog_date_gnu=3Dyes + fi + ]) + AC_CACHE_CHECK([for BSD date], [ax_cv_prog_date_bsd], [ + ax_cv_prog_date_bsd=3Dno + if date -v 1d > /dev/null 2>&1 + then + ax_cv_prog_date_bsd=3Dyes + fi + ]) + AC_CACHE_CHECK([for date type], [ax_cv_prog_date_type], [ + ax_cv_prog_date_type=3Dunknown + if test "x${ax_cv_prog_date_gnu}" =3D "xyes" + then + ax_cv_prog_date_type=3Dgnu + elif test "x${ax_cv_prog_date_bsd}" =3D "xyes" + then + ax_cv_prog_date_type=3Dbsd + fi + ]) + AS_VAR_IF([ax_cv_prog_date_gnu], [yes], [ + AC_CACHE_CHECK([whether GNU date supports --date], [ax_cv_prog_date_gn= u_date], [ + ax_cv_prog_date_gnu_date=3Dno + if date --date=3D@1512031231 > /dev/null 2>&1 + then + ax_cv_prog_date_gnu_date=3Dyes + fi + ]) + AC_CACHE_CHECK([whether GNU date supports --utc], [ax_cv_prog_date_gnu= _utc], [ + ax_cv_prog_date_gnu_utc=3Dno + if date --utc > /dev/null 2>&1 + then + ax_cv_prog_date_gnu_utc=3Dyes + fi + ]) + ]) + AS_VAR_IF([ax_cv_prog_date_bsd], [yes], [ + AC_CACHE_CHECK([whether BSD date supports -r], [ax_cv_prog_date_bsd_da= te], [ + ax_cv_prog_date_bsd_date=3Dno + if date -r 1512031231 > /dev/null 2>&1 + then + ax_cv_prog_date_bsd_date=3Dyes + fi + ]) + ]) + AS_VAR_IF([ax_cv_prog_date_bsd], [yes], [ + AC_CACHE_CHECK([whether BSD date supports -v], [ax_cv_prog_date_bsd_ad= just], [ + ax_cv_prog_date_bsd_adjust=3Dno + if date -v 1d > /dev/null 2>&1 + then + ax_cv_prog_date_bsd_adjust=3Dyes + fi + ]) + ]) +])dnl AX_PROG_DATE --=20 2.20.1