* configure.in: Make "--with-modules=yes" the default. Do not
authorMarius Vollmer <mvo@zagadka.de>
Mon, 10 Jan 2000 00:32:37 +0000 (00:32 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Mon, 10 Jan 2000 00:32:37 +0000 (00:32 +0000)
clear INCLTDL, LIBLTDL prior to processing "--with-modules".
* configure.in: replace --enable-dynamic-linking with
--with-modules, required modules can be specified using
--with-modules="/path/to/mod.la" and will be linked
statically on platforms that don't support dynamic loading,
configure libltdl, configure libtool for dlopening

configure.in

index 89a7fb6..9745e77 100644 (file)
@@ -40,10 +40,6 @@ AC_CONFIG_SUBDIRS(guile-readline)
 #
 #--------------------------------------------------------------------
 
-AC_ARG_ENABLE(dynamic-linking,
-  [  --enable-dynamic-linking  include support for dynamic linking],,
-  enable_dynamic_linking=yes)
-
 AC_ARG_ENABLE(guile-debug,
   [  --enable-guile-debug    include internal debugging functions],
   if test "$enable_guile_debug" = y || test "$enable_guile_debug" = yes; then
@@ -96,8 +92,12 @@ fi
 
 #--------------------------------------------------------------------
 
+AC_LIBLTDL_CONVENIENCE
+AC_CONFIG_SUBDIRS(libltdl)
+
 AC_PROG_CC
 AC_PROG_CPP
+AC_LIBTOOL_DLOPEN
 
 AC_AIX
 AC_ISC_POSIX
@@ -140,34 +140,28 @@ if test $ac_cv_func_connect = no; then
     AC_CHECK_LIB(socket, connect)
 fi
 
-# Checks for dynamic linking
+# Check for dynamic linking
 
-if test "$enable_dynamic_linking" = "yes"; then
-
-AC_CHECK_LIB(dl,dlopen)
-if test "$ac_cv_lib_dl_dlopen" = "yes"; then
-  AC_CHECK_FUNCS(dlopen)
-  AC_DEFINE(DYNAMIC_LINKING)
-else
-AC_CHECK_LIB(dld,dld_link)
-if test "$ac_cv_lib_dld_dld_link" = "yes"; then
-  AC_DEFINE(DYNAMIC_LINKING)
-else
-AC_CHECK_FUNCS(shl_load)
-if test "$ac_cv_func_shl_load" = "yes"; then
-  AC_DEFINE(DYNAMIC_LINKING)
-else
-AC_CHECK_FUNCS(dlopen)
-if test "$ac_cv_func_dlopen" = "yes"; then
+use_modules=yes
+AC_ARG_WITH(modules,
+[  --with-modules[=FILES]  Add support for dynamic modules],
+use_modules="$withval")
+test -z "$use_modules" && use_modules=yes
+DLPREOPEN=
+if test "$use_modules" != no; then
   AC_DEFINE(DYNAMIC_LINKING)
+  if test "$use_modules" = yes; then
+    DLPREOPEN="-dlpreopen force"
+  else
+    DLPREOPEN="-export-dynamic"
+    for module in $use_modules; do
+      DLPREOPEN="$DLPREOPEN -dlopen $module"
+    done
+  fi
 fi
-fi
-fi
-fi
-
-fi
-
-GUILE_DLSYM_USCORE
+AC_SUBST(INCLTDL)
+AC_SUBST(LIBLTDL)
+AC_SUBST(DLPREOPEN)
 
 AC_CHECK_FUNCS(ctermid ftime 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 bzero strdup system usleep atexit on_exit)