Authors: Ralf Treinen <treinen@debian.org>
Description: hardwire the location of the app-defaults directory according
  to debian policy since guessing that value from directory locations on
  the build machine leads to random results.
Debian-bug: #593927 

Index: twlog-2.5/configure
===================================================================
--- twlog-2.5.orig/configure	2010-08-25 21:24:55.000000000 +0200
+++ twlog-2.5/configure	2010-08-25 21:32:44.000000000 +0200
@@ -7490,102 +7490,13 @@
 LIBS="$X_LIBS $XBAE_LIBS $MOTIF_LIBS -lXt -lX11 $X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
 ###########################################################################
 
-#
-# Find the path to the X11 app_defaults directory
-#
-
-    { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
-echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
-if test "${ac_cv_x_app_defaults+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test x"$ac_x_app_defaults" = x; then
+    ac_cv_x_app_defaults="/etc/X11/app-defaults"
 else
-
-  rm -fr conftestdir
-  if mkdir conftestdir; then
-    cd conftestdir 2>/dev/null
-    # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-    cat > Imakefile <<'EOF'
-acfindx:
-        @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
-EOF
-    if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
-      # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
-      eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    fi
-    cd .. 2>/dev/null
-    rm -fr conftestdir
-  fi
-      if test x"$ac_x_app_defaults" = x; then
-
-  # Look for the directory under a standard set of common directories.
-  # Check X11 before X11Rn because it's often a symlink to the current release.
-# TJW - added /usr/share/X11/app-defaults for Xorg/FC5
-# TJW - added /etc/X11/app-defaults for Ubuntu
-  for ac_dir in                                 \
-    /usr/share/X11/app-defaults                 \
-    /etc/X11/app-defaults                       \
-    /usr/X11/lib/app-defaults                   \
-    /usr/X11R6/lib/app-defaults                 \
-    /usr/X11R6/lib/X11/app-defaults             \
-    /usr/X11R5/lib/app-defaults                 \
-    /usr/X11R5/lib/X11/app-defaults             \
-    /usr/X11R4/lib/app-defaults                 \
-    /usr/X11R4/lib/X11/app-defaults             \
-                                                \
-    /usr/lib/X11/app-defaults                   \
-    /usr/lib/X11R6/app-defaults                 \
-    /usr/lib/X11R5/app-defaults                 \
-    /usr/lib/X11R4/app-defaults                 \
-                                                \
-    /usr/local/X11/lib/app-defaults             \
-    /usr/local/X11R6/lib/app-defaults           \
-    /usr/local/X11R5/lib/app-defaults           \
-    /usr/local/X11R4/lib/app-defaults           \
-                                                \
-    /usr/local/lib/X11/app-defaults             \
-    /usr/local/lib/X11R6/app-defaults           \
-    /usr/local/lib/X11R6/X11/app-defaults       \
-    /usr/local/lib/X11R5/app-defaults           \
-    /usr/local/lib/X11R5/X11/app-defaults       \
-    /usr/local/lib/X11R4/app-defaults           \
-    /usr/local/lib/X11R4/X11/app-defaults       \
-                                                \
-    /usr/X386/lib/X11/app-defaults              \
-    /usr/x386/lib/X11/app-defaults              \
-    /usr/XFree86/lib/X11/app-defaults           \
-                                                \
-    /usr/lib/X11/app-defaults                   \
-    /usr/local/lib/X11/app-defaults             \
-    /usr/unsupported/lib/X11/app-defaults       \
-    /usr/athena/lib/X11/app-defaults            \
-    /usr/local/x11r5/lib/X11/app-defaults       \
-    /usr/lpp/Xamples/lib/X11/app-defaults       \
-    /lib/usr/lib/X11/app-defaults               \
-                                                \
-    /usr/openwin/lib/app-defaults               \
-    /usr/openwin/lib/X11/app-defaults           \
-    /usr/openwin/share/lib/app-defaults         \
-    /usr/openwin/share/lib/X11/app-defaults     \
-                                                \
-    /X11R6/lib/app-defaults                     \
-    /X11R5/lib/app-defaults                     \
-    /X11R4/lib/app-defaults                     \
-    ; \
-  do
-    if test -d "$ac_dir"; then
-      ac_x_app_defaults=$ac_dir
-      break
-    fi
-  done
-
-      fi
-      if test x"$ac_x_app_defaults" = x; then
-        ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
-      else
         # Record where we found app-defaults for the cache.
-        ac_cv_x_app_defaults="$ac_x_app_defaults"
-      fi
+    ac_cv_x_app_defaults="$ac_x_app_defaults"
 fi
+
 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
