aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--config/open-axiom.m445
-rwxr-xr-xconfigure72
-rw-r--r--configure.ac36
-rw-r--r--configure.ac.pamphlet50
5 files changed, 86 insertions, 122 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b03cf83..5e744c14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-15 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * config/open-axiom.m4 (OPENAXIOM_DYNAMIC_MODULE_SUPPORT): New.
+ * configure.ac.pamphlet: Use it.
+
2010-08-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
* config/var-def.mk (CPPFLAGS): New expanded variable.
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index e868a77b..34338aaa 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -432,3 +432,48 @@ AC_DEFINE_UNQUOTED([OPENAXIOM_HOST_LISP_PRECISION],
[$openaxiom_host_lisp_precision],
[The width of the host Lisp and CPU registers.])
])
+
+dnl --------------------------------------
+dnl -- OPENAXIOM_DYNAMIC_MODULE_SUPPORT --
+dnl --------------------------------------
+dnl Infer compiler flags and file extensions associated
+dnl with dynamic module support.
+dnl We need to link some C object files into in the Lisp images we
+dnl use. Some Lisps (e.g. GCL, ECL) support inclusion of ``ordinary''
+dnl object files. Other Lisps (e.g. SBCL, Clozure CL) support only dynamic
+dnl or shared libraries. However, the exact minutia of portably
+dnl building shared libraries are known to be fraught with all kinds
+dnl of traps. Consequently, we sought to use dedicated tools such
+dnl Libtool. Unfortunately, Libtool has been steadily improved over the years
+dnl to become nearly useless when mixed with non-libtool components.
+AC_DEFUN([OPENAXIOM_DYNAMIC_MODULE_SUPPORT],[
+AC_SUBST(oa_use_libtool_for_shared_lib)
+AC_SUBST(oa_shrobj_flags)
+AC_SUBST(oa_shrlib_flags)
+oa_use_libtool_for_shared_lib=no
+oa_shrobj_flags=
+oa_shrlib_flags=
+## Tell Libtool to assume `dlopen' so that it does not have to
+## emulate it.
+LT_INIT([pic-only dlopen win32-dll shared])
+AC_SUBST([LIBTOOL_DEPS])
+# Give me extension of libraries
+AC_SUBST(shared_ext)
+AC_SUBST(libext)
+module=yes
+eval shared_ext=\"$shrext_cmds\"
+case $host in
+ *mingw*|*cygwin*)
+ oa_shrobj_flags='-prefer-pic'
+ oa_shrlib_flags="-shared --export-all-symbols"
+ ;;
+ *darwin*)
+ oa_shrobj_flags='-dynamic'
+ oa_shrlib_flags='-bundle -undefined suppress -flat_namespace'
+ ;;
+ *)
+ oa_shrobj_flags='-prefer-pic'
+ oa_shrlib_flags='-shared'
+ ;;
+esac
+])
diff --git a/configure b/configure
index 09f1c2f3..50487704 100755
--- a/configure
+++ b/configure
@@ -834,9 +834,6 @@ INSTALL_PROGRAM
MAKE
oa_editor
axiom_src_subdirs
-oa_shrlib_flags
-oa_shrobj_flags
-oa_use_libtool_for_shared_lib
libext
shared_ext
LIBTOOL_DEPS
@@ -861,6 +858,9 @@ LIBTOOL
OBJDUMP
DLLTOOL
AS
+oa_shrlib_flags
+oa_shrobj_flags
+oa_use_libtool_for_shared_lib
EGREP
GREP
axiom_gcl_rsym_hack
@@ -6469,12 +6469,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-
-oa_use_libtool_for_shared_lib=yes
-oa_shrobj_flags=
-oa_shrlib_flags=
-# Tell Libtool to assume `dlopen' so that it does not have to
-# emulate it.
case `pwd` in
*\ * | *\ *)
{ $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -6960,13 +6954,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:6963: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:6957: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:6966: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:6960: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:6969: output\"" >&5)
+ (eval echo "\"\$as_me:6963: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -8168,7 +8162,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8171 "configure"' > conftest.$ac_ext
+ echo '#line 8165 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9648,6 +9642,15 @@ fi
+
+
+oa_use_libtool_for_shared_lib=no
+oa_shrobj_flags=
+oa_shrlib_flags=
+## Tell Libtool to assume `dlopen' so that it does not have to
+## emulate it.
+
+
# Set options
# Check whether --with-pic was given.
@@ -10439,11 +10442,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10442: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10445: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10446: \$? = $ac_status" >&5
+ echo "$as_me:10449: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10778,11 +10781,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10781: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10784: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10785: \$? = $ac_status" >&5
+ echo "$as_me:10788: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10883,11 +10886,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10886: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10889: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10890: \$? = $ac_status" >&5
+ echo "$as_me:10893: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10938,11 +10941,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10941: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10944: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10945: \$? = $ac_status" >&5
+ echo "$as_me:10948: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13738,7 +13741,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13741 "configure"
+#line 13744 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13834,7 +13837,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13837 "configure"
+#line 13840 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15854,11 +15857,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15857: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15860: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15861: \$? = $ac_status" >&5
+ echo "$as_me:15864: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15953,11 +15956,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15956: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15959: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15960: \$? = $ac_status" >&5
+ echo "$as_me:15963: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16005,11 +16008,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16008: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16011: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16012: \$? = $ac_status" >&5
+ echo "$as_me:16015: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16991,17 +16994,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Give me extension of libraries
-module=yes
-eval shared_ext=\"$shrext_cmds\"
-## Don't use Libtool for building actual DLLs on MinGW and Cygwin
-## Libool has been improved to the point of being useless
-## for building in-place shared libraries.
-oa_use_libtool_for_shared_lib=no
+module=yes
+eval shared_ext=\"$shrext_cmds\"
case $host in
*mingw*|*cygwin*)
- # oa_use_libtool_for_shared_lib=no
oa_shrobj_flags='-prefer-pic'
oa_shrlib_flags="-shared --export-all-symbols"
;;
@@ -17016,8 +17014,6 @@ case $host in
esac
-
-
axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc"
diff --git a/configure.ac b/configure.ac
index 26d8a28f..4e8c7af8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,41 +24,7 @@ axiom_build_sharedir=$axiom_builddir/share
OPENAXIOM_HOST_COMPILERS
OPENAXIOM_GCL_HACKS
OPENAXIOM_HOST_DATA_PROPERTIES
-
-oa_use_libtool_for_shared_lib=yes
-oa_shrobj_flags=
-oa_shrlib_flags=
-# Tell Libtool to assume `dlopen' so that it does not have to
-# emulate it.
-LT_INIT([pic-only dlopen win32-dll shared])
-AC_SUBST([LIBTOOL_DEPS])
-# Give me extension of libraries
-module=yes
-eval shared_ext=\"$shrext_cmds\"
-AC_SUBST(shared_ext)
-AC_SUBST(libext)
-## Don't use Libtool for building actual DLLs on MinGW and Cygwin
-## Libool has been improved to the point of being useless
-## for building in-place shared libraries.
-oa_use_libtool_for_shared_lib=no
-case $host in
- *mingw*|*cygwin*)
- # oa_use_libtool_for_shared_lib=no
- oa_shrobj_flags='-prefer-pic'
- oa_shrlib_flags="-shared --export-all-symbols"
- ;;
- *darwin*)
- oa_shrobj_flags='-dynamic'
- oa_shrlib_flags='-bundle -undefined suppress -flat_namespace'
- ;;
- *)
- oa_shrobj_flags='-prefer-pic'
- oa_shrlib_flags='-shared'
- ;;
-esac
-AC_SUBST(oa_use_libtool_for_shared_lib)
-AC_SUBST(oa_shrobj_flags)
-AC_SUBST(oa_shrlib_flags)
+OPENAXIOM_DYNAMIC_MODULE_SUPPORT
axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc"
AC_SUBST(axiom_src_subdirs)
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index 46fb80db..6b89cff8 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -961,53 +961,6 @@ $srcdir/config/move-if-change \
@
-\section{Dynamic and shared libraries}
-
-We need to link some C object files into in the Lisp images we
-use. Some Lisps (e.g. GCL, ECL) support inclusion of ``ordinary''
-object files. Other Lisps (e.g. SBCL) support only dynamic
-or shared libraries. However, the exact minutia of portably
-building shared libraries are known to be fraught with all kinds
-of traps. Consequently, dedicated tools have been developed to
-abstract away from those details. In particular, we rely on
-GNU \Tool{libtool} to take care of that for us.
-<<initialize shared libraries tool>>=
-oa_use_libtool_for_shared_lib=yes
-oa_shrobj_flags=
-oa_shrlib_flags=
-# Tell Libtool to assume `dlopen' so that it does not have to
-# emulate it.
-LT_INIT([pic-only dlopen win32-dll shared])
-AC_SUBST([LIBTOOL_DEPS])
-# Give me extension of libraries
-module=yes
-eval shared_ext=\"$shrext_cmds\"
-AC_SUBST(shared_ext)
-AC_SUBST(libext)
-## Don't use Libtool for building actual DLLs on MinGW and Cygwin
-## Libool has been improved to the point of being useless
-## for building in-place shared libraries.
-oa_use_libtool_for_shared_lib=no
-case $host in
- *mingw*|*cygwin*)
- # oa_use_libtool_for_shared_lib=no
- oa_shrobj_flags='-prefer-pic'
- oa_shrlib_flags="-shared --export-all-symbols"
- ;;
- *darwin*)
- oa_shrobj_flags='-dynamic'
- oa_shrlib_flags='-bundle -undefined suppress -flat_namespace'
- ;;
- *)
- oa_shrobj_flags='-prefer-pic'
- oa_shrlib_flags='-shared'
- ;;
-esac
-AC_SUBST(oa_use_libtool_for_shared_lib)
-AC_SUBST(oa_shrobj_flags)
-AC_SUBST(oa_shrlib_flags)
-@
-
\section{configure.ac}
<<*>>=
@@ -1018,8 +971,7 @@ AC_SUBST(oa_shrlib_flags)
OPENAXIOM_HOST_COMPILERS
OPENAXIOM_GCL_HACKS
OPENAXIOM_HOST_DATA_PROPERTIES
-
-<<initialize shared libraries tool>>
+OPENAXIOM_DYNAMIC_MODULE_SUPPORT
axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc"
AC_SUBST(axiom_src_subdirs)