| 1 |
# autobuild.m4 |
| 2 |
# serial 8 |
| 3 |
dnl Copyright (C) 2004, 2006-2026 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. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
dnl From Simon Josefsson |
| 10 |
|
| 11 |
# Usage: AB_INIT([MODE]). |
| 12 |
AC_DEFUN([AB_INIT], |
| 13 |
[ |
| 14 |
AC_REQUIRE([AC_CANONICAL_BUILD]) |
| 15 |
AC_REQUIRE([AC_CANONICAL_HOST]) |
| 16 |
|
| 17 |
if test -z "$AB_PACKAGE"; then |
| 18 |
AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} |
| 19 |
fi |
| 20 |
AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) |
| 21 |
|
| 22 |
if test -z "$AB_VERSION"; then |
| 23 |
AB_VERSION=${PACKAGE_VERSION:-$VERSION} |
| 24 |
fi |
| 25 |
AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) |
| 26 |
|
| 27 |
hostname=`hostname` |
| 28 |
if test "$hostname"; then |
| 29 |
AC_MSG_NOTICE([autobuild hostname... $hostname]) |
| 30 |
fi |
| 31 |
|
| 32 |
m4_if([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])]) |
| 33 |
|
| 34 |
date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` |
| 35 |
if test "$?" != 0; then |
| 36 |
date=`date` |
| 37 |
fi |
| 38 |
if test "$date"; then |
| 39 |
AC_MSG_NOTICE([autobuild timestamp... $date]) |
| 40 |
fi |
| 41 |
]) |