Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | Use BUILD_CC and target include files for configuration tests. |
| 2 | If cross-compiling, force pathnames for helper programs, since |
| 3 | autodiscovery by the configure script will not work. |
| 4 | |
| 5 | Upstream-Status: Pending |
| 6 | |
| 7 | Signed-off-by: Bill Randle <william.c.randle at intel.com> |
| 8 | |
| 9 | --- man-1.6g/configure.orig 2016-03-28 17:46:12.734910976 -0700 |
| 10 | +++ man-1.6g/configure 2016-03-30 21:47:45.110572908 -0700 |
| 11 | @@ -216,7 +216,8 @@ |
| 12 | INCLUDEDIR=${INCLUDEDIR-/usr/include} |
| 13 | |
| 14 | rm -f conftest conftest.c |
| 15 | -compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1" |
| 16 | +# since we are interested in target feature support, use that sysroot |
| 17 | +compile="$BUILD_CC -isystem/${PKG_CONFIG_SYSROOT_DIR}/usr/include $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1" |
| 18 | |
| 19 | # Check for various header files. |
| 20 | |
| 21 | @@ -455,19 +456,23 @@ |
| 22 | fi |
| 23 | done |
| 24 | done |
| 25 | - Fgroff=/usr/bin/groff |
| 26 | - Fnroff=/usr/bin/nroff |
| 27 | - Fjnroff=/usr/bin/nroff |
| 28 | - Fgeqn=/usr/bin/geqn |
| 29 | - Fgtbl=/usr/bin/gtbl |
| 30 | - Fcol=/usr/bin/col |
| 31 | - Fgrefer=/usr/bin/grefer |
| 32 | - Fgpic=/usr/bin/gpic |
| 33 | - Fmore=/bin/more |
| 34 | - Fless=/usr/bin/less |
| 35 | - Fcmp=/usr/bin/cmp |
| 36 | - Fcat=/bin/cat |
| 37 | - Fgawk=/bin/gawk |
| 38 | + if [ $BUILD_CC != $CC ]; then |
| 39 | + # cross compiling => target fs not available, so force defaults |
| 40 | + Fgroff=/usr/bin/groff |
| 41 | + Fnroff=/usr/bin/nroff |
| 42 | + Fjnroff=/usr/bin/nroff |
| 43 | + Fgeqn=/usr/bin/eqn |
| 44 | + Fgneqn=/usr/bin/neqn |
| 45 | + Fgtbl=/usr/bin/tbl |
| 46 | + Fcol=/usr/bin/col |
| 47 | + Fgrefer=/usr/bin/refer |
| 48 | + Fgpic=/usr/bin/pic |
| 49 | + Fmore=/bin/more |
| 50 | + Fless=/usr/bin/less |
| 51 | + Fcmp=/usr/bin/cmp |
| 52 | + Fcat=/bin/cat |
| 53 | + Fgawk=/usr/bin/gawk |
| 54 | + fi |
| 55 | |
| 56 | |
| 57 | for i in eqn tbl refer pic |
| 58 | @@ -507,8 +512,8 @@ |
| 59 | jnroff="$Fjnroff -Tutf8 -mandocj" |
| 60 | fi |
| 61 | eqn="$Fgeqn -Tps" |
| 62 | - neqn="$Fgeqn -Tutf8" |
| 63 | - jneqn="$Fgeqn -Tutf8" |
| 64 | + neqn="$Fgneqn -Tutf8" |
| 65 | + jneqn="$Fgneqn -Tutf8" |
| 66 | tbl="$Fgtbl" |
| 67 | col="$Fcol" |
| 68 | vgrind="$Fvgrind" |