+1998-12-23 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
+
+ * doc/PLATFORMS: added my cygwin32 box (i686-pc-cygwin32).
+
+ * TODO: remind myself of the win32 tasks remaining.
+
+ * ltconfig.in (archive_cmds, archive_sym_cmds,
+ old_archive_from_new_cmds): Fixed a bug which left an a.exe in the
+ build directory. Fixed a bug where $soname-def was never deleted.
+
+ * ltconfig.in (file_magic_command): new variable holds the command
+ (including any args) to run to generate the string to match
+ against the regex in $file_magic. Use the variable where
+ necessary. Added to libtool header output.
+ (deplibs_check_method): use file_magic for win32, but compare the
+ output of `objdump -f' with the regex (see below).
+ (archive_cmds, archive_sym_cmds): use compile_dependencylibs for
+ each $CC invokation (see below).
+
+ * ltmain.in: Set allow_undefined to `no' for win32 variants by
+ default, otherwise it is impossible to link a dll without forcing
+ the makefile maintainer to figure out whether to pass
+ --no-undefined at every libtool invokation.
+ (compile_dependencylibs): save the list of dependency library
+ flags needed for a deplib build on win32.
+ (link_against_libtool_libs): commented out the check for this; if
+ it is left in, then ltlibs (i.e. *.la files) cannot be deplibs for
+ subsequent links.
+ Don't add -lc to the deplibs line for win32 platforms (which don't
+ have a libc as such).
+ (file_magic_command): use this to get some output to compare with
+ the file_magic regex (instead of hardcoding `file' which doesn't
+ exist on win32.
+ * doc/libtool.texi (Porting inter-library dependencies): Updated
+ to document the changes above.
+
+ * ltconfig.in (deplibs_check_method): Changed the file_magic regex
+ to match more linux variants. This is less lenient than Thomas
+ Tanner's commit to fix the same problem below.
+ Reported by Joel Klecker <espy@debian.org>
+ * THANKS: added Joel Klecker <espy@debian.org>
+
1998-12-23 Thomas Tanner <tanner@gmx.de>
* ltconfig.in: fixed file-magic for Linux shared libraries
* libltdl/configure.in: warn if dlopen is not supported
* mdemo/Makefile.am (mdemo.debug): use libltdls
+1998-12-22 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
+
+ * ltconfig.in: revert Thomas Tanners change to create all
+ libraries without the `lib' prefix on win32, otherwise `gcc foo.c
+ -lbar' can't find libbar.a.
+
1998-12-22 Alexandre Oliva <oliva@dcc.unicamp.br>
* Makefile.am (SUBDIRS): prepend `.' to avoid am-recursive
1998-12-21 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* libtool.m4 (AM_SYS_NM_PARSE): apparently __ptr_t is predefined
- on some systems - use lt_ptr_t instead.
+ on some systems - use lt_ptr_t instead.
* ltconfig.in: ditto.
* ltmain.in: ditto.
* demo/dlmain.c (main): No need to specialcase underscores in
dld_preloaded_symbols - it is fixed by symxfrm above!
* libltdl/configure.in: use AM_SYS_SYMBOL_UNDERSCORE from
- libtool.m4 rather than reincent the wheel here =)O|
+ libtool.m4 rather than reinvent the wheel here =)O|
* ltmain.in: Fix deplibs methods to not rely on a.out (cygwin
uses a.exe!).
return TRUE;
}
' > ltdll.c
- archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
- $DLLTOOL --export-all --output-def $lib-def $libobjs ltdll.$objext~
- $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $soname-def~
+ $DLLTOOL --export-all --output-def $soname-def $libobjs ltdll.$objext~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
$rm ltdll.$objext $soname-base $soname-exp'
- archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
- cat "$export_symbols" >> $lib-def~
- $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $soname-def~
+ cat "$export_symbols" >> $soname-def~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
$rm ltdll.$objext $soname-base $soname-exp'
- old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib-def --output-lib $objdir/$libname.a~$rm $lib.exp'
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a~$rm $soname-def'
else
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
return TRUE;
}
' > ltdll.c
- archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
- $DLLTOOL --export-all --output-def $lib-def $libobjs ltdll.$objext~
- $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
- $rm ltdll.$objext $soname-base $soname-exp'
- archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
- cat "$export_symbols" >> $lib-def~
- $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
- $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
- $rm ltdll.$objext $soname-base $soname-exp'
- old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib-def --output-lib $objdir/$libname.a~$rm $lib.exp'
+ archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $soname-def~
+ $DLLTOOL --export-all --output-def $soname-def $libobjs ltdll.$objext~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $rm ltdll.$objext $soname-base $soname-exp $soname-def'
+ archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $soname-def~
+ cat "$export_symbols" >> $soname-def~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $soname-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$compile_dependencylibs~
+ $rm ltdll.$objext $soname-base $soname-exp $soname-def'
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a~$rm $soname-def'
else
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_search_path="/lib /usr/lib /usr/local/lib"
+file_magic_command=
deplibs_check_method='none'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'file_regex' -- check by looking for filenames that look like the shared
# library in the library path.
# 'file_magic [regex]' -- check by looking for files in library path which
-# responds to the "file" command with a given regex. This is actually a
-# superset of the file_regex command. If you have file on your system, you'll
-# want to use this instead.
-# Notes: regexes are run through expr.
-
+# responds to the $file_magic_command with a given regex. This is actually a
+# superset of the file_regex command. If you have `file' or equivalent on
+# your system, you'll want to use this instead.
+# Notes: regexs are run through expr.
echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
case "$host_os" in
aix3* | aix4*)
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
fi
dynamic_linker='Win32 ld.exe'
- libname_spec='$name'
+ deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
+ file_magic_command='objdump -f'
need_lib_prefix=no
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
soname_spec='${libname}${release}.so$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
- deplibs_check_method='file_magic ELF .* shared object'
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ file_magic_command=file
sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`"
if test -f /lib/ld.so.1; then
whole_archive_flag_spec libname_spec library_names_spec soname_spec \
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
old_postuninstall_cmds archive_cmds archive_sym_cmds postinstall_cmds postuninstall_cmds \
- deplibs_check_method allow_undefined_flag no_undefined_flag \
+ file_magic_command deplibs_check_method allow_undefined_flag no_undefined_flag \
finish_cmds finish_eval global_symbol_pipe \
hardcode_libdir_flag_spec hardcode_libdir_separator sys_lib_search_path \
compiler_c_o compiler_o_lo need_locks; do
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$deplibs_check_method
+# Command to use when deplibs_check_method == file_magic
+file_magic_command=$file_magic_command
+
# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=$allow_undefined_flag
modename="$modename: link"
C_compiler="$CC" # save it, to compile generated C sources
CC="$nonopt"
- allow_undefined=yes
+ case "$host" in
+ *-*-cygwin32* | *-*-mingw32* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ allow_undefined=no
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
compile_command="$CC"
finalize_command="$CC"
immediate | unsupported)
if test "$hardcode_direct" = no; then
compile_command="$compile_command $dir/$linklib"
+ case "$host" in
+ *-*-cygwin32* | *-*-mingw32* | *-*-os2*)
+ compile_dependencylibs="$compile_dependencylibs -L$dir -l$name"
+ ;;
+ esac
elif test "$hardcode_minus_L" = no; then
case "$host" in
*-*-sunos*)
exit 1
fi
+ # If the following section is uncommented, then it is impossible to
+ # link with ltlibrary deplibs...
+
# How the heck are we supposed to write a wrapper for a shared library?
- if test -n "$link_against_libtool_libs"; then
- $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
- exit 1
- fi
+ #if test -n "$link_against_libtool_libs"; then
+ # $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
+ # exit 1
+ #fi
if test -n "$dlfiles$dlprefiles"; then
$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
allow_undefined_flag="$no_undefined_flag"
fi
- # Add libc to deplibs on all systems.
dependency_libs="$deplibs"
- deplibs="$deplibs -lc"
+ case "$host" in
+ *-*-cygwin32* | *-*-mingw32* | *-*-os2*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *)
+ # Add libc to deplibs on all other systems.
+ deplibs="$deplibs -lc"
+ ;;
+ esac
fi
# Create the output directory, or remove our outputs if we need to.
## Gordon: Do you check for the existence of the libraries in deplibs
## on the system? That should maybe be merged in here someplace....
## Actually: I think test_compile and file_magic do this... file_regex
- ## sorta does this. Only pas_all needs to be changed. -Toshio
+ ## sorta does this. Only pass_all needs to be changed. -Toshio
name_save=$name
libname_save=$libname
release_save=$release
# strict. What do you think Gordon?
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
for potent_lib in $potential_libs; do
- file_output=`file $potent_lib`
+ file_output=`eval $file_magic_command $potent_lib`
if test `expr "$file_output" : ".*$file_magic_regex"` -ne 0 ; then
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""