Index: configure.ac
===================================================================
--- configure.ac	(revision 5606)
+++ configure.ac	(working copy)
@@ -168,30 +168,25 @@
 AM_DISABLE_STATIC
 AM_PROG_LIBTOOL([dlopen win32-dll])
 LT_LANG([C])
-LT_CONFIG_LTDL_DIR([src/libltdl])
-LTDL_INIT([recursive convenience])
-AC_CONFIG_FILES([src/libltdl/Makefile])
 
-# Workarounds for libtool LT_CONFIG_H bug
-#CPPFLAGS="$CPPFLAGS -I$HWLOC_top_builddir"
-AC_CONFIG_COMMANDS_PRE([LT_CONFIG_H=`expr "$LT_CONFIG_H" : '.*/\(.*\)'`])
+# If we want plugins, look for ltdl.h and libltdl
+LIBLTDL=
+AS_IF([test "$enable_plugins" = "yes"],
+      [AC_CHECK_HEADER([ltdl.h], [],
+          [AC_MSG_WARN([Plugin support requested, but could not find ltdl.h])
+           AC_MSG_ERROR([Cannot continue])])
+       AC_CHECK_LIB([ltdl], [lt_dlopenext], [],
+          [AC_MSG_WARN([Plugin support requested, but could not find libltdl])
+           AC_MSG_ERROR([Cannot continue])])
+      ])
+AC_SUBST(LIBLTDL)
 
 # Add libltdl static-build dependencies to hwloc.pc
 if test "x$hwloc_have_plugins" = xyes; then
-  if test "x$with_included_ltdl" = xno; then
-    HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE $LIBLTDL"
-  fi
+  # JMS What to put here for static builds?
   HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE $lt_cv_dlopen_libs"
 fi
 
-# Is ltdl included?
-HWLOC_LTDL_SUBDIR=
-AS_IF([test "x$with_included_ltdl" = xyes],
-      [HWLOC_LIBLTDL_SUBDIR=libltdl])
-AC_SUBST(HWLOC_LIBLTDL_SUBDIR)
-dnl AM_CONDITIONAL([HWLOC_LTDL_INCLUDED], [test "x$with_included_ltdl" = xyes])
-
-
 # Party on
 AC_OUTPUT
 
Index: src
===================================================================
--- src	(revision 5606)
+++ src	(working copy)

Property changes on: src
___________________________________________________________________
Modified: svn:ignore
## -1,5 +1,4 ##
 .deps
 Makefile.in
 Makefile
-libltdl
 static-components.h
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 5606)
+++ src/Makefile.am	(working copy)
@@ -207,8 +207,6 @@
 AM_CPPFLAGS += $(LTDLINCL)
 libhwloc_la_LDFLAGS += -export-dynamic
 libhwloc_la_LIBADD = $(LIBLTDL)
-libhwloc_la_DEPENDENCIES = $(LTDLDEPS)
-SUBDIRS = $(HWLOC_LIBLTDL_SUBDIR)
 endif
 
 # Embedded library (note the lack of a .so version number -- that
