autobuild.m4 1.0 KB

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