Mon Jun 20 17:32:07 2016 UTC ()
Fix configure test for multi-threaded XZ.


(joerg)
diff -r1.8 -r1.9 pkgsrc/archivers/libarchive/files/configure
diff -r1.8 -r1.9 pkgsrc/archivers/libarchive/files/configure.ac

cvs diff -r1.8 -r1.9 pkgsrc/archivers/libarchive/files/configure (expand / switch to unified diff)

--- pkgsrc/archivers/libarchive/files/configure 2016/06/20 17:24:55 1.8
+++ pkgsrc/archivers/libarchive/files/configure 2016/06/20 17:32:07 1.9
@@ -14723,40 +14723,44 @@ fi @@ -14723,40 +14723,44 @@ fi
14723 # Some pre-release (but widely distributed) versions of liblzma 14723 # Some pre-release (but widely distributed) versions of liblzma
14724 # included a disabled version of lzma_stream_encoder_mt that 14724 # included a disabled version of lzma_stream_encoder_mt that
14725 # fools a naive AC_CHECK_LIB or AC_CHECK_FUNC, so we need 14725 # fools a naive AC_CHECK_LIB or AC_CHECK_FUNC, so we need
14726 # to do something more complex here: 14726 # to do something more complex here:
14727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have multithread support in lzma" >&5 14727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have multithread support in lzma" >&5
14728$as_echo_n "checking whether we have multithread support in lzma... " >&6; } 14728$as_echo_n "checking whether we have multithread support in lzma... " >&6; }
14729if ${ac_cv_lzma_has_mt+:} false; then : 14729if ${ac_cv_lzma_has_mt+:} false; then :
14730 $as_echo_n "(cached) " >&6 14730 $as_echo_n "(cached) " >&6
14731else 14731else
14732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14733/* end confdefs.h. */ 14733/* end confdefs.h. */
14734 14734
14735 #include <lzma.h> 14735 #include <lzma.h>
 14736 #if LZMA_VERSION < 50020000
 14737 #error unsupported
 14738 #endif
14736int 14739int
14737main () 14740main ()
14738{ 14741{
14739lzma_stream_encoder_mt(0, 0); 14742lzma_stream_encoder_mt(0, 0);
14740 ; 14743 ;
14741 return 0; 14744 return 0;
14742} 14745}
14743_ACEOF 14746_ACEOF
14744if ac_fn_c_try_compile "$LINENO"; then : 14747if ac_fn_c_try_link "$LINENO"; then :
14745 ac_cv_lzma_has_mt=yes 14748 ac_cv_lzma_has_mt=yes
14746else 14749else
14747 ac_cv_lzma_has_mt=no 14750 ac_cv_lzma_has_mt=no
14748fi 14751fi
14749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14752rm -f core conftest.err conftest.$ac_objext \
 14753 conftest$ac_exeext conftest.$ac_ext
