+1999-04-29 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * 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 <gary@oranda.demon.co.uk>
* libtool.m4 (cygwin*|mingw*, DLLTOOL, OBJDUMP, AS): Only expand the
--- /dev/null
+/* 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
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
[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)