From: Alexandre Oliva Date: Thu, 29 Apr 1999 08:08:04 +0000 (+0000) Subject: * libltdl/Makefile.am (ltdl.lo): Add dependencies. X-Git-Tag: release-1-3~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f649375e18ff8bcdd0111decd2e34e1da9e705d8;p=thirdparty%2Flibtool.git * libltdl/Makefile.am (ltdl.lo): Add dependencies. * libltdl/configure.in: Clean up some duplicate defines. * libltdl/acconfig.h: New file. Add #undefs for defines that would be duplicated. --- diff --git a/ChangeLog b/ChangeLog index 72e0df814..66ac51f43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-04-29 Alexandre Oliva + + * libltdl/Makefile.am (ltdl.lo): Add dependencies. + * libltdl/configure.in: Clean up some duplicate defines. + * libltdl/acconfig.h: New file. Add #undefs for defines that + would be duplicated. + 1999-04-29 Gary V. Vaughan * libtool.m4 (cygwin*|mingw*, DLLTOOL, OBJDUMP, AS): Only expand the diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am index 22dfc45bd..94e45f8b9 100644 --- a/libltdl/Makefile.am +++ b/libltdl/Makefile.am @@ -20,6 +20,9 @@ libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c libltdlc_la_LIBADD = $(LIBADD_DL) +## Because we do not have automatic dependency tracking: +ltdl.lo: ltdl.h config.h + $(OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck diff --git a/libltdl/acconfig.h b/libltdl/acconfig.h new file mode 100644 index 000000000..15f115c74 --- /dev/null +++ b/libltdl/acconfig.h @@ -0,0 +1,12 @@ +/* Some of these are defined here, not in configure.in, because + they're AC_DEFINEd in two different places, which causes two + defines to appear. Some C compilers might now appreciate it... */ + +/* Define if you have the libdl library or equivalent. */ +#undef HAVE_LIBDL + +/* Define if you have the GNU dld library. */ +#undef HAVE_DLD + +/* Define if you have the shl_load function. */ +#undef HAVE_SHL_LOAD diff --git a/libltdl/configure.in b/libltdl/configure.in index 465a1f7aa..1cf26355c 100644 --- a/libltdl/configure.in +++ b/libltdl/configure.in @@ -71,7 +71,8 @@ AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", AC_HEADER_STDC AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) AC_CHECK_HEADERS(string.h strings.h, break) -AC_CHECK_FUNCS(strdup strchr strrchr index rindex) +AC_CHECK_FUNCS(strchr index, break) +AC_CHECK_FUNCS(strrchr rindex, break) AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], libltdl_cv_preloaded_symbols, [dnl @@ -86,29 +87,16 @@ if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then [Define if libtool can extract symbol lists from object files. ]) fi -test_dlerror=no LIBADD_DL= -AC_CHECK_FUNCS(dlopen, [AC_DEFINE(HAVE_LIBDL, 1, - [Define if you have the libdl library or equivalent. ]) dnl - test_dlerror=yes], - [AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, - [Define if you have the libdl library. ]) dnl - LIBADD_DL="-ldl" test_dlerror=yes], - [AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1, - [Define if you have the GNU dld library. ]) dnl - LIBADD_DL="-ldld"], - [AC_CHECK_FUNCS(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, - [Define if you have the shl_load function. ])], - [AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, - [Define if you have the shl_load function. ]) dnl - LIBADD_DL="-ldld"])] - )] - )] - )] -) +AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1)], +[AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1) LIBADD_DL="-ldl"], +[AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1) LIBADD_DL="-ldld"], +[AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1)], +[AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1) LIBADD_DL="-ldld"])] +)])])]) AC_SUBST(LIBADD_DL) -if test "$test_dlerror" = yes; then +if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = yes; then LIBS_SAVE="$LIBS" LIBS="$LIBS $LIBADD_DL" AC_CHECK_FUNCS(dlerror)