14750fi 14754fi
14751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lzma_has_mt" >&5 14755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lzma_has_mt" >&5
14752$as_echo "$ac_cv_lzma_has_mt" >&6; } 14756$as_echo "$ac_cv_lzma_has_mt" >&6; }
14753 if test "x$ac_cv_lzma_has_mt" != xno; then 14757 if test "x$ac_cv_lzma_has_mt" != xno; then
14754 14758
14755$as_echo "#define HAVE_LZMA_STREAM_ENCODER_MT 1" >>confdefs.h 14759$as_echo "#define HAVE_LZMA_STREAM_ENCODER_MT 1" >>confdefs.h
14756 14760
14757 fi 14761 fi
14758fi 14762fi
14759 14763
14760 14764
14761# Check whether --with-lzo2 was given. 14765# Check whether --with-lzo2 was given.
14762if test "${with_lzo2+set}" = set; then : 14766if test "${with_lzo2+set}" = set; then :
@@ -17632,27 +17636,27 @@ else @@ -17632,27 +17636,27 @@ else
17632 ac_cv_sys_largefile_CC=no 17636 ac_cv_sys_largefile_CC=no
17633 if test "$GCC" != yes; then 17637 if test "$GCC" != yes; then
17634 ac_save_CC=$CC 17638 ac_save_CC=$CC
17635 while :; do 17639 while :; do
17636 # IRIX 6.2 and later do not support large files by default, 17640 # IRIX 6.2 and later do not support large files by default,
17637 # so use the C compiler's -n32 option if that helps. 17641 # so use the C compiler's -n32 option if that helps.
17638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17639/* end confdefs.h. */ 17643/* end confdefs.h. */
17640#include <sys/types.h> 17644#include <sys/types.h>
17641 /* Check that off_t can represent 2**63 - 1 correctly. 17645 /* Check that off_t can represent 2**63 - 1 correctly.
17642 We can't simply define LARGE_OFF_T to be 9223372036854775807, 17646 We can't simply define LARGE_OFF_T to be 9223372036854775807,
17643 since some C++ compilers masquerading as C compilers 17647 since some C++ compilers masquerading as C compilers
17644 incorrectly reject 9223372036854775807. */ 17648 incorrectly reject 9223372036854775807. */
17645#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 17649#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17646 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 17650 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17647 && LARGE_OFF_T % 2147483647 == 1) 17651 && LARGE_OFF_T % 2147483647 == 1)
17648 ? 1 : -1]; 17652 ? 1 : -1];
17649int 17653int
17650main () 17654main ()
17651{ 17655{
17652 17656
17653 ; 17657 ;
17654 return 0; 17658 return 0;
17655} 17659}
17656_ACEOF 17660_ACEOF
17657 if ac_fn_c_try_compile "$LINENO"; then : 17661 if ac_fn_c_try_compile "$LINENO"; then :
17658 break 17662 break
@@ -17678,51 +17682,51 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6;  @@ -17678,51 +17682,51 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6;
17678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 17682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17679$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } 17683$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
17680if ${ac_cv_sys_file_offset_bits+:} false; then : 17684if ${ac_cv_sys_file_offset_bits+:} false; then :
17681 $as_echo_n "(cached) " >&6 17685 $as_echo_n "(cached) " >&6
17682else 17686else
17683 while :; do 17687 while :; do
17684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17685/* end confdefs.h. */ 17689/* end confdefs.h. */
17686#include <sys/types.h> 17690#include <sys/types.h>
17687 /* Check that off_t can represent 2**63 - 1 correctly. 17691 /* Check that off_t can represent 2**63 - 1 correctly.
17688 We can't simply define LARGE_OFF_T to be 9223372036854775807, 17692 We can't simply define LARGE_OFF_T to be 9223372036854775807,
17689 since some C++ compilers masquerading as C compilers 17693 since some C++ compilers masquerading as C compilers
17690 incorrectly reject 9223372036854775807. */ 17694 incorrectly reject 9223372036854775807. */
17691#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 17695#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17692 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 17696 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17693 && LARGE_OFF_T % 2147483647 == 1) 17697 && LARGE_OFF_T % 2147483647 == 1)
17694 ? 1 : -1]; 17698 ? 1 : -1];
17695int 17699int
17696main () 17700main ()
17697{ 17701{
17698 17702
17699 ; 17703 ;
17700 return 0; 17704 return 0;
17701} 17705}
17702_ACEOF 17706_ACEOF
17703if ac_fn_c_try_compile "$LINENO"; then : 17707if ac_fn_c_try_compile "$LINENO"; then :
17704 ac_cv_sys_file_offset_bits=no; break 17708 ac_cv_sys_file_offset_bits=no; break
17705fi 17709fi
17706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 17710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17708/* end confdefs.h. */ 17712/* end confdefs.h. */
17709#define _FILE_OFFSET_BITS 64 17713#define _FILE_OFFSET_BITS 64
17710#include <sys/types.h> 17714#include <sys/types.h>
17711 /* Check that off_t can represent 2**63 - 1 correctly. 17715 /* Check that off_t can represent 2**63 - 1 correctly.
17712 We can't simply define LARGE_OFF_T to be 9223372036854775807, 17716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
17713 since some C++ compilers masquerading as C compilers 17717 since some C++ compilers masquerading as C compilers
17714 incorrectly reject 9223372036854775807. */ 17718 incorrectly reject 9223372036854775807. */
17715#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 17719#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17716 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 17720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17717 && LARGE_OFF_T % 2147483647 == 1) 17721 && LARGE_OFF_T % 2147483647 == 1)
17718 ? 1 : -1]; 17722 ? 1 : -1];
17719int 17723int
17720main () 17724main ()
17721{ 17725{
17722 17726
17723 ; 17727 ;
17724 return 0; 17728 return 0;
17725} 17729}
17726_ACEOF 17730_ACEOF
17727if ac_fn_c_try_compile "$LINENO"; then : 17731if ac_fn_c_try_compile "$LINENO"; then :
17728 ac_cv_sys_file_offset_bits=64; break 17732 ac_cv_sys_file_offset_bits=64; break
@@ -17747,51 +17751,51 @@ rm -rf conftest* @@ -17747,51 +17751,51 @@ rm -rf conftest*
17747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 17751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
17748$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } 17752$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
17749if ${ac_cv_sys_large_files+:} false; then : 17753if ${ac_cv_sys_large_files+:} false; then :
17750 $as_echo_n "(cached) " >&6 17754 $as_echo_n "(cached) " >&6
17751else 17755else
17752 while :; do 17756 while :; do
17753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17754/* end confdefs.h. */ 17758/* end confdefs.h. */
17755#include <sys/types.h> 17759#include <sys/types.h>
17756 /* Check that off_t can represent 2**63 - 1 correctly. 17760 /* Check that off_t can represent 2**63 - 1 correctly.
17757 We can't simply define LARGE_OFF_T to be 9223372036854775807, 17761 We can't simply define LARGE_OFF_T to be 9223372036854775807,
17758 since some C++ compilers masquerading as C compilers 17762 since some C++ compilers masquerading as C compilers
17759 incorrectly reject 9223372036854775807. */ 17763 incorrectly reject 9223372036854775807. */
17760#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 17764#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17761 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 17765 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17762 && LARGE_OFF_T % 2147483647 == 1) 17766 && LARGE_OFF_T % 2147483647 == 1)
17763 ? 1 : -1]; 17767 ? 1 : -1];
17764int 17768int
17765main () 17769main ()
17766{ 17770{
17767 17771
17768 ; 17772 ;
17769 return 0; 17773 return 0;
17770} 17774}
17771_ACEOF 17775_ACEOF
17772if ac_fn_c_try_compile "$LINENO"; then : 17776if ac_fn_c_try_compile "$LINENO"; then :
17773 ac_cv_sys_large_files=no; break 17777 ac_cv_sys_large_files=no; break
17774fi 17778fi
17775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 17779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17777/* end confdefs.h. */ 17781/* end confdefs.h. */
17778#define _LARGE_FILES 1 17782#define _LARGE_FILES 1
17779#include <sys/types.h> 17783#include <sys/types.h>
17780 /* Check that off_t can represent 2**63 - 1 correctly. 17784 /* Check that off_t can represent 2**63 - 1 correctly.
17781 We can't simply define LARGE_OFF_T to be 9223372036854775807, 17785 We can't simply define LARGE_OFF_T to be 9223372036854775807,
17782 since some C++ compilers masquerading as C compilers 17786 since some C++ compilers masquerading as C compilers
17783 incorrectly reject 9223372036854775807. */ 17787 incorrectly reject 9223372036854775807. */
17784#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 17788#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17785 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 17789 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17786 && LARGE_OFF_T % 2147483647 == 1) 17790 && LARGE_OFF_T % 2147483647 == 1)
17787 ? 1 : -1]; 17791 ? 1 : -1];
17788int 17792int
17789main () 17793main ()
17790{ 17794{
17791 17795
17792 ; 17796 ;
17793 return 0; 17797 return 0;
17794} 17798}
17795_ACEOF 17799_ACEOF
17796if ac_fn_c_try_compile "$LINENO"; then : 17800if ac_fn_c_try_compile "$LINENO"; then :
17797 ac_cv_sys_large_files=1; break 17801 ac_cv_sys_large_files=1; break

