configure.ac | configure.ac | |||
---|---|---|---|---|
skipping to change at line 61 | skipping to change at line 61 | |||
echo | echo | |||
echo "Configure options:" | echo "Configure options:" | |||
AM_CFLAGS= | AM_CFLAGS= | |||
############# | ############# | |||
# Debugging # | # Debugging # | |||
############# | ############# | |||
AC_MSG_CHECKING([if debugging code should be compiled]) | AC_MSG_CHECKING([if debugging code should be compiled]) | |||
AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [Enable debugging c ode.]), | AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging c ode.]), | |||
[], enable_debug=no) | [], enable_debug=no) | |||
if test "x$enable_debug" = xyes; then | if test "x$enable_debug" = xyes; then | |||
AC_MSG_RESULT([yes]) | AC_MSG_RESULT([yes]) | |||
else | else | |||
AC_DEFINE([NDEBUG], [1], [Define to 1 to disable debugging code.]) | AC_DEFINE([NDEBUG], [1], [Define to 1 to disable debugging code.]) | |||
AC_MSG_RESULT([no]) | AC_MSG_RESULT([no]) | |||
fi | fi | |||
########### | ########### | |||
# Filters # | # Filters # | |||
skipping to change at line 85 | skipping to change at line 85 | |||
m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,sparc]) | m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,sparc]) | |||
m4_define([LZ_FILTERS], [lzma1,lzma2]) | m4_define([LZ_FILTERS], [lzma1,lzma2]) | |||
m4_foreach([NAME], [SUPPORTED_FILTERS], | m4_foreach([NAME], [SUPPORTED_FILTERS], | |||
[enable_filter_[]NAME=no | [enable_filter_[]NAME=no | |||
enable_encoder_[]NAME=no | enable_encoder_[]NAME=no | |||
enable_decoder_[]NAME=no | enable_decoder_[]NAME=no | |||
])dnl | ])dnl | |||
AC_MSG_CHECKING([which encoders to build]) | AC_MSG_CHECKING([which encoders to build]) | |||
AC_ARG_ENABLE([encoders], AC_HELP_STRING([--enable-encoders=LIST], | AC_ARG_ENABLE([encoders], AS_HELP_STRING([--enable-encoders=LIST], | |||
[Comma-separated list of encoders to build. Default=all. | [Comma-separated list of encoders to build. Default=all. | |||
Available encoders:] | Available encoders:] | |||
m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])) , | m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])) , | |||
[], [enable_encoders=SUPPORTED_FILTERS]) | [], [enable_encoders=SUPPORTED_FILTERS]) | |||
enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'` | enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'` | |||
if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then | if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then | |||
AC_MSG_RESULT([(none)]) | AC_MSG_RESULT([(none)]) | |||
else | else | |||
for arg in $enable_encoders | for arg in $enable_encoders | |||
do | do | |||
skipping to change at line 113 | skipping to change at line 113 | |||
*) | *) | |||
AC_MSG_RESULT([]) | AC_MSG_RESULT([]) | |||
AC_MSG_ERROR([unknown filter: $arg]) | AC_MSG_ERROR([unknown filter: $arg]) | |||
;; | ;; | |||
esac | esac | |||
done | done | |||
AC_MSG_RESULT([$enable_encoders]) | AC_MSG_RESULT([$enable_encoders]) | |||
fi | fi | |||
AC_MSG_CHECKING([which decoders to build]) | AC_MSG_CHECKING([which decoders to build]) | |||
AC_ARG_ENABLE([decoders], AC_HELP_STRING([--enable-decoders=LIST], | AC_ARG_ENABLE([decoders], AS_HELP_STRING([--enable-decoders=LIST], | |||
[Comma-separated list of decoders to build. Default=all. | [Comma-separated list of decoders to build. Default=all. | |||
Available decoders are the same as available encoders.]), | Available decoders are the same as available encoders.]), | |||
[], [enable_decoders=SUPPORTED_FILTERS]) | [], [enable_decoders=SUPPORTED_FILTERS]) | |||
enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'` | enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'` | |||
if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then | if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then | |||
AC_MSG_RESULT([(none)]) | AC_MSG_RESULT([(none)]) | |||
else | else | |||
for arg in $enable_decoders | for arg in $enable_decoders | |||
do | do | |||
case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [ | case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [ | |||
skipping to change at line 195 | skipping to change at line 195 | |||
# Match finders # | # Match finders # | |||
################# | ################# | |||
m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4]) | m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4]) | |||
m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], | m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], | |||
[enable_match_finder_[]NAME=no | [enable_match_finder_[]NAME=no | |||
]) | ]) | |||
AC_MSG_CHECKING([which match finders to build]) | AC_MSG_CHECKING([which match finders to build]) | |||
AC_ARG_ENABLE([match-finders], AC_HELP_STRING([--enable-match-finders=LIST] , | AC_ARG_ENABLE([match-finders], AS_HELP_STRING([--enable-match-finders=LIST] , | |||
[Comma-separated list of match finders to build. Default=all . | [Comma-separated list of match finders to build. Default=all . | |||
At least one match finder is required for encoding with | At least one match finder is required for encoding with | |||
the LZMA1 and LZMA2 filters. Available match finders:] | the LZMA1 and LZMA2 filters. Available match finders:] | |||
m4_translit(m4_defn([SUPPORTED_MATCH_FINDERS]), [,], [ ])), [], | m4_translit(m4_defn([SUPPORTED_MATCH_FINDERS]), [,], [ ])), [], | |||
[enable_match_finders=SUPPORTED_MATCH_FINDERS]) | [enable_match_finders=SUPPORTED_MATCH_FINDERS]) | |||
enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'` | enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'` | |||
if test "x$enable_encoder_lz" = xyes ; then | if test "x$enable_encoder_lz" = xyes ; then | |||
for arg in $enable_match_finders | for arg in $enable_match_finders | |||
do | do | |||
case $arg in m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [ | case $arg in m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [ | |||
skipping to change at line 233 | skipping to change at line 233 | |||
# Integrity checks # | # Integrity checks # | |||
#################### | #################### | |||
m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256]) | m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256]) | |||
m4_foreach([NAME], [SUPPORTED_CHECKS], | m4_foreach([NAME], [SUPPORTED_CHECKS], | |||
[enable_check_[]NAME=no | [enable_check_[]NAME=no | |||
])dnl | ])dnl | |||
AC_MSG_CHECKING([which integrity checks to build]) | AC_MSG_CHECKING([which integrity checks to build]) | |||
AC_ARG_ENABLE([checks], AC_HELP_STRING([--enable-checks=LIST], | AC_ARG_ENABLE([checks], AS_HELP_STRING([--enable-checks=LIST], | |||
[Comma-separated list of integrity checks to build. | [Comma-separated list of integrity checks to build. | |||
Default=all. Available integrity checks:] | Default=all. Available integrity checks:] | |||
m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])), | m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])), | |||
[], [enable_checks=SUPPORTED_CHECKS]) | [], [enable_checks=SUPPORTED_CHECKS]) | |||
enable_checks=`echo "$enable_checks" | sed 's/,/ /g'` | enable_checks=`echo "$enable_checks" | sed 's/,/ /g'` | |||
if test "x$enable_checks" = xno || test "x$enable_checks" = x; then | if test "x$enable_checks" = xno || test "x$enable_checks" = x; then | |||
AC_MSG_RESULT([(none)]) | AC_MSG_RESULT([(none)]) | |||
else | else | |||
for arg in $enable_checks | for arg in $enable_checks | |||
do | do | |||
skipping to change at line 259 | skipping to change at line 259 | |||
[integrity check is enabled.]) | [integrity check is enabled.]) | |||
;;]) | ;;]) | |||
*) | *) | |||
AC_MSG_RESULT([]) | AC_MSG_RESULT([]) | |||
AC_MSG_ERROR([unknown integrity check: $arg] ) | AC_MSG_ERROR([unknown integrity check: $arg] ) | |||
;; | ;; | |||
esac | esac | |||
done | done | |||
AC_MSG_RESULT([$enable_checks]) | AC_MSG_RESULT([$enable_checks]) | |||
fi | fi | |||
if test "x$enable_checks_crc32" = xno ; then | if test "x$enable_check_crc32" = xno ; then | |||
AC_MSG_ERROR([For now, the CRC32 check must always be enabled.]) | AC_MSG_ERROR([For now, the CRC32 check must always be enabled.]) | |||
fi | fi | |||
m4_foreach([NAME], [SUPPORTED_CHECKS], | m4_foreach([NAME], [SUPPORTED_CHECKS], | |||
[AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes) | [AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes) | |||
])dnl | ])dnl | |||
########################### | ########################### | |||
# Assembler optimizations # | # Assembler optimizations # | |||
########################### | ########################### | |||
AC_MSG_CHECKING([if assembler optimizations should be used]) | AC_MSG_CHECKING([if assembler optimizations should be used]) | |||
AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler], | AC_ARG_ENABLE([assembler], AS_HELP_STRING([--disable-assembler], | |||
[Do not use assembler optimizations even if such exist | [Do not use assembler optimizations even if such exist | |||
for the architecture.]), | for the architecture.]), | |||
[], [enable_assembler=yes]) | [], [enable_assembler=yes]) | |||
if test "x$enable_assembler" = xyes; then | if test "x$enable_assembler" = xyes; then | |||
enable_assembler=no | enable_assembler=no | |||
case $host_os in | case $host_os in | |||
# Darwin should work too but only if not creating universal | # Darwin should work too but only if not creating universal | |||
# binaries. Solaris x86 could work too but I cannot test. | # binaries. Solaris x86 could work too but I cannot test. | |||
linux* | *bsd* | mingw* | cygwin* | *djgpp*) | linux* | *bsd* | mingw* | cygwin* | *djgpp*) | |||
case $host_cpu in | case $host_cpu in | |||
skipping to change at line 295 | skipping to change at line 295 | |||
esac | esac | |||
;; | ;; | |||
esac | esac | |||
fi | fi | |||
case $enable_assembler in | case $enable_assembler in | |||
x86 | x86_64 | no) | x86 | x86_64 | no) | |||
AC_MSG_RESULT([$enable_assembler]) | AC_MSG_RESULT([$enable_assembler]) | |||
;; | ;; | |||
*) | *) | |||
AC_MSG_RESULT([]) | AC_MSG_RESULT([]) | |||
AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'.]) | AC_MSG_ERROR([--enable-assembler accepts only `yes', `no', ` x86', or `x86_64'.]) | |||
;; | ;; | |||
esac | esac | |||
AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86) | AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86) | |||
AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64) | AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64) | |||
##################### | ##################### | |||
# Size optimization # | # Size optimization # | |||
##################### | ##################### | |||
AC_MSG_CHECKING([if small size is preferred over speed]) | AC_MSG_CHECKING([if small size is preferred over speed]) | |||
AC_ARG_ENABLE([small], AC_HELP_STRING([--enable-small], | AC_ARG_ENABLE([small], AS_HELP_STRING([--enable-small], | |||
[Make liblzma smaller and a little slower. | [Make liblzma smaller and a little slower. | |||
This is disabled by default to optimize for speed.]), | This is disabled by default to optimize for speed.]), | |||
[], [enable_small=no]) | [], [enable_small=no]) | |||
if test "x$enable_small" = xyes; then | if test "x$enable_small" = xyes; then | |||
AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.]) | AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.]) | |||
elif test "x$enable_small" != xno; then | elif test "x$enable_small" != xno; then | |||
AC_MSG_RESULT([]) | AC_MSG_RESULT([]) | |||
AC_MSG_ERROR([--enable-small accepts only \`yes' or \`no']) | AC_MSG_ERROR([--enable-small accepts only `yes' or `no']) | |||
fi | fi | |||
AC_MSG_RESULT([$enable_small]) | AC_MSG_RESULT([$enable_small]) | |||
AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes) | AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes) | |||
############# | ############# | |||
# Threading # | # Threading # | |||
############# | ############# | |||
AC_MSG_CHECKING([if threading support is wanted]) | AC_MSG_CHECKING([if threading support is wanted]) | |||
AC_ARG_ENABLE([threads], AC_HELP_STRING([--disable-threads], | AC_ARG_ENABLE([threads], AS_HELP_STRING([--enable-threads=METHOD], | |||
[Disable threading support. | [Supported METHODS are `yes', `no', `posix', `win95', and | |||
This makes some things thread-unsafe.]), | `vista'. The default is `yes'. Using `no' together with | |||
--enable-small makes liblzma thread unsafe.]), | ||||
[], [enable_threads=yes]) | [], [enable_threads=yes]) | |||
if test "x$enable_threads" != xyes && test "x$enable_threads" != xno; then | ||||
AC_MSG_RESULT([]) | if test "x$enable_threads" = xyes; then | |||
AC_MSG_ERROR([--enable-threads accepts only \`yes' or \`no']) | case $host_os in | |||
mingw*) | ||||
case $host_cpu in | ||||
i?86) enable_threads=win95 ;; | ||||
*) enable_threads=vista ;; | ||||
esac | ||||
;; | ||||
*) | ||||
enable_threads=posix | ||||
;; | ||||
esac | ||||
fi | ||||
case $enable_threads in | ||||
posix | win95 | vista) | ||||
AC_MSG_RESULT([yes, $enable_threads]) | ||||
;; | ||||
no) | ||||
AC_MSG_RESULT([no]) | ||||
;; | ||||
*) | ||||
AC_MSG_RESULT([]) | ||||
AC_MSG_ERROR([--enable-threads only accepts `yes', `no', `po | ||||
six', `win95', or `vista']) | ||||
;; | ||||
esac | ||||
# The Win95 threading lacks thread-safe one-time initialization function. | ||||
# It's better to disallow it instead of allowing threaded but thread-unsafe | ||||
# build. | ||||
if test "x$enable_small$enable_threads" = xyeswin95; then | ||||
AC_MSG_ERROR([--enable-threads=win95 and --enable-small cannot be | ||||
used at the same time]) | ||||
fi | fi | |||
AC_MSG_RESULT([$enable_threads]) | ||||
# We use the actual result a little later. | # We use the actual result a little later. | |||
######################### | ######################### | |||
# Assumed amount of RAM # | # Assumed amount of RAM # | |||
######################### | ######################### | |||
# We use 128 MiB as default, because it will allow decompressing files | # We use 128 MiB as default, because it will allow decompressing files | |||
# created with "xz -9". It would be slightly safer to guess a lower value, | # created with "xz -9". It would be slightly safer to guess a lower value, | |||
# but most systems, on which we don't have any way to determine the amount | # but most systems, on which we don't have any way to determine the amount | |||
# of RAM, will probably have at least 128 MiB of RAM. | # of RAM, will probably have at least 128 MiB of RAM. | |||
AC_MSG_CHECKING([how much RAM to assume if the real amount is unknown]) | AC_MSG_CHECKING([how much RAM to assume if the real amount is unknown]) | |||
AC_ARG_ENABLE([assume-ram], AC_HELP_STRING([--enable-assume-ram=SIZE], | AC_ARG_ENABLE([assume-ram], AS_HELP_STRING([--enable-assume-ram=SIZE], | |||
[If and only if the real amount of RAM cannot be determined, | [If and only if the real amount of RAM cannot be determined, | |||
assume SIZE MiB. The default is 128 MiB. This affects the | assume SIZE MiB. The default is 128 MiB. This affects the | |||
default memory usage limit.]), | default memory usage limit.]), | |||
[], [enable_assume_ram=128]) | [], [enable_assume_ram=128]) | |||
assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789` | assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789` | |||
if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then | if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then | |||
AC_MSG_RESULT([]) | AC_MSG_RESULT([]) | |||
AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument]) | AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument]) | |||
fi | fi | |||
AC_MSG_RESULT([$enable_assume_ram MiB]) | AC_MSG_RESULT([$enable_assume_ram MiB]) | |||
AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram], | AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram], | |||
[How many MiB of RAM to assume if the real amount cannot | [How many MiB of RAM to assume if the real amount cannot | |||
be determined.]) | be determined.]) | |||
######################### | ######################### | |||
# Components to install # | # Components to install # | |||
######################### | ######################### | |||
AC_ARG_ENABLE([xz], [AC_HELP_STRING([--disable-xz], | AC_ARG_ENABLE([xz], [AS_HELP_STRING([--disable-xz], | |||
[do not build the xz tool])], | [do not build the xz tool])], | |||
[], [enable_xz=yes]) | [], [enable_xz=yes]) | |||
AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno]) | AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno]) | |||
AC_ARG_ENABLE([xzdec], [AC_HELP_STRING([--disable-xzdec], | AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec], | |||
[do not build xzdec])], | [do not build xzdec])], | |||
[], [enable_xzdec=yes]) | [], [enable_xzdec=yes]) | |||
AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno]) | AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno]) | |||
AC_ARG_ENABLE([lzmadec], [AC_HELP_STRING([--disable-lzmadec], | AC_ARG_ENABLE([lzmadec], [AS_HELP_STRING([--disable-lzmadec], | |||
[do not build lzmadec | [do not build lzmadec | |||
(it exists primarily for LZMA Utils compatibility)])], | (it exists primarily for LZMA Utils compatibility)])], | |||
[], [enable_lzmadec=yes]) | [], [enable_lzmadec=yes]) | |||
AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno]) | AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno]) | |||
AC_ARG_ENABLE([lzmainfo], [AC_HELP_STRING([--disable-lzmainfo], | AC_ARG_ENABLE([lzmainfo], [AS_HELP_STRING([--disable-lzmainfo], | |||
[do not build lzmainfo | [do not build lzmainfo | |||
(it exists primarily for LZMA Utils compatibility)])], | (it exists primarily for LZMA Utils compatibility)])], | |||
[], [enable_lzmainfo=yes]) | [], [enable_lzmainfo=yes]) | |||
AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno]) | AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno]) | |||
AC_ARG_ENABLE([lzma-links], [AC_HELP_STRING([--disable-lzma-links], | AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links], | |||
[do not create symlinks for LZMA Utils compatibility])], | [do not create symlinks for LZMA Utils compatibility])], | |||
[], [enable_lzma_links=yes]) | [], [enable_lzma_links=yes]) | |||
AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno]) | AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno]) | |||
AC_ARG_ENABLE([scripts], [AC_HELP_STRING([--disable-scripts], | AC_ARG_ENABLE([scripts], [AS_HELP_STRING([--disable-scripts], | |||
[do not install the scripts xzdiff, xzgrep, xzless, xzmore, | [do not install the scripts xzdiff, xzgrep, xzless, xzmore, | |||
and their symlinks])], | and their symlinks])], | |||
[], [enable_scripts=yes]) | [], [enable_scripts=yes]) | |||
AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno]) | AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno]) | |||
AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc], | ||||
[do not install documentation files to docdir | ||||
(man pages will still be installed)])], | ||||
[], [enable_doc=yes]) | ||||
AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno]) | ||||
##################### | ##################### | |||
# Symbol versioning # | # Symbol versioning # | |||
##################### | ##################### | |||
AC_MSG_CHECKING([if library symbol versioning should be used]) | AC_MSG_CHECKING([if library symbol versioning should be used]) | |||
AC_ARG_ENABLE([symbol-versions], [AC_HELP_STRING([--enable-symbol-versions] , | AC_ARG_ENABLE([symbol-versions], [AS_HELP_STRING([--enable-symbol-versions] , | |||
[Use symbol versioning for liblzma. Enabled by default on | [Use symbol versioning for liblzma. Enabled by default on | |||
GNU/Linux, other GNU-based systems, and FreeBSD.])], | GNU/Linux, other GNU-based systems, and FreeBSD.])], | |||
[], [enable_symbol_versions=auto]) | [], [enable_symbol_versions=auto]) | |||
if test "x$enable_symbol_versions" = xauto; then | if test "x$enable_symbol_versions" = xauto; then | |||
case $host_os in | case $host_os in | |||
# NOTE: Even if one omits -gnu on GNU/Linux (e.g. | # NOTE: Even if one omits -gnu on GNU/Linux (e.g. | |||
# i486-slackware-linux), configure will (via config.sub) | # i486-slackware-linux), configure will (via config.sub) | |||
# append -gnu (e.g. i486-slackware-linux-gnu), and this | # append -gnu (e.g. i486-slackware-linux-gnu), and this | |||
# test will work correctly. | # test will work correctly. | |||
gnu* | *-gnu* | freebsd*) | gnu* | *-gnu* | freebsd*) | |||
skipping to change at line 435 | skipping to change at line 473 | |||
echo | echo | |||
gl_POSIX_SHELL | gl_POSIX_SHELL | |||
if test -z "$POSIX_SHELL" ; then | if test -z "$POSIX_SHELL" ; then | |||
AC_MSG_ERROR([No POSIX conforming shell (sh) was found.]) | AC_MSG_ERROR([No POSIX conforming shell (sh) was found.]) | |||
fi | fi | |||
echo | echo | |||
echo "Initializing Automake:" | echo "Initializing Automake:" | |||
AM_INIT_AUTOMAKE([1.10 foreign tar-v7 filename-length-max=99]) | # We don't use "subdir-objects" yet because it breaks "make distclean" when | |||
# dependencies are enabled (as of Automake 1.14.1) due to this bug: | ||||
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354 | ||||
# The -Wno-unsupported is used to silence warnings about missing | ||||
# "subdir-objects". | ||||
AM_INIT_AUTOMAKE([1.12 foreign tar-v7 filename-length-max=99 serial-tests - | ||||
Wno-unsupported]) | ||||
AC_PROG_LN_S | AC_PROG_LN_S | |||
AC_PROG_CC_C99 | AC_PROG_CC_C99 | |||
if test x$ac_cv_prog_cc_c99 = xno ; then | if test x$ac_cv_prog_cc_c99 = xno ; then | |||
AC_MSG_ERROR([No C99 compiler was found.]) | AC_MSG_ERROR([No C99 compiler was found.]) | |||
fi | fi | |||
AM_PROG_CC_C_O | AM_PROG_CC_C_O | |||
AM_PROG_AS | AM_PROG_AS | |||
AC_USE_SYSTEM_EXTENSIONS | AC_USE_SYSTEM_EXTENSIONS | |||
if test "x$enable_threads" = xyes; then | case $enable_threads in | |||
echo | posix) | |||
echo "Threading support:" | echo | |||
AX_PTHREAD | echo "POSIX threading support:" | |||
LIBS="$LIBS $PTHREAD_LIBS" | AX_PTHREAD([:]) dnl We don't need the HAVE_PTHREAD macro. | |||
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" | LIBS="$LIBS $PTHREAD_LIBS" | |||
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" | ||||
dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX, but | ||||
dnl it's tricky to get it right together with AC_PROG_CC_C99. | dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX, | |||
dnl Thus, this is handled by telling the user in INSTALL to set | dnl but it's tricky to get it right together with | |||
dnl the correct CC manually. | dnl AC_PROG_CC_C99. Thus, this is handled by telling the | |||
dnl user in INSTALL to set the correct CC manually. | ||||
# These are nice to have but not mandatory. | ||||
OLD_CFLAGS=$CFLAGS | AC_DEFINE([MYTHREAD_POSIX], [1], | |||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | [Define to 1 when using POSIX threads (pthreads).]) | |||
AC_SEARCH_LIBS([clock_gettime], [rt]) | ||||
AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock]) | # These are nice to have but not mandatory. | |||
AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]]) | # | |||
CFLAGS=$OLD_CFLAGS | # FIXME: xz uses clock_gettime if it is available and can do | |||
fi | # it even when threading is disabled. Moving this outside | |||
AM_CONDITIONAL([COND_THREADS], [test "x$ax_pthread_ok" = xyes]) | # of pthread detection may be undesirable because then | |||
# liblzma may get linked against librt even when librt isn't | ||||
# needed by liblzma. | ||||
OLD_CFLAGS=$CFLAGS | ||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||||
AC_SEARCH_LIBS([clock_gettime], [rt]) | ||||
AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock]) | ||||
AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h | ||||
>]]) | ||||
CFLAGS=$OLD_CFLAGS | ||||
;; | ||||
win95) | ||||
AC_DEFINE([MYTHREAD_WIN95], [1], [Define to 1 when using | ||||
Windows 95 (and thus XP) compatible threads. | ||||
This avoids use of features that were added in | ||||
Windows Vista.]) | ||||
;; | ||||
vista) | ||||
AC_DEFINE([MYTHREAD_VISTA], [1], [Define to 1 when using | ||||
Windows Vista compatible threads. This uses | ||||
features that are not available on Windows XP.]) | ||||
;; | ||||
esac | ||||
AM_CONDITIONAL([COND_THREADS], [test "x$enable_threads" != xno]) | ||||
echo | echo | |||
echo "Initializing Libtool:" | echo "Initializing Libtool:" | |||
LT_PREREQ([2.2]) | LT_PREREQ([2.2]) | |||
LT_INIT([win32-dll]) | LT_INIT([win32-dll]) | |||
LT_LANG([Windows Resource]) | LT_LANG([Windows Resource]) | |||
# This is a bit wrong since it is possible to request that only some libs | # This is a bit wrong since it is possible to request that only some libs | |||
# are built as shared. Using that feature isn't so common though, and this | # are built as shared. Using that feature isn't so common though, and this | |||
# breaks only on Windows (at least for now) if the user enables only some | # breaks only on Windows (at least for now) if the user enables only some | |||
# libs as shared. | # libs as shared. | |||
AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno]) | AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno]) | |||
########################################################################### #### | ########################################################################### #### | |||
# Checks for libraries. | # Checks for libraries. | |||
########################################################################### #### | ########################################################################### #### | |||
echo | echo | |||
echo "Initializing gettext:" | echo "Initializing gettext:" | |||
AM_GNU_GETTEXT_VERSION([0.16.1]) | AM_GNU_GETTEXT_VERSION([0.18]) | |||
AM_GNU_GETTEXT([external]) | AM_GNU_GETTEXT([external]) | |||
########################################################################### #### | ########################################################################### #### | |||
# Checks for header files. | # Checks for header files. | |||
########################################################################### #### | ########################################################################### #### | |||
echo | echo | |||
echo "System headers and functions:" | echo "System headers and functions:" | |||
# There is currently no workarounds in this package if some of | # There is currently no workarounds in this package if some of | |||
# these headers are missing. | # these headers are missing. | |||
AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h], | AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h], | |||
[], | [], | |||
[AC_MSG_ERROR([Required header file(s) are missing.])]) | [AC_MSG_ERROR([Required header file(s) are missing.])]) | |||
# This allows the use of the intrinsic functions if they are available. | ||||
AC_CHECK_HEADERS([immintrin.h]) | ||||
########################################################################### #### | ########################################################################### #### | |||
# Checks for typedefs, structures, and compiler characteristics. | # Checks for typedefs, structures, and compiler characteristics. | |||
########################################################################### #### | ########################################################################### #### | |||
dnl We don't need these as long as we need a C99 compiler anyway. | dnl We don't need these as long as we need a C99 compiler anyway. | |||
dnl AC_C_INLINE | dnl AC_C_INLINE | |||
dnl AC_C_RESTRICT | dnl AC_C_RESTRICT | |||
AC_HEADER_STDBOOL | AC_HEADER_STDBOOL | |||
skipping to change at line 524 | skipping to change at line 592 | |||
AC_TYPE_UINT16_T | AC_TYPE_UINT16_T | |||
AC_TYPE_INT32_T | AC_TYPE_INT32_T | |||
AC_TYPE_UINT32_T | AC_TYPE_UINT32_T | |||
AC_TYPE_INT64_T | AC_TYPE_INT64_T | |||
AC_TYPE_UINT64_T | AC_TYPE_UINT64_T | |||
AC_TYPE_UINTPTR_T | AC_TYPE_UINTPTR_T | |||
AC_CHECK_SIZEOF([size_t]) | AC_CHECK_SIZEOF([size_t]) | |||
# The command line tool can copy high resolution timestamps if such | # The command line tool can copy high resolution timestamps if such | |||
# information is availabe in struct stat. Otherwise one second accuracy | # information is available in struct stat. Otherwise one second accuracy | |||
# is used. | # is used. | |||
AC_CHECK_MEMBERS([ | AC_CHECK_MEMBERS([ | |||
struct stat.st_atim.tv_nsec, | struct stat.st_atim.tv_nsec, | |||
struct stat.st_atimespec.tv_nsec, | struct stat.st_atimespec.tv_nsec, | |||
struct stat.st_atimensec, | struct stat.st_atimensec, | |||
struct stat.st_uatime, | struct stat.st_uatime, | |||
struct stat.st_atim.st__tim.tv_nsec]) | struct stat.st_atim.st__tim.tv_nsec]) | |||
AC_SYS_LARGEFILE | AC_SYS_LARGEFILE | |||
AC_C_BIGENDIAN | AC_C_BIGENDIAN | |||
skipping to change at line 609 | skipping to change at line 677 | |||
AC_SEARCH_LIBS([SHA256Init], [md]) | AC_SEARCH_LIBS([SHA256Init], [md]) | |||
AC_CHECK_FUNCS([CC_SHA256_Init SHA256_Init SHA256Init], | AC_CHECK_FUNCS([CC_SHA256_Init SHA256_Init SHA256Init], | |||
[break]) | [break]) | |||
fi | fi | |||
fi | fi | |||
AM_CONDITIONAL([COND_INTERNAL_SHA256], | AM_CONDITIONAL([COND_INTERNAL_SHA256], | |||
[test "x$ac_cv_func_SHA256_Init" != xyes \ | [test "x$ac_cv_func_SHA256_Init" != xyes \ | |||
&& test "x$ac_cv_func_SHA256Init" != xyes \ | && test "x$ac_cv_func_SHA256Init" != xyes \ | |||
&& test "x$ac_cv_func_CC_SHA256_Init" != xyes]) | && test "x$ac_cv_func_CC_SHA256_Init" != xyes]) | |||
# Check for SSE2 intrinsics. | ||||
AC_CHECK_DECL([_mm_movemask_epi8], | ||||
[AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1], | ||||
[Define to 1 if _mm_movemask_epi8 is available.])], | ||||
[], | ||||
[#ifdef HAVE_IMMINTRIN_H | ||||
#include <immintrin.h> | ||||
#endif]) | ||||
########################################################################### #### | ########################################################################### #### | |||
# If using GCC, set some additional AM_CFLAGS: | # If using GCC, set some additional AM_CFLAGS: | |||
########################################################################### #### | ########################################################################### #### | |||
if test "$GCC" = yes ; then | if test "$GCC" = yes ; then | |||
echo | echo | |||
echo "GCC extensions:" | echo "GCC extensions:" | |||
fi | fi | |||
# Always do the visibility check but don't set AM_CFLAGS on Windows. | # Always do the visibility check but don't set AM_CFLAGS on Windows. | |||
skipping to change at line 641 | skipping to change at line 718 | |||
# pointer although we don't modify anything through it. | # pointer although we don't modify anything through it. | |||
# * -Wcast-align breaks optimized CRC32 and CRC64 implementation | # * -Wcast-align breaks optimized CRC32 and CRC64 implementation | |||
# on some architectures (not on x86), where this warning is bogu s, | # on some architectures (not on x86), where this warning is bogu s, | |||
# because we take care of correct alignment. | # because we take care of correct alignment. | |||
# * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations | # * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations | |||
# don't seem so useful here; at least the last one gives some | # don't seem so useful here; at least the last one gives some | |||
# warnings which are not bugs. | # warnings which are not bugs. | |||
for NEW_FLAG in \ | for NEW_FLAG in \ | |||
-Wall \ | -Wall \ | |||
-Wextra \ | -Wextra \ | |||
-Wvla \ | ||||
-Wformat=2 \ | -Wformat=2 \ | |||
-Winit-self \ | -Winit-self \ | |||
-Wmissing-include-dirs \ | -Wmissing-include-dirs \ | |||
-Wstrict-aliasing \ | -Wstrict-aliasing \ | |||
-Wfloat-equal \ | -Wfloat-equal \ | |||
-Wundef \ | -Wundef \ | |||
-Wshadow \ | -Wshadow \ | |||
-Wpointer-arith \ | -Wpointer-arith \ | |||
-Wbad-function-cast \ | -Wbad-function-cast \ | |||
-Wwrite-strings \ | -Wwrite-strings \ | |||
skipping to change at line 662 | skipping to change at line 740 | |||
-Waggregate-return \ | -Waggregate-return \ | |||
-Wstrict-prototypes \ | -Wstrict-prototypes \ | |||
-Wold-style-definition \ | -Wold-style-definition \ | |||
-Wmissing-prototypes \ | -Wmissing-prototypes \ | |||
-Wmissing-declarations \ | -Wmissing-declarations \ | |||
-Wmissing-noreturn \ | -Wmissing-noreturn \ | |||
-Wredundant-decls | -Wredundant-decls | |||
do | do | |||
AC_MSG_CHECKING([if $CC accepts $NEW_FLAG]) | AC_MSG_CHECKING([if $CC accepts $NEW_FLAG]) | |||
OLD_CFLAGS="$CFLAGS" | OLD_CFLAGS="$CFLAGS" | |||
CFLAGS="$CFLAGS $NEW_FLAG" | CFLAGS="$CFLAGS $NEW_FLAG -Werror" | |||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo(void) { }])], [ | AC_COMPILE_IFELSE([AC_LANG_SOURCE( | |||
[void foo(void); void foo(void) { }])], [ | ||||
AM_CFLAGS="$AM_CFLAGS $NEW_FLAG" | AM_CFLAGS="$AM_CFLAGS $NEW_FLAG" | |||
AC_MSG_RESULT([yes]) | AC_MSG_RESULT([yes]) | |||
], [ | ], [ | |||
AC_MSG_RESULT([no]) | AC_MSG_RESULT([no]) | |||
]) | ]) | |||
CFLAGS="$OLD_CFLAGS" | CFLAGS="$OLD_CFLAGS" | |||
done | done | |||
AC_ARG_ENABLE([werror], | AC_ARG_ENABLE([werror], | |||
AC_HELP_STRING([--enable-werror], [Enable -Werror to abort | AS_HELP_STRING([--enable-werror], [Enable -Werror to abort | |||
compilation on all compiler warnings.]), | compilation on all compiler warnings.]), | |||
[], [enable_werror=no]) | [], [enable_werror=no]) | |||
if test "x$enable_werror" = "xyes"; then | if test "x$enable_werror" = "xyes"; then | |||
AM_CFLAGS="$AM_CFLAGS -Werror" | AM_CFLAGS="$AM_CFLAGS -Werror" | |||
fi | fi | |||
fi | fi | |||
########################################################################### #### | ########################################################################### #### | |||
# Create the makefiles and config.h | # Create the makefiles and config.h | |||
########################################################################### #### | ########################################################################### #### | |||
skipping to change at line 704 | skipping to change at line 783 | |||
# This is needed for src/scripts. | # This is needed for src/scripts. | |||
xz=`echo xz | sed "$program_transform_name"` | xz=`echo xz | sed "$program_transform_name"` | |||
AC_SUBST([xz]) | AC_SUBST([xz]) | |||
AC_CONFIG_FILES([ | AC_CONFIG_FILES([ | |||
Doxyfile | Doxyfile | |||
Makefile | Makefile | |||
po/Makefile.in | po/Makefile.in | |||
lib/Makefile | lib/Makefile | |||
src/Makefile | src/Makefile | |||
src/liblzma/liblzma.pc | ||||
src/liblzma/Makefile | src/liblzma/Makefile | |||
src/liblzma/api/Makefile | src/liblzma/api/Makefile | |||
src/xz/Makefile | src/xz/Makefile | |||
src/xzdec/Makefile | src/xzdec/Makefile | |||
src/lzmainfo/Makefile | src/lzmainfo/Makefile | |||
src/scripts/Makefile | src/scripts/Makefile | |||
tests/Makefile | tests/Makefile | |||
debug/Makefile | debug/Makefile | |||
]) | ]) | |||
AC_CONFIG_FILES([src/scripts/xzdiff], [chmod +x src/scripts/xzdiff]) | AC_CONFIG_FILES([src/scripts/xzdiff], [chmod +x src/scripts/xzdiff]) | |||
skipping to change at line 735 | skipping to change at line 813 | |||
echo "No supported method to detect the amount of RAM." | echo "No supported method to detect the amount of RAM." | |||
echo "Consider using --enable-assume-ram (if you didn't already)" | echo "Consider using --enable-assume-ram (if you didn't already)" | |||
echo "or make a patch to add support for this operating system." | echo "or make a patch to add support for this operating system." | |||
fi | fi | |||
if test x$tuklib_cv_cpucores_method = xunknown; then | if test x$tuklib_cv_cpucores_method = xunknown; then | |||
echo | echo | |||
echo "WARNING:" | echo "WARNING:" | |||
echo "No supported method to detect the number of CPU cores." | echo "No supported method to detect the number of CPU cores." | |||
fi | fi | |||
if test "x$enable_threads$enable_small" = xnoyes; then | ||||
echo | ||||
echo "NOTE:" | ||||
echo "liblzma will be thread unsafe due the combination" | ||||
echo "of --disable-threads --enable-small." | ||||
fi | ||||
End of changes. 33 change blocks. | ||||
53 lines changed or deleted | 134 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |