autobuild.m4 1.01 KB
Newer Older
1
# autobuild.m4 serial 7
Paul Eggert's avatar
Paul Eggert committed
2
dnl Copyright (C) 2004, 2006-2016 Free Software Foundation, Inc.
Simon Josefsson's avatar
Simon Josefsson committed
3 4 5 6 7 8 9 10 11
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

dnl From Simon Josefsson

# Usage: AB_INIT([MODE]).
AC_DEFUN([AB_INIT],
[
12 13
  AC_REQUIRE([AC_CANONICAL_BUILD])
  AC_REQUIRE([AC_CANONICAL_HOST])
Simon Josefsson's avatar
Simon Josefsson committed
14

15 16 17 18
  if test -z "$AB_PACKAGE"; then
    AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
  fi
  AC_MSG_NOTICE([autobuild project... $AB_PACKAGE])
Simon Josefsson's avatar
Simon Josefsson committed
19

20 21 22 23
  if test -z "$AB_VERSION"; then
    AB_VERSION=${PACKAGE_VERSION:-$VERSION}
  fi
  AC_MSG_NOTICE([autobuild revision... $AB_VERSION])
Simon Josefsson's avatar
Simon Josefsson committed
24

25 26 27 28
  hostname=`hostname`
  if test "$hostname"; then
    AC_MSG_NOTICE([autobuild hostname... $hostname])
  fi
Simon Josefsson's avatar
Simon Josefsson committed
29

30
  ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])])
Simon Josefsson's avatar
Simon Josefsson committed
31

32
  date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
33 34 35 36 37 38
  if test "$?" != 0; then
    date=`date`
  fi
  if test "$date"; then
    AC_MSG_NOTICE([autobuild timestamp... $date])
  fi
Simon Josefsson's avatar
Simon Josefsson committed
39
])