diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | config/var-def.mk | 12 | ||||
-rwxr-xr-x | configure | 67 | ||||
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | configure.ac.pamphlet | 13 | ||||
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/lib/Makefile.in | 11 |
7 files changed, 93 insertions, 34 deletions
@@ -1,3 +1,10 @@ +2008-04-04 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * configure.ac.pamphlet: Disable Libtool for building shared + libraries on MinGW and Cygwin. + * config/var-def.mk (SHREXT): Tidy. + (LINK_SHRLIB): New. + 2008-04-01 Gabriel Dos Reis <gdr@cs.tamu.edu> * configure.ac.pamphlet: Automatically detect SBCL or Clisp. diff --git a/config/var-def.mk b/config/var-def.mk index ccd0c721..3a4efcc9 100644 --- a/config/var-def.mk +++ b/config/var-def.mk @@ -56,7 +56,7 @@ CFLAGS = @CFLAGS@ OBJEXT = @OBJEXT@ EXEEXT = @EXEEXT@ # this includes leading period -SHREXT = @shrext_cmds@ +SHREXT = @shared_ext@ # this does not include period LIBEXT = @libext@ @@ -74,6 +74,16 @@ COMPILE = $(LIBTOOL) --mode=compile $(CC) -c ## This situation is to be fixed when I have time. LINK = $(LIBTOOL) --mode=link $(CC) -static +## Libtool is a disaster for building DLLs on Cygwin, and insists +## on adding silly extensions where it should not on MinGW, so we have +## to be very selective about when and where to use. Sadly, that ends +## up negating the whole point of having Libtool in the first place. +ifeq (@oa_use_libtool_for_shared_lib@,no) +LINK_SHRLIB = $(CC) -shared +else +LINK_SHRLIB = $(LIBTOOL) --mode=link $(CC) -shared -module +endif + AUTOCONF = autoconf AWK = @AWK@ @@ -826,8 +826,9 @@ FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS -shrext_cmds +shared_ext libext +oa_use_libtool_for_shared_lib axiom_enable_checking axiom_optimize_options axiom_src_subdirs @@ -1988,6 +1989,7 @@ ac_config_headers="$ac_config_headers config/axiom-c-macros.h" +oa_use_libtool_for_shared_lib=yes # Tell Libtool to assume `dlopen' so that it does not have to # emulate it. @@ -3790,7 +3792,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3793 "configure"' > conftest.$ac_ext + echo '#line 3795 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6935,11 +6937,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:6938: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6940: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6942: \$? = $ac_status" >&5 + echo "$as_me:6944: \$? = $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. @@ -7203,11 +7205,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:7206: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7208: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7210: \$? = $ac_status" >&5 + echo "$as_me:7212: \$? = $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. @@ -7307,11 +7309,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:7310: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7312: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7314: \$? = $ac_status" >&5 + echo "$as_me:7316: \$? = $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 @@ -9759,7 +9761,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9762 "configure" +#line 9764 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9859,7 +9861,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9862 "configure" +#line 9864 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12227,11 +12229,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:12230: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12232: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12234: \$? = $ac_status" >&5 + echo "$as_me:12236: \$? = $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. @@ -12331,11 +12333,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:12334: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12336: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12338: \$? = $ac_status" >&5 + echo "$as_me:12340: \$? = $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 @@ -13901,11 +13903,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:13904: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13906: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13908: \$? = $ac_status" >&5 + echo "$as_me:13910: \$? = $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. @@ -14005,11 +14007,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:14008: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14010: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14012: \$? = $ac_status" >&5 + echo "$as_me:14014: \$? = $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 @@ -16235,11 +16237,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:16238: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16240: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16242: \$? = $ac_status" >&5 + echo "$as_me:16244: \$? = $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. @@ -16503,11 +16505,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:16506: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16508: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16510: \$? = $ac_status" >&5 + echo "$as_me:16512: \$? = $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. @@ -16607,11 +16609,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:16610: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16612: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16614: \$? = $ac_status" >&5 + echo "$as_me:16616: \$? = $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 @@ -19303,8 +19305,18 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Give me extension of libraries +eval shared_ext=\"$shrext_cmds\" +# Don't use Libtool for building actual DLLs on MinGW and Cygwin +case $host in + *mingw*|*cygwin*) + oa_use_libtool_for_shared_lib=no + ;; + *) + ;; +esac + axiom_optimize_options=speed ## Shall we proclaim safety? @@ -26080,8 +26092,9 @@ FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim LIBTOOL_DEPS!$LIBTOOL_DEPS$ac_delim -shrext_cmds!$shrext_cmds$ac_delim +shared_ext!$shared_ext$ac_delim libext!$libext$ac_delim +oa_use_libtool_for_shared_lib!$oa_use_libtool_for_shared_lib$ac_delim axiom_enable_checking!$axiom_enable_checking$ac_delim axiom_optimize_options!$axiom_optimize_options$ac_delim axiom_src_subdirs!$axiom_src_subdirs$ac_delim @@ -26104,7 +26117,6 @@ MAKEINDEX!$MAKEINDEX$ac_delim NOTANGLE!$NOTANGLE$ac_delim NOWEAVE!$NOWEAVE$ac_delim AXIOM_LISP!$AXIOM_LISP$ac_delim -axiom_include_gcl!$axiom_include_gcl$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -26146,6 +26158,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +axiom_include_gcl!$axiom_include_gcl$ac_delim axiom_lisp_flavor!$axiom_lisp_flavor$ac_delim axiom_gcl_rsym_hack!$axiom_gcl_rsym_hack$ac_delim axiom_quiet_flags!$axiom_quiet_flags$ac_delim @@ -26178,7 +26191,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index 6f1873b2..0400145b 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,7 @@ AC_PREREQ([2.60]) AC_CONFIG_SRCDIR(src/Makefile.pamphlet) +oa_use_libtool_for_shared_lib=yes # Tell Libtool to assume `dlopen' so that it does not have to # emulate it. AC_LIBTOOL_DLOPEN @@ -18,8 +19,18 @@ AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) # Give me extension of libraries -AC_SUBST(shrext_cmds) +eval shared_ext=\"$shrext_cmds\" +AC_SUBST(shared_ext) AC_SUBST(libext) +# Don't use Libtool for building actual DLLs on MinGW and Cygwin +case $host in + *mingw*|*cygwin*) + oa_use_libtool_for_shared_lib=no + ;; + *) + ;; +esac +AC_SUBST(oa_use_libtool_for_shared_lib) axiom_optimize_options=speed ## Shall we proclaim safety? diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 4b1000a3..36707652 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -1214,6 +1214,7 @@ 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 # Tell Libtool to assume `dlopen' so that it does not have to # emulate it. AC_LIBTOOL_DLOPEN @@ -1221,8 +1222,18 @@ AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) # Give me extension of libraries -AC_SUBST(shrext_cmds) +eval shared_ext=\"$shrext_cmds\" +AC_SUBST(shared_ext) AC_SUBST(libext) +# Don't use Libtool for building actual DLLs on MinGW and Cygwin +case $host in + *mingw*|*cygwin*) + oa_use_libtool_for_shared_lib=no + ;; + *) + ;; +esac +AC_SUBST(oa_use_libtool_for_shared_lib) @ \section{configure.ac} diff --git a/src/ChangeLog b/src/ChangeLog index dd6ee975..cddbd22d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-04-04 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * lib/Makefile.in (libopen_axiom_core_objects): Tidy. + 2008-04-03 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/postpar.boot (postBootNotEqual): New. Disallow `^=' in diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index 419bd1c5..20668fec 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -52,7 +52,11 @@ libspad_SOURCES = $(foreach comp, \ unused_SOURCES = emupty.c libopen_axiom_core_SOURCES = $(core_SOURCES) +ifeq (@oa_use_libtool_for_shared_lib@,no) libopen_axiom_core_objects = $(libopen_axiom_core_SOURCES:.c=.$(OBJEXT)) +else +libopen_axiom_core_objects = $(libopen_axiom_core_SOURCES:.c=.lo) +endif libspad_objects = $(libspad_SOURCES:.c=.lo) subdir = src/lib/ @@ -72,8 +76,7 @@ stamp: $(axiom_target_libdir)/libopen-axiom-core$(SHREXT) \ $(axiom_target_libdir)/libopen-axiom-core$(SHREXT): \ $(libopen_axiom_core_objects) $(mkinstalldirs) $(axiom_target_libdir) - $(CC) -shared --export-all-symbols -o \ - $@ $(libopen_axiom_core_objects) \ + $(LINK_SHRLIB) -o $@ $(libopen_axiom_core_objects) \ @axiom_c_runtime_extra@ -lm libopen-axiom-core.$(LIBEXT): $(libopen_axiom_core_SOURCES:.c=.lo) @@ -93,11 +96,11 @@ libspad.$(LIBEXT): $(libspad_objects) # we don't need to remove the produced objects in mostlyclean. # The remoal is done by clean. mostlyclean-local: - @rm -f *.$(OBJEXT) + @rm -f *.$(OBJEXT) *.lo clean-local: mostlyclean-local @rm -f $(axiom_target_libdir)/libopen-axiom-core$(SHREXT) - @rm -f libopen-axiom-core$(LIBEXT) + @rm -f libopen-axiom-core.$(LIBEXT) @rm -f libspad.$(LIBEXT) @rm -fr .libs _libs @rm -f stamp |