(have-llvect?): Removed, Scheme code will always
[bpt/guile.git] / configure.in
index 0c7568e..2cf1d71 100644 (file)
@@ -47,6 +47,7 @@ AH_TOP(/*GUILE_CONFIGURE_COPYRIGHT*/)
 #
 #--------------------------------------------------------------------
 
+AC_CONFIG_SUBDIRS(libltdl)
 AC_CONFIG_SUBDIRS(guile-readline)
 
 #--------------------------------------------------------------------
@@ -68,8 +69,12 @@ AC_MINIX
 AM_PROG_CC_STDC
 
 AC_LIBTOOL_DLOPEN
+AC_LIBLTDL_INSTALLABLE
 AC_PROG_LIBTOOL
-AC_LIB_LTDL
+
+AC_SUBST(DLPREOPEN)
+AC_SUBST(LTDLINCL)
+AC_SUBST(LIBLTDL)
 
 AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
 AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
@@ -190,13 +195,6 @@ if test "$use_modules" != no; then
    AC_LIBOBJ([dynl])
 fi
 
-SCM_I_GSC_HAVE_ARRAYS=0
-if test "$enable_arrays" = yes; then
-   AC_LIBOBJ([ramap])
-   AC_LIBOBJ([unif])
-   SCM_I_GSC_HAVE_ARRAYS=1
-fi
-
 if test "$enable_posix" = yes; then
    AC_LIBOBJ([filesys])
    AC_LIBOBJ([posix])
@@ -581,12 +579,6 @@ if test "$MINGW32" = "yes" ; then
 fi
 AC_SUBST(EXTRA_DEFS)
 
-# FIXME: check to see if we still need these.
-#AC_SUBST(INCLTDL)
-#AC_SUBST(LIBLTDL)
-
-AC_SUBST(DLPREOPEN)
-
 # Reasons for testing:
 #   crt_externs.h - Darwin specific
 #
@@ -637,6 +629,15 @@ AC_TRY_LINK([#include <gmp.h>],
             [mpz_import (0, 0, 0, 0, 0, 0, 0);] , ,
   [AC_MSG_ERROR([At least GNU MP 4.1 is required, see http://swox.com/gmp])])
 
+dnl i18n tests
+#AC_CHECK_HEADERS([libintl.h])
+#AC_CHECK_FUNCS(gettext)
+#if test $ac_cv_func_gettext = no; then
+#   AC_CHECK_LIB(intl, gettext)
+#fi
+#AC_CHECK_FUNCS([bindtextdomain textdomain])
+AM_GNU_GETTEXT([external], [need-ngettext])
+
 ### Some systems don't declare some functions.  On such systems, we
 ### need to at least provide our own K&R-style declarations.
 
@@ -894,19 +895,23 @@ int main () { return (isinf(0.0) != 0); }],
 AC_MSG_CHECKING([for isnan])
 AC_LINK_IFELSE(
 [#include <math.h>
+#ifdef __MINGW32__
+#define isnan _isnan
+#endif
 int main () { return (isnan(0.0) != 0); }],
   [AC_MSG_RESULT([yes])
    AC_DEFINE(HAVE_ISNAN, 1,
              [Define to 1 if you have the `isnan' macro or function.])],
   [AC_MSG_RESULT([no])])
 
-# When testing for the presence of alloca, we need to add alloca.o
-# explicitly to LIBOBJS to make sure that it is translated to
-# `alloca.lo' for libtool later on.  This can and should be done more cleanly.
+# We must have a proper stack-using alloca in order for stack-copying
+# continuations to work properly.  If we don't find a native one,
+# abort.
+
 AC_FUNC_ALLOCA
 if test "$ALLOCA" = "alloca.o"
 then
-  AC_LIBOBJ([alloca])
+  AC_ERROR([No native alloca found.])
 fi
 
 AC_CHECK_MEMBERS([struct stat.st_rdev])
@@ -997,17 +1002,12 @@ AC_ARG_WITH(threads, [  --with-threads          thread interface],
 
 case "$with_threads" in
   "yes" | "pthread" | "pthreads" | "pthread-threads" | "")
-    AC_CHECK_LIB(pthread, main,
-      LIBS="-lpthread $LIBS"
+    ACX_PTHREAD(CC="$PTHREAD_CC"
+      LIBS="$PTHREAD_LIBS $LIBS"
       SCM_I_GSC_USE_PTHREAD_THREADS=1
       with_threads="pthreads",
       with_threads="null")
       
-    if test $GCC = yes; then
-    AC_DEFINE(_THREAD_SAFE, 1,
-      [Use thread safe versions of GNU Libc functions.])
-    fi
-    
     AC_MSG_CHECKING(if pthread_mutexattr_settype is declared)
     AC_CACHE_VAL(guile_cv_mutexattr_settype_declared,
       [AC_TRY_COMPILE([#include <pthread.h>],
@@ -1184,9 +1184,11 @@ 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"
+dnl Tell guile-config what flags guile users should compile and link with.
+GUILE_LIBS="$LDFLAGS $LIBS"
+GUILE_CFLAGS="$PTHREAD_CFLAGS"
 AC_SUBST(GUILE_LIBS)
+AC_SUBST(GUILE_CFLAGS)
 
 AC_SUBST(AWK)
 AC_SUBST(LIBLOBJS)
@@ -1205,7 +1207,6 @@ AC_SUBST([SCM_I_GSC_GUILE_DEBUG_FREELIST])
 AC_SUBST([SCM_I_GSC_ENABLE_DISCOURAGED])
 AC_SUBST([SCM_I_GSC_ENABLE_DEPRECATED])
 AC_SUBST([SCM_I_GSC_ENABLE_ELISP])
-AC_SUBST([SCM_I_GSC_HAVE_ARRAYS])
 AC_SUBST([SCM_I_GSC_STACK_GROWS_UP])
 AC_SUBST([SCM_I_GSC_C_INLINE])
 AC_CONFIG_FILES([libguile/gen-scmconfig.h])
@@ -1236,8 +1237,6 @@ AC_CONFIG_FILES([
   lang/elisp/Makefile
   lang/elisp/internals/Makefile
   lang/elisp/primitives/Makefile
-  libguile-ltdl/Makefile
-  libguile-ltdl/upstream/Makefile
   libguile/Makefile
   oop/Makefile
   oop/goops/Makefile