Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: configure.ac

Issue 7109015: Update XZ Utils to 5.0.3 (in deps) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build-aux/version.sh ('k') | debug/Makefile.am » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- Autoconf -*- 1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script. 2 # Process this file with autoconf to produce a configure script.
3 3
4 ############################################################################### 4 ###############################################################################
5 # 5 #
6 # Author: Lasse Collin 6 # Author: Lasse Collin
7 # 7 #
8 # This file has been put into the public domain. 8 # This file has been put into the public domain.
9 # You can do whatever you want with this file. 9 # You can do whatever you want with this file.
10 # 10 #
11 ############################################################################### 11 ###############################################################################
12 12
13 # NOTE: Don't add useless checks. autoscan detects this and that, but don't 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 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 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. 16 # a way that would cause the problems the autoconf macros check.
17 17
18 AC_PREREQ([2.64]) 18 AC_PREREQ([2.64])
19 19
20 AC_INIT([XZ Utils], m4_esyscmd([/bin/sh version.sh]), 20 AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]),
21 [lasse.collin@tukaani.org], [xz], [http://tukaani.org/xz/]) 21 [lasse.collin@tukaani.org], [xz], [http://tukaani.org/xz/])
22 AC_CONFIG_SRCDIR([src/liblzma/common/common.h]) 22 AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
23 AC_CONFIG_AUX_DIR([build-aux]) 23 AC_CONFIG_AUX_DIR([build-aux])
24 AC_CONFIG_MACRO_DIR([m4]) 24 AC_CONFIG_MACRO_DIR([m4])
25 AC_CONFIG_HEADER([config.h]) 25 AC_CONFIG_HEADER([config.h])
26 26
27 echo 27 echo
28 echo "$PACKAGE_STRING" 28 echo "$PACKAGE_STRING"
29 29
30 echo 30 echo
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 AC_MSG_CHECKING([which encoders to build]) 86 AC_MSG_CHECKING([which encoders to build])
87 AC_ARG_ENABLE([encoders], AC_HELP_STRING([--enable-encoders=LIST], 87 AC_ARG_ENABLE([encoders], AC_HELP_STRING([--enable-encoders=LIST],
88 [Comma-separated list of encoders to build. Default=all. 88 [Comma-separated list of encoders to build. Default=all.
89 Available encoders:] 89 Available encoders:]
90 m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])), 90 m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])),
91 [], [enable_encoders=SUPPORTED_FILTERS]) 91 [], [enable_encoders=SUPPORTED_FILTERS])
92 enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'` 92 enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
93 if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then 93 if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
94 AC_MSG_RESULT([(none)]) 94 AC_MSG_RESULT([(none)])
95 else 95 else
96 AC_DEFINE([HAVE_ENCODER], [1],
97 [Define to 1 if encoder components are enabled.])
98 for arg in $enable_encoders 96 for arg in $enable_encoders
99 do 97 do
100 case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [ 98 case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
101 NAME) 99 NAME)
102 enable_filter_[]NAME=yes 100 enable_filter_[]NAME=yes
103 enable_encoder_[]NAME=yes 101 enable_encoder_[]NAME=yes
104 AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1], 102 AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1],
105 [Define to 1 if] NAME [encoder is enabled.]) 103 [Define to 1 if] NAME [encoder is enabled.])
106 ;;]) 104 ;;])
107 *) 105 *)
108 AC_MSG_RESULT([]) 106 AC_MSG_RESULT([])
109 AC_MSG_ERROR([unknown filter: $arg]) 107 AC_MSG_ERROR([unknown filter: $arg])
110 ;; 108 ;;
111 esac 109 esac
112 done 110 done
113 AC_MSG_RESULT([$enable_encoders]) 111 AC_MSG_RESULT([$enable_encoders])
114 fi 112 fi
115 113
116 AC_MSG_CHECKING([which decoders to build]) 114 AC_MSG_CHECKING([which decoders to build])
117 AC_ARG_ENABLE([decoders], AC_HELP_STRING([--enable-decoders=LIST], 115 AC_ARG_ENABLE([decoders], AC_HELP_STRING([--enable-decoders=LIST],
118 [Comma-separated list of decoders to build. Default=all. 116 [Comma-separated list of decoders to build. Default=all.
119 Available decoders are the same as available encoders.]), 117 Available decoders are the same as available encoders.]),
120 [], [enable_decoders=SUPPORTED_FILTERS]) 118 [], [enable_decoders=SUPPORTED_FILTERS])
121 enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'` 119 enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
122 if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then 120 if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
123 AC_MSG_RESULT([(none)]) 121 AC_MSG_RESULT([(none)])
124 else 122 else
125 AC_DEFINE([HAVE_DECODER], [1],
126 [Define to 1 if decoder components are enabled.])
127 for arg in $enable_decoders 123 for arg in $enable_decoders
128 do 124 do
129 case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [ 125 case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
130 NAME) 126 NAME)
131 enable_filter_[]NAME=yes 127 enable_filter_[]NAME=yes
132 enable_decoder_[]NAME=yes 128 enable_decoder_[]NAME=yes
133 AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1], 129 AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1],
134 [Define to 1 if] NAME [decoder is enabled.]) 130 [Define to 1 if] NAME [decoder is enabled.])
135 ;;]) 131 ;;])
136 *) 132 *)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 AC_MSG_RESULT([(none because not building any LZ-based encoder)]) 222 AC_MSG_RESULT([(none because not building any LZ-based encoder)])
227 fi 223 fi
228 224
229 225
230 #################### 226 ####################
231 # Integrity checks # 227 # Integrity checks #
232 #################### 228 ####################
233 229
234 m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256]) 230 m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256])
235 231
236 m4_foreach([NAME], [SUPPORTED_FILTERS], 232 m4_foreach([NAME], [SUPPORTED_CHECKS],
237 [enable_check_[]NAME=no 233 [enable_check_[]NAME=no
238 ])dnl 234 ])dnl
239 235
240 AC_MSG_CHECKING([which integrity checks to build]) 236 AC_MSG_CHECKING([which integrity checks to build])
241 AC_ARG_ENABLE([checks], AC_HELP_STRING([--enable-checks=LIST], 237 AC_ARG_ENABLE([checks], AC_HELP_STRING([--enable-checks=LIST],
242 [Comma-separated list of integrity checks to build. 238 [Comma-separated list of integrity checks to build.
243 Default=all. Available integrity checks:] 239 Default=all. Available integrity checks:]
244 m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])), 240 m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])),
245 [], [enable_checks=SUPPORTED_CHECKS]) 241 [], [enable_checks=SUPPORTED_CHECKS])
246 enable_checks=`echo "$enable_checks" | sed 's/,/ /g'` 242 enable_checks=`echo "$enable_checks" | sed 's/,/ /g'`
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 AC_MSG_CHECKING([if assembler optimizations should be used]) 276 AC_MSG_CHECKING([if assembler optimizations should be used])
281 AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler], 277 AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler],
282 [Do not use assembler optimizations even if such exist 278 [Do not use assembler optimizations even if such exist
283 for the architecture.]), 279 for the architecture.]),
284 [], [enable_assembler=yes]) 280 [], [enable_assembler=yes])
285 if test "x$enable_assembler" = xyes; then 281 if test "x$enable_assembler" = xyes; then
286 enable_assembler=no 282 enable_assembler=no
287 case $host_os in 283 case $host_os in
288 # Darwin should work too but only if not creating universal 284 # Darwin should work too but only if not creating universal
289 # binaries. Solaris x86 could work too but I cannot test. 285 # binaries. Solaris x86 could work too but I cannot test.
290 » » linux* | *bsd* | mingw* | cygwin*) 286 » » linux* | *bsd* | mingw* | cygwin* | *djgpp*)
291 case $host_cpu in 287 case $host_cpu in
292 i?86) enable_assembler=x86 ;; 288 i?86) enable_assembler=x86 ;;
293 x86_64) enable_assembler=x86_64 ;; 289 x86_64) enable_assembler=x86_64 ;;
294 esac 290 esac
295 ;; 291 ;;
296 esac 292 esac
297 fi 293 fi
298 case $enable_assembler in 294 case $enable_assembler in
299 x86 | x86_64 | no) 295 x86 | x86_64 | no)
300 AC_MSG_RESULT([$enable_assembler]) 296 AC_MSG_RESULT([$enable_assembler])
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then 358 if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
363 AC_MSG_RESULT([]) 359 AC_MSG_RESULT([])
364 AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument]) 360 AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument])
365 fi 361 fi
366 AC_MSG_RESULT([$enable_assume_ram MiB]) 362 AC_MSG_RESULT([$enable_assume_ram MiB])
367 AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram], 363 AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram],
368 [How many MiB of RAM to assume if the real amount cannot 364 [How many MiB of RAM to assume if the real amount cannot
369 be determined.]) 365 be determined.])
370 366
371 367
372 ############################################ 368 #########################
373 # xz/xzdec/lzmadec linkage against liblzma # 369 # Components to install #
374 ############################################ 370 #########################
375 371
376 # Link the xz, xzdec, and lzmadec command line tools against static liblzma 372 AC_ARG_ENABLE([xz], [AC_HELP_STRING([--disable-xz],
377 # unless using --enable-dynamic. Using static liblzma gives a little bit 373 » » [do not build the xz tool])],
378 # faster executable on x86, because no register is wasted for PIC. We also 374 » [], [enable_xz=yes])
379 # have one dependency less, which allows users to more freely copy the xz 375 AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno])
380 # binary to other boxes. However, I wouldn't be surprised if distro
381 # maintainers still prefer dynamic linking, so let's make it easy for them.
382 376
383 AC_MSG_CHECKING([how programs should be linked against liblzma]) 377 AC_ARG_ENABLE([xzdec], [AC_HELP_STRING([--disable-xzdec],
384 AC_ARG_ENABLE([dynamic], [AC_HELP_STRING([--enable-dynamic=TYPE], 378 » » [do not build xzdec])],
385 » » » [Set how command line tools are linked against liblzma. 379 » [], [enable_xzdec=yes])
386 » » » TYPE can be mixed, yes, or no. The default is mixed.])], 380 AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno])
387 » » [], [enable_dynamic=mixed]) 381
388 case $enable_dynamic in 382 AC_ARG_ENABLE([lzmadec], [AC_HELP_STRING([--disable-lzmadec],
389 » mixed) 383 » » [do not build lzmadec
390 » » AC_MSG_RESULT([mixed (some dynamically, some statically)]) 384 » » (it exists primarily for LZMA Utils compatibility)])],
391 » » ;; 385 » [], [enable_lzmadec=yes])
392 » yes) 386 AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno])
393 » » AC_MSG_RESULT([dynamically]) 387
394 » » ;; 388 AC_ARG_ENABLE([lzmainfo], [AC_HELP_STRING([--disable-lzmainfo],
395 » no) 389 » » [do not build lzmainfo
396 » » AC_MSG_RESULT([statically]) 390 » » (it exists primarily for LZMA Utils compatibility)])],
397 » » ;; 391 » [], [enable_lzmainfo=yes])
398 » *) 392 AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
399 » » AC_MSG_RESULT([]) 393
400 » » AC_MSG_ERROR([--enable-dynamic accepts only \`mixed', \`yes', or \`no']) 394 AC_ARG_ENABLE([lzma-links], [AC_HELP_STRING([--disable-lzma-links],
401 » » ;; 395 » » [do not create symlinks for LZMA Utils compatibility])],
402 esac 396 » [], [enable_lzma_links=yes])
403 # We use the actual results later, because we don't know yet 397 AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno])
404 # if --disable-shared or --disable-static was used. 398
399 AC_ARG_ENABLE([scripts], [AC_HELP_STRING([--disable-scripts],
400 » » [do not install the scripts xzdiff, xzgrep, xzless, xzmore,
401 » » and their symlinks])],
402 » [], [enable_scripts=yes])
403 AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno])
405 404
406 405
407 ############################################################################### 406 ###############################################################################
408 # Checks for programs. 407 # Checks for programs.
409 ############################################################################### 408 ###############################################################################
410 409
411 echo 410 echo
412 gl_POSIX_SHELL 411 gl_POSIX_SHELL
413 if test -z "$POSIX_SHELL" ; then 412 if test -z "$POSIX_SHELL" ; then
414 AC_MSG_ERROR([No POSIX conforming shell (sh) was found.]) 413 AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 # Gnulib replacements as needed 514 # Gnulib replacements as needed
516 gl_GETOPT 515 gl_GETOPT
517 516
518 # Find the best function to set timestamps. 517 # Find the best function to set timestamps.
519 AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break]) 518 AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
520 519
521 TUKLIB_PROGNAME 520 TUKLIB_PROGNAME
522 TUKLIB_INTEGER 521 TUKLIB_INTEGER
523 TUKLIB_PHYSMEM 522 TUKLIB_PHYSMEM
524 TUKLIB_CPUCORES 523 TUKLIB_CPUCORES
524 TUKLIB_MBSTR
525 525
526 526
527 ############################################################################### 527 ###############################################################################
528 # If using GCC, set some additional AM_CFLAGS: 528 # If using GCC, set some additional AM_CFLAGS:
529 ############################################################################### 529 ###############################################################################
530 530
531 if test "$GCC" = yes ; then 531 if test "$GCC" = yes ; then
532 echo 532 echo
533 echo "GCC extensions:" 533 echo "GCC extensions:"
534 fi 534 fi
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 -Wstrict-prototypes \ 571 -Wstrict-prototypes \
572 -Wold-style-definition \ 572 -Wold-style-definition \
573 -Wmissing-prototypes \ 573 -Wmissing-prototypes \
574 -Wmissing-declarations \ 574 -Wmissing-declarations \
575 -Wmissing-noreturn \ 575 -Wmissing-noreturn \
576 -Wredundant-decls 576 -Wredundant-decls
577 do 577 do
578 AC_MSG_CHECKING([if $CC accepts $NEW_FLAG]) 578 AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
579 OLD_CFLAGS="$CFLAGS" 579 OLD_CFLAGS="$CFLAGS"
580 CFLAGS="$CFLAGS $NEW_FLAG" 580 CFLAGS="$CFLAGS $NEW_FLAG"
581 » » AC_COMPILE_IFELSE([void foo(void) { }], [ 581 » » AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo(void) { }])], [
582 AM_CFLAGS="$AM_CFLAGS $NEW_FLAG" 582 AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
583 AC_MSG_RESULT([yes]) 583 AC_MSG_RESULT([yes])
584 ], [ 584 ], [
585 AC_MSG_RESULT([no]) 585 AC_MSG_RESULT([no])
586 ]) 586 ])
587 CFLAGS="$OLD_CFLAGS" 587 CFLAGS="$OLD_CFLAGS"
588 done 588 done
589 589
590 AC_ARG_ENABLE([werror], 590 AC_ARG_ENABLE([werror],
591 AC_HELP_STRING([--enable-werror], [Enable -Werror to abort 591 AC_HELP_STRING([--enable-werror], [Enable -Werror to abort
(...skipping 11 matching lines...) Expand all
603 603
604 echo 604 echo
605 605
606 # Don't build the lib directory at all if we don't need any replacement 606 # Don't build the lib directory at all if we don't need any replacement
607 # functions. 607 # functions.
608 AM_CONDITIONAL([COND_GNULIB], test -n "$LIBOBJS") 608 AM_CONDITIONAL([COND_GNULIB], test -n "$LIBOBJS")
609 609
610 # Add default AM_CFLAGS. 610 # Add default AM_CFLAGS.
611 AC_SUBST([AM_CFLAGS]) 611 AC_SUBST([AM_CFLAGS])
612 612
613 # Set additional flags for static/dynamic linking. The idea is that every
614 # program (not library) being built will use either STATIC_{CPPFLAGS,LDFLAGS}
615 # or DYNAMIC_{CPPFLAGS,LDFLAGS} depending on which type of linkage is
616 # preferred. These preferences get overridden by use of --disable-static,
617 # --disable-shared, or --enable-dynamic.
618 #
619 # This is quite messy, because we want to use LZMA_API_STATIC when linking
620 # against static liblzma. It's needed on Windows.
621 if test "x$enable_static" = xno; then
622 enable_dynamic=yes
623 fi
624 if test "x$enable_shared" = xno; then
625 enable_dynamic=no
626 fi
627 case $enable_dynamic in
628 yes)
629 STATIC_CPPFLAGS=
630 STATIC_LDFLAGS=
631 DYNAMIC_CPPFLAGS=
632 DYNAMIC_LDFLAGS=
633 ;;
634 mixed)
635 STATIC_CPPFLAGS="-DLZMA_API_STATIC"
636 STATIC_LDFLAGS="-static"
637 DYNAMIC_CPPFLAGS=
638 DYNAMIC_LDFLAGS=
639 ;;
640 no)
641 STATIC_CPPFLAGS="-DLZMA_API_STATIC"
642 STATIC_LDFLAGS="-static"
643 DYNAMIC_CPPFLAGS="-DLZMA_API_STATIC"
644 DYNAMIC_LDFLAGS="-static"
645 ;;
646 esac
647 AC_SUBST([STATIC_CPPFLAGS])
648 AC_SUBST([STATIC_LDFLAGS])
649 AC_SUBST([DYNAMIC_CPPFLAGS])
650 AC_SUBST([DYNAMIC_LDFLAGS])
651
652 # This is needed for src/scripts. 613 # This is needed for src/scripts.
653 xz=`echo xz | sed "$program_transform_name"` 614 xz=`echo xz | sed "$program_transform_name"`
654 AC_SUBST([xz]) 615 AC_SUBST([xz])
655 616
656 AC_CONFIG_FILES([ 617 AC_CONFIG_FILES([
657 Doxyfile 618 Doxyfile
658 Makefile 619 Makefile
659 po/Makefile.in 620 po/Makefile.in
660 lib/Makefile 621 lib/Makefile
661 src/Makefile 622 src/Makefile
(...skipping 22 matching lines...) Expand all
684 echo "Consider using --enable-assume-ram (if you didn't already)" 645 echo "Consider using --enable-assume-ram (if you didn't already)"
685 echo "or make a patch to add support for this operating system." 646 echo "or make a patch to add support for this operating system."
686 fi 647 fi
687 648
688 # Not threading yet so don't warn. 649 # Not threading yet so don't warn.
689 #if test x$tuklib_cv_cpucores_method = xunknown; then 650 #if test x$tuklib_cv_cpucores_method = xunknown; then
690 # echo 651 # echo
691 # echo "WARNING:" 652 # echo "WARNING:"
692 # echo "No supported method to detect the number of CPU cores." 653 # echo "No supported method to detect the number of CPU cores."
693 #fi 654 #fi
OLDNEW
« no previous file with comments | « build-aux/version.sh ('k') | debug/Makefile.am » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698