Using Apple's legacy object file image functions around NSModule is strongly discouraged and won't work in the future at all.
fi
# Only test for dlopen() if the others didn't work
fi
# Only test for dlopen() if the others didn't work
-if test "${ac_cv_have_plugins}" = "no"; then
+if test "${ac_cv_have_plugins}" = "no" -o "${SYS}" = "darwin"; then
AC_CHECK_HEADERS(dlfcn.h sys/dl.h)
ac_cv_my_have_dlopen=no
AC_CHECK_FUNC(dlopen,
AC_CHECK_HEADERS(dlfcn.h sys/dl.h)
ac_cv_my_have_dlopen=no
AC_CHECK_FUNC(dlopen,
#define MODULE_SHORTCUT_MAX 50
/* The module handle type. */
#define MODULE_SHORTCUT_MAX 50
/* The module handle type. */
-#if defined(HAVE_DL_DYLD)
+#if defined(HAVE_DL_DYLD) && !defined(__x86_64__)
# if defined (HAVE_MACH_O_DYLD_H)
# include <mach-o/dyld.h>
# endif
# if defined (HAVE_MACH_O_DYLD_H)
# include <mach-o/dyld.h>
# endif