-1999-01-22 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
+1999-01-22 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * Makefile.am (ltconfig, ltmain.sh): add ChangeLog Revision to
+ TIMESTAMP
+ * configure.in: get values of PACKAGE and VERSION set by
+ AM_INIT_AUTOMAKE, and extract only TIMESTAMP from the ChangeLog
+
+ * libltdl/ltdl.c (lt_dlopen): if we're reusing a previously opened
+ handle, don't reset its name nor add it to the list, and free the
+ name we have allocated
+ Reported by Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
+
+ * Makefile.am (ltconfig, ltmain.sh, TIMESTAMP): let's not assume
+ anything about the format of the date, just that it does not
+ contain `$'
+
+1999-01-22 Gary V. Vaughan <garyv@oranda.demon.co.uk>
* ltmain.in: Merged Thomas' ild-patch. Untested.
* configure.in: ditto.
* doc/PLATFORMS: ReInsert i686-pc-cygwin32, for the same reason.
* doc/libtool.texi: ReInsert win32 refs, for the same reason.
-1999-01-22 Gary V. Vaughan <garyv@oranda.demon.co.uk>
-
* configure.in (date): echo the version number during
configuration, and show $date for cvs versions.
* For historical reasons: this is when I started writing libtool.
- $Date$
+ $Revision$ $Date$
# Line numbering transliterated from a section in autoconf (Autoconf 2.12).
$(srcdir)/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS)
rm -f ltconfig.T
- date=`sed 's%.*\$$''Date: \([0-9 /]*[0-9:]*\) \$$.*% (\1)%;t;d' \
+ date=`sed 's%.*\$$''Revision: \([^$$]*\) \$$ \$$''Date: \([^$$]*\) \$$.*% (\1 \2)%;t end;d;: end' \
< $(srcdir)/ChangeLog` && \
$(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \
sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
$(srcdir)/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS)
rm -f ltmain.shT
- date=`sed 's%.*\$$''Date: \([0-9 /]*[0-9:]*\) \$$.*% (\1)%;t;d' \
+ date=`sed 's%.*\$$''Revision: \([^$$]*\) \$$ \$$''Date: \([^$$]*\) \$$.*% (\1 \2)%;t end;d;: end' \
< $(srcdir)/ChangeLog` && \
sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
-e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT
AC_INIT(ltmain.in)
+AM_INIT_AUTOMAKE(libtool, 1.2e)
+
# This is a sanity check so we can see which version is used in bug reports.
# It is assumed that we only want to see the date extension for cvs libtool
# versions (i.e. "odd" letters) and not actual alpha releases.
-version=`egrep '^[AM_INIT_AUTOMAKE]' $srcdir/configure.in | \
- sed 's/^.*,//;s/).*$//'`
-date=
+case "$VERSION" in
changequote(,)
-case $version in
*[acegikmoqsuwy])
- date=`sed 's%.*\$''Date: \([0-9 /]*[0-9:]*\) \$.*% (\1)%;t;d' < \
- $srcdir/ChangeLog`
+ TIMESTAMP=`sed 's%.*\$''Revision: \([^$]*\) \$ \$''Date: \([^$]*\) \$.*% (\1 \2)%;t end;d;: end' < ${srcdir}/ChangeLog`
+changequote([,])
+ banner="Configuring $PACKAGE $VERSION$TIMESTAMP"
+ dashes=`echo "$banner" | sed 's/./-/g'`
+
+ # Display an obvious version banner
+ echo
+ echo $dashes
+ echo "$banner"
+ echo $dashes
+ echo
;;
esac
-changequote([,])
-banner="Configuring libtool-$version$date"
-dashes=`echo "$banner" | sed 's/./-/g'`
-
-# Display an obvious version banner
-echo $dashes
-echo "$banner"
-echo $dashes
-echo
-
-AM_INIT_AUTOMAKE(libtool, 1.2e)
-AC_SUBST(pkgdatadir)
aclocaldir='${datadir}/aclocal'
AC_SUBST(aclocaldir)
const char *filename;
{
lt_dlhandle handle = 0;
- char *dir = 0;
+ char *dir = 0, *name = 0;
const char *basename, *ext;
const char *saved_error = last_error;
char *dlname = 0, *old_name = 0;
char *libdir = 0, *deplibs = 0;
char tmp[LTDL_FILENAME_MAX];
- char *name;
FILE *file;
int i;
/* if we can't find the installed flag, it is probably an
#endif
}
if (!file) {
- clean_up_name:
- free(name);
goto clean_up_dir;
}
while (!feof(file)) {
last_error = memory_error;
goto clean_up_vars;
}
+ handle->usage = 0;
if (deplibs && load_deplibs(handle, deplibs)) {
clean_up_handle:
free(handle);
dlname, old_name))
goto clean_up_deplibs;
}
- handle->name = name;
clean_up_vars:
if (dlname)
free(dlname);
if (deplibs)
free(deplibs);
if (!handle)
- goto clean_up_name;
+ goto clean_up_dir;
} else {
/* try to append libtool library extension */
char *newfilename = malloc(strlen(filename)+4);
last_error = memory_error;
goto clean_up_dir;
}
+ handle->usage = 0;
if (tryall_dlopen(&handle, filename)
&& (dir
|| (find_library(&handle, basename, usr_search_path)
}
#endif
}
- handle->name = 0;
}
- handle->usage = 1;
- handle->next = handles;
- handles = handle;
+ if (!handle->usage) {
+ handle->usage = 1;
+ handle->next = handles;
+ handles = handle;
+ handle->name = name;
+ name = 0;
+ }
restore_error:
last_error = saved_error;
clean_up_dir:
if (dir)
free(dir);
+ if (name)
+ free(name);
return handle;
}