From: Gary V. Vaughan Date: Wed, 7 Mar 2001 01:43:27 +0000 (+0000) Subject: From Tor Lillqvist X-Git-Tag: release-1-3d~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d138744bbecefa0597d6c72b52a9ee716ae19cbc;p=thirdparty%2Flibtool.git From Tor Lillqvist * libtool.m4 (export_symbols): On Windows, if the export_symbols file (which has been passed to libtool with the -export-symbols command line switch) already is a .def file, use it as is. --- diff --git a/ChangeLog b/ChangeLog index 5bee81bfd..f2dba2062 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-03-07 Gary V. Vaughan + From Tor Lillqvist + * libtool.m4 (export_symbols): On Windows, if the export_symbols + file (which has been passed to libtool with the -export-symbols + command line switch) already is a .def file, use it as is. + * libtool.m4 (library_names_spec): Using m4 quotes correctly this time around! diff --git a/libtool.m4 b/libtool.m4 index 3f76d4b12..558b79d48 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1272,17 +1272,23 @@ EOF $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~ - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \[$]# in - 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; - *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done~ + archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname-def; + else + echo EXPORTS > $output_objdir/$soname-def; + _lt_hint=1; + cat $export_symbols | while read symbol; do + set dummy \$symbol; + case \[$]# in + 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; + esac; + _lt_hint=`expr 1 + \$_lt_hint`; + done; + fi~ '"$ltdll_cmds"' $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~