1 dnl aclocal.m4 generated automatically by aclocal 1.4a
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, 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.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl Usage: RELYX_WARNING(message) Displays the warning "message" and sets
15 dnl flag lyx_warning to yes.
16 AC_DEFUN(RELYX_WARNING,[
17 relyx_warning_txt="$relyx_warning_txt
23 dnl RELYX_SEARCH_PROG(VARIABLE-NAME,PROGRAMS-LIST,ACTION-IF-FOUND)
25 define(RELYX_SEARCH_PROG,[dnl
26 for ac_prog in $2 ; do
27 # Extract the first word of "$ac_prog", so it can be a program name with
29 set dummy $ac_prog ; ac_word=$[2]
30 if test ! -n "[$]$1"; then
31 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
32 for ac_dir in $PATH; do
33 test -z "$ac_dir" && ac_dir=.
34 if test -f [$ac_dir/$ac_word]; then
42 if test -n "[$]$1"; then
48 test -n "[$]$1" && break
53 dnl Usage RELYX_PROG_PERL_OK
54 AC_DEFUN(RELYX_PROG_PERL_OK,[
55 if echo 'require 5.002;exit' | $ac_dir/$ac_prog 2>&5
62 dnl Usage RELYX_CHECK_PERL
63 AC_DEFUN(RELYX_CHECK_PERL,[
64 AC_MSG_CHECKING([for perl >= 5.002])
65 RELYX_SEARCH_PROG(PERL, perl perl5 perl5.002 perl5.003 perl5.004,
68 if test -n "$PERL" ; then
71 PERL="/bin/echo reLyX has been disabled because perl version 5.002 has
73 been found.\nTo reenable it, edit "
76 Configure has not been able to find a version 5.002 or better of Perl.
77 reLyX has been setup to only display a warning message.
78 Set variable PERL to some value to install a working reLyX.)
82 dnl Usage: RELYX_CHECK_ERRORS Displays a warning message if a RELYX_ERROR
83 dnl has occured previously.
84 AC_DEFUN(RELYX_CHECK_ERRORS,[
85 if test x$relyx_error = xyes; then
87 **** The following problems have been detected by configure.
88 **** Please check the messages below before running 'make'.
89 **** (see the section 'Problems' in the INSTALL file)
92 deleting cache $cache_file
97 if test x$relyx_warning = xyes; then
99 === The following minor problems have been detected by configure.
100 === Please check the messages below before running 'make'.
101 === (see the section 'Problems' in the INSTALL file)
106 Configuration of LyX was successful.
107 Type 'make' to compile the program,
108 and then 'make install' to install it.
113 # Do all the work for Automake. This macro actually does too much --
114 # some checks are only needed if your package does certain things.
115 # But this isn't really a big deal.
120 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
122 AC_DEFUN(AM_INIT_AUTOMAKE,
123 [AC_REQUIRE([AC_PROG_INSTALL])
124 dnl We require 2.13 because we rely on SHELL being computed by configure.
130 dnl test to see if srcdir already configured
131 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
132 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
135 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
136 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
137 AC_REQUIRE([AM_SANITY_CHECK])
138 AC_REQUIRE([AC_ARG_PROGRAM])
139 dnl FIXME This is truly gross.
140 missing_dir=`cd $ac_aux_dir && pwd`
141 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
142 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
143 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
144 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
145 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
146 AC_REQUIRE([AC_PROG_MAKE_SET])])
149 # Check to make sure that the build environment is sane.
152 AC_DEFUN(AM_SANITY_CHECK,
153 [AC_MSG_CHECKING([whether build environment is sane])
156 echo timestamp > conftestfile
157 # Do `set' in a subshell so we don't clobber the current shell's
158 # arguments. Must try -L first in case configure is actually a
159 # symlink; some systems play weird games with the mod time of symlinks
160 # (eg FreeBSD returns the mod time of the symlink's containing
163 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
164 if test "[$]*" = "X"; then
166 set X `ls -t $srcdir/configure conftestfile`
168 if test "[$]*" != "X $srcdir/configure conftestfile" \
169 && test "[$]*" != "X conftestfile $srcdir/configure"; then
171 # If neither matched, then we have a broken ls. This can happen
172 # if, for instance, CONFIG_SHELL is bash and it inherits a
173 # broken ls alias from the environment. This has actually
174 # happened. Such a system could not be considered "sane".
175 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
176 alias in your environment])
179 test "[$]2" = conftestfile
185 AC_MSG_ERROR([newly created file is older than distributed files!
186 Check your system clock])
191 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
192 dnl The program must properly implement --version.
193 AC_DEFUN(AM_MISSING_PROG,
194 [AC_MSG_CHECKING(for working $2)
195 # Run test in a subshell; some versions of sh will print an error if
196 # an executable is not found, even if stderr is redirected.
197 # Redirect stdin to placate older versions of autoconf. Sigh.
198 if ($2 --version) < /dev/null > /dev/null 2>&1; then
203 AC_MSG_RESULT(missing)