APPROVE COMMIT
NOTE: This patch has been committed.
configure change omitted for readability. Close readers of the diff may
wonder what’s changed, now that DLSYM_NEEDS_UNDERSCORE isn’t automatically
set when HAVE_SHLIB is set. The answer is; nothing, DLSYM_NEEDS_UNDERSCORE
is respected in sysdll.c and only there, and only within #defines that
reflect that the system’s dynamic library architecture has been detected.
The system’s dynamic library architecture is only detected when
--with-modules is on, and in this case, DLYSYM_NEEDS_UNDERSCORE now gets an
appropriate value when --with-modules is on.
ChangeLog addition:
2011-08-24 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac:
On OS X, if dlopen() is available in dlfcn.h, use it in preference
to dyld; the latter API is deprecated.
Move DLSYM_NEEDS_UNDERSCORE together with HAVE_DLYD, it's not
needed if the dlsym() and dlopen() APIs are being used.
Define REALPATH_CORRECTS_CASE, DEFAULT_FILE_SYSTEM_IGNORE_CASE in
this file, don't define them in terms of HAVE_DYLD in
src/config.h.in.
* configure: Regenerate.
src/ChangeLog addition:
2011-08-24 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in:
Move REALPATH_CORRECTS_CASE, DEFAULT_FILE_SYSTEM_IGNORE_CASE to
../configure.ac rather than implementing them in terms of
HAVE_DYLD here.
diff -r a39cd9dc92ba -r a142ad1a9140 configure.ac
--- a/configure.ac Wed Aug 24 11:22:30 2011 +0100
+++ b/configure.ac Wed Aug 24 23:41:29 2011 +0100
@@ -1475,7 +1475,6 @@
if test "$with_dynamic" = "yes"; then
case "$opsys" in
hpux* ) opsys="${opsys}-shr" ;;
- darwin ) AC_DEFINE(DLSYM_NEEDS_UNDERSCORE) ;;
esac
else dnl "$with_dynamic" = "no"
case "$opsys" in
@@ -3375,6 +3374,13 @@
fi
AC_SUBST(LIBSTDCPP)
+dnl Tell the pathname handling code about a couple of Darwin-specific things
+dnl it needs to know:
+if test "$opsys" = "darwin"; then
+ AC_DEFINE(REALPATH_CORRECTS_CASE)
+ AC_DEFINE(DEFAULT_FILE_SYSTEM_IGNORE_CASE)
+fi
+
dnl This must come before the detection code for anything that is in a module
if test "$with_modules" != "no"; then
AC_MSG_CHECKING([for module support])
@@ -3382,10 +3388,7 @@
case "$opsys" in
mingw* | cygwin* ) have_dl=yes ;;
- darwin ) have_dl=yes
- AC_DEFINE(HAVE_DYLD)
- ;;
- * )
+ *)
dnl Check for the ELFish dlopen()
AC_CHECK_HEADER(dlfcn.h, [
AC_MSG_CHECKING([for dlopen in -lc])
@@ -3406,38 +3409,45 @@
if test "$have_dl" = "yes"; then
AC_DEFINE(HAVE_DLOPEN)
else
- dnl Check for HP/UX shl_load
- AC_CHECK_HEADER(dl.h, [
- AC_MSG_CHECKING([for shl_load in -lc])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dl.h>],
- [shl_load ("", 0, 0);])], [have_dl=yes; AC_MSG_RESULT($have_dl)], [
- AC_MSG_RESULT([no])
- AC_MSG_CHECKING([for shl_load in -ldl])
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -ldld"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dl.h>],
- [shl_load ("", 0, 0);])], [have_dl=yes],
- [LIBS="$ac_save_LIBS"; AC_MSG_RESULT([no])])])])
- if test "$have_dl" = "yes"; then
- AC_DEFINE(HAVE_SHL_LOAD)
- else
- dnl Check for libtool's libltdl
- AC_CHECK_HEADER(ltdl.h, [
- AC_MSG_CHECKING([for lt_dlinit in -lltdl])
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -lltdl"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ltdl.h>],
- [lt_dlinit ();])], [have_dl=yes], [LIBS="$ac_save_LIBS"])])
- AC_MSG_RESULT($have_dl)
- if test "$have_dl" = "yes"; then
- AC_DEFINE(HAVE_LTDL)
- fi
- dnl end !HP/UX
- fi
+ dnl On Darwin, the DYLD API is deprecated, so we prefer dlopen if
+ dnl available, above.
+ if test "$opsys" = "darwin"; then
+ have_dl=yes
+ AC_DEFINE(HAVE_DYLD)
+ AC_DEFINE(DLSYM_NEEDS_UNDERSCORE)
+ else
+ dnl Check for HP/UX shl_load
+ AC_CHECK_HEADER(dl.h, [
+ AC_MSG_CHECKING([for shl_load in -lc])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dl.h>],
+ [shl_load ("", 0, 0);])], [have_dl=yes;
AC_MSG_RESULT($have_dl)],[
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([for shl_load in -ldl])
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldld"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dl.h>],
+ [shl_load ("", 0, 0);])], [have_dl=yes],
+ [LIBS="$ac_save_LIBS"; AC_MSG_RESULT([no])])])])
+ if test "$have_dl" = "yes"; then
+ AC_DEFINE(HAVE_SHL_LOAD)
+ else
+ dnl Check for libtool's libltdl
+ AC_CHECK_HEADER(ltdl.h, [
+ AC_MSG_CHECKING([for lt_dlinit in -lltdl])
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -lltdl"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ltdl.h>],
+ [lt_dlinit ();])], [have_dl=yes], [LIBS="$ac_save_LIBS"])])
+ AC_MSG_RESULT($have_dl)
+ if test "$have_dl" = "yes"; then
+ AC_DEFINE(HAVE_LTDL)
+ fi
+ dnl end !HP/UX
+ fi
+ fi
dnl end !dlopen
fi
ac_save_LIBS=
- dnl end !darwin
esac
if test -n "$have_dl"; then
diff -r a39cd9dc92ba -r a142ad1a9140 src/config.h.in
--- a/src/config.h.in Wed Aug 24 11:22:30 2011 +0100
+++ b/src/config.h.in Wed Aug 24 23:41:29 2011 +0100
@@ -330,11 +330,8 @@
#undef DLSYM_NEEDS_UNDERSCORE
#undef HAVE_SHLIB
-/* Darwin; realpath corrects for case: */
-#ifdef HAVE_DYLD
-#define REALPATH_CORRECTS_CASE 1
-#define DEFAULT_FILE_SYSTEM_IGNORE_CASE 1
-#endif
+#undef REALPATH_CORRECTS_CASE
+#undef DEFAULT_FILE_SYSTEM_IGNORE_CASE
#undef HAVE_LIBINTL
#undef HAVE_LIBDNET
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches