This helps to avoid stupid libtool issues
if test "${with_system_libltdl+set}" = set; then
withval=$with_system_libltdl;
LIBLTDL="-lltdl"
-INCLTDL=
+INCLTDL=-DWITH_SYSTEM_LTDL
LTDL_SUBDIRS=
else
[ --with-system-libltdl Use the libltdl installed in your system (default=use our own)],
[
LIBLTDL="-lltdl"
-INCLTDL=
+INCLTDL=-DWITH_SYSTEM_LTDL
LTDL_SUBDIRS=
enable_ltdl_install=no
],
#endif
#ifndef WITHOUT_LIBLTDL
+#ifdef WITH_SYSTEM_LTDL
#include "ltdl.h"
+#else
+#include "libltdl/ltdl.h"
+#endif
#endif
#ifdef __cplusplus