maint: update copyright
[gnulib.git] / m4 / autobuild.m4
1 # autobuild.m4 serial 7
2 dnl Copyright (C) 2004, 2006-2014 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl From Simon Josefsson
8
9 # Usage: AB_INIT([MODE]).
10 AC_DEFUN([AB_INIT],
11 [
12   AC_REQUIRE([AC_CANONICAL_BUILD])
13   AC_REQUIRE([AC_CANONICAL_HOST])
14
15   if test -z "$AB_PACKAGE"; then
16     AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
17   fi
18   AC_MSG_NOTICE([autobuild project... $AB_PACKAGE])
19
20   if test -z "$AB_VERSION"; then
21     AB_VERSION=${PACKAGE_VERSION:-$VERSION}
22   fi
23   AC_MSG_NOTICE([autobuild revision... $AB_VERSION])
24
25   hostname=`hostname`
26   if test "$hostname"; then
27     AC_MSG_NOTICE([autobuild hostname... $hostname])
28   fi
29
30   ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])])
31
32   date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
33   if test "$?" != 0; then
34     date=`date`
35   fi
36   if test "$date"; then
37     AC_MSG_NOTICE([autobuild timestamp... $date])
38   fi
39 ])