cvs diff -r1.8 -r1.9 pkgsrc/archivers/libarchive/files/configure.ac (expand / switch to unified diff)

--- pkgsrc/archivers/libarchive/files/configure.ac 2016/06/20 17:24:55 1.8
+++ pkgsrc/archivers/libarchive/files/configure.ac 2016/06/20 17:32:07 1.9
@@ -363,28 +363,31 @@ fi @@ -363,28 +363,31 @@ fi
363AC_ARG_WITH([lzma], 363AC_ARG_WITH([lzma],
364 AS_HELP_STRING([--without-lzma], [Don't build support for xz through lzma])) 364 AS_HELP_STRING([--without-lzma], [Don't build support for xz through lzma]))
365 365
366if test "x$with_lzma" != "xno"; then 366if test "x$with_lzma" != "xno"; then
367 AC_CHECK_HEADERS([lzma.h]) 367 AC_CHECK_HEADERS([lzma.h])
368 AC_CHECK_LIB(lzma,lzma_stream_decoder) 368 AC_CHECK_LIB(lzma,lzma_stream_decoder)
369 # Some pre-release (but widely distributed) versions of liblzma 369 # Some pre-release (but widely distributed) versions of liblzma
370 # included a disabled version of lzma_stream_encoder_mt that 370 # included a disabled version of lzma_stream_encoder_mt that
371 # fools a naive AC_CHECK_LIB or AC_CHECK_FUNC, so we need 371 # fools a naive AC_CHECK_LIB or AC_CHECK_FUNC, so we need
372 # to do something more complex here: 372 # to do something more complex here:
373 AC_CACHE_CHECK( 373 AC_CACHE_CHECK(
374 [whether we have multithread support in lzma], 374 [whether we have multithread support in lzma],
375 ac_cv_lzma_has_mt, 375 ac_cv_lzma_has_mt,
376 [AC_COMPILE_IFELSE([ 376 [AC_LINK_IFELSE([
377 AC_LANG_PROGRAM([[#include <lzma.h>]], 377 AC_LANG_PROGRAM([[#include <lzma.h>]
 378 [#if LZMA_VERSION < 50020000]
 379 [#error unsupported]
 380 [#endif]],
378 [[lzma_stream_encoder_mt(0, 0);]])], 381 [[lzma_stream_encoder_mt(0, 0);]])],
379 [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])]) 382 [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])])
380 if test "x$ac_cv_lzma_has_mt" != xno; then 383 if test "x$ac_cv_lzma_has_mt" != xno; then
381 AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.]) 384 AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.])
382 fi 385 fi
383fi 386fi
384 387
385AC_ARG_WITH([lzo2], 388AC_ARG_WITH([lzo2],
386 AS_HELP_STRING([--without-lzo2], [Don't build support for lzop through liblzo2])) 389 AS_HELP_STRING([--without-lzo2], [Don't build support for lzop through liblzo2]))
387 390
388if test "x$with_lzo2" != "xno"; then 391if test "x$with_lzo2" != "xno"; then
389 AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h]) 392 AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h])
390 AC_CHECK_LIB(lzo2,lzo1x_decompress_safe) 393 AC_CHECK_LIB(lzo2,lzo1x_decompress_safe)