1 dnl aclocal.m4 generated automatically by aclocal 1.2a
3 dnl Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
4 dnl This Makefile.in 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 On the NeXT, #including <utime.h> doesn't give you a definition for
14 dnl struct utime, unless you #define _POSIX_SOURCE.
16 AC_DEFUN(GUILE_STRUCT_UTIMBUF, [
17 AC_CACHE_CHECK([whether we need POSIX to get struct utimbuf],
18 guile_cv_struct_utimbuf_needs_posix,
21 #include <sys/utime.h>
27 guile_cv_struct_utimbuf_needs_posix=no,
28 guile_cv_struct_utimbuf_needs_posix=yes)])
29 if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then
30 AC_DEFINE(UTIMBUF_NEEDS_POSIX)
37 dnl Apparently, at CMU they have a weird version of libc.h that is
38 dnl installed in /usr/local/include and conflicts with unistd.h.
39 dnl In these situations, we should not #include libc.h.
40 dnl This test arranges to #define LIBC_H_WITH_UNISTD_H iff libc.h is
41 dnl present on the system, and is safe to #include.
43 AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD],
45 AC_CHECK_HEADERS(libc.h unistd.h)
47 "whether libc.h and unistd.h can be included together",
48 guile_cv_header_libc_with_unistd,
50 if test "$ac_cv_header_libc_h" = "no"; then
51 guile_cv_header_libc_with_unistd="no"
52 elif test "$ac_cv_header_unistd.h" = "no"; then
53 guile_cv_header_libc_with_unistd="yes"
61 [guile_cv_header_libc_with_unistd=yes],
62 [guile_cv_header_libc_with_unistd=no]
67 if test "$guile_cv_header_libc_with_unistd" = yes; then
68 AC_DEFINE(LIBC_H_WITH_UNISTD_H)
75 dnl This is needed when we want to check for the same function repeatedly
76 dnl with other parameters, such as libraries, varying.
78 dnl GUILE_NAMED_CHECK_FUNC(FUNCTION, TESTNAME,
79 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
80 AC_DEFUN(GUILE_NAMED_CHECK_FUNC,
81 [AC_MSG_CHECKING([for $1])
82 AC_CACHE_VAL(ac_cv_func_$1_$2,
84 dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
85 dnl which includes <sys/select.h> which contains a prototype for
86 dnl select. Similarly for bzero.
87 [/* System header to define __stub macros and hopefully few prototypes,
88 which can conflict with char $1(); below. */
90 /* Override any gcc2 internal prototype to avoid an error. */
91 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
95 [/* We use char because int might match the return type of a gcc2
96 builtin and then its argument prototype would still apply. */
99 /* The GNU C library defines this for functions which it implements
100 to always fail with ENOSYS. Some functions are actually named
101 something starting with __ and the normal name is an alias. */
102 #if defined (__stub_$1) || defined (__stub___$1)
107 ], eval "ac_cv_func_$1_$2=yes", eval "ac_cv_func_$1_$2=no")])
108 if eval "test \"`echo '$ac_cv_func_'$1'_'$2`\" = yes"; then
110 ifelse([$3], , :, [$3])
118 # Do all the work for Automake. This macro actually does too much --
119 # some checks are only needed if your package does certain things.
120 # But this isn't really a big deal.
125 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
127 AC_DEFUN(AM_INIT_AUTOMAKE,
128 [AC_REQUIRE([AM_PROG_INSTALL])
133 dnl test to see if srcdir already configured
134 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
135 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
138 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
139 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
142 dnl FIXME This is truly gross.
143 missing_dir=`cd $ac_aux_dir && pwd`
144 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
145 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
146 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
147 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
148 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
154 AC_DEFUN(AM_PROG_INSTALL,
155 [AC_REQUIRE([AC_PROG_INSTALL])
156 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
157 AC_SUBST(INSTALL_SCRIPT)dnl
161 # Check to make sure that the build environment is sane.
164 AC_DEFUN(AM_SANITY_CHECK,
165 [AC_MSG_CHECKING([whether build environment is sane])
168 echo timestamp > conftestfile
169 # Do `set' in a subshell so we don't clobber the current shell's
170 # arguments. Must try -L first in case configure is actually a
171 # symlink; some systems play weird games with the mod time of symlinks
172 # (eg FreeBSD returns the mod time of the symlink's containing
175 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
176 if test "$@" = "X"; then
178 set X `ls -t $srcdir/configure conftestfile`
180 test "[$]2" = conftestfile
186 AC_MSG_ERROR([newly created file is older than distributed files!
187 Check your system clock])
192 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
193 dnl The program must properly implement --version.
194 AC_DEFUN(AM_MISSING_PROG,
195 [AC_MSG_CHECKING(for working $2)
196 # Run test in a subshell; some versions of sh will print an error if
197 # an executable is not found, even if stderr is redirected.
198 # Redirect stdin to placate older versions of autoconf. Sigh.
199 if ($2 --version) < /dev/null > /dev/null 2>&1; then
204 AC_MSG_RESULT(missing)
208 # Add --enable-maintainer-mode option to configure.
213 AC_DEFUN(AM_MAINTAINER_MODE,
214 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
215 dnl maintainer-mode is disabled by default
216 AC_ARG_ENABLE(maintainer-mode,
217 [ --enable-maintainer-mode enable make rules and dependencies not useful
218 (and sometimes confusing) to the casual installer],
219 USE_MAINTAINER_MODE=$enableval,
220 USE_MAINTAINER_MODE=no)
221 AC_MSG_RESULT($USE_MAINTAINER_MODE)
222 if test $USE_MAINTAINER_MODE = yes; then
231 # Like AC_CONFIG_HEADER, but automatically create stamp file.
233 AC_DEFUN(AM_CONFIG_HEADER,
235 AC_CONFIG_HEADER([$1])
236 dnl When config.status generates a header, we must update the stamp-h file.
237 dnl This file resides in the same directory as the config header
238 dnl that is generated. We must strip everything past the first ":",
239 dnl and everything past the last "/".
240 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
241 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
242 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
244 for am_file in <<$1>>; do
245 case " <<$>>CONFIG_HEADERS " in
246 *" <<$>>am_file "*<<)>>
247 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
250 am_indx=`expr "<<$>>am_indx" + 1`
255 # serial 4 AM_PROG_LIBTOOL
256 AC_DEFUN(AM_PROG_LIBTOOL,
257 [AC_REQUIRE([AC_CANONICAL_HOST])
258 AC_REQUIRE([AC_PROG_CC])
259 AC_REQUIRE([AC_PROG_RANLIB])
261 # Always use our own libtool.
262 LIBTOOL='$(top_builddir)/libtool'
265 dnl Allow the --disable-shared flag to stop us from building shared libs.
266 AC_ARG_ENABLE(shared,
267 [ --enable-shared build shared libraries [default=yes]],
268 test "$enableval" = no && libtool_shared=" --disable-shared",
271 libtool_flags="$libtool_shared"
272 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
273 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
277 # For IRIX 6, ld needs -n32 if cc uses it.
278 if echo " $CC $CFLAGS " | egrep -e '[ ]-n32[ ]' > /dev/null; then
284 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
285 CFLAGS="$CFLAGS -belf"
289 # Actually configure libtool. ac_aux_dir is where install-sh is found.
290 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
291 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
292 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
293 || AC_MSG_ERROR([libtool configure failed])
297 dnl CY_AC_WITH_THREADS determines which thread library the user intends
298 dnl to put underneath guile. Pass it the path to find the guile top-level
299 dnl source directory. Eg CY_AC_WITH_THREADS(../..) for tcl/unix.
302 AC_DEFUN([CY_AC_WITH_THREADS],[
303 AC_CACHE_CHECK("threads package type",cy_cv_threads_package,[
304 AC_CACHE_VAL(cy_cv_threads_cflags,[
305 AC_CACHE_VAL(cy_cv_threads_libs,[
307 AC_ARG_WITH(threads,[ --with-threads thread interface],
308 use_threads=$withval, use_threads=no)
309 test -n "$use_threads" || use_threads=qt
310 threads_package=unknown
311 if test "$use_threads" != no; then
313 dnl Test for the qt threads package - used for cooperative threads
314 dnl This may not necessarily be built yet - so just check for the
317 if test "$use_threads" = yes || test "$use_threads" = qt; then
318 # Look for qt in source directory.
319 if test -f $srcdir/qt/qt.c; then
320 qtsrcdir="`(cd $srcdir; pwd)`/qt"
322 cy_cv_threads_cflags="-I$qtsrcdir -I../qt"
323 cy_cv_threads_libs="../qt/libqt.a"
326 if test -f $use_threads/qt.c; then
327 # FIXME seems as though we should try to use an installed qt here.
329 cy_cv_threads_cflags="-I$use_threads -I../qt"
330 cy_cv_threads_libs="../qt/libqt.a"
333 if test "$use_threads" = pthreads; then
334 # Look for pthreads in srcdir. See above to understand why
335 # we always set threads_package.
336 if test -f $srcdir/../../pthreads/pthreads/queue.c \
337 || test -f $srcdir/../pthreads/pthreads/queue.c; then
339 cy_cv_threads_cflags="-I$srcdir/../../pthreads/include"
340 cy_cv_threads_libs="-L../../pthreads/lib -lpthread"
343 saved_CPP="$CPPFLAGS"
346 if test "$threads_package" = unknown; then
348 dnl Test for the FSU threads package
350 CPPFLAGS="-I$use_threads/include"
351 LDFLAGS="-L$use_threads/lib"
352 LIBS="-lgthreads -lmalloc"
353 AC_TRY_LINK([#include <pthread.h>],[
354 pthread_equal(NULL,NULL);
355 ], threads_package=FSU)
357 if test "$threads_package" = unknown; then
359 dnl Test for the MIT threads package
362 AC_TRY_LINK([#include <pthread.h>],[
363 pthread_equal(NULL,NULL);
364 ], threads_package=MIT)
366 if test "$threads_package" = unknown; then
368 dnl Test for the PCthreads package
371 AC_TRY_LINK([#include <pthread.h>],[
372 pthread_equal(NULL,NULL);
373 ], threads_package=PCthreads)
376 dnl Set the appropriate flags!
378 cy_cv_threads_cflags="$CPPFLAGS $cy_cv_threads_cflags"
379 cy_cv_threads_libs="$LDFLAGS $LIBS $cy_cv_threads_libs"
380 cy_cv_threads_package=$threads_package
381 CPPFLAGS="$saved_CPP"
384 if test "$threads_package" = unknown; then
385 AC_MSG_ERROR("cannot find thread library installation")
392 dnl Set flags according to what is cached.
394 CPPFLAGS="$cy_cv_threads_cflags"
395 LIBS="$cy_cv_threads_libs"