]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/Makefile.am (ltdl.lo): Add dependencies.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Thu, 29 Apr 1999 08:08:04 +0000 (08:08 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 29 Apr 1999 08:08:04 +0000 (08:08 +0000)
* libltdl/configure.in: Clean up some duplicate defines.
* libltdl/acconfig.h: New file.  Add #undefs for defines that
would be duplicated.

ChangeLog
libltdl/Makefile.am
libltdl/acconfig.h [new file with mode: 0644]
libltdl/configure.in

index 72e0df81417c0afb21a1f48c95c8ab4a3dd144b7..66ac51f436bf8ec0ad5a98c60a7b4e7bd1d0ad2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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
index 22dfc45bda8ae68b055b8083e91b12d7fe27f862..94e45f8b97463900b062c99d8495d2cdb551c595 100644 (file)
@@ -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 (file)
index 0000000..15f115c
--- /dev/null
@@ -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
index 465a1f7aa26a5c7eead5036266b4eae00559e5d6..1cf26355c6567592f082b0c1165581157e6f2554 100644 (file)
@@ -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)