commit c28d4b3b09625f80368add11b019574f1d7bc30f
parent 6f96105b9ceb1cd5f1129b3a878dc218bf72ec64
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Mon, 6 Nov 2017 22:12:26 +0300
configure.ac: used more reliable method to detect host architecture on Solaris,
really use generated PKG_CONFIG_PATH
Diffstat:
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -1405,7 +1405,22 @@ AS_IF([test "x$with_gnutls" != "xno" && test "x$have_gnutls" != "xyes"],
[
AS_IF([[test "x$host_os" = "xsolaris2.11" && test "x$cross_compiling" = "xno"]],
[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[char size_chk[sizeof(char*)-7];]], [[]])],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+char size_chk[7-sizeof(char*)];
+#if defined(_LP64) || defined(__LP64__) || defined(__x86_64) || defined(__x86_64__)
+#error This is 64-bit target.
+choke me now
+#endif
+#if defined(__amd64) || defined(__amd64__) || defined(__sparcv9) || defined(__sparc_v9__)
+#error This is 64-bit target.
+choke me now
+#endif
+ ]], [[]]
+ )
+ ],
+ [
+ mhd_cv_pkgconf_add_dirs='/usr/lib/pkgconfig/gnutls-3'
+ ],
[
AS_IF([[test "x$host_cpu" = "xx86_64" || test "x$host_cpu" = "xi386"]],
[[mhd_cv_pkgconf_add_dirs='/usr/lib/amd64/pkgconfig/gnutls-3:/usr/lib/amd64/pkgconfig']],
@@ -1413,9 +1428,6 @@ AS_IF([test "x$with_gnutls" != "xno" && test "x$have_gnutls" != "xyes"],
[[mhd_cv_pkgconf_add_dirs='/usr/lib/sparkv9/pkgconfig/gnutls-3:/usr/lib/sparkv9/pkgconfig']],
[[mhd_cv_pkgconf_add_dirs='/usr/lib/64/pkgconfig/gnutls-3:/usr/lib/64/pkgconfig']]
)
- ],
- [
- mhd_cv_pkgconf_add_dirs='/usr/lib/pkgconfig/gnutls-3'
]
)
],
@@ -1427,6 +1439,7 @@ AS_IF([test "x$with_gnutls" != "xno" && test "x$have_gnutls" != "xyes"],
[
test "x$PKG_CONFIG_PATH" = "x" || PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PATH_SEPARATOR}"
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${mhd_cv_pkgconf_add_dirs}"
+ export PKG_CONFIG_PATH
]
)
PKG_CHECK_MODULES(GNUTLS, [[gnutls]],