| 1 | # Do all the work for Automake. -*- Autoconf -*-
|
|---|
| 2 |
|
|---|
| 3 | # This macro actually does too much some checks are only needed if
|
|---|
| 4 | # your package does certain things. But this isn't really a big deal.
|
|---|
| 5 |
|
|---|
| 6 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
|---|
| 7 | # Free Software Foundation, Inc.
|
|---|
| 8 |
|
|---|
| 9 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 10 | # it under the terms of the GNU General Public License as published by
|
|---|
| 11 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 12 | # any later version.
|
|---|
| 13 |
|
|---|
| 14 | # This program is distributed in the hope that it will be useful,
|
|---|
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 17 | # GNU General Public License for more details.
|
|---|
| 18 |
|
|---|
| 19 | # You should have received a copy of the GNU General Public License
|
|---|
| 20 | # along with this program; if not, write to the Free Software
|
|---|
| 21 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 22 | # 02111-1307, USA.
|
|---|
| 23 |
|
|---|
| 24 | # serial 11
|
|---|
| 25 |
|
|---|
| 26 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
|---|
| 27 | # AM_INIT_AUTOMAKE([OPTIONS])
|
|---|
| 28 | # -----------------------------------------------
|
|---|
| 29 | # The call with PACKAGE and VERSION arguments is the old style
|
|---|
| 30 | # call (pre autoconf-2.50), which is being phased out. PACKAGE
|
|---|
| 31 | # and VERSION should now be passed to AC_INIT and removed from
|
|---|
| 32 | # the call to AM_INIT_AUTOMAKE.
|
|---|
| 33 | # We support both call styles for the transition. After
|
|---|
| 34 | # the next Automake release, Autoconf can make the AC_INIT
|
|---|
| 35 | # arguments mandatory, and then we can depend on a new Autoconf
|
|---|
| 36 | # release and drop the old call support.
|
|---|
| 37 | AC_DEFUN([AM_INIT_AUTOMAKE],
|
|---|
| 38 | [AC_PREREQ([2.58])dnl
|
|---|
| 39 | dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
|---|
| 40 | dnl the ones we care about.
|
|---|
| 41 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
|---|
| 42 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
|---|
| 43 | AC_REQUIRE([AC_PROG_INSTALL])dnl
|
|---|
| 44 | # test to see if srcdir already configured
|
|---|
| 45 | if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
|---|
| 46 | test -f $srcdir/config.status; then
|
|---|
| 47 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
|---|
| 48 | fi
|
|---|
| 49 |
|
|---|
| 50 | # test whether we have cygpath
|
|---|
| 51 | if test -z "$CYGPATH_W"; then
|
|---|
| 52 | if (cygpath --version) >/dev/null 2>/dev/null; then
|
|---|
| 53 | CYGPATH_W='cygpath -w'
|
|---|
| 54 | else
|
|---|
| 55 | CYGPATH_W=echo
|
|---|
| 56 | fi
|
|---|
| 57 | fi
|
|---|
| 58 | AC_SUBST([CYGPATH_W])
|
|---|
| 59 |
|
|---|
| 60 | # Define the identity of the package.
|
|---|
| 61 | dnl Distinguish between old-style and new-style calls.
|
|---|
| 62 | m4_ifval([$2],
|
|---|
| 63 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
|---|
| 64 | AC_SUBST([PACKAGE], [$1])dnl
|
|---|
| 65 | AC_SUBST([VERSION], [$2])],
|
|---|
| 66 | [_AM_SET_OPTIONS([$1])dnl
|
|---|
| 67 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
|---|
| 68 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
|---|
| 69 |
|
|---|
| 70 | _AM_IF_OPTION([no-define],,
|
|---|
| 71 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
|---|
| 72 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
|---|
| 73 |
|
|---|
| 74 | # Some tools Automake needs.
|
|---|
| 75 | AC_REQUIRE([AM_SANITY_CHECK])dnl
|
|---|
| 76 | AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
|---|
| 77 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
|---|
| 78 | AM_MISSING_PROG(AUTOCONF, autoconf)
|
|---|
| 79 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
|---|
| 80 | AM_MISSING_PROG(AUTOHEADER, autoheader)
|
|---|
| 81 | AM_MISSING_PROG(MAKEINFO, makeinfo)
|
|---|
| 82 | AM_MISSING_PROG(AMTAR, tar)
|
|---|
| 83 | AM_PROG_INSTALL_SH
|
|---|
| 84 | AM_PROG_INSTALL_STRIP
|
|---|
| 85 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
|---|
| 86 | # We need awk for the "check" target. The system "awk" is bad on
|
|---|
| 87 | # some platforms.
|
|---|
| 88 | AC_REQUIRE([AC_PROG_AWK])dnl
|
|---|
| 89 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|---|
| 90 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
|---|
| 91 |
|
|---|
| 92 | _AM_IF_OPTION([no-dependencies],,
|
|---|
| 93 | [AC_PROVIDE_IFELSE([AC_PROG_CC],
|
|---|
| 94 | [_AM_DEPENDENCIES(CC)],
|
|---|
| 95 | [define([AC_PROG_CC],
|
|---|
| 96 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
|---|
| 97 | AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
|---|
| 98 | [_AM_DEPENDENCIES(CXX)],
|
|---|
| 99 | [define([AC_PROG_CXX],
|
|---|
| 100 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
|---|
| 101 | ])
|
|---|
| 102 | ])
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 | # When config.status generates a header, we must update the stamp-h file.
|
|---|
| 106 | # This file resides in the same directory as the config header
|
|---|
| 107 | # that is generated. The stamp files are numbered to have different names.
|
|---|
| 108 |
|
|---|
| 109 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
|---|
| 110 | # loop where config.status creates the headers, so we can generate
|
|---|
| 111 | # our stamp files there.
|
|---|
| 112 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
|---|
| 113 | [# Compute $1's index in $config_headers.
|
|---|
| 114 | _am_stamp_count=1
|
|---|
| 115 | for _am_header in $config_headers :; do
|
|---|
| 116 | case $_am_header in
|
|---|
| 117 | $1 | $1:* )
|
|---|
| 118 | break ;;
|
|---|
| 119 | * )
|
|---|
| 120 | _am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
|---|
| 121 | esac
|
|---|
| 122 | done
|
|---|
| 123 | echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
|---|