changeset 73481:e9c680a7e7cc

Make sure x_default_search_path is always set even when x_libraries is empty, and look in .../share as well for each library directory.
author Andreas Schwab <schwab@suse.de>
date Mon, 23 Oct 2006 15:28:18 +0000
parents 93f756e426b8
children 84b5a8e7c67c
files configure.in
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Mon Oct 23 13:59:44 2006 +0000
+++ b/configure.in	Mon Oct 23 15:28:18 2006 +0000
@@ -1720,11 +1720,18 @@
   window_system=x11
 fi
 
-if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
-  LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
-  LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
+if test "${x_libraries}" != NONE; then
+  if test -n "${x_libraries}"; then
+    LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
+    LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
+  fi
   x_default_search_path=""
-  for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
+  x_search_path=${x_libraries}
+  if test -z "${x_search_path}"; then
+    x_search_path=/usr/lib
+  fi
+  for x_library in `echo ${x_search_path}: | \
+		    sed -e "s/:/ /g" -e p -e "s:/lib[[^ /]]* :/share :g"`; do
     x_search_path="\
 ${x_library}/X11/%L/%T/%N%C%S:\
 ${x_library}/X11/%l/%T/%N%C%S:\