Wed Nov 21 18:02:49 PST 2001 Brendan Conoboy <blc@redhat.com>
[dejagnu.git] / aclocal.m4
blobf6571f547bda09ddf8409efb1cfc3b3302d4d80e
1 dnl aclocal.m4 generated automatically by aclocal 1.4
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 AC_DEFUN(DJ_AC_STL, [
14 AC_MSG_CHECKING(for STL versions)
15 AC_CACHE_VAL(ac_cv_stl,[
16   AC_LANG_CPLUSPLUS
17   AC_TRY_COMPILE([#include <iostream>], [
18   using namespace std;
19   char bbuuff[5120];
20   cout.rdbuf()->pubsetbuf(bbuuff, 5120); ],
21   ac_cv_stl=v3
22   ,
23   ac_cv_stl=v2
24   ),
27 AC_LANG_C
28 if test x"${ac_cv_stl}" != x"v2" ; then  
29   AC_MSG_RESULT(v3)
30   AC_DEFINE(HAVE_STL3)
31 else
32   AC_MSG_RESULT(v2)
36 AC_DEFUN(DJ_AC_PATH_TCLSH, [
37 dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../
38 ../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../..
39 /../../../../../.."
40 no_itcl=true
41 AC_MSG_CHECKING(for the tclsh program)
42 AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory where tcl header
43 s are], with_tclinclude=${withval})
44 AC_CACHE_VAL(ac_cv_path_tclsh,[
45 dnl first check to see if --with-itclinclude was specified
46 if test x"${with_tclinclude}" != x ; then
47   if test -f ${with_tclinclude}/tclsh ; then
48     ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)`
49   elif test -f ${with_tclinclude}/src/tclsh ; then
50     ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)`
51   else
52     AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh])
53   fi
57 dnl next check in private source directory
58 dnl since ls returns lowest version numbers first, reverse its output
59 if test x"${ac_cv_path_tclsh}" = x ; then
60     dnl find the top level Itcl source directory
61     for i in $dirlist; do
62         if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then
63             tclpath=$srcdir/$i
64             break
65         fi
66     done
68     dnl find the exact Itcl source dir. We do it this way, cause there
69     dnl might be multiple version of Itcl, and we want the most recent one.
70     for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do
71         if test -f $i/src/tclsh ; then
72           ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh
73           break
74         fi
75     done
78 dnl see if one is installed
79 if test x"${ac_cv_path_tclsh}" = x ; then
80    AC_MSG_RESULT(none)
81    AC_PATH_PROG(tclsh, tclsh)
82 else
83    AC_MSG_RESULT(${ac_cv_path_tclsh})
85 TCLSH="${ac_cv_path_tclsh}"
86 AC_SUBST(TCLSH)
90 AC_DEFUN(DJ_AC_PATH_DOCBOOK, [
91 dirlist=".. ../../ ../../.. ../../../.. ../../../../.. ../../../../../.. ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
92 AC_MSG_CHECKING(for docbook tools)
93 AC_ARG_WITH(oskith, [  --with-docbook       directory where the db2 sgml tools are], with_docbook=${withval})
94 AC_CACHE_VAL(ac_cv_c_docbook,[
95 dnl first check to see if --with-docbook was specified
96 if test x"${with_docbook}" != x ; then
97   if test -f ${with_docbook}/db2html ; then
98     ac_cv_c_docbook=`(cd ${with_docbook}; pwd)`
99   else
100     AC_MSG_ERROR([${with_docbook} directory doesn't contain SGML tools])
101   fi
104 if test x"${ac_cv_c_docbook}" = x ; then
105     for i in $ac_default_prefix/bin /usr/local/bin $OSKITHDIR/../bin /usr/bin /bin /opt /home; do
106         dnl See is we have an SGML tool in that directory.
107         if test -f $i/db2html ; then
108             ac_cv_c_docbook=$i
109             break
110         fi
111     done
114 if test x"${ac_cv_c_docbook}" = x ; then
115     AC_MSG_RESULT(none)
116 else
117     DOCBOOK="${ac_cv_c_docbook}"
118     AC_MSG_RESULT(${ac_cv_c_docbook})
121 AC_SUBST(DOCBOOK)
124 # Do all the work for Automake.  This macro actually does too much --
125 # some checks are only needed if your package does certain things.
126 # But this isn't really a big deal.
128 # serial 1
130 dnl Usage:
131 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
133 AC_DEFUN(AM_INIT_AUTOMAKE,
134 [AC_REQUIRE([AC_PROG_INSTALL])
135 PACKAGE=[$1]
136 AC_SUBST(PACKAGE)
137 VERSION=[$2]
138 AC_SUBST(VERSION)
139 dnl test to see if srcdir already configured
140 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
141   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
143 ifelse([$3],,
144 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
145 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
146 AC_REQUIRE([AM_SANITY_CHECK])
147 AC_REQUIRE([AC_ARG_PROGRAM])
148 dnl FIXME This is truly gross.
149 missing_dir=`cd $ac_aux_dir && pwd`
150 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
151 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
152 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
153 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
154 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
155 AC_REQUIRE([AC_PROG_MAKE_SET])])
158 # Check to make sure that the build environment is sane.
161 AC_DEFUN(AM_SANITY_CHECK,
162 [AC_MSG_CHECKING([whether build environment is sane])
163 # Just in case
164 sleep 1
165 echo timestamp > conftestfile
166 # Do `set' in a subshell so we don't clobber the current shell's
167 # arguments.  Must try -L first in case configure is actually a
168 # symlink; some systems play weird games with the mod time of symlinks
169 # (eg FreeBSD returns the mod time of the symlink's containing
170 # directory).
171 if (
172    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
173    if test "[$]*" = "X"; then
174       # -L didn't work.
175       set X `ls -t $srcdir/configure conftestfile`
176    fi
177    if test "[$]*" != "X $srcdir/configure conftestfile" \
178       && test "[$]*" != "X conftestfile $srcdir/configure"; then
180       # If neither matched, then we have a broken ls.  This can happen
181       # if, for instance, CONFIG_SHELL is bash and it inherits a
182       # broken ls alias from the environment.  This has actually
183       # happened.  Such a system could not be considered "sane".
184       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
185 alias in your environment])
186    fi
188    test "[$]2" = conftestfile
189    )
190 then
191    # Ok.
192    :
193 else
194    AC_MSG_ERROR([newly created file is older than distributed files!
195 Check your system clock])
197 rm -f conftest*
198 AC_MSG_RESULT(yes)])
200 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
201 dnl The program must properly implement --version.
202 AC_DEFUN(AM_MISSING_PROG,
203 [AC_MSG_CHECKING(for working $2)
204 # Run test in a subshell; some versions of sh will print an error if
205 # an executable is not found, even if stderr is redirected.
206 # Redirect stdin to placate older versions of autoconf.  Sigh.
207 if ($2 --version) < /dev/null > /dev/null 2>&1; then
208    $1=$2
209    AC_MSG_RESULT(found)
210 else
211    $1="$3/missing $2"
212    AC_MSG_RESULT(missing)
214 AC_SUBST($1)])
216 # Add --enable-maintainer-mode option to configure.
217 # From Jim Meyering
219 # serial 1
221 AC_DEFUN(AM_MAINTAINER_MODE,
222 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
223   dnl maintainer-mode is disabled by default
224   AC_ARG_ENABLE(maintainer-mode,
225 [  --enable-maintainer-mode enable make rules and dependencies not useful
226                           (and sometimes confusing) to the casual installer],
227       USE_MAINTAINER_MODE=$enableval,
228       USE_MAINTAINER_MODE=no)
229   AC_MSG_RESULT($USE_MAINTAINER_MODE)
230   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
231   MAINT=$MAINTAINER_MODE_TRUE
232   AC_SUBST(MAINT)dnl
236 # Define a conditional.
238 AC_DEFUN(AM_CONDITIONAL,
239 [AC_SUBST($1_TRUE)
240 AC_SUBST($1_FALSE)
241 if $2; then
242   $1_TRUE=
243   $1_FALSE='#'
244 else
245   $1_TRUE='#'
246   $1_FALSE=
247 fi])
250 dnl AM_PROG_LEX
251 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
252 AC_DEFUN(AM_PROG_LEX,
253 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
254 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
255 AC_PROG_LEX
256 AC_DECL_YYTEXT])