Build: Avoid different quoting style in --enable-doxygen doc.
[xz.git] / configure.ac
blob5ad55898cd1bee0a85f1d72b5ff0a197f5e5491b
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 ###############################################################################
6 # Author: Lasse Collin
8 # This file has been put into the public domain.
9 # You can do whatever you want with this file.
11 ###############################################################################
13 # NOTE: Don't add useless checks. autoscan detects this and that, but don't
14 # let it confuse you. For example, we don't care about checking for behavior
15 # of malloc(), stat(), or lstat(), since we don't use those functions in
16 # a way that would cause the problems the autoconf macros check.
18 AC_PREREQ([2.69])
20 AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]),
21         [xz@tukaani.org], [xz], [https://tukaani.org/xz/])
22 AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
23 AC_CONFIG_AUX_DIR([build-aux])
24 AC_CONFIG_MACRO_DIR([m4])
25 AC_CONFIG_HEADERS([config.h])
27 echo
28 echo "$PACKAGE_STRING"
30 echo
31 echo "System type:"
32 # This is needed to know if assembler optimizations can be used.
33 AC_CANONICAL_HOST
35 # We do some special things on Windows (32-bit or 64-bit) builds.
36 case $host_os in
37         mingw* | cygwin | msys) is_w32=yes ;;
38         *)                      is_w32=no ;;
39 esac
40 AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
42 # We need to use $EXEEXT with $(LN_S) when creating symlinks to
43 # executables. Cygwin is an exception to this, since it is recommended
44 # that symlinks don't have the .exe suffix. To make this work, we
45 # define LN_EXEEXT.
47 # MSYS2 is treated the same way as Cygwin. It uses plain "msys" like
48 # the original MSYS when building MSYS/MSYS2-binaries. Hopefully this
49 # doesn't break things for the original MSYS developers. Note that this
50 # doesn't affect normal MSYS/MSYS2 users building non-MSYS/MSYS2 binaries
51 # since in that case the $host_os is usually mingw32.
52 case $host_os in
53         cygwin | msys)  LN_EXEEXT= ;;
54         *)              LN_EXEEXT='$(EXEEXT)' ;;
55 esac
56 AC_SUBST([LN_EXEEXT])
58 echo
59 echo "Configure options:"
60 AM_CFLAGS=
63 #############
64 # Debugging #
65 #############
67 AC_MSG_CHECKING([if debugging code should be compiled])
68 AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging code.]),
69         [], enable_debug=no)
70 if test "x$enable_debug" = xyes; then
71         AC_MSG_RESULT([yes])
72 else
73         AC_DEFINE([NDEBUG], [1], [Define to 1 to disable debugging code.])
74         AC_MSG_RESULT([no])
78 ###########
79 # Filters #
80 ###########
82 m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc])dnl
83 m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,arm64,sparc])
84 m4_define([LZ_FILTERS], [lzma1,lzma2])
86 m4_foreach([NAME], [SUPPORTED_FILTERS],
87 [enable_filter_[]NAME=no
88 enable_encoder_[]NAME=no
89 enable_decoder_[]NAME=no
90 ])dnl
92 AC_MSG_CHECKING([which encoders to build])
93 AC_ARG_ENABLE([encoders], AS_HELP_STRING([--enable-encoders=LIST],
94                 [Comma-separated list of encoders to build. Default=all.
95                 Available encoders:]
96                         m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])),
97         [], [enable_encoders=SUPPORTED_FILTERS])
98 enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
99 if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
100         enable_encoders=no
101         AC_MSG_RESULT([(none)])
102 else
103         for arg in $enable_encoders
104         do
105                 case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
106                         NAME)
107                                 enable_filter_[]NAME=yes
108                                 enable_encoder_[]NAME=yes
109                                 AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1],
110                                 [Define to 1 if] NAME [encoder is enabled.])
111                                 ;;])
112                         *)
113                                 AC_MSG_RESULT([])
114                                 AC_MSG_ERROR([unknown filter: $arg])
115                                 ;;
116                 esac
117         done
118         AC_DEFINE([HAVE_ENCODERS], [1],
119                 [Define to 1 if any of HAVE_ENCODER_foo have been defined.])
120         AC_MSG_RESULT([$enable_encoders])
123 AC_MSG_CHECKING([which decoders to build])
124 AC_ARG_ENABLE([decoders], AS_HELP_STRING([--enable-decoders=LIST],
125                 [Comma-separated list of decoders to build. Default=all.
126                 Available decoders are the same as available encoders.]),
127         [], [enable_decoders=SUPPORTED_FILTERS])
128 enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
129 if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
130         enable_decoders=no
131         AC_MSG_RESULT([(none)])
132 else
133         for arg in $enable_decoders
134         do
135                 case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
136                         NAME)
137                                 enable_filter_[]NAME=yes
138                                 enable_decoder_[]NAME=yes
139                                 AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1],
140                                 [Define to 1 if] NAME [decoder is enabled.])
141                                 ;;])
142                         *)
143                                 AC_MSG_RESULT([])
144                                 AC_MSG_ERROR([unknown filter: $arg])
145                                 ;;
146                 esac
147         done
148         AC_DEFINE([HAVE_DECODERS], [1],
149                 [Define to 1 if any of HAVE_DECODER_foo have been defined.])
150         AC_MSG_RESULT([$enable_decoders])
153 if test "x$enable_encoder_lzma2$enable_encoder_lzma1" = xyesno \
154                 || test "x$enable_decoder_lzma2$enable_decoder_lzma1" = xyesno; then
155         AC_MSG_ERROR([LZMA2 requires that LZMA1 is also enabled.])
158 AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoders" != xno)
159 AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoders" != xno)
161 m4_foreach([NAME], [SUPPORTED_FILTERS],
162 [AM_CONDITIONAL(COND_FILTER_[]m4_toupper(NAME), test "x$enable_filter_[]NAME" = xyes)
163 AM_CONDITIONAL(COND_ENCODER_[]m4_toupper(NAME), test "x$enable_encoder_[]NAME" = xyes)
164 AM_CONDITIONAL(COND_DECODER_[]m4_toupper(NAME), test "x$enable_decoder_[]NAME" = xyes)
165 ])dnl
167 # The so called "simple filters" share common code.
168 enable_filter_simple=no
169 enable_encoder_simple=no
170 enable_decoder_simple=no
171 m4_foreach([NAME], [SIMPLE_FILTERS],
172 [test "x$enable_filter_[]NAME" = xyes && enable_filter_simple=yes
173 test "x$enable_encoder_[]NAME" = xyes && enable_encoder_simple=yes
174 test "x$enable_decoder_[]NAME" = xyes && enable_decoder_simple=yes
175 ])dnl
176 AM_CONDITIONAL(COND_FILTER_SIMPLE, test "x$enable_filter_simple" = xyes)
177 AM_CONDITIONAL(COND_ENCODER_SIMPLE, test "x$enable_encoder_simple" = xyes)
178 AM_CONDITIONAL(COND_DECODER_SIMPLE, test "x$enable_decoder_simple" = xyes)
180 # LZ-based filters share common code.
181 enable_filter_lz=no
182 enable_encoder_lz=no
183 enable_decoder_lz=no
184 m4_foreach([NAME], [LZ_FILTERS],
185 [test "x$enable_filter_[]NAME" = xyes && enable_filter_lz=yes
186 test "x$enable_encoder_[]NAME" = xyes && enable_encoder_lz=yes
187 test "x$enable_decoder_[]NAME" = xyes && enable_decoder_lz=yes
188 ])dnl
189 AM_CONDITIONAL(COND_FILTER_LZ, test "x$enable_filter_lz" = xyes)
190 AM_CONDITIONAL(COND_ENCODER_LZ, test "x$enable_encoder_lz" = xyes)
191 AM_CONDITIONAL(COND_DECODER_LZ, test "x$enable_decoder_lz" = xyes)
194 #################
195 # Match finders #
196 #################
198 m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4])
200 m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS],
201 [enable_match_finder_[]NAME=no
204 AC_MSG_CHECKING([which match finders to build])
205 AC_ARG_ENABLE([match-finders], AS_HELP_STRING([--enable-match-finders=LIST],
206                 [Comma-separated list of match finders to build. Default=all.
207                 At least one match finder is required for encoding with
208                 the LZMA1 and LZMA2 filters. Available match finders:]
209                 m4_translit(m4_defn([SUPPORTED_MATCH_FINDERS]), [,], [ ])), [],
210         [enable_match_finders=SUPPORTED_MATCH_FINDERS])
211 enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'`
212 if test "x$enable_encoder_lz" = xyes ; then
213         if test -z "$enable_match_finders"; then
214                 AC_MSG_ERROR([At least one match finder is required for an LZ-based encoder.])
215         fi
217         for arg in $enable_match_finders
218                 do
219                 case $arg in m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [
220                         NAME)
221                                 enable_match_finder_[]NAME=yes
222                                 AC_DEFINE(HAVE_MF_[]m4_toupper(NAME), [1],
223                                 [Define to 1 to enable] NAME [match finder.])
224                                 ;;])
225                         *)
226                                 AC_MSG_RESULT([])
227                                 AC_MSG_ERROR([unknown match finder: $arg])
228                                 ;;
229                 esac
230         done
231         AC_MSG_RESULT([$enable_match_finders])
232 else
233         AC_MSG_RESULT([(none because not building any LZ-based encoder)])
237 ####################
238 # Integrity checks #
239 ####################
241 m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256])
243 m4_foreach([NAME], [SUPPORTED_CHECKS],
244 [enable_check_[]NAME=no
245 ])dnl
247 AC_MSG_CHECKING([which integrity checks to build])
248 AC_ARG_ENABLE([checks], AS_HELP_STRING([--enable-checks=LIST],
249                 [Comma-separated list of integrity checks to build.
250                 Default=all. Available integrity checks:]
251                 m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])),
252         [], [enable_checks=SUPPORTED_CHECKS])
253 enable_checks=`echo "$enable_checks" | sed 's/,/ /g'`
254 if test "x$enable_checks" = xno || test "x$enable_checks" = x; then
255         AC_MSG_RESULT([(none)])
256 else
257         for arg in $enable_checks
258         do
259                 case $arg in m4_foreach([NAME], [SUPPORTED_CHECKS], [
260                         NAME)
261                                 enable_check_[]NAME=yes
262                                 AC_DEFINE(HAVE_CHECK_[]m4_toupper(NAME), [1],
263                                 [Define to 1 if] NAME
264                                 [integrity check is enabled.])
265                                 ;;])
266                         *)
267                                 AC_MSG_RESULT([])
268                                 AC_MSG_ERROR([unknown integrity check: $arg])
269                                 ;;
270                 esac
271         done
272         AC_MSG_RESULT([$enable_checks])
274 if test "x$enable_check_crc32" = xno ; then
275         AC_MSG_ERROR([For now, the CRC32 check must always be enabled.])
278 m4_foreach([NAME], [SUPPORTED_CHECKS],
279 [AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes)
280 ])dnl
282 AC_MSG_CHECKING([if external SHA-256 should be used])
283 AC_ARG_ENABLE([external-sha256], AS_HELP_STRING([--enable-external-sha256],
284                 [Use SHA-256 code from the operating system.
285                 See INSTALL for possible subtle problems.]),
286                 [], [enable_external_sha256=no])
287 if test "x$enable_check_sha256" != "xyes"; then
288         enable_external_sha256=no
290 if test "x$enable_external_sha256" = xyes; then
291         AC_MSG_RESULT([yes])
292 else
293         AC_MSG_RESULT([no])
297 #############
298 # MicroLZMA #
299 #############
301 AC_MSG_CHECKING([if MicroLZMA support should be built])
302 AC_ARG_ENABLE([microlzma], AS_HELP_STRING([--disable-microlzma],
303                 [Do not build MicroLZMA encoder and decoder.
304                 It is needed by specific applications only,
305                 for example, erofs-utils.]),
306         [], [enable_microlzma=yes])
307 case $enable_microlzma in
308         yes | no)
309                 AC_MSG_RESULT([$enable_microlzma])
310                 ;;
311         *)
312                 AC_MSG_RESULT([])
313                 AC_MSG_ERROR([--enable-microlzma accepts only `yes' or `no'.])
314                 ;;
315 esac
316 AM_CONDITIONAL(COND_MICROLZMA, test "x$enable_microlzma" = xyes)
319 #############################
320 # .lz (lzip) format support #
321 #############################
323 AC_MSG_CHECKING([if .lz (lzip) decompression support should be built])
324 AC_ARG_ENABLE([lzip-decoder], AS_HELP_STRING([--disable-lzip-decoder],
325                 [Disable decompression support for .lz (lzip) files.]),
326         [], [enable_lzip_decoder=yes])
327 if test "x$enable_decoder_lzma1" != xyes; then
328         enable_lzip_decoder=no
329         AC_MSG_RESULT([no because LZMA1 decoder is disabled])
330 elif test "x$enable_lzip_decoder" = xyes; then
331         AC_DEFINE([HAVE_LZIP_DECODER], [1],
332                 [Define to 1 if .lz (lzip) decompression support is enabled.])
333         AC_MSG_RESULT([yes])
334 else
335         AC_MSG_RESULT([no])
337 AM_CONDITIONAL(COND_LZIP_DECODER, test "x$enable_lzip_decoder" = xyes)
340 ###########################
341 # Assembler optimizations #
342 ###########################
344 AC_MSG_CHECKING([if assembler optimizations should be used])
345 AC_ARG_ENABLE([assembler], AS_HELP_STRING([--disable-assembler],
346                 [Do not use assembler optimizations even if such exist
347                 for the architecture.]),
348         [], [enable_assembler=yes])
349 if test "x$enable_assembler" = xyes; then
350         enable_assembler=no
351         case $host_os in
352                 # Darwin should work too but only if not creating universal
353                 # binaries. Solaris x86 could work too but I cannot test.
354                 linux* | *bsd* | mingw* | cygwin | msys | *djgpp*)
355                         case $host_cpu in
356                                 i?86)   enable_assembler=x86 ;;
357                         esac
358                         ;;
359         esac
361 case $enable_assembler in
362         x86 | no)
363                 AC_MSG_RESULT([$enable_assembler])
364                 ;;
365         *)
366                 AC_MSG_RESULT([])
367                 AC_MSG_ERROR([--enable-assembler accepts only `yes', `no', or `x86' (32-bit).])
368                 ;;
369 esac
370 AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
373 #############
374 # CLMUL CRC #
375 #############
377 AC_ARG_ENABLE([clmul-crc], AS_HELP_STRING([--disable-clmul-crc],
378                 [Do not use carryless multiplication for CRC calculation
379                 even if support for it is detected.]),
380         [], [enable_clmul_crc=yes])
383 #####################
384 # Size optimization #
385 #####################
387 AC_MSG_CHECKING([if small size is preferred over speed])
388 AC_ARG_ENABLE([small], AS_HELP_STRING([--enable-small],
389                 [Make liblzma smaller and a little slower.
390                 This is disabled by default to optimize for speed.]),
391         [], [enable_small=no])
392 if test "x$enable_small" = xyes; then
393         AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.])
394 elif test "x$enable_small" != xno; then
395         AC_MSG_RESULT([])
396         AC_MSG_ERROR([--enable-small accepts only `yes' or `no'])
398 AC_MSG_RESULT([$enable_small])
399 AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
402 #############
403 # Threading #
404 #############
406 AC_MSG_CHECKING([if threading support is wanted])
407 AC_ARG_ENABLE([threads], AS_HELP_STRING([--enable-threads=METHOD],
408                 [Supported METHODS are `yes', `no', `posix', `win95', and
409                 `vista'. The default is `yes'. Using `no' together with
410                 --enable-small makes liblzma thread unsafe.]),
411         [], [enable_threads=yes])
413 if test "x$enable_threads" = xyes; then
414         case $host_os in
415                 mingw*)
416                         case $host_cpu in
417                                 i?86)   enable_threads=win95 ;;
418                                 *)      enable_threads=vista ;;
419                         esac
420                         ;;
421                 *)
422                         enable_threads=posix
423                         ;;
424         esac
427 case $enable_threads in
428         posix | win95 | vista)
429                 AC_MSG_RESULT([yes, $enable_threads])
430                 ;;
431         no)
432                 AC_MSG_RESULT([no])
433                 ;;
434         *)
435                 AC_MSG_RESULT([])
436                 AC_MSG_ERROR([--enable-threads only accepts `yes', `no', `posix', `win95', or `vista'])
437                 ;;
438 esac
440 # The Win95 threading lacks thread-safe one-time initialization function.
441 # It's better to disallow it instead of allowing threaded but thread-unsafe
442 # build.
443 if test "x$enable_small$enable_threads" = xyeswin95; then
444         AC_MSG_ERROR([--enable-threads=win95 and --enable-small cannot be
445                 used at the same time])
448 # We use the actual result a little later.
451 #########################
452 # Assumed amount of RAM #
453 #########################
455 # We use 128 MiB as default, because it will allow decompressing files
456 # created with "xz -9". It would be slightly safer to guess a lower value,
457 # but most systems, on which we don't have any way to determine the amount
458 # of RAM, will probably have at least 128 MiB of RAM.
459 AC_MSG_CHECKING([how much RAM to assume if the real amount is unknown])
460 AC_ARG_ENABLE([assume-ram], AS_HELP_STRING([--enable-assume-ram=SIZE],
461                 [If and only if the real amount of RAM cannot be determined,
462                 assume SIZE MiB. The default is 128 MiB. This affects the
463                 default memory usage limit.]),
464         [], [enable_assume_ram=128])
465 assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789`
466 if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
467         AC_MSG_RESULT([])
468         AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument])
470 AC_MSG_RESULT([$enable_assume_ram MiB])
471 AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram],
472                 [How many MiB of RAM to assume if the real amount cannot
473                 be determined.])
476 #########################
477 # Components to install #
478 #########################
480 AC_ARG_ENABLE([xz], [AS_HELP_STRING([--disable-xz],
481                 [do not build the xz tool])],
482         [], [enable_xz=yes])
483 AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno])
485 AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec],
486                 [do not build xzdec])],
487         [], [enable_xzdec=yes])
488 test "x$enable_decoders" = xno && enable_xzdec=no
489 AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno])
491 AC_ARG_ENABLE([lzmadec], [AS_HELP_STRING([--disable-lzmadec],
492                 [do not build lzmadec
493                 (it exists primarily for LZMA Utils compatibility)])],
494         [], [enable_lzmadec=yes])
495 test "x$enable_decoder_lzma1" = xno && enable_lzmadec=no
496 AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno])
498 AC_ARG_ENABLE([lzmainfo], [AS_HELP_STRING([--disable-lzmainfo],
499                 [do not build lzmainfo
500                 (it exists primarily for LZMA Utils compatibility)])],
501         [], [enable_lzmainfo=yes])
502 test "x$enable_decoder_lzma1" = xno && enable_lzmainfo=no
503 AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
505 AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links],
506                 [do not create symlinks for LZMA Utils compatibility])],
507         [], [enable_lzma_links=yes])
508 AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno])
510 AC_ARG_ENABLE([scripts], [AS_HELP_STRING([--disable-scripts],
511                 [do not install the scripts xzdiff, xzgrep, xzless, xzmore,
512                 and their symlinks])],
513         [], [enable_scripts=yes])
514 AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno])
516 AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc],
517                 [do not install documentation files to docdir
518                 (man pages will still be installed)])],
519         [], [enable_doc=yes])
520 AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno])
523 ###########
524 # Doxygen #
525 ###########
527 # Doxygen can be enabled in two different modes:
528 # api - Only generate Doxygen html pages for liblzma API headers.
529 # all - Generate Doxygen html pages for every file.
530 # api mode is the default because the primary purpose for the doxygen
531 # documentation is to publicaly describe liblzma's API. The other html
532 # pages are only useful for those who want to understand or alter the
533 # internals of xz and liblzma.
535 AC_ARG_ENABLE([doxygen], [AS_HELP_STRING([--enable-doxygen=SCOPE],
536                         [Doxygen SCOPE can be `all', or `api'.
537                         The default is `api', which will generate doxygen html
538                         for liblzma API. The `all' option will generate doxygen
539                         html for every .c and .h file.])],
540                 [], [enable_doxygen=api])
541 case $enable_doxygen in
542         api)
543                 doxygen_project_name="liblzma ($PACKAGE_NAME)"
544                 doxygen_extract_private=NO
545                 doxygen_input_path=src/liblzma/api
546                 ;;
547         all)
548                 doxygen_project_name="$PACKAGE_NAME"
549                 doxygen_extract_private=YES
550                 doxygen_input_path=src
551                 ;;
552         *)
553                 AC_MSG_ERROR([--enable-doxygen only accepts `all' or `api'])
554                 ;;
555 esac
557 AC_SUBST([doxygen_project_name])
558 AC_SUBST([doxygen_extract_private])
559 AC_SUBST([doxygen_input_path])
562 ##############
563 # Sandboxing #
564 ##############
566 AC_MSG_CHECKING([if sandboxing should be used])
567 AC_ARG_ENABLE([sandbox], [AS_HELP_STRING([--enable-sandbox=METHOD],
568                 [Sandboxing METHOD can be
569                 `auto', `no', `capsicum', or `pledge'.
570                 The default is `auto' which enables sandboxing if
571                 a supported sandboxing method is found.])],
572         [], [enable_sandbox=auto])
573 case $enable_sandbox in
574         auto)
575                 AC_MSG_RESULT([maybe (autodetect)])
576                 ;;
577         no | capsicum | pledge)
578                 AC_MSG_RESULT([$enable_sandbox])
579                 ;;
580         *)
581                 AC_MSG_RESULT([])
582                 AC_MSG_ERROR([--enable-sandbox only accepts `auto', `no', `capsicum', or `pledge'.])
583                 ;;
584 esac
587 ###########################
588 # PATH prefix for scripts #
589 ###########################
591 # The scripts can add a prefix to the search PATH so that POSIX tools
592 # or the xz binary is always in the PATH.
593 AC_ARG_ENABLE([path-for-scripts],
594         [AS_HELP_STRING([--enable-path-for-scripts=PREFIX],
595                 [If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in
596                 the beginning of the scripts (xzgrep and others).
597                 The default is empty except on Solaris the default is
598                 /usr/xpg4/bin.])],
599         [], [
600                 case $host_os in
601                         solaris*) enable_path_for_scripts=/usr/xpg4/bin ;;
602                         *)        enable_path_for_scripts= ;;
603                 esac
604         ])
605 if test -n "$enable_path_for_scripts" && test "x$enable_path_for_scripts" != xno ; then
606         enable_path_for_scripts="PATH=$enable_path_for_scripts:\$PATH"
607 else
608         enable_path_for_scripts=
610 AC_SUBST([enable_path_for_scripts])
613 ###############################################################################
614 # Checks for programs.
615 ###############################################################################
617 echo
618 case $host_os in
619         solaris*)
620                 # The gnulib POSIX shell macro below may pick a shell that
621                 # doesn't work with xzgrep. Workaround by picking a shell
622                 # that is known to work.
623                 if test -z "$gl_cv_posix_shell" && test -x /usr/xpg4/bin/sh; then
624                         gl_cv_posix_shell=/usr/xpg4/bin/sh
625                 fi
626                 ;;
627 esac
628 gl_POSIX_SHELL
629 if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then
630         AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
633 echo
634 echo "Initializing Automake:"
636 # We don't use "subdir-objects" yet because it breaks "make distclean" when
637 # dependencies are enabled (as of Automake 1.14.1) due to this bug:
638 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
639 # The -Wno-unsupported is used to silence warnings about missing
640 # "subdir-objects".
641 AM_INIT_AUTOMAKE([1.12 foreign tar-v7 filename-length-max=99 -Wno-unsupported])
642 AC_PROG_LN_S
644 AC_PROG_CC_C99
645 if test x$ac_cv_prog_cc_c99 = xno ; then
646         AC_MSG_ERROR([No C99 compiler was found.])
649 AM_PROG_CC_C_O
650 AM_PROG_AS
651 AC_USE_SYSTEM_EXTENSIONS
653 case $enable_threads in
654         posix)
655                 echo
656                 echo "POSIX threading support:"
657                 AX_PTHREAD([:]) dnl We don't need the HAVE_PTHREAD macro.
658                 LIBS="$LIBS $PTHREAD_LIBS"
659                 AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
661                 dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX,
662                 dnl but it's tricky to get it right together with
663                 dnl AC_PROG_CC_C99. Thus, this is handled by telling the
664                 dnl user in INSTALL to set the correct CC manually.
666                 AC_DEFINE([MYTHREAD_POSIX], [1],
667                         [Define to 1 when using POSIX threads (pthreads).])
669                 # These are nice to have but not mandatory.
670                 #
671                 # FIXME: xz uses clock_gettime if it is available and can do
672                 # it even when threading is disabled. Moving this outside
673                 # of pthread detection may be undesirable because then
674                 # liblzma may get linked against librt even when librt isn't
675                 # needed by liblzma.
676                 OLD_CFLAGS=$CFLAGS
677                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
678                 AC_SEARCH_LIBS([clock_gettime], [rt])
679                 AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock])
680                 AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE(
681                         [HAVE_CLOCK_MONOTONIC], [1], [Define to 1 if
682                         `CLOCK_MONOTONIC' is declared in <time.h>.])], [],
683                         [[#include <time.h>]])
684                 CFLAGS=$OLD_CFLAGS
685                 ;;
686         win95)
687                 AC_DEFINE([MYTHREAD_WIN95], [1], [Define to 1 when using
688                         Windows 95 (and thus XP) compatible threads.
689                         This avoids use of features that were added in
690                         Windows Vista.])
691                 ;;
692         vista)
693                 AC_DEFINE([MYTHREAD_VISTA], [1], [Define to 1 when using
694                         Windows Vista compatible threads. This uses
695                         features that are not available on Windows XP.])
696                 ;;
697 esac
698 AM_CONDITIONAL([COND_THREADS], [test "x$enable_threads" != xno])
700 echo
701 echo "Initializing Libtool:"
702 LT_PREREQ([2.4])
703 LT_INIT([win32-dll])
704 LT_LANG([Windows Resource])
706 # This is a bit wrong since it is possible to request that only some libs
707 # are built as shared. Using that feature isn't so common though, and this
708 # breaks only on Windows (at least for now) if the user enables only some
709 # libs as shared.
710 AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno])
712 #####################
713 # Symbol versioning #
714 #####################
716 # NOTE: This checks if we are building shared or static library
717 # and if --with-pic or --without-pic was used. Thus this check
718 # must be after Libtool initialization.
719 AC_MSG_CHECKING([if library symbol versioning should be used])
720 AC_ARG_ENABLE([symbol-versions], [AS_HELP_STRING([--enable-symbol-versions],
721                 [Use symbol versioning for liblzma. Enabled by default on
722                 GNU/Linux, other GNU-based systems, and FreeBSD.])],
723         [], [enable_symbol_versions=auto])
724 if test "x$enable_symbol_versions" = xauto; then
725         case $host_os in
726                 # NOTE: Even if one omits -gnu on GNU/Linux (e.g.
727                 # i486-slackware-linux), configure will (via config.sub)
728                 # append -gnu (e.g. i486-slackware-linux-gnu), and this
729                 # test will work correctly.
730                 gnu* | *-gnu* | freebsd*)
731                         enable_symbol_versions=yes
732                         ;;
733                 *)
734                         enable_symbol_versions=no
735                         ;;
736         esac
739 # There are two variants for symbol versioning.
740 # See src/liblzma/validate_map.sh for details.
742 # On GNU/Linux, extra symbols are added in the C code. These extra symbols
743 # must not be put into a static library as they can cause problems (and
744 # even if they didn't cause problems, they would be useless). On other
745 # systems symbol versioning may be used too but there is no problem as only
746 # a linker script is specified in src/liblzma/Makefile.am and that isn't
747 # used when creating a static library.
749 # Libtool always uses -DPIC when building shared libraries by default and
750 # doesn't use it for static libs by default. This can be overriden with
751 # --with-pic and --without-pic though. As long as neither --with-pic nor
752 # --without-pic is used then we can use #ifdef PIC to detect if the file is
753 # being built for a shared library.
754 if test "x$enable_symbol_versions" = xno ; then
755         enable_symbol_versions=no
756         AC_MSG_RESULT([no])
757 elif test "x$enable_shared" = xno ; then
758         enable_symbol_versions=no
759         AC_MSG_RESULT([no (not building a shared library)])
760 else
761         case $host_os in
762                 linux*)
763                         case "$pic_mode-$enable_static" in
764                                 default-*)
765                                         # Use symvers if PIC is defined.
766                                         have_symbol_versions_linux=2
767                                         ;;
768                                 *-no)
769                                         # Not building static library.
770                                         # Use symvers unconditionally.
771                                         have_symbol_versions_linux=1
772                                         ;;
773                                 *)
774                                         AC_MSG_RESULT([])
775                                         AC_MSG_ERROR([
776     On GNU/Linux, building both shared and static library at the same time
777     is not supported if --with-pic or --without-pic is used.
778     Use either --disable-shared or --disable-static to build one type
779     of library at a time. If both types are needed, build one at a time,
780     possibly picking only src/liblzma/.libs/liblzma.a from the static build.])
781                                         ;;
782                         esac
783                         enable_symbol_versions=linux
784                         AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX],
785                                 [$have_symbol_versions_linux],
786                                 [Define to 1 to if GNU/Linux-specific details
787                                 are unconditionally wanted for symbol
788                                 versioning. Define to 2 to if these are wanted
789                                 only if also PIC is defined (allows building
790                                 both shared and static liblzma at the same
791                                 time with Libtool if neither --with-pic nor
792                                 --without-pic is used). This define must be
793                                 used together with liblzma_linux.map.])
794                         ;;
795                 *)
796                         enable_symbol_versions=generic
797                         ;;
798         esac
799         AC_MSG_RESULT([yes ($enable_symbol_versions)])
802 AM_CONDITIONAL([COND_SYMVERS_LINUX],
803         [test "x$enable_symbol_versions" = xlinux])
804 AM_CONDITIONAL([COND_SYMVERS_GENERIC],
805         [test "x$enable_symbol_versions" = xgeneric])
808 ###############################################################################
809 # Checks for libraries.
810 ###############################################################################
812 dnl Support for _REQUIRE_VERSION was added in gettext 0.19.6. If both
813 dnl _REQUIRE_VERSION and _VERSION are present, the _VERSION is ignored.
814 dnl We use both for compatibility with other programs in the Autotools family.
815 echo
816 echo "Initializing gettext:"
817 AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
818 AM_GNU_GETTEXT_VERSION([0.19.6])
819 AM_GNU_GETTEXT([external])
822 ###############################################################################
823 # Checks for header files.
824 ###############################################################################
826 echo
827 echo "System headers and functions:"
829 # There is currently no workarounds in this package if some of
830 # these headers are missing.
831 AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
832         [],
833         [AC_MSG_ERROR([Required header file(s) are missing.])])
835 # immintrin.h allows the use of the intrinsic functions if they are available.
836 # cpuid.h may be used for detecting x86 processor features at runtime.
837 AC_CHECK_HEADERS([immintrin.h cpuid.h])
840 ###############################################################################
841 # Checks for typedefs, structures, and compiler characteristics.
842 ###############################################################################
844 AC_HEADER_STDBOOL
846 AC_TYPE_UINT8_T
847 AC_TYPE_UINT16_T
848 AC_TYPE_INT32_T
849 AC_TYPE_UINT32_T
850 AC_TYPE_INT64_T
851 AC_TYPE_UINT64_T
852 AC_TYPE_UINTPTR_T
854 AC_CHECK_SIZEOF([size_t])
856 # The command line tool can copy high resolution timestamps if such
857 # information is available in struct stat. Otherwise one second accuracy
858 # is used.
859 AC_CHECK_MEMBERS([
860         struct stat.st_atim.tv_nsec,
861         struct stat.st_atimespec.tv_nsec,
862         struct stat.st_atimensec,
863         struct stat.st_uatime,
864         struct stat.st_atim.st__tim.tv_nsec])
866 AC_SYS_LARGEFILE
867 AC_C_BIGENDIAN
869 # __attribute__((__constructor__)) can be used for one-time initializations.
870 # Use -Werror because some compilers accept unknown attributes and just
871 # give a warning. If it works this should give no warnings, even
872 # clang -Weverything should be fine.
873 # dnl This doesn't need AC_LANG_SOURCE, minimal code is enough.
874 AC_MSG_CHECKING([if __attribute__((__constructor__)) can be used])
875 have_func_attribute_constructor=no
876 OLD_CFLAGS="$CFLAGS"
877 CFLAGS="$CFLAGS -Werror"
878 AC_COMPILE_IFELSE([
879         __attribute__((__constructor__))
880         static void my_constructor_func(void) { return; }
881 ], [
882         AC_DEFINE([HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR], [1],
883                 [Define to 1 if __attribute__((__constructor__))
884                 is supported for functions.])
885         have_func_attribute_constructor=yes
886         AC_MSG_RESULT([yes])
887 ], [
888         AC_MSG_RESULT([no])
890 CFLAGS="$OLD_CFLAGS"
893 ###############################################################################
894 # Checks for library functions.
895 ###############################################################################
897 # Gnulib replacements as needed
898 gl_GETOPT
900 # Find the best function to set timestamps.
901 AC_CHECK_FUNCS([futimens futimes futimesat utimes _futime utime], [break])
903 # This is nice to have but not mandatory.
904 AC_CHECK_FUNCS([posix_fadvise])
906 TUKLIB_PROGNAME
907 TUKLIB_INTEGER
908 TUKLIB_PHYSMEM
909 TUKLIB_CPUCORES
910 TUKLIB_MBSTR
912 # If requested, check for system-provided SHA-256. At least the following
913 # implementations are supported:
915 # OS       Headers                     Library  Type           Function
916 # FreeBSD  sys/types.h + sha256.h      libmd    SHA256_CTX     SHA256_Init
917 # NetBSD   sys/types.h + sha2.h                 SHA256_CTX     SHA256_Init
918 # OpenBSD  sys/types.h + sha2.h                 SHA2_CTX       SHA256Init
919 # Solaris  sys/types.h + sha2.h        libmd    SHA256_CTX     SHA256Init
920 # MINIX 3  sys/types.h + sha2.h                 SHA256_CTX     SHA256_Init
921 # Darwin   CommonCrypto/CommonDigest.h          CC_SHA256_CTX  CC_SHA256_Init
923 # Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead
924 # of size_t.
926 sha256_header_found=no
927 sha256_type_found=no
928 sha256_func_found=no
929 if test "x$enable_external_sha256" = "xyes"; then
930         # Test for Common Crypto before others, because Darwin has sha256.h
931         # too and we don't want to use that, because on older versions it
932         # uses OpenSSL functions, whose SHA256_Init is not guaranteed to
933         # succeed.
934         AC_CHECK_HEADERS(
935                 [CommonCrypto/CommonDigest.h sha256.h sha2.h],
936                 [sha256_header_found=yes ; break])
937         if test "x$sha256_header_found" = xyes; then
938                 AC_CHECK_TYPES([CC_SHA256_CTX, SHA256_CTX, SHA2_CTX],
939                         [sha256_type_found=yes], [],
940                         [[#ifdef HAVE_SYS_TYPES_H
941                           # include <sys/types.h>
942                           #endif
943                           #ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
944                           # include <CommonCrypto/CommonDigest.h>
945                           #endif
946                           #ifdef HAVE_SHA256_H
947                           # include <sha256.h>
948                           #endif
949                           #ifdef HAVE_SHA2_H
950                           # include <sha2.h>
951                           #endif]])
952                 if test "x$sha256_type_found" = xyes ; then
953                         AC_SEARCH_LIBS([SHA256Init], [md])
954                         AC_SEARCH_LIBS([SHA256_Init], [md])
955                         AC_CHECK_FUNCS([CC_SHA256_Init SHA256Init SHA256_Init],
956                                 [sha256_func_found=yes ; break])
957                 fi
958         fi
960 AM_CONDITIONAL([COND_INTERNAL_SHA256], [test "x$sha256_func_found" = xno])
961 if test "x$enable_external_sha256$sha256_func_found" = xyesno; then
962         AC_MSG_ERROR([--enable-external-sha256 was specified but no supported external SHA-256 implementation was found])
965 # Check for SSE2 intrinsics. There is no run-time detection for SSE2 so if
966 # compiler options enable SSE2 then SSE2 support is required by the binaries.
967 # The compile-time check for SSE2 is done with #ifdefs because some compilers
968 # (ICC, MSVC) allow SSE2 intrinsics even when SSE2 isn't enabled.
969 AC_CHECK_DECL([_mm_movemask_epi8],
970         [AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1],
971                 [Define to 1 if _mm_movemask_epi8 is available.])],
972         [],
973 [#ifdef HAVE_IMMINTRIN_H
974 #include <immintrin.h>
975 #endif])
977 # For faster CRC on 32/64-bit x86 and E2K (see also crc64_fast.c):
979 #   - Check for the CLMUL intrinsic _mm_clmulepi64_si128 in <immintrin.h>.
980 #     Check also for _mm_set_epi64x for consistency with CMake build
981 #     where it's needed to disable CLMUL with VS2013.
983 #   - Check that __attribute__((__target__("ssse3,sse4.1,pclmul"))) works
984 #     together with _mm_clmulepi64_si128 from <immintrin.h>. The attribute
985 #     was added in GCC 4.4 but some GCC 4.x versions don't allow intrinsics
986 #     with it. Exception: it must be not be used with EDG-based compilers
987 #     like ICC and the compiler on E2K.
989 # If everything above is supported, runtime detection will be used to keep the
990 # binaries working on systems that don't support the required extensions.
991 AC_MSG_CHECKING([if _mm_clmulepi64_si128 is usable])
992 if test "x$enable_clmul_crc" = xno ; then
993         AC_MSG_RESULT([no, --disable-clmul-crc was used])
994 else
995         AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
996 #include <immintrin.h>
998 // CLMUL works on older E2K instruction set but it is slow due to emulation.
999 #if defined(__e2k__) && __iset__ < 6
1000 #       error
1001 #endif
1003 // Intel's old compiler (ICC) can define __GNUC__ but the attribute must not
1004 // be used with it. The new Clang-based ICX needs the attribute.
1005 // Checking for !defined(__EDG__) catches ICC and other EDG-based compilers.
1006 #if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__)
1007 __attribute__((__target__("ssse3,sse4.1,pclmul")))
1008 #endif
1009 __m128i my_clmul(__m128i a)
1011         const __m128i b = _mm_set_epi64x(1, 2);
1012         return _mm_clmulepi64_si128(a, b, 0);
1014         ]])], [
1015                 AC_DEFINE([HAVE_USABLE_CLMUL], [1],
1016                         [Define to 1 if _mm_set_epi64x and
1017                         _mm_clmulepi64_si128 are usable.
1018                         See configure.ac for details.])
1019                 AC_MSG_RESULT([yes])
1020         ], [
1021                 AC_MSG_RESULT([no])
1022         ])
1025 # Check for sandbox support. If one is found, set enable_sandbox=found.
1026 case $enable_sandbox in
1027         auto | capsicum)
1028                 AX_CHECK_CAPSICUM([enable_sandbox=found], [:])
1029                 ;;
1030 esac
1031 case $enable_sandbox in
1032         auto | pledge)
1033                 AC_CHECK_FUNCS([pledge], [enable_sandbox=found ; break])
1034                 ;;
1035 esac
1037 # If a specific sandboxing method was explicitly requested and it wasn't
1038 # found, give an error.
1039 case $enable_sandbox in
1040         auto | no | found)
1041                 ;;
1042         *)
1043                 AC_MSG_ERROR([$enable_sandbox support not found])
1044                 ;;
1045 esac
1048 ###############################################################################
1049 # If using GCC, set some additional AM_CFLAGS:
1050 ###############################################################################
1052 if test "$GCC" = yes ; then
1053         echo
1054         echo "GCC extensions:"
1057 # Always do the visibility check but don't set AM_CFLAGS on Windows.
1058 # This way things get set properly even on Windows.
1059 gl_VISIBILITY
1060 if test -n "$CFLAG_VISIBILITY" && test "$is_w32" = no; then
1061         AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
1064 if test "$GCC" = yes ; then
1065         # Enable as much warnings as possible. These commented warnings won't
1066         # work for this package though:
1067         #   * -Wunreachable-code breaks several assert(0) cases, which are
1068         #     backed up with "return LZMA_PROG_ERROR".
1069         #   * -Wcast-qual would break various things where we need a non-const
1070         #     pointer although we don't modify anything through it.
1071         #   * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations
1072         #     don't seem so useful here; at least the last one gives some
1073         #     warnings which are not bugs.
1074         #   * -Wconversion still shows too many warnings.
1075         #
1076         # The flags before the empty line are for GCC and many of them
1077         # are supported by Clang too. The flags after the empty line are
1078         # for Clang.
1079         for NEW_FLAG in \
1080                         -Wall \
1081                         -Wextra \
1082                         -Wvla \
1083                         -Wc99-c11-compat \
1084                         -Wformat=2 \
1085                         -Winit-self \
1086                         -Wmissing-include-dirs \
1087                         -Wshift-overflow=2 \
1088                         -Wstrict-overflow=3 \
1089                         -Walloc-zero \
1090                         -Wduplicated-cond \
1091                         -Wfloat-equal \
1092                         -Wundef \
1093                         -Wshadow \
1094                         -Wpointer-arith \
1095                         -Wbad-function-cast \
1096                         -Wwrite-strings \
1097                         -Wdate-time \
1098                         -Wsign-conversion \
1099                         -Wfloat-conversion \
1100                         -Wlogical-op \
1101                         -Waggregate-return \
1102                         -Wstrict-prototypes \
1103                         -Wold-style-definition \
1104                         -Wmissing-prototypes \
1105                         -Wmissing-declarations \
1106                         -Wredundant-decls \
1107                         \
1108                         -Wc99-compat \
1109                         -Wc11-extensions \
1110                         -Wc2x-compat \
1111                         -Wc2x-extensions \
1112                         -Wpre-c2x-compat \
1113                         -Warray-bounds-pointer-arithmetic \
1114                         -Wassign-enum \
1115                         -Wconditional-uninitialized \
1116                         -Wdocumentation \
1117                         -Wduplicate-enum \
1118                         -Wempty-translation-unit \
1119                         -Wflexible-array-extensions \
1120                         -Wmissing-variable-declarations \
1121                         -Wnewline-eof \
1122                         -Wshift-sign-overflow \
1123                         -Wstring-conversion
1124         do
1125                 AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
1126                 OLD_CFLAGS="$CFLAGS"
1127                 CFLAGS="$CFLAGS $NEW_FLAG -Werror"
1128                 AC_COMPILE_IFELSE([AC_LANG_SOURCE(
1129                                 [void foo(void); void foo(void) { }])], [
1130                         AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
1131                         AC_MSG_RESULT([yes])
1132                 ], [
1133                         AC_MSG_RESULT([no])
1134                 ])
1135                 CFLAGS="$OLD_CFLAGS"
1136         done
1138         AC_ARG_ENABLE([werror],
1139                 AS_HELP_STRING([--enable-werror], [Enable -Werror to abort
1140                         compilation on all compiler warnings.]),
1141                 [], [enable_werror=no])
1142         if test "x$enable_werror" = "xyes"; then
1143                 AM_CFLAGS="$AM_CFLAGS -Werror"
1144         fi
1148 ###############################################################################
1149 # Create the makefiles and config.h
1150 ###############################################################################
1152 echo
1154 # Don't build the lib directory at all if we don't need any replacement
1155 # functions.
1156 AM_CONDITIONAL([COND_GNULIB], test -n "$LIBOBJS")
1158 # Add default AM_CFLAGS.
1159 AC_SUBST([AM_CFLAGS])
1161 # This is needed for src/scripts.
1162 xz=`echo xz | sed "$program_transform_name"`
1163 AC_SUBST([xz])
1165 AC_CONFIG_FILES([
1166         Doxyfile
1167         Makefile
1168         po/Makefile.in
1169         lib/Makefile
1170         src/Makefile
1171         src/liblzma/Makefile
1172         src/liblzma/api/Makefile
1173         src/xz/Makefile
1174         src/xzdec/Makefile
1175         src/lzmainfo/Makefile
1176         src/scripts/Makefile
1177         tests/Makefile
1178         debug/Makefile
1180 AC_CONFIG_FILES([src/scripts/xzdiff], [chmod +x src/scripts/xzdiff])
1181 AC_CONFIG_FILES([src/scripts/xzgrep], [chmod +x src/scripts/xzgrep])
1182 AC_CONFIG_FILES([src/scripts/xzmore], [chmod +x src/scripts/xzmore])
1183 AC_CONFIG_FILES([src/scripts/xzless], [chmod +x src/scripts/xzless])
1185 AC_OUTPUT
1187 # Some warnings
1188 if test x$tuklib_cv_physmem_method = xunknown; then
1189         echo
1190         echo "WARNING:"
1191         echo "No supported method to detect the amount of RAM."
1192         echo "Consider using --enable-assume-ram (if you didn't already)"
1193         echo "or make a patch to add support for this operating system."
1196 if test x$tuklib_cv_cpucores_method = xunknown; then
1197         echo
1198         echo "WARNING:"
1199         echo "No supported method to detect the number of CPU cores."
1202 if test "x$enable_threads$enable_small$have_func_attribute_constructor" \
1203                 = xnoyesno; then
1204         echo
1205         echo "NOTE:"
1206         echo "liblzma will be thread-unsafe due to the combination"
1207         echo "of --disable-threads --enable-small when using a compiler"
1208         echo "that doesn't support __attribute__((__constructor__))."