diff options
author | joerg <joerg@pkgsrc.org> | 2016-06-20 17:32:07 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2016-06-20 17:32:07 +0000 |
commit | 80e49cf619425aa4b87d0cc109592bf0c11391d7 (patch) | |
tree | 892998c72ad9e13c57f3c00422efeac309159c69 /archivers/libarchive | |
parent | 4689f79af399229083cf37d6bedb8b93160eff7c (diff) | |
download | pkgsrc-80e49cf619425aa4b87d0cc109592bf0c11391d7.tar.gz |
Fix configure test for multi-threaded XZ.
Diffstat (limited to 'archivers/libarchive')
-rwxr-xr-x | archivers/libarchive/files/configure | 18 | ||||
-rw-r--r-- | archivers/libarchive/files/configure.ac | 7 |
2 files changed, 16 insertions, 9 deletions
diff --git a/archivers/libarchive/files/configure b/archivers/libarchive/files/configure index 892401dc077..1793d30e131 100755 --- a/archivers/libarchive/files/configure +++ b/archivers/libarchive/files/configure @@ -14733,6 +14733,9 @@ else /* end confdefs.h. */ #include <lzma.h> + #if LZMA_VERSION < 50020000 + #error unsupported + #endif int main () { @@ -14741,12 +14744,13 @@ lzma_stream_encoder_mt(0, 0); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lzma_has_mt=yes else ac_cv_lzma_has_mt=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lzma_has_mt" >&5 $as_echo "$ac_cv_lzma_has_mt" >&6; } @@ -17642,7 +17646,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -17688,7 +17692,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -17712,7 +17716,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -17757,7 +17761,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -17781,7 +17785,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; diff --git a/archivers/libarchive/files/configure.ac b/archivers/libarchive/files/configure.ac index e15ceee1e5f..27758a278e4 100644 --- a/archivers/libarchive/files/configure.ac +++ b/archivers/libarchive/files/configure.ac @@ -373,8 +373,11 @@ if test "x$with_lzma" != "xno"; then AC_CACHE_CHECK( [whether we have multithread support in lzma], ac_cv_lzma_has_mt, - [AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[#include <lzma.h>]], + [AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[#include <lzma.h>] + [#if LZMA_VERSION < 50020000] + [#error unsupported] + [#endif]], [[lzma_stream_encoder_mt(0, 0);]])], [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])]) if test "x$ac_cv_lzma_has_mt" != xno; then |