1 dnl configuration script for Guile
2 dnl Process this file with autoconf to produce configure.
4 dnl Copyright (C) 1998, 1999, 2000, 2001 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 AC_ARG_ENABLE(error-on-warning,
47 [ --enable-error-on-warning treat compile warnings as errors],
48 [case "${enableval}" in
49 yes | y) CFLAGS="${CFLAGS} -Werror"; enable_compile_warnings=no ;;
51 *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
55 AC_ARG_ENABLE(debug-freelist,
56 [ --enable-debug-freelist include garbage collector freelist debugging code],
57 if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then
58 AC_DEFINE(GUILE_DEBUG_FREELIST, 1,
59 [Define this if you want to debug the free list (helps w/ GC bugs).])
62 AC_ARG_ENABLE(debug-malloc,
63 [ --enable-debug-malloc include malloc debugging code],
64 if test "$enable_debug_malloc" = y || test "$enable_debug_malloc" = yes; then
65 AC_DEFINE(GUILE_DEBUG_MALLOC, 1,
66 [Define this if you want to debug scm_must_malloc/realloc/free calls.])
69 AC_ARG_ENABLE(guile-debug,
70 [ --enable-guile-debug include internal debugging functions],
71 if test "$enable_guile_debug" = y || test "$enable_guile_debug" = yes; then
72 AC_DEFINE(GUILE_DEBUG, 1,
73 [Define this to include various undocumented functions used to debug.])
77 [ --disable-arrays omit array and uniform array support],,
81 [ --disable-posix omit posix interfaces],,
84 AC_ARG_ENABLE(networking,
85 [ --disable-networking omit networking interfaces],,
86 enable_networking=yes)
89 [ --disable-regex omit regular expression interfaces],,
92 AC_ARG_ENABLE(htmldoc,
93 [ --enable-htmldoc build HTML documentation as well as Info],
94 [if test "$enable_htmldoc" = "" || test "$enable_htmldoc" = y || test "$enable_htmldoc" = yes; then
96 AC_PATH_PROG(TEXI2HTML, texi2html, not found)
97 if test "$TEXI2HTML" = "not found"; then
99 echo Building HTML documentation requires the \`texi2html\' program,
100 echo which appears not to be present on your machine.
102 echo \`texi2html\' is available from
103 echo 'http://www.mathematik.uni-kl.de/~obachman/Texi2html/.'
105 echo In the meantime, to build the guile-doc distribution
106 echo without HTML enabled, please rerun \`./configure\' without
107 echo the \`--enable-htmldoc\' option.
112 AM_CONDITIONAL(HTMLDOC, test x$htmldoc_enabled = xyes)
114 AC_ARG_ENABLE(deprecated,
115 [ --disable-deprecated omit deprecated features [no]])
117 AH_TEMPLATE([SCM_ENABLE_DEPRECATED],
118 [Define this to 1 if you want to include deprecated features.])
120 if test "$enable_deprecated" = no; then
121 AC_DEFINE(SCM_ENABLE_DEPRECATED, 0)
123 if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then
125 elif test "$enable_deprecated" = shutup; then
128 warn_default=$enable_deprecated
130 AC_DEFINE(SCM_ENABLE_DEPRECATED, 1)
131 AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
132 [Define this to control the default warning level for deprecated features.])
135 dnl The --disable-debug used to control these two. But now they are
136 dnl a required part of the distribution.
137 AC_DEFINE(DEBUG_EXTENSIONS, 1,
138 [Define if you want support for debugging Scheme programs.])
139 AC_DEFINE(READER_EXTENSIONS, 1,
140 [Define if you want support for debugging Scheme programs.])
143 [ --disable-elisp omit Emacs Lisp support],,
146 #--------------------------------------------------------------------
148 dnl Some more checks for Win32
153 AC_LIBLTDL_INSTALLABLE
154 AC_CONFIG_SUBDIRS(libltdl)
167 ## Needed for building DLLs on Cygwin, before AM_PROG_LIBTOOL
171 AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
172 AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
174 dnl Check for dynamic linking
178 [ --with-modules[=FILES] Add support for dynamic modules],
179 use_modules="$withval")
180 test -z "$use_modules" && use_modules=yes
182 if test "$use_modules" != no; then
183 AC_DEFINE(DYNAMIC_LINKING, 1,
184 [Define if you want support for dynamic linking.])
185 if test "$use_modules" = yes; then
186 DLPREOPEN="-dlpreopen force"
188 DLPREOPEN="-export-dynamic"
189 for module in $use_modules; do
190 DLPREOPEN="$DLPREOPEN -dlopen $module"
195 dnl files which are destined for separate modules.
197 if test "$use_modules" != no; then
201 if test "$enable_arrays" = yes; then
204 AC_DEFINE(HAVE_ARRAYS, 1,
205 [Define this if you want support for arrays and uniform arrays.])
208 if test "$enable_posix" = yes; then
211 AC_DEFINE(HAVE_POSIX, 1,
212 [Define this if you want support for POSIX system calls in Guile.])
215 if test "$enable_networking" = yes; then
218 AC_DEFINE(HAVE_NETWORKING, 1,
219 [Define this if you want support for networking in Guile.])
222 if test "$enable_debug_malloc" = yes; then
223 AC_LIBOBJ([debug-malloc])
226 if test "$enable_elisp" = yes; then
227 AC_DEFINE(SCM_ENABLE_ELISP, 1,
228 [Define this if you want Elisp support (in addition to Scheme).])
236 if test "$ac_cv_c_inline" != no; then
237 AC_DEFINE(HAVE_INLINE, 1,
238 [Define if the compiler supports inline functions.])
241 AC_CHECK_SIZEOF(short)
243 AC_CHECK_SIZEOF(long)
244 AC_CHECK_SIZEOF(size_t)
246 dnl Check for integral types that can represent the range of pointers.
247 dnl If these types don't exist on this platform, they are replaced by
248 dnl "unsigned long" and "long", respectively.
250 AC_CHECK_HEADERS(stdint.h)
251 AC_CHECK_HEADERS(inttypes.h)
252 AC_CHECK_SIZEOF(uintptr_t)
253 AC_CHECK_SIZEOF(ptrdiff_t)
255 AC_CHECK_SIZEOF(long long)
257 AC_CHECK_SIZEOF(void *)
259 if test "$ac_cv_sizeof_long" -ne "$ac_cv_sizeof_void_p"; then
260 AC_MSG_ERROR(sizes of long and void* are not identical)
267 AC_CHECK_HEADERS(io.h libc.h limits.h malloc.h memory.h string.h regex.h rxposix.h rx/rxposix.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h direct.h)
268 GUILE_HEADER_LIBC_WITH_UNISTD
274 AC_CHECK_LIB(m, main)
275 AC_CHECK_FUNCS(gethostbyname)
276 if test $ac_cv_func_gethostbyname = no; then
277 AC_CHECK_LIB(nsl, gethostbyname)
279 AC_CHECK_FUNCS(connect)
280 if test $ac_cv_func_connect = no; then
281 AC_CHECK_LIB(socket, connect)
285 dnl Check for Winsock and other functionality on Win32 (*not* CygWin)
288 if test "$MINGW32" = "yes" ; then
289 AC_CHECK_HEADER(winsock2.h, [AC_DEFINE([HAVE_WINSOCK2_H], 1,
290 [Define if you have the <winsock2.h> header file.])])
291 AC_CHECK_LIB(ws2_32, main)
292 AC_LIBOBJ([win32-uname])
293 AC_LIBOBJ([win32-dirent])
294 if test "$enable_networking" = yes ; then
295 AC_LIBOBJ([win32-socket])
297 if test "$enable_shared" = yes ; then
298 EXTRA_DEFS="-DSCM_IMPORT"
299 AC_DEFINE(USE_DLL_IMPORT, 1,
300 [Define if you need additional CPP macros on Win32 platforms.])
302 if test x"$enable_ltdl_install" = x"yes" ; then
303 INCLTDL="-DLIBLTDL_DLL_IMPORT $INCLTDL"
312 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)
314 AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h)
315 AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
316 AC_CHECK_LIB(crypt, crypt)
318 ### Some systems don't declare some functions. On such systems, we
319 ### need to at least provide our own K&R-style declarations.
321 ### GUILE_FUNC_DECLARED(function, headerfile)
323 ### Check for a declaration of FUNCTION in HEADERFILE; if it is
324 ### not there, #define MISSING_FUNCTION_DECL.
325 AC_DEFUN(GUILE_FUNC_DECLARED, [
326 AC_CACHE_CHECK(for $1 declaration, guile_cv_func_$1_declared,
327 AC_EGREP_HEADER($1, $2,
328 guile_cv_func_$1_declared=yes,
329 guile_cv_func_$1_declared=no))
330 if test [x$guile_cv_func_]$1[_declared] = xno; then
331 AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL], 1,
332 [Define if the operating system supplies $1 without declaring it.])
336 GUILE_FUNC_DECLARED(strptime, time.h)
337 GUILE_FUNC_DECLARED(sleep, unistd.h)
338 GUILE_FUNC_DECLARED(usleep, unistd.h)
340 ### On some systems usleep has no return value. If it does have one,
341 ### we'd like to return it; otherwise, we'll fake it.
342 AC_CACHE_CHECK([return type of usleep], guile_cv_func_usleep_return_type,
343 [AC_EGREP_HEADER(changequote(<, >)<void[ ]+usleep>changequote([, ]),
345 [guile_cv_func_usleep_return_type=void],
346 [guile_cv_func_usleep_return_type=int])])
347 case "$guile_cv_func_usleep_return_type" in
349 AC_DEFINE(USLEEP_RETURNS_VOID, 1,
350 [Define if the system headers declare usleep to return void.])
354 AC_CHECK_HEADER(sys/un.h, have_sys_un_h=1)
355 if test -n "$have_sys_un_h" ; then
356 AC_DEFINE(HAVE_UNIX_DOMAIN_SOCKETS, 1,
357 [Define if the system supports Unix-domain (file-domain) sockets.])
360 AC_CHECK_FUNCS(socketpair getgroups setpwent pause tzset)
362 AC_CHECK_FUNCS(sethostent gethostent endhostent dnl
363 setnetent getnetent endnetent dnl
364 setprotoent getprotoent endprotoent dnl
365 setservent getservent endservent dnl
366 getnetbyaddr getnetbyname dnl
367 inet_lnaof inet_makeaddr inet_netof hstrerror dnl
370 dnl Some systems do not declare this. Some systems do declare it, as a
371 dnl macro. With cygwin it may be in a DLL.
373 AC_MSG_CHECKING(whether netdb.h declares h_errno)
374 AC_CACHE_VAL(guile_cv_have_h_errno,
375 [AC_TRY_COMPILE([#include <netdb.h>],
377 guile_cv_have_h_errno=yes, guile_cv_have_h_errno=no)])
378 AC_MSG_RESULT($guile_cv_have_h_errno)
379 if test $guile_cv_have_h_errno = yes; then
380 AC_DEFINE(HAVE_H_ERRNO, 1, [Define if h_errno is declared in netdb.h.])
383 AC_MSG_CHECKING(whether uint32_t is defined)
384 AC_CACHE_VAL(guile_cv_have_uint32_t,
385 [AC_TRY_COMPILE([#include <sys/types.h>
393 guile_cv_have_uint32_t=yes, guile_cv_have_uint32_t=no)])
394 AC_MSG_RESULT($guile_cv_have_uint32_t)
395 if test $guile_cv_have_uint32_t = yes; then
396 AC_DEFINE(HAVE_UINT32_T, 1,
397 [Define if uint32_t typedef is defined when netdb.h is include.])
400 AC_MSG_CHECKING(for working IPv6 support)
401 AC_CACHE_VAL(guile_cv_have_ipv6,
403 #ifdef HAVE_SYS_TYPES_H
404 #include <sys/types.h>
406 #include <netinet/in.h>
407 #include <sys/socket.h>],
408 [struct sockaddr_in6 a; a.sin6_family = AF_INET6;],
409 guile_cv_have_ipv6=yes, guile_cv_have_ipv6=no)])
410 AC_MSG_RESULT($guile_cv_have_ipv6)
411 if test $guile_cv_have_ipv6 = yes; then
412 AC_DEFINE(HAVE_IPV6, 1, [Define if you want support for IPv6.])
415 # included in rfc2553 but not in older implementations, e.g., glibc 2.1.3.
416 AC_MSG_CHECKING(whether sockaddr_in6 has sin6_scope_id)
417 AC_CACHE_VAL(guile_cv_have_sin6_scope_id,
419 #ifdef HAVE_SYS_TYPES_H
420 #include <sys/types.h>
422 #include <netinet/in.h>],
423 [struct sockaddr_in6 sok; sok.sin6_scope_id = 0;],
424 guile_cv_have_sin6_scope_id=yes, guile_cv_have_sin6_scope_id=no)])
425 AC_MSG_RESULT($guile_cv_have_sin6_scope_id)
426 if test $guile_cv_have_sin6_scope_id = yes; then
427 AC_DEFINE(HAVE_SIN6_SCOPE_ID, 1,
428 [Define this if your IPv6 has sin6_scope_id in sockaddr_in6 struct.])
431 AC_MSG_CHECKING(whether localtime caches TZ)
432 AC_CACHE_VAL(guile_cv_localtime_cache,
433 [if test x$ac_cv_func_tzset = xyes; then
434 AC_TRY_RUN([#include <time.h>
438 extern char **environ;
442 for (to = from = environ; (*to = *from); from++)
443 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
446 char TZ_GMT0[] = "TZ=GMT0";
447 char TZ_PST8[] = "TZ=PST8";
450 time_t now = time ((time_t *) 0);
451 int hour_GMT0, hour_unset;
452 if (putenv (TZ_GMT0) != 0)
454 hour_GMT0 = localtime (&now)->tm_hour;
456 hour_unset = localtime (&now)->tm_hour;
457 if (putenv (TZ_PST8) != 0)
459 if (localtime (&now)->tm_hour == hour_GMT0)
462 if (localtime (&now)->tm_hour != hour_unset)
465 }], guile_cv_localtime_cache=no, guile_cv_localtime_cache=yes,
466 [# If we have tzset, assume the worst when cross-compiling.
467 guile_cv_localtime_cache=yes])
469 # If we lack tzset, report that localtime does not cache TZ,
470 # since we can't invalidate the cache if we don't have tzset.
471 guile_cv_localtime_cache=no
473 AC_MSG_RESULT($guile_cv_localtime_cache)
474 if test $guile_cv_localtime_cache = yes; then
475 AC_DEFINE(LOCALTIME_CACHE, 1, [Define if localtime caches the TZ setting.])
478 dnl Test whether system calls are restartable by default on the
479 dnl current system. If they are not, we put a loop around every system
480 dnl call to check for EINTR (see SCM_SYSCALL) and do not attempt to
481 dnl change from the default behaviour. On the other hand, if signals
482 dnl are restartable then the loop is not installed and when libguile
483 dnl initialises it also resets the behaviour of each signal to cause a
484 dnl restart (in case a different runtime had a different default
485 dnl behaviour for some reason: e.g., different versions of linux seem
486 dnl to behave differently.)
488 AC_SYS_RESTARTABLE_SYSCALLS
490 if test "$enable_regex" = yes; then
491 if test "$ac_cv_header_regex_h" = yes ||
492 test "$ac_cv_header_rxposix_h" = yes ||
493 test "$ac_cv_header_rx_rxposix_h" = yes; then
494 GUILE_NAMED_CHECK_FUNC(regcomp, norx, [AC_LIBOBJ([regex-posix])],
495 [AC_CHECK_LIB(rx, main)
496 GUILE_NAMED_CHECK_FUNC(regcomp, rx, [AC_LIBOBJ([regex-posix])],
497 [AC_CHECK_LIB(regex, main)
498 GUILE_NAMED_CHECK_FUNC(regcomp, regex, [AC_LIBOBJ([regex-posix])])])]
500 dnl The following should not be necessary, but for some reason
501 dnl autoheader misses it if we don't include it!
502 if test "$ac_cv_func_regcomp_norx" = yes ||
503 test "$ac_cv_func_regcomp_regex" = yes ||
504 test "$ac_cv_func_regcomp_rx" = yes; then
505 AC_DEFINE(HAVE_REGCOMP, 1,
506 [This is included as part of a workaround for a autoheader bug.])
511 AC_REPLACE_FUNCS(inet_aton putenv strerror memmove mkstemp)
513 AC_CHECK_HEADERS(floatingpoint.h ieeefp.h nan.h)
515 AC_CHECK_FUNCS(finite isinf isnan copysign)
517 # When testing for the presence of alloca, we need to add alloca.o
518 # explicitly to LIBOBJS to make sure that it is translated to
519 # `alloca.lo' for libtool later on. This can and should be done more cleanly.
521 if test "$ALLOCA" = "alloca.o"; then AC_LIBOBJ([alloca]); fi
523 AC_CHECK_MEMBERS([struct stat.st_rdev])
524 AC_CHECK_MEMBERS([struct stat.st_blksize])
528 AC_CACHE_CHECK([for S_ISLNK in sys/stat.h], ac_cv_macro_S_ISLNK,
529 [AC_TRY_CPP([#include <sys/stat.h>
533 ac_cv_macro_S_ISLNK=yes,
534 ac_cv_macro_S_ISLNK=no)])
535 if test $ac_cv_macro_S_ISLNK = yes; then
536 AC_DEFINE(HAVE_S_ISLNK, 1,
537 [Define this if your system defines S_ISLNK in sys/stat.h.])
543 #--------------------------------------------------------------------
545 # Which way does the stack grow?
547 #--------------------------------------------------------------------
549 AC_TRY_RUN(aux (l) unsigned long l;
550 { int x; exit (l >= ((unsigned long)&x)); }
551 main () { int q; aux((unsigned long)&q); },
552 [AC_DEFINE([SCM_STACK_GROWS_UP], 1,
553 [Define this if a callee's stack frame has a higher address
554 than the caller's stack frame. On most machines, this is
557 [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in)])
559 AH_TEMPLATE([SCM_SINGLES],
560 [Define this if floats are the same size as longs.])
562 AC_CACHE_CHECK([whether floats fit in longs], guile_cv_type_float_fits_long,
563 [AC_TRY_RUN([main () { exit (sizeof(float) > sizeof(long)); }],
564 [guile_cv_type_float_fits_long=yes],
565 [guile_cv_type_float_fits_long=no],
566 [guile_cv_type_float_fits_long=guess-yes])])
567 case $guile_cv_type_float_fits_long in
569 AC_DEFINE(SCM_SINGLES)
572 AC_DEFINE(SCM_SINGLES)
573 AC_MSG_WARN([guessing that sizeof(long) == sizeof(float)])
574 AC_MSG_WARN([see SCM_SINGLES in scmconfig.h.in])
579 AC_MSG_CHECKING(for struct linger)
580 AC_CACHE_VAL(scm_cv_struct_linger,
582 #include <sys/types.h>
583 #include <sys/socket.h>],
584 [struct linger lgr; lgr.l_linger = 100],
585 scm_cv_struct_linger="yes",
586 scm_cv_struct_linger="no"))
587 AC_MSG_RESULT($scm_cv_struct_linger)
588 if test $scm_cv_struct_linger = yes; then
589 AC_DEFINE(HAVE_STRUCT_LINGER, 1,
590 [Define this if your system defines struct linger, for use with the
591 getsockopt and setsockopt system calls.])
595 AC_MSG_CHECKING(for struct timespec)
596 AC_CACHE_VAL(scm_cv_struct_timespec,
599 [struct timespec t; t.tv_nsec = 100],
600 scm_cv_struct_timespec="yes",
601 scm_cv_struct_timespec="no"))
602 AC_MSG_RESULT($scm_cv_struct_timespec)
603 if test $scm_cv_struct_timespec = yes; then
604 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
605 [Define this if your system defines struct timespec via <time.h>.])
608 #--------------------------------------------------------------------
610 # Flags for thread support
612 #--------------------------------------------------------------------
614 ### What thread package has the user asked for?
615 AC_ARG_WITH(threads, [ --with-threads thread interface],
618 ### Turn $with_threads into either the name of a threads package, like
619 ### `qt', or `no', meaning that threads should not be supported.
620 AC_MSG_CHECKING(whether to support threads)
621 case "$with_threads" in
622 "yes" | "qt" | "coop" | "")
628 AC_MSG_ERROR(invalid value for --with-threads: $with_threads)
631 AC_MSG_RESULT($with_threads)
633 ## Make sure the threads package we've chosen is actually supported on
634 ## the present platform.
635 case "${with_threads}" in
637 ## This configures the QuickThreads package, and sets or clears
638 ## the THREAD_PACKAGE variable if qthreads don't configure
644 ## If we're using threads, bring in some other parts of Guile which
646 if test "${THREAD_PACKAGE}" != "" ; then
647 AC_DEFINE(USE_THREADS, 1, [Define if using any sort of threads.])
649 ## Include the Guile thread interface in the library...
652 ## ... and tell it which package to talk to.
653 case "${THREAD_PACKAGE}" in
655 AC_DEFINE(USE_COOP_THREADS, 1,
656 [Define if using cooperative multithreading.])
659 AC_MSG_ERROR(invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE})
663 ## Bring in scm_internal_select, if appropriate.
664 if test $ac_cv_func_gettimeofday = yes &&
665 test $ac_cv_func_select = yes; then
666 AC_DEFINE(GUILE_ISELECT, 1, [Define to implement scm_internal_select.])
669 AC_ARG_ENABLE(linuxthreads,
670 [ --disable-linuxthreads disable linuxthreads workaround],,
671 enable_linuxthreads=yes)
673 ## Workaround for linuxthreads (optionally disabled)
674 if test $host_os = linux-gnu -a "$enable_linuxthreads" = yes; then
675 AC_DEFINE(GUILE_PTHREAD_COMPAT, 1,
676 [Define to enable workaround for COOP-linuxthreads compatibility.])
677 AC_CHECK_LIB(pthread, main)
682 if test "$cross_compiling" = "yes"; then
683 AC_MSG_CHECKING(cc for build)
684 ## /usr/bin/cc still uses wrong assembler
685 ## CC_FOR_BUILD="${CC_FOR_BUILD-/usr/bincc}"
686 CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}"
688 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
690 AC_ARG_WITH(cc-for-build,
691 [ --with-cc-for-build=CC native C compiler, to be used during build])
692 test -n "$with_cc_for_build" && CC_FOR_BUILD="$with_cc_for_build"
694 ## AC_MSG_CHECKING("if we are cross compiling")
695 ## AC_MSG_RESULT($cross_compiling)
696 if test "$cross_compiling" = "yes"; then
697 AC_MSG_RESULT($CC_FOR_BUILD)
700 ## No need as yet to be more elaborate
701 CCLD_FOR_BUILD="$CC_FOR_BUILD"
703 AC_SUBST(cross_compiling)
704 AC_SUBST(CC_FOR_BUILD)
705 AC_SUBST(CCLD_FOR_BUILD)
707 ## libtool erroneously calls CC_FOR_BUILD HOST_CC;
708 ## --HOST is the platform that PACKAGE is compiled for.
709 HOST_CC="$CC_FOR_BUILD"
712 if test "$cross_compiling" = "yes"; then
713 AC_MSG_CHECKING(guile for build)
714 GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
716 GUILE_FOR_BUILD='$(preinstguile)'
718 AC_ARG_WITH(guile-for-build,
719 [ --with-guile-for-build=guile native guile executable, to be used during build])
720 test -n "$with_guile_for_build" && GUILE_FOR_BUILD="$with_guile_for_build"
722 ## AC_MSG_CHECKING("if we are cross compiling")
723 ## AC_MSG_RESULT($cross_compiling)
724 if test "$cross_compiling" = "yes"; then
725 AC_MSG_RESULT($GUILE_FOR_BUILD)
727 AC_SUBST(GUILE_FOR_BUILD)
729 ## If we're using GCC, ask for aggressive warnings.
732 ## We had -Wstrict-prototypes in here for a bit, but Guile does too
733 ## much stuff with generic function pointers for that to really be
734 ## less than exasperating.
735 ## -Wpointer-arith was here too, but something changed in gcc/glibc
736 ## and it became equally exasperating (gcc 2.95 and/or glibc 2.1.2).
737 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" ;;
742 ## NOTE the code below sets LIBOBJS directly and so is now forbidden
743 ## -- I'm disabling it for now in the hopes that the newer autoconf
744 ## will DTRT -- if not, we need to fix up the sed command to match the
747 ## Remove fileblocks.o from the object list. This file gets added by
748 ## the Autoconf macro AC_STRUCT_ST_BLOCKS. But there is no need.
749 #LIBOBJS="`echo ${LIBOBJS} | sed 's/fileblocks\.o//g'`"
751 ## If we're creating a shared library (using libtool!), then we'll
752 ## need to generate a list of .lo files corresponding to the .o files
753 ## given in LIBOBJS. We'll call it LIBLOBJS.
754 LIBLOBJS="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`"
756 ## We also need to create corresponding .doc and .x files
757 EXTRA_DOT_DOC_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.doc ,g;s,\.[[^.]]*$,.doc,'`"
758 EXTRA_DOT_X_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.x ,g;s,\.[[^.]]*$,.x,'`"
760 AC_SUBST(GUILE_MAJOR_VERSION)
761 AC_SUBST(GUILE_MINOR_VERSION)
762 AC_SUBST(GUILE_MICRO_VERSION)
763 AC_SUBST(GUILE_VERSION)
765 #######################################################################
768 AC_SUBST(LIBQTHREADS_INTERFACE_CURRENT)
769 AC_SUBST(LIBQTHREADS_INTERFACE_REVISION)
770 AC_SUBST(LIBQTHREADS_INTERFACE_AGE)
771 AC_SUBST(LIBQTHREADS_INTERFACE)
773 AC_SUBST(LIBGUILE_INTERFACE_CURRENT)
774 AC_SUBST(LIBGUILE_INTERFACE_REVISION)
775 AC_SUBST(LIBGUILE_INTERFACE_AGE)
776 AC_SUBST(LIBGUILE_INTERFACE)
778 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_CURRENT)
779 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_REVISION)
780 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_AGE)
781 AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE)
783 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_CURRENT)
784 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_REVISION)
785 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_AGE)
786 AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE)
788 #######################################################################
790 dnl Tell guile-config what flags guile users should link against.
791 GUILE_LIBS="$LDFLAGS $THREAD_LIBS_INSTALLED $LIBS"
796 AC_SUBST(EXTRA_DOT_DOC_FILES)
797 AC_SUBST(EXTRA_DOT_X_FILES)
799 dnl See also top_builddir in info node: (libtool)AC_PROG_LIBTOOL
800 top_builddir_absolute=`pwd`
801 AC_SUBST(top_builddir_absolute)
802 top_srcdir_absolute=`(cd $srcdir ; pwd)`
803 AC_SUBST(top_srcdir_absolute)
810 libguile/guile-doc-snarf
811 libguile/guile-func-name-check
812 libguile/guile-snarf-docs
817 lang/elisp/internals/Makefile
818 lang/elisp/primitives/Makefile
827 guile-config/Makefile
830 doc/tutorial/Makefile
834 examples/scripts/Makefile
835 examples/box/Makefile
836 examples/box-module/Makefile
837 examples/box-dynamic/Makefile
838 examples/box-dynamic-module/Makefile
839 examples/modules/Makefile
840 examples/safe/Makefile
846 AC_CONFIG_COMMANDS(default,
847 [ chmod +x libguile/guile-snarf \
848 libguile/guile-doc-snarf \
849 libguile/guile-func-name-check \
850 libguile/guile-snarf-docs \
858 dnl comment-start: "dnl "
860 dnl comment-start-skip: "\\bdnl\\b\\s *"