Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001 |
| 2 | From: Zheng Junling <zhengjunling@huawei.com> |
| 3 | Date: Mon, 16 Jun 2014 12:51:25 +0000 |
| 4 | Subject: [PATCH] slang: fix the iconv existence checking |
| 5 | |
| 6 | When checking whether there is iconv, the configure file always check |
| 7 | the host env. |
| 8 | |
| 9 | Now we make it working properly by adding correct prefix for cross- |
| 10 | compiling environment. |
| 11 | |
| 12 | When enabling iconv-module, we see a QA warning because rpaths hardcoded |
| 13 | into the build. And rpaths are not needed, so let's turn this off. |
| 14 | |
| 15 | This patch is generated by referencing the existing "fix-check-pcre" |
| 16 | patch. |
| 17 | |
| 18 | Upstream-Status: Inappropriate |
| 19 | |
| 20 | Signed-off-by: Zheng Junling <zhengjunling@huawei.com> |
| 21 | --- |
| 22 | configure | 60 ++++++------------------------------------------------------ |
| 23 | 1 file changed, 6 insertions(+), 54 deletions(-) |
| 24 | |
| 25 | diff --git a/configure b/configure |
| 26 | index 7a96256..91632f3 100755 |
| 27 | --- a/configure |
| 28 | +++ b/configure |
| 29 | @@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } |
| 30 | /usr/include/iconv,/usr/lib \ |
| 31 | /usr/iconv/include,/usr/iconv/lib \ |
| 32 | /usr/include,/usr/lib \ |
| 33 | + /usr/include,/usr/lib64 \ |
| 34 | /opt/include/iconv,/opt/lib \ |
| 35 | /opt/iconv/include,/opt/iconv/lib \ |
| 36 | /opt/include,/opt/lib" |
| 37 | @@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } |
| 38 | xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` |
| 39 | xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` |
| 40 | found=0 |
| 41 | - if test -r $xincdir/$xincfile |
| 42 | + if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile |
| 43 | then |
| 44 | for E in $exts |
| 45 | do |
| 46 | - if test -r "$xlibdir/$xlibfile.$E" |
| 47 | + if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" |
| 48 | then |
| 49 | - jd_iconv_include_dir="$xincdir" |
| 50 | - jd_iconv_library_dir="$xlibdir" |
| 51 | + jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" |
| 52 | + jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" |
| 53 | jd_with_iconv_library="yes" |
| 54 | found=1 |
| 55 | break |
| 56 | @@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; } |
| 57 | then |
| 58 | ICONV_LIB="" |
| 59 | else |
| 60 | - |
| 61 | -if test "X$jd_iconv_library_dir" != "X" |
| 62 | -then |
| 63 | - if test "X$RPATH" = "X" |
| 64 | - then |
| 65 | - |
| 66 | -case "$host_os" in |
| 67 | - *linux*|*solaris* ) |
| 68 | - if test "X$GCC" = Xyes |
| 69 | - then |
| 70 | - if test "X$ac_R_nospace" = "Xno" |
| 71 | - then |
| 72 | - RPATH="-Wl,-R," |
| 73 | - else |
| 74 | - RPATH="-Wl,-R" |
| 75 | - fi |
| 76 | - else |
| 77 | - if test "X$ac_R_nospace" = "Xno" |
| 78 | - then |
| 79 | - RPATH="-R " |
| 80 | - else |
| 81 | - RPATH="-R" |
| 82 | - fi |
| 83 | - fi |
| 84 | - ;; |
| 85 | - *osf*|*openbsd*) |
| 86 | - if test "X$GCC" = Xyes |
| 87 | - then |
| 88 | - RPATH="-Wl,-rpath," |
| 89 | - else |
| 90 | - RPATH="-rpath " |
| 91 | - fi |
| 92 | - ;; |
| 93 | - *netbsd*) |
| 94 | - if test "X$GCC" = Xyes |
| 95 | - then |
| 96 | - RPATH="-Wl,-R" |
| 97 | - fi |
| 98 | - ;; |
| 99 | -esac |
| 100 | - |
| 101 | - if test "X$RPATH" != "X" |
| 102 | - then |
| 103 | - RPATH="$RPATH$jd_iconv_library_dir" |
| 104 | - fi |
| 105 | - else |
| 106 | - RPATH="$RPATH:$jd_iconv_library_dir" |
| 107 | - fi |
| 108 | -fi |
| 109 | - |
| 110 | + RPATH="" |
| 111 | fi |
| 112 | |
| 113 | ICONV_INC=-I$jd_iconv_include_dir |
| 114 | -- |
| 115 | 1.8.3.4 |
| 116 | |