dnl configuration script for Guile
dnl Process this file with autoconf to produce configure.
dnl
-dnl Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+dnl Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
dnl
dnl This file is part of GUILE
dnl
[ --disable-deprecated omit deprecated features [no]])
if test "$enable_deprecated" = no; then
- AC_DEFINE(SCM_DEBUG_DEPRECATED, 1)
+ AC_DEFINE(SCM_ENABLE_DEPRECATED, 0)
else
if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then
warn_default=summary
else
warn_default=$enable_deprecated
fi
- AC_DEFINE(SCM_DEBUG_DEPRECATED, 0)
+ AC_DEFINE(SCM_ENABLE_DEPRECATED, 1)
AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default")
fi
AC_DEFINE(DEBUG_EXTENSIONS)
AC_DEFINE(READER_EXTENSIONS)
+AC_ARG_ENABLE(elisp,
+ [ --disable-elisp omit Emacs Lisp support],,
+ enable_elisp=yes)
+
dnl files which are destined for separate modules.
if test "$enable_arrays" = yes; then
LIBOBJS="$LIBOBJS debug-malloc.o"
fi
+if test "$enable_elisp" = yes; then
+ AC_DEFINE(SCM_ENABLE_ELISP)
+fi
+
#--------------------------------------------------------------------
-AC_LIBLTDL_CONVENIENCE
+dnl Some more checks for Win32
+AC_CYGWIN
+AC_MINGW32
+AC_LIBTOOL_WIN32_DLL
+
+AC_LIBLTDL_INSTALLABLE
AC_CONFIG_SUBDIRS(libltdl)
+AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CPP
AC_LIBTOOL_DLOPEN
AM_PROG_CC_STDC
AM_PROG_LIBTOOL
+AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
+AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
+
AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN
+if test "$ac_cv_c_inline" != no; then
+ AC_DEFINE(HAVE_INLINE)
+fi
+
+AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(size_t)
dnl Check for integral types that can represent the range of pointers.
dnl If these types don't exist on this platform, they are replaced by
dnl "unsigned long" and "long", respectively.
AC_CHECK_HEADERS(stdint.h)
-AC_CHECK_TYPES([uintptr_t, ptrdiff_t])
-
-AC_CACHE_CHECK([for long longs], scm_cv_long_longs,
- AC_TRY_COMPILE(,
- [long long a],
- scm_cv_long_longs=yes,
- scm_cv_long_longs=no))
-if test "$scm_cv_long_longs" = yes; then
- AC_DEFINE(HAVE_LONG_LONGS)
- AC_CHECK_SIZEOF(long long)
-fi
+AC_CHECK_HEADERS(inttypes.h)
+AC_CHECK_SIZEOF(uintptr_t)
+AC_CHECK_SIZEOF(ptrdiff_t)
+
+AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(void *)
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
-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 winsock2.h grp.h sys/utsname.h)
+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)
GUILE_HEADER_LIBC_WITH_UNISTD
AC_TYPE_GETGROUPS
AC_CHECK_LIB(socket, connect)
fi
-# Check for dynamic linking
+dnl
+dnl Check for Winsock and other functionality on Win32 (*not* CygWin)
+dnl
+EXTRA_DEFS=""
+if test "$MINGW32" = "yes" ; then
+ AC_CHECK_HEADER(winsock2.h, [AC_DEFINE([HAVE_WINSOCK2_H], 1,
+ [Define if you have the <winsock2.h> header file.])])
+ AC_CHECK_LIB(ws2_32, main)
+ LIBOBJS="$LIBOBJS win32-uname.o win32-dirent.o"
+ if test "$enable_networking" = yes ; then
+ LIBOBJS="$LIBOBJS win32-socket.o"
+ fi
+ if test "$enable_shared" = yes ; then
+ EXTRA_DEFS="-DSCM_IMPORT"
+ AC_DEFINE(USE_DLL_IMPORT, 1,
+ [Define if you need additional CPP macros on Win32 platforms.])
+ fi
+ if test x"$enable_ltdl_install" = x"yes" ; then
+ INCLTDL="-DLIBLTDL_DLL_IMPORT $INCLTDL"
+ fi
+fi
+AC_SUBST(EXTRA_DEFS)
+
+dnl Check for dynamic linking
use_modules=yes
AC_ARG_WITH(modules,
done
fi
fi
+
AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)
AC_SUBST(DLPREOPEN)
### we'd like to return it; otherwise, we'll fake it.
AC_CACHE_CHECK([return type of usleep], guile_cv_func_usleep_return_type,
[AC_EGREP_HEADER(changequote(<, >)<void[ ]+usleep>changequote([, ]),
- /usr/include/unistd.h,
+ unistd.h,
[guile_cv_func_usleep_return_type=void],
[guile_cv_func_usleep_return_type=int])])
case "$guile_cv_func_usleep_return_type" in
AC_DEFINE(HAVE_H_ERRNO)
fi
-AC_MSG_CHECKING(whether netdb.h defines uint32_t)
+AC_MSG_CHECKING(whether uint32_t is defined)
AC_CACHE_VAL(guile_cv_have_uint32_t,
-[AC_TRY_COMPILE([#include <netdb.h>],
-[uint32_t a;],
-guile_cv_have_uint32_t=yes, guile_cv_have_uint32_t=no)])
+ [AC_TRY_COMPILE([#include <sys/types.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+ #ifndef __MINGW32__
+ #include <netdb.h>
+ #endif],
+ [uint32_t a;],
+ guile_cv_have_uint32_t=yes, guile_cv_have_uint32_t=no)])
AC_MSG_RESULT($guile_cv_have_uint32_t)
if test $guile_cv_have_uint32_t = yes; then
AC_DEFINE(HAVE_UINT32_T)
test "$ac_cv_header_rx_rxposix_h" = yes; then
GUILE_NAMED_CHECK_FUNC(regcomp, norx, [LIBOBJS="regex-posix.o $LIBOBJS"],
[AC_CHECK_LIB(rx, main)
- GUILE_NAMED_CHECK_FUNC(regcomp, rx, [LIBOBJS="regex-posix.o $LIBOBJS"])]
+ GUILE_NAMED_CHECK_FUNC(regcomp, rx, [LIBOBJS="regex-posix.o $LIBOBJS"],
+ [AC_CHECK_LIB(regex, main)
+ GUILE_NAMED_CHECK_FUNC(regcomp, regex, [LIBOBJS="regex-posix.o $LIBOBJS"])])]
)
dnl The following should not be necessary, but for some reason
dnl autoheader misses it if we don't include it!
if test "$ac_cv_func_regcomp_norx" = yes ||
+ test "$ac_cv_func_regcomp_regex" = yes ||
test "$ac_cv_func_regcomp_rx" = yes; then
AC_DEFINE(HAVE_REGCOMP)
fi
AC_DEFINE(GUILE_ISELECT, 1)
fi
- ## Workaround for linuxthreads (currently disabled)
- if test $host_os = linux-gnu; then
+ AC_ARG_ENABLE(linuxthreads,
+ [ --disable-linuxthreads disable linuxthreads workaround],,
+ enable_linuxthreads=yes)
+
+ ## Workaround for linuxthreads (optionally disabled)
+ if test $host_os = linux-gnu -a "$enable_linuxthreads" = yes; then
AC_DEFINE(GUILE_PTHREAD_COMPAT, 1)
AC_CHECK_LIB(pthread, main)
fi
fi
-AC_SUBST(LIBGUILEQTHREADS_MAJOR_VERSION)
-AC_SUBST(LIBGUILEQTHREADS_MINOR_VERSION)
-AC_SUBST(LIBGUILEQTHREADS_REVISION_VERSION)
-AC_SUBST(LIBGUILEQTHREADS_VERSION)
## If we're using GCC, ask for aggressive warnings.
case "$GCC" in
AC_PROG_AWK
+## Remove fileblocks.o from the object list. This file gets added by
+## the Autoconf macro AC_STRUCT_ST_BLOCKS. But there is no need.
+LIBOBJS="`echo ${LIBOBJS} | sed 's/fileblocks\.o//g'`"
+
## If we're creating a shared library (using libtool!), then we'll
## need to generate a list of .lo files corresponding to the .o files
## given in LIBOBJS. We'll call it LIBLOBJS.
AC_SUBST(GUILE_MINOR_VERSION)
AC_SUBST(GUILE_MICRO_VERSION)
AC_SUBST(GUILE_VERSION)
-AC_SUBST(LIBGUILE_MAJOR_VERSION)
-AC_SUBST(LIBGUILE_MINOR_VERSION)
-AC_SUBST(LIBGUILE_REVISION_VERSION)
-AC_SUBST(LIBGUILE_VERSION)
+
+#######################################################################
+# library versioning
+
+AC_SUBST(LIBQTHREADS_INTERFACE_CURRENT)
+AC_SUBST(LIBQTHREADS_INTERFACE_REVISION)
+AC_SUBST(LIBQTHREADS_INTERFACE_AGE)
+AC_SUBST(LIBQTHREADS_INTERFACE)
+
+AC_SUBST(LIBGUILE_INTERFACE_CURRENT)
+AC_SUBST(LIBGUILE_INTERFACE_REVISION)
+AC_SUBST(LIBGUILE_INTERFACE_AGE)
+AC_SUBST(LIBGUILE_INTERFACE)
+
+AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_CURRENT)
+AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_REVISION)
+AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_AGE)
+AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE)
+
+AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_CURRENT)
+AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_REVISION)
+AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_AGE)
+AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE)
+
+#######################################################################
dnl Tell guile-config what flags guile users should link against.
GUILE_LIBS="$LDFLAGS $THREAD_LIBS_INSTALLED $LIBS"
AC_SUBST(EXTRA_DOT_DOC_FILES)
AC_SUBST(EXTRA_DOT_X_FILES)
+dnl See also top_builddir in info node: (libtool)AC_PROG_LIBTOOL
+top_builddir_absolute=`pwd`
+AC_SUBST(top_builddir_absolute)
+top_srcdir_absolute=`(cd $srcdir ; pwd)`
+AC_SUBST(top_srcdir_absolute)
+
AC_CONFIG_FILES([
Makefile
+ am/Makefile
libguile/Makefile
libguile/guile-snarf
libguile/guile-doc-snarf
libguile/guile-func-name-check
libguile/guile-snarf-docs
- libguile/guile-snarf-docs-texi
- libguile/versiondat.h
+ libguile/version.h
ice-9/Makefile
+ lang/Makefile
+ lang/elisp/Makefile
+ lang/elisp/internals/Makefile
+ lang/elisp/primitives/Makefile
oop/Makefile
oop/goops/Makefile
scripts/Makefile
qt/time/Makefile
guile-config/Makefile
doc/Makefile
+ doc/ref/Makefile
+ doc/tutorial/Makefile
+ doc/goops/Makefile
+ doc/r5rs/Makefile
examples/Makefile
examples/scripts/Makefile
examples/box/Makefile
examples/box-dynamic-module/Makefile
examples/modules/Makefile
examples/safe/Makefile
+ test-suite/Makefile
check-guile
- guile-tools])
+ guile-tools
+ pre-inst-guile])
AC_CONFIG_COMMANDS(default,
[ chmod +x libguile/guile-snarf \
libguile/guile-doc-snarf \
libguile/guile-func-name-check \
libguile/guile-snarf-docs \
- libguile/guile-snarf-docs-texi \
check-guile \
- guile-tools])
+ guile-tools \
+ pre-inst-guile])
AC_OUTPUT