I'm about to commit this attempt to fix our Athena3d library mismatch
problem. It's slightly different from my previous patch.
2000-01-18 Martin Buchholz <martin(a)xemacs.org>
* configure.in: Use /etc/ld.so.conf at link-time, if available.
Index: configure.in
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/configure.in,v
retrieving revision 1.111.2.63
diff -u -r1.111.2.63 configure.in
--- configure.in 2000/01/15 05:18:51 1.111.2.63
+++ configure.in 2000/01/20 07:35:47
@@ -1978,7 +1978,7 @@
dnl Extra system-specific library directories - please add to list
for dir in "/usr/ccs/lib"; do
- test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
+ test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
done
dnl --site-runtime-libraries (multiple dirs)
@@ -1988,11 +1988,24 @@
export LD_RUN_PATH
fi
+dnl Linux systems have dynamic runtime library directories listed in
+dnl /etc/ld.so.conf. Since those are used at run time, it seems pretty
+dnl safe to use them at link time, and less controversial than forcing
+dnl the run-time to use the link-time libraries. This also helps avoid
+dnl mismatches between the link-time and run-time libraries.
+if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
+ for dir in `cat /etc/ld.so.conf`; do
+ test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
+ done
+ add_runtime_path=no
+fi
+
dnl -------------------------------------
dnl Compute runtime library path
dnl -------------------------------------
-if test "$dynamic" = "no"; then add_runtime_path=no
+if test -n "$add_runtime_path"; then :;
+elif test "$dynamic" = "no"; then add_runtime_path=no
elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
else case "$opsys" in
sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
Show replies by date