Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Upstream-Status: Pending |
| 2 | |
| 3 | We don't build xmkmf so any values returned from it are going to be wrong. |
| 4 | Using any paths in /usr/ for x headers/libs is a bad idea when cross compiling. |
| 5 | This patch removes them to stop any confusion. |
| 6 | |
| 7 | RP - 20071115 |
| 8 | |
| 9 | Index: autoconf-2.68/lib/autoconf/libs.m4 |
| 10 | =================================================================== |
| 11 | --- autoconf-2.68.orig/lib/autoconf/libs.m4 |
| 12 | +++ autoconf-2.68/lib/autoconf/libs.m4 |
| 13 | @@ -159,53 +159,6 @@ m4_popdef([AC_Lib_Name])dnl |
| 14 | # --------------------- # |
| 15 | |
| 16 | |
| 17 | -# _AC_PATH_X_XMKMF |
| 18 | -# ---------------- |
| 19 | -# Internal subroutine of _AC_PATH_X. |
| 20 | -# Set ac_x_includes and/or ac_x_libraries. |
| 21 | -m4_define([_AC_PATH_X_XMKMF], |
| 22 | -[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl |
| 23 | -rm -f -r conftest.dir |
| 24 | -if mkdir conftest.dir; then |
| 25 | - cd conftest.dir |
| 26 | - cat >Imakefile <<'_ACEOF' |
| 27 | -incroot: |
| 28 | - @echo incroot='${INCROOT}' |
| 29 | -usrlibdir: |
| 30 | - @echo usrlibdir='${USRLIBDIR}' |
| 31 | -libdir: |
| 32 | - @echo libdir='${LIBDIR}' |
| 33 | -_ACEOF |
| 34 | - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then |
| 35 | - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
| 36 | - for ac_var in incroot usrlibdir libdir; do |
| 37 | - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" |
| 38 | - done |
| 39 | - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
| 40 | - for ac_extension in a so sl dylib la dll; do |
| 41 | - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && |
| 42 | - test -f "$ac_im_libdir/libX11.$ac_extension"; then |
| 43 | - ac_im_usrlibdir=$ac_im_libdir; break |
| 44 | - fi |
| 45 | - done |
| 46 | - # Screen out bogus values from the imake configuration. They are |
| 47 | - # bogus both because they are the default anyway, and because |
| 48 | - # using them would break gcc on systems where it needs fixed includes. |
| 49 | - case $ac_im_incroot in |
| 50 | - /usr/include) ac_x_includes= ;; |
| 51 | - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
| 52 | - esac |
| 53 | - case $ac_im_usrlibdir in |
| 54 | - /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
| 55 | - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
| 56 | - esac |
| 57 | - fi |
| 58 | - cd .. |
| 59 | - rm -f -r conftest.dir |
| 60 | -fi |
| 61 | -])# _AC_PATH_X_XMKMF |
| 62 | - |
| 63 | - |
| 64 | # _AC_PATH_X_DIRECT |
| 65 | # ----------------- |
| 66 | # Internal subroutine of _AC_PATH_X. |
| 67 | @@ -213,44 +166,7 @@ fi |
| 68 | m4_define([_AC_PATH_X_DIRECT], |
| 69 | [# Standard set of common directories for X headers. |
| 70 | # Check X11 before X11Rn because it is often a symlink to the current release. |
| 71 | -ac_x_header_dirs=' |
| 72 | -/usr/X11/include |
| 73 | -/usr/X11R7/include |
| 74 | -/usr/X11R6/include |
| 75 | -/usr/X11R5/include |
| 76 | -/usr/X11R4/include |
| 77 | - |
| 78 | -/usr/include/X11 |
| 79 | -/usr/include/X11R7 |
| 80 | -/usr/include/X11R6 |
| 81 | -/usr/include/X11R5 |
| 82 | -/usr/include/X11R4 |
| 83 | - |
| 84 | -/usr/local/X11/include |
| 85 | -/usr/local/X11R7/include |
| 86 | -/usr/local/X11R6/include |
| 87 | -/usr/local/X11R5/include |
| 88 | -/usr/local/X11R4/include |
| 89 | - |
| 90 | -/usr/local/include/X11 |
| 91 | -/usr/local/include/X11R7 |
| 92 | -/usr/local/include/X11R6 |
| 93 | -/usr/local/include/X11R5 |
| 94 | -/usr/local/include/X11R4 |
| 95 | - |
| 96 | -/usr/X386/include |
| 97 | -/usr/x386/include |
| 98 | -/usr/XFree86/include/X11 |
| 99 | - |
| 100 | -/usr/include |
| 101 | -/usr/local/include |
| 102 | -/usr/unsupported/include |
| 103 | -/usr/athena/include |
| 104 | -/usr/local/x11r5/include |
| 105 | -/usr/lpp/Xamples/include |
| 106 | - |
| 107 | -/usr/openwin/include |
| 108 | -/usr/openwin/share/include' |
| 109 | +ac_x_header_dirs='' |
| 110 | |
| 111 | if test "$ac_x_includes" = no; then |
| 112 | # Guess where to find include files, by looking for Xlib.h. |
| 113 | @@ -299,7 +215,6 @@ AC_DEFUN([_AC_PATH_X], |
| 114 | [AC_CACHE_VAL(ac_cv_have_x, |
| 115 | [# One or both of the vars are not set, and there is no cached value. |
| 116 | ac_x_includes=no ac_x_libraries=no |
| 117 | -_AC_PATH_X_XMKMF |
| 118 | _AC_PATH_X_DIRECT |
| 119 | case $ac_x_includes,$ac_x_libraries in #( |
| 120 | no,* | *,no | *\'*) |