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