]> git.donarmstrong.com Git - lilypond.git/blob - flower/aclocal.m4
6984d2990ff3ed379002e1515ea91158d8bdffca
[lilypond.git] / flower / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.2
2
3 # Do all the work for Automake.  This macro actually does too much --
4 # some checks are only needed if your package does certain things.
5 # But this isn't really a big deal.
6
7 # serial 1
8
9 dnl Usage:
10 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
11
12 AC_DEFUN(AM_INIT_AUTOMAKE,
13 [AC_REQUIRE([AM_PROG_INSTALL])
14 PACKAGE=[$1]
15 AC_SUBST(PACKAGE)
16 VERSION=[$2]
17 AC_SUBST(VERSION)
18 dnl test to see if srcdir already configured
19 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
20   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
21 fi
22 ifelse([$3],,
23 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
24 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
25 AM_SANITY_CHECK
26 AC_ARG_PROGRAM
27 dnl FIXME This is truly gross.
28 missing_dir=`cd $ac_aux_dir && pwd`
29 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
30 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
31 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
32 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
33 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
34 AC_PROG_MAKE_SET])
35
36
37 # serial 1
38
39 AC_DEFUN(AM_PROG_INSTALL,
40 [AC_REQUIRE([AC_PROG_INSTALL])
41 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
42 AC_SUBST(INSTALL_SCRIPT)dnl
43 ])
44
45 #
46 # Check to make sure that the build environment is sane.
47 #
48
49 AC_DEFUN(AM_SANITY_CHECK,
50 [AC_MSG_CHECKING([whether build environment is sane])
51 # Just in case
52 sleep 1
53 echo timestamp > conftestfile
54 # Do `set' in a subshell so we don't clobber the current shell's
55 # arguments.  Must try -L first in case configure is actually a
56 # symlink; some systems play weird games with the mod time of symlinks
57 # (eg FreeBSD returns the mod time of the symlink's containing
58 # directory).
59 if (
60    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
61    if test "$@" = "X"; then
62       # -L didn't work.
63       set X `ls -t $srcdir/configure conftestfile`
64    fi
65    test "[$]2" = conftestfile
66    )
67 then
68    # Ok.
69    :
70 else
71    AC_MSG_ERROR([newly created file is older than distributed files!
72 Check your system clock])
73 fi
74 rm -f conftest*
75 AC_MSG_RESULT(yes)])
76
77 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
78 dnl The program must properly implement --version.
79 AC_DEFUN(AM_MISSING_PROG,
80 [AC_MSG_CHECKING(for working $2)
81 # Run test in a subshell; some versions of sh will print an error if
82 # an executable is not found, even if stderr is redirected.
83 # Redirect stdin to placate older versions of autoconf.  Sigh.
84 if ($2 --version) < /dev/null > /dev/null 2>&1; then
85    $1=$2
86    AC_MSG_RESULT(found)
87 else
88    $1="$3/missing $2"
89    AC_MSG_RESULT(missing)
90 fi
91 AC_SUBST($1)])
92
93 # Like AC_CONFIG_HEADER, but automatically create stamp file.
94
95 AC_DEFUN(AM_CONFIG_HEADER,
96 [AC_PREREQ([2.12])
97 AC_CONFIG_HEADER([$1])
98 dnl When config.status generates a header, we must update the stamp-h file.
99 dnl This file resides in the same directory as the config header
100 dnl that is generated.  We must strip everything past the first ":",
101 dnl and everything past the last "/".
102 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
103 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
104 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
105 <<am_indx=1
106 for am_file in <<$1>>; do
107   case " <<$>>CONFIG_HEADERS " in
108   *" <<$>>am_file "*<<)>>
109     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
110     ;;
111   esac
112   am_indx=`expr "<<$>>am_indx" + 1`
113 done<<>>dnl>>)
114 changequote([,]))])
115