1 dnl configuration script for Guile
2 dnl Process this file with autoconf to produce configure.
4 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 dnl This file is part of GUILE
8 dnl GUILE is free software; you can redistribute it and/or modify it
9 dnl under the terms of the GNU General Public License as published by
10 dnl the Free Software Foundation; either version 2, or (at your
11 dnl option) any later version.
13 dnl GUILE is distributed in the hope that it will be useful, but
14 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl General Public License for more details.
18 dnl You should have received a copy of the GNU General Public License
19 dnl along with GUILE; see the file COPYING. If not, write to the
20 dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 dnl Boston, MA 02111-1307, USA.
26 AC_CONFIG_SRCDIR([Makefile.in])
27 . $srcdir/GUILE-VERSION
28 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
30 AM_CONFIG_HEADER(libguile/scmconfig.h)
32 #--------------------------------------------------------------------
34 # Independent Subdirectories
36 #--------------------------------------------------------------------
38 AC_CONFIG_SUBDIRS(guile-readline)
40 #--------------------------------------------------------------------
44 #--------------------------------------------------------------------
46 GUILE_ERROR_ON_WARNING="yes"
48 AC_ARG_ENABLE(error-on-warning,
49 [ --enable-error-on-warning treat compile warnings as errors],
50 [case "${enableval}" in
51 yes | y) GUILE_ERROR_ON_WARNING="yes" ;;
52 no | n) GUILE_ERROR_ON_WARNING="no" ;;
53 *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
56 AC_ARG_ENABLE(debug-freelist,
57 [ --enable-debug-freelist include garbage collector freelist debugging code],
58 if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then
59 AC_DEFINE(GUILE_DEBUG_FREELIST, 1,
60 [Define this if you want to debug the free list (helps w/ GC bugs).])
63 AC_ARG_ENABLE(debug-malloc,
64 [ --enable-debug-malloc include malloc debugging code],
65 if test "$enable_debug_malloc" = y || test "$enable_debug_malloc" = yes; then
66 AC_DEFINE(GUILE_DEBUG_MALLOC, 1,
67 [Define this if you want to debug scm_must_malloc/realloc/free calls.])
70 AC_ARG_ENABLE(guile-debug,
71 [ --enable-guile-debug include internal debugging functions],
72 if test "$enable_guile_debug" = y || test "$enable_guile_debug" = yes; then
73 AC_DEFINE(GUILE_DEBUG, 1,
74 [Define this to include various undocumented functions used to debug.])
78 [ --disable-arrays omit array and uniform array support],,
82 [ --disable-posix omit posix interfaces],,
85 AC_ARG_ENABLE(networking,
86 [ --disable-networking omit networking interfaces],,
87 enable_networking=yes)
90 [ --disable-regex omit regular expression interfaces],,
93 AC_ARG_ENABLE(htmldoc,
94 [ --enable-htmldoc build HTML documentation as well as Info],
95 [if test "$enable_htmldoc" = "" || test "$enable_htmldoc" = y || test "$enable_htmldoc" = yes; then
97 AC_PATH_PROG(TEXI2HTML, texi2html, not found)
98 if test "$TEXI2HTML" = "not found"; then
100 echo Building HTML documentation requires the \`texi2html\' program,
101 echo which appears not to be present on your machine.
103 echo \`texi2html\' is available from
104 echo 'http://www.mathematik.uni-kl.de/~obachman/Texi2html/.'
106 echo In the meantime, to build the guile-doc distribution
107 echo without HTML enabled, please rerun \`./configure\' without
108 echo the \`--enable-htmldoc\' option.
113 AM_CONDITIONAL(HTMLDOC, test x$htmldoc_enabled = xyes)
115 AC_ARG_ENABLE(deprecated,
116 [ --disable-deprecated omit deprecated features])
118 AH_TEMPLATE([SCM_ENABLE_DEPRECATED],
119 [Define this to 1 if you want to include deprecated features.])
121 if test "$enable_deprecated" = no; then
122 AC_DEFINE(SCM_ENABLE_DEPRECATED, 0)
124 if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then
126 elif test "$enable_deprecated" = shutup; then
129 warn_default=$enable_deprecated
131 AC_DEFINE(SCM_ENABLE_DEPRECATED, 1)
132 AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
133 [Define this to control the default warning level for deprecated features.])
136 dnl The --disable-debug used to control these two. But now they are
137 dnl a required part of the distribution.
138 AC_DEFINE(DEBUG_EXTENSIONS, 1,
139 [Define if you want support for debugging Scheme programs.])
140 AC_DEFINE(READER_EXTENSIONS, 1,
141 [Define if you want support for debugging Scheme programs.])
144 [ --disable-elisp omit Emacs Lisp support],,
147 #--------------------------------------------------------------------
149 dnl Some more checks for Win32
169 AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
170 AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
172 dnl Check for dynamic linking
176 [ --with-modules[=FILES] Add support for dynamic modules],
177 use_modules="$withval")
178 test -z "$use_modules" && use_modules=yes
180 if test "$use_modules" != no; then
181 AC_DEFINE(DYNAMIC_LINKING, 1,
182 [Define if you want support for dynamic linking.])
183 if test "$use_modules" = yes; then
184 DLPREOPEN="-dlpreopen force"
186 DLPREOPEN="-export-dynamic"
187 for module in $use_modules; do
188 DLPREOPEN="$DLPREOPEN -dlopen $module"
193 dnl files which are destined for separate modules.
195 if test "$use_modules" != no; then
199 if test "$enable_arrays" = yes; then
202 AC_DEFINE(HAVE_ARRAYS, 1,
203 [Define this if you want support for arrays and uniform arrays.])
206 if test "$enable_posix" = yes; then
209 AC_DEFINE(HAVE_POSIX, 1,
210 [Define this if you want support for POSIX system calls in Guile.])
213 if test "$enable_networking" = yes; then
216 AC_DEFINE(HAVE_NETWORKING, 1,
217 [Define this if you want support for networking in Guile.])
220 if test "$enable_debug_malloc" = yes; then
221 AC_LIBOBJ([debug-malloc])
224 if test "$enable_elisp" = yes; then
225 AC_DEFINE(SCM_ENABLE_ELISP, 1,
226 [Define this if you want Elisp support (in addition to Scheme).])
234 if test "$ac_cv_c_inline" != no; then
235 AC_DEFINE(HAVE_INLINE, 1,
236 [Define if the compiler supports inline functions.])
239 AC_CHECK_SIZEOF(short)
241 AC_CHECK_SIZEOF(long)
242 AC_CHECK_SIZEOF(size_t)
244 dnl Check for integral types that can represent the range of pointers.
245 dnl If these types don't exist on this platform, they are replaced by
246 dnl "unsigned long" and "long", respectively.
248 AC_CHECK_HEADERS(stdint.h)
249 AC_CHECK_HEADERS(inttypes.h)
250 AC_CHECK_SIZEOF(uintptr_t)
251 AC_CHECK_SIZEOF(ptrdiff_t)
253 AC_CHECK_SIZEOF(long long)
255 AC_CHECK_SIZEOF(void *)
257 if test "$ac_cv_sizeof_long" -ne "$ac_cv_sizeof_void_p"; then
258 AC_MSG_ERROR(sizes of long and void* are not identical)
266 AC_CHECK_HEADERS([io.h libc.h limits.h malloc.h memory.h string.h \
267 regex.h rxposix.h rx/rxposix.h sys/dir.h sys/ioctl.h sys/select.h \
268 sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \
269 sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \
272 GUILE_HEADER_LIBC_WITH_UNISTD
278 AC_CHECK_LIB(m, main)
279 AC_CHECK_FUNCS(gethostbyname)
280 if test $ac_cv_func_gethostbyname = no; then
281 AC_CHECK_LIB(nsl, gethostbyname)
284 AC_CHECK_FUNCS(connect)
285 if test $ac_cv_func_connect = no; then
286 AC_CHECK_LIB(socket, connect)
290 dnl Check for Winsock and other functionality on Win32 (*not* CygWin)
293 if test "$MINGW32" = "yes" ; then
294 AC_CHECK_HEADER(winsock2.h, [AC_DEFINE([HAVE_WINSOCK2_H], 1,
295 [Define if you have the <winsock2.h> header file.])])
296 AC_CHECK_LIB(ws2_32, main)
297 AC_LIBOBJ([win32-uname])
298 AC_LIBOBJ([win32-dirent])
299 if test "$enable_networking" = yes ; then
300 AC_LIBOBJ([win32-socket])
302 if test "$enable_shared" = yes ; then
303 EXTRA_DEFS="-DSCM_IMPORT"
304 AC_DEFINE(USE_DLL_IMPORT, 1,
305 [Define if you need additional CPP macros on Win32 platforms.])
307 if test x"$enable_ltdl_install" = x"yes" ; then
308 INCLTDL="-DLIBLTDL_DLL_IMPORT $INCLTDL"
313 # FIXME: check to see if we still need these.
319 AC_CHECK_HEADERS([assert.h])
321 AC_CHECK_FUNCS([ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex])
323 AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h)
324 AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
325 AC_CHECK_LIB(crypt, crypt)
327 ### Some systems don't declare some functions. On such systems, we
328 ### need to at least provide our own K&R-style declarations.
330 ### GUILE_FUNC_DECLARED(function, headerfile)
332 ### Check for a declaration of FUNCTION in HEADERFILE; if it is
333 ### not there, #define MISSING_FUNCTION_DECL.
334 AC_DEFUN(GUILE_FUNC_DECLARED, [
335 AC_CACHE_CHECK(for $1 declaration, guile_cv_func_$1_declared,
336 AC_EGREP_HEADER($1, $2,
337 guile_cv_func_$1_declared=yes,
338 guile_cv_func_$1_declared=no))
339 if test [x$guile_cv_func_]$1[_declared] = xno; then
340 AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL], 1,
341 [Define if the operating system supplies $1 without declaring it.])
345 GUILE_FUNC_DECLARED(strptime, time.h)
346 GUILE_FUNC_DECLARED(sleep, unistd.h)
347 GUILE_FUNC_DECLARED(usleep, unistd.h)
349 ### On some systems usleep has no return value. If it does have one,
350 ### we'd like to return it; otherwise, we'll fake it.
351 AC_CACHE_CHECK([return type of usleep], guile_cv_func_usleep_return_type,
352 [AC_EGREP_HEADER(changequote(<, >)<void[ ]+usleep>changequote([, ]),
354 [guile_cv_func_usleep_return_type=void],
355 [guile_cv_func_usleep_return_type=int])])
356 case "$guile_cv_func_usleep_return_type" in
358 AC_DEFINE(USLEEP_RETURNS_VOID, 1,
359 [Define if the system headers declare usleep to return void.])
363 AC_CHECK_HEADER(sys/un.h, have_sys_un_h=1)
364 if test -n "$have_sys_un_h" ; then
365 AC_DEFINE(HAVE_UNIX_DOMAIN_SOCKETS, 1,
366 [Define if the system supports Unix-domain (file-domain) sockets.])
369 AC_CHECK_FUNCS(socketpair getgroups setpwent pause tzset)
371 AC_CHECK_FUNCS(sethostent gethostent endhostent dnl
372 setnetent getnetent endnetent dnl
373 setprotoent getprotoent endprotoent dnl
374 setservent getservent endservent dnl
375 getnetbyaddr getnetbyname dnl
376 inet_lnaof inet_makeaddr inet_netof hstrerror dnl
379 AC_MSG_CHECKING(for __libc_stack_end)
380 AC_TRY_LINK([extern char *__libc_stack_end;],
381 [char *p = __libc_stack_end;],
382 have_libc_stack_end=yes,
383 have_libc_stack_end=no)
384 AC_MSG_RESULT($have_libc_stack_end)
386 if test $have_libc_stack_end = yes; then
387 AC_DEFINE(HAVE_LIBC_STACK_END, 1,
388 [Define if you have the __libc_stack_end variable.])
391 dnl Some systems do not declare this. Some systems do declare it, as a
392 dnl macro. With cygwin it may be in a DLL.
394 AC_MSG_CHECKING(whether netdb.h declares h_errno)
395 AC_CACHE_VAL(guile_cv_have_h_errno,
396 [AC_TRY_COMPILE([#include <netdb.h>],
398 guile_cv_have_h_errno=yes, guile_cv_have_h_errno=no)])
399 AC_MSG_RESULT($guile_cv_have_h_errno)
400 if test $guile_cv_have_h_errno = yes; then
401 AC_DEFINE(HAVE_H_ERRNO, 1, [Define if h_errno is declared in netdb.h.])
404 AC_MSG_CHECKING(whether uint32_t is defined)
405 AC_CACHE_VAL(guile_cv_have_uint32_t,
406 [AC_TRY_COMPILE([#include <sys/types.h>
414 guile_cv_have_uint32_t=yes, guile_cv_have_uint32_t=no)])
415 AC_MSG_RESULT($guile_cv_have_uint32_t)
416 if test $guile_cv_have_uint32_t = yes; then
417 AC_DEFINE(HAVE_UINT32_T, 1,
418 [Define if uint32_t typedef is defined when netdb.h is include.])
421 AC_MSG_CHECKING(for working IPv6 support)
422 AC_CACHE_VAL(guile_cv_have_ipv6,
424 #ifdef HAVE_SYS_TYPES_H
425 #include <sys/types.h>
427 #include <netinet/in.h>
428 #include <sys/socket.h>],
429 [struct sockaddr_in6 a; a.sin6_family = AF_INET6;],
430 guile_cv_have_ipv6=yes, guile_cv_have_ipv6=no)])
431 AC_MSG_RESULT($guile_cv_have_ipv6)
432 if test $guile_cv_have_ipv6 = yes; then
433 AC_DEFINE(HAVE_IPV6, 1, [Define if you want support for IPv6.])
436 # included in rfc2553 but not in older implementations, e.g., glibc 2.1.3.
437 AC_MSG_CHECKING(whether sockaddr_in6 has sin6_scope_id)
438 AC_CACHE_VAL(guile_cv_have_sin6_scope_id,
440 #ifdef HAVE_SYS_TYPES_H
441 #include <sys/types.h>
443 #include <netinet/in.h>],
444 [struct sockaddr_in6 sok; sok.sin6_scope_id = 0;],
445 guile_cv_have_sin6_scope_id=yes, guile_cv_have_sin6_scope_id=no)])
446 AC_MSG_RESULT($guile_cv_have_sin6_scope_id)
447 if test $guile_cv_have_sin6_scope_id = yes; then
448 AC_DEFINE(HAVE_SIN6_SCOPE_ID, 1,
449 [Define this if your IPv6 has sin6_scope_id in sockaddr_in6 struct.])
452 AC_MSG_CHECKING(whether localtime caches TZ)
453 AC_CACHE_VAL(guile_cv_localtime_cache,
454 [if test x$ac_cv_func_tzset = xyes; then
455 AC_TRY_RUN([#include <time.h>
459 extern char **environ;
463 for (to = from = environ; (*to = *from); from++)
464 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
467 char TZ_GMT0[] = "TZ=GMT0";
468 char TZ_PST8[] = "TZ=PST8";
471 time_t now = time ((time_t *) 0);
472 int hour_GMT0, hour_unset;
473 if (putenv (TZ_GMT0) != 0)
475 hour_GMT0 = localtime (&now)->tm_hour;
477 hour_unset = localtime (&now)->tm_hour;
478 if (putenv (TZ_PST8) != 0)
480 if (localtime (&now)->tm_hour == hour_GMT0)
483 if (localtime (&now)->tm_hour != hour_unset)
486 }], guile_cv_localtime_cache=no, guile_cv_localtime_cache=yes,
487 [# If we have tzset, assume the worst when cross-compiling.
488 guile_cv_localtime_cache=yes])
490 # If we lack tzset, report that localtime does not cache TZ,
491 # since we can't invalidate the cache if we don't have tzset.
492 guile_cv_localtime_cache=no
494 AC_MSG_RESULT($guile_cv_localtime_cache)
495 if test $guile_cv_localtime_cache = yes; then
496 AC_DEFINE(LOCALTIME_CACHE, 1, [Define if localtime caches the TZ setting.])
499 dnl Test whether system calls are restartable by default on the
500 dnl current system. If they are not, we put a loop around every system
501 dnl call to check for EINTR (see SCM_SYSCALL) and do not attempt to
502 dnl change from the default behaviour. On the other hand, if signals
503 dnl are restartable then the loop is not installed and when libguile
504 dnl initialises it also resets the behaviour of each signal to cause a
505 dnl restart (in case a different runtime had a different default
506 dnl behaviour for some reason: e.g., different versions of linux seem
507 dnl to behave differently.)
509 AC_SYS_RESTARTABLE_SYSCALLS
511 if test "$enable_regex" = yes; then
512 if test "$ac_cv_header_regex_h" = yes ||
513 test "$ac_cv_header_rxposix_h" = yes ||
514 test "$ac_cv_header_rx_rxposix_h" = yes; then
515 GUILE_NAMED_CHECK_FUNC(regcomp, norx, [AC_LIBOBJ([regex-posix])],
516 [AC_CHECK_LIB(rx, main)
517 GUILE_NAMED_CHECK_FUNC(regcomp, rx, [AC_LIBOBJ([regex-posix])],
518 [AC_CHECK_LIB(regex, main)
519 GUILE_NAMED_CHECK_FUNC(regcomp, regex, [AC_LIBOBJ([regex-posix])])])]
521 dnl The following should not be necessary, but for some reason
522 dnl autoheader misses it if we don't include it!
523 if test "$ac_cv_func_regcomp_norx" = yes ||
524 test "$ac_cv_func_regcomp_regex" = yes ||
525 test "$ac_cv_func_regcomp_rx" = yes; then
526 AC_DEFINE(HAVE_REGCOMP, 1,
527 [This is included as part of a workaround for a autoheader bug.])
532 AC_REPLACE_FUNCS(inet_aton putenv strerror memmove mkstemp)
534 AC_CHECK_HEADERS(floatingpoint.h ieeefp.h nan.h)
536 AC_CHECK_FUNCS(finite isinf isnan copysign)
538 # When testing for the presence of alloca, we need to add alloca.o
539 # explicitly to LIBOBJS to make sure that it is translated to
540 # `alloca.lo' for libtool later on. This can and should be done more cleanly.
542 if test "$ALLOCA" = "alloca.o"; then AC_LIBOBJ([alloca]); fi
544 AC_CHECK_MEMBERS([struct stat.st_rdev])
545 AC_CHECK_MEMBERS([struct stat.st_blksize])
549 AC_CACHE_CHECK([for S_ISLNK in sys/stat.h], ac_cv_macro_S_ISLNK,
550 [AC_TRY_CPP([#include <sys/stat.h>
554 ac_cv_macro_S_ISLNK=yes,
555 ac_cv_macro_S_ISLNK=no)])
556 if test $ac_cv_macro_S_ISLNK = yes; then
557 AC_DEFINE(HAVE_S_ISLNK, 1,
558 [Define this if your system defines S_ISLNK in sys/stat.h.])
564 #--------------------------------------------------------------------
566 # Which way does the stack grow?
568 #--------------------------------------------------------------------
570 AC_TRY_RUN(aux (l) unsigned long l;
571 { int x; exit (l >= ((unsigned long)&x)); }
572 main () { int q; aux((unsigned long)&q); },
573 [AC_DEFINE([SCM_STACK_GROWS_UP], 1,
574 [Define this if a callee's stack frame has a higher address
575 than the caller's stack frame. On most machines, this is
578 [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in)])
580 AH_TEMPLATE([SCM_SINGLES],
581 [Define this if floats are the same size as longs.])
583 AC_CACHE_CHECK([whether floats fit in longs], guile_cv_type_float_fits_long,
584 [AC_TRY_RUN([main () { exit (sizeof(float) > sizeof(long)); }],
585 [guile_cv_type_float_fits_long=yes],
586 [guile_cv_type_float_fits_long=no],
587 [guile_cv_type_float_fits_long=guess-yes])])
588 case $guile_cv_type_float_fits_long in
590 AC_DEFINE(SCM_SINGLES)
593 AC_DEFINE(SCM_SINGLES)
594 AC_MSG_WARN([guessing that sizeof(long) == sizeof(float)])
595 AC_MSG_WARN([see SCM_SINGLES in scmconfig.h.in])
600 AC_MSG_CHECKING(for struct linger)
601 AC_CACHE_VAL(scm_cv_struct_linger,
603 #include <sys/types.h>
604 #include <sys/socket.h>],
605 [struct linger lgr; lgr.l_linger = 100],
606 scm_cv_struct_linger="yes",
607 scm_cv_struct_linger="no"))
608 AC_MSG_RESULT($scm_cv_struct_linger)
609 if test $scm_cv_struct_linger = yes; then
610 AC_DEFINE(HAVE_STRUCT_LINGER, 1,
611 [Define this if your system defines struct linger, for use with the
612 getsockopt and setsockopt system calls.])
616 AC_MSG_CHECKING(for struct timespec)
617 AC_CACHE_VAL(scm_cv_struct_timespec,
620 [struct timespec t; t.tv_nsec = 100],
621 scm_cv_struct_timespec="yes",
622 scm_cv_struct_timespec="no"))
623 AC_MSG_RESULT($scm_cv_struct_timespec)
624 if test $scm_cv_struct_timespec = yes; then
625 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
626 [Define this if your system defines struct timespec via <time.h>.])
629 #--------------------------------------------------------------------
631 # Flags for thread support
633 #--------------------------------------------------------------------
635 ### What thread package has the user asked for?
636 AC_ARG_WITH(threads, [ --with-threads thread interface],
639 ### Turn $with_threads into either the name of a threads package, like
640 ### `qt', or `no', meaning that threads should not be supported.
641 AC_MSG_CHECKING(whether to support threads)
642 case "$with_threads" in
643 "yes" | "qt" | "coop" | "")
649 AC_MSG_ERROR(invalid value for --with-threads: $with_threads)
652 AC_MSG_RESULT($with_threads)
654 ## Make sure the threads package we've chosen is actually supported on
655 ## the present platform.
656 case "${with_threads}" in
658 ## This configures the QuickThreads package, and sets or clears
659 ## the THREAD_PACKAGE variable if qthreads don't configure
665 ## If we're using threads, bring in some other parts of Guile which
667 if test "${THREAD_PACKAGE}" != "" ; then
668 AC_DEFINE(USE_THREADS, 1, [Define if using any sort of threads.])
670 ## Include the Guile thread interface in the library...
673 ## ... and tell it which package to talk to.
674 case "${THREAD_PACKAGE}" in
676 AC_DEFINE(USE_COOP_THREADS, 1,
677 [Define if using cooperative multithreading.])
680 AC_MSG_ERROR(invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE})
684 ## Bring in scm_internal_select, if appropriate.
685 if test $ac_cv_func_gettimeofday = yes &&
686 test $ac_cv_func_select = yes; then
687 AC_DEFINE(GUILE_ISELECT, 1, [Define to implement scm_internal_select.])
690 AC_ARG_ENABLE(linuxthreads,
691 [ --disable-linuxthreads disable linuxthreads workaround],,
692 enable_linuxthreads=yes)
694 ## Workaround for linuxthreads (optionally disabled)
695 if test $host_os = linux-gnu -a "$enable_linuxthreads" = yes; then
696 AC_DEFINE(GUILE_PTHREAD_COMPAT, 1,
697 [Define to enable workaround for COOP-linuxthreads compatibility.])
698 AC_CHECK_LIB(pthread, main)
703 if test "$cross_compiling" = "yes"; then
704 AC_MSG_CHECKING(cc for build)
705 ## /usr/bin/cc still uses wrong assembler
706 ## CC_FOR_BUILD="${CC_FOR_BUILD-/usr/bincc}"
707 CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}"
709 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
711 AC_ARG_WITH(cc-for-build,
712 [ --with-cc-for-build=CC native C compiler, to be used during build])
713 test -n "$with_cc_for_build" && CC_FOR_BUILD="$with_cc_for_build"
715 ## AC_MSG_CHECKING("if we are cross compiling")
716 ## AC_MSG_RESULT($cross_compiling)
717 if test "$cross_compiling" = "yes"; then
718 AC_MSG_RESULT($CC_FOR_BUILD)
721 ## No need as yet to be more elaborate
722 CCLD_FOR_BUILD="$CC_FOR_BUILD"
724 AC_SUBST(cross_compiling)
725 AC_SUBST(CC_FOR_BUILD)
726 AC_SUBST(CCLD_FOR_BUILD)
728 ## libtool erroneously calls CC_FOR_BUILD HOST_CC;
729 ## --HOST is the platform that PACKAGE is compiled for.
730 HOST_CC="$CC_FOR_BUILD"
733 if test "$cross_compiling" = "yes"; then
734 AC_MSG_CHECKING(guile for build)
735 GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
737 GUILE_FOR_BUILD='$(preinstguile)'
739 AC_ARG_WITH(guile-for-build,
740 [ --with-guile-for-build=guile native guile executable, to be used during build])
741 test -n "$with_guile_for_build" && GUILE_FOR_BUILD="$with_guile_for_build"
743 ## AC_MSG_CHECKING("if we are cross compiling")
744 ## AC_MSG_RESULT($cross_compiling)
745 if test "$cross_compiling" = "yes"; then
746 AC_MSG_RESULT($GUILE_FOR_BUILD)
748 AC_SUBST(GUILE_FOR_BUILD)
750 # Do this here so we don't screw up any of the tests above that might
751 # not be "warning free"
753 if test "${GUILE_ERROR_ON_WARNING}" = yes
755 CFLAGS="${CFLAGS} -Werror"
756 enable_compile_warnings=no
759 ## If we're using GCC, ask for aggressive warnings.
762 ## We had -Wstrict-prototypes in here for a bit, but Guile does too
763 ## much stuff with generic function pointers for that to really be
764 ## less than exasperating.
765 ## -Wpointer-arith was here too, but something changed in gcc/glibc
766 ## and it became equally exasperating (gcc 2.95 and/or glibc 2.1.2).
767 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" ;;
770 ## NOTE the code below sets LIBOBJS directly and so is now forbidden
771 ## -- I'm disabling it for now in the hopes that the newer autoconf
772 ## will DTRT -- if not, we need to fix up the sed command to match the
775 ## Remove fileblocks.o from the object list. This file gets added by
776 ## the Autoconf macro AC_STRUCT_ST_BLOCKS. But there is no need.
777 #LIBOBJS="`echo ${LIBOBJS} | sed 's/fileblocks\.o//g'`"
779 ## If we're creating a shared library (using libtool!), then we'll
780 ## need to generate a list of .lo files corresponding to the .o files
781 ## given in LIBOBJS. We'll call it LIBLOBJS.
782 LIBLOBJS="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`"
784 ## We also need to create corresponding .doc and .x files
785 EXTRA_DOT_DOC_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.doc ,g;s,\.[[^.]]*$,.doc,'`"
786 EXTRA_DOT_X_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.x ,g;s,\.[[^.]]*$,.x,'`"
788 AC_SUBST(GUILE_MAJOR_VERSION)
789 AC_SUBST(GUILE_MINOR_VERSION)
790 AC_SUBST(GUILE_MICRO_VERSION)
791 AC_SUBST(GUILE_VERSION)
793 #######################################################################
796 AC_SUBST(LIBQTHREADS_INTERFACE_CURRENT)
797 AC_SUBST(LIBQTHREADS_INTERFACE_REVISION)
798 AC_SUBST(LIBQTHREADS_INTERFACE_AGE)
799 AC_SUBST(LIBQTHREADS_INTERFACE)
801 AC_SUBST(LIBGUILE_INTERFACE_CURRENT)
802 AC_SUBST(LIBGUILE_INTERFACE_REVISION)
803 AC_SUBST(LIBGUILE_INTERFACE_AGE)
804 AC_SUBST(LIBGUILE_INTERFACE)
806 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_CURRENT)
807 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_REVISION)
808 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_AGE)
809 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE)
811 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_CURRENT)
812 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_REVISION)
813 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_AGE)
814 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE)
816 #######################################################################
818 dnl Tell guile-config what flags guile users should link against.
819 GUILE_LIBS="$LDFLAGS $THREAD_LIBS_INSTALLED $LIBS"
824 AC_SUBST(EXTRA_DOT_DOC_FILES)
825 AC_SUBST(EXTRA_DOT_X_FILES)
827 dnl See also top_builddir in info node: (libtool)AC_PROG_LIBTOOL
828 top_builddir_absolute=`pwd`
829 AC_SUBST(top_builddir_absolute)
830 top_srcdir_absolute=`(cd $srcdir ; pwd)`
831 AC_SUBST(top_srcdir_absolute)
838 libguile/guile-doc-snarf
839 libguile/guile-func-name-check
840 libguile/guile-snarf-docs
842 libguile-ltdl/Makefile
843 libguile-ltdl/upstream/Makefile
847 lang/elisp/internals/Makefile
848 lang/elisp/primitives/Makefile
857 guile-config/Makefile
860 doc/tutorial/Makefile
864 examples/scripts/Makefile
865 examples/box/Makefile
866 examples/box-module/Makefile
867 examples/box-dynamic/Makefile
868 examples/box-dynamic-module/Makefile
869 examples/modules/Makefile
870 examples/safe/Makefile
873 benchmark-suite/Makefile
878 AC_CONFIG_COMMANDS(default,
879 [ chmod +x libguile/guile-snarf \
880 libguile/guile-doc-snarf \
881 libguile/guile-func-name-check \
882 libguile/guile-snarf-docs \
891 dnl comment-start: "dnl "
893 dnl comment-start-skip: "\\bdnl\\b\\s *"