atool-0.39.0/0002755000175000017500000000000011736366035007736 500000000000000atool-0.39.0/aclocal.m40000644000175000017500000005302211720757355011520 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, [m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ac_define_dir.m4]) atool-0.39.0/m4/0002755000175000017500000000000011736366035010256 500000000000000atool-0.39.0/m4/ac_define_dir.m40000644000175000017500000000205610722516267013172 00000000000000dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) dnl dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR dnl variable, taking care of fixing up ${prefix} and such. dnl dnl VARNAME is offered as both a C preprocessor symbol, and an output dnl variable. dnl dnl Note that the 3 argument form is only supported with autoconf 2.13 and dnl later (i.e. only where _AC_DEFINE supports 3 arguments). dnl dnl Examples: dnl dnl AC_DEFINE_DIR(DATADIR, datadir) dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries]) dnl dnl @version $Id: ac_define_dir.m4,v 1.2 2003/10/28 23:36:47 guidod Exp $ dnl @author Guido Draheim , original by Alexandre Oliva AC_DEFUN([AC_DEFINE_DIR], [ test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ac_define_dir=`eval echo [$]$2` ac_define_dir=`eval echo [$]ac_define_dir` $1="$ac_define_dir" AC_SUBST($1) ifelse($3, , AC_DEFINE_UNQUOTED($1, "$ac_define_dir"), AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) ]) atool-0.39.0/AUTHORS0000644000175000017500000000047511720757561010733 00000000000000Authors ======= Oskar Liljeblad Contributors ============ Peter Valdemar Mørch - patches for handling Debian archives Nick Matteo - patch for lzma support Dan Serban - patch for plzip support, as well as --lzip in GNU tar 1.23 and later For other contributors, check out the NEWS file. atool-0.39.0/extra/0002755000175000017500000000000010727334117011054 500000000000000atool-0.39.0/extra/bash-completion-atool_0.1-10000755000175000017500000000126010727333502015630 00000000000000# atool(1) completion by Roman G _atool() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} case "$cur" in -*) COMPREPLY=( $( compgen -W '-l -x -X -a -c- -d -r \ -e -F -D -f -q -v -p -o -E -S --list --extract --extract-to= \ --add --cat --diff --repack --each --format= --subdir --force \ --quiet --verbose --page --null --explain --simulate --config=' -- $cur ) ) ;; *) _filedir '@(rar|RAR|zip|ZIP|tar.gz|tgz|tar.bz|tbz|tar.Z|tZ|tar.lzo|tzo|tar.7z|t7z|tar|jar|JAR|war|lha|lzh|7z|ace|ACE|arj|ARJ|a|arc|ARC|rpm|deb|gz|bz|bz2|Z|lzo|cpio)' ;; esac return 0 } complete -F _atool -o filenames atool atool-0.39.0/extra/README0000644000175000017500000000043710727334117011656 00000000000000This directory contains stuff submitted by other users. The copyright of these files belong to their respective author. bash-completion-atool_0.1-1 Completions for bash, by Roman G . See also http://linux4all.blogsome.com/2007/12/07/bash-completion-for-atool/. atool-0.39.0/NEWS0000644000175000017500000004027111736366024010355 000000000000002012-04-02: atool 0.39.0 released. Add support for plzip, as well as --lzip in GNU tar 1.23 and later (patch from Dan Serban). Add support for lbzip2 and pigz (patch from Tim Harder). Fix documentation typo (Debian #661636). Updated links in README and on web page (thanks Antonio Diaz). 2011-08-15: atool 0.38.0 released. Fix Mac OS X build time problem (reported by Dave Dribin): Don't use 'sed -r' in makefiles, use 'sed' instead, etc. Apply manpage typo fix patches (from Francois Marier). Fixed bug preventing saved amount of data not to be printed with arepack. Added -O, --format-option option for specifying archiver options. Exit gracefully when specifying an unsupported formats with arepack. Fix xv typo - should be xz (use_tar_xz_option etc) (from polemon). Fix identification of .xpi files as zip (patch by Francois Marier, Debian bug #530812). Fix identification of 7zip files (patch by Bastian Kleineidam, Debian bug #558003). 2009-08-13: atool 0.37.0 released. Added support for lzip and xz (suggested by Vincent Lefevre). Fixed bug in arepack command with tar archives. The number of bytes saved is now printed in 'repack' mode (suggested by Meino Christian Cramer). Don't use -U parameter (to delete original archive) for lzop. Added link to ATrpms repository to home page. Added support for GNU tar's --xv, --lzop, and --lzma options when the corresponding atool options are enabled (use_tar_xv_option, use_tar_lzop_option and use_tar_lzma_option). Better checking of config file variables. 2009-02-26: atool 0.36.0 released. Fix problem not identifying ZIP archives using file (from mollifier). Fix problem with escaping characters in UTF-8 locales. Don't use -r when creating rar archives, it recurses subdirs as expected by default. 2008-06-08: atool 0.35.0 released. Now detect self-extracting ZIP archives using file (suggested by Jens Schleusener). Added "use_file_always" option to always identify using file (suggested by Thomas Link). Now identify compressed files (bzip2, bzip, gzip, compress) when using "use_file" option. Improved error messages (from Ed Avis). Fix manpage hyphens (patch from Francois Marier). Added -o, --option option to change a configuration option. Added support for rzip and lrzip archives. Use '-c' option with compressors such as gzip and bzip2 when piping output. Added support for pbzip2 (added configuration options path_pbzip2 and use_pbzip2). 2008-04-03: atool 0.34.0 released. Added support for lzma (suggested by Ed Avis and Leif Thande, patch from Nick Matteo). Added extra directory. Now using automake. 2007-08-22: atool 0.33.0 released. Change order of arguments in tar commands. Use 'f' option to tar when using archive from stdin/to stdout (by reported by Shotaro Aoyama). Fix configuration file bug: "use_arj_for_unpack" did not work (reported by Simon Peter). Minor build and documentation updates. 2005-12-13: atool 0.32.0 released. Fixed bug in repack mode: Could not repack a compressed file into an archive, but could (incorrectly) repack an archive to a compressed file (reported by Meino Christian Cramer). Print ellipsis properly in output ("...", not "..") (patch from Ed Avis). Added support for Microsoft Cabinet archives. Ignore waitpid errors on win32 (patch from Ed Avis). 2005-08-08: web page updated. Fixed some typos in the web page and NEWS file (will be updated for next release). 2005-08-08: atool 0.31.0 released. ATTENTION: This release fixes a serious bug which might cause files and directories to be removed in some circumstances when using adiff. I recommend upgrading to the 0.31.0 immediately. If you cannot upgrade, you are safe as long as you do not use the adiff command on untrusted archives. Here are the details: Symbolic links would be followed when temporary directories were removed recursively. Only the adiff command removed directories in this way - the extracted files of the archives it compared. This means that if you ran adiff on an archive containing a symbolic link that pointed to, say, /foo, /foo would be removed recursively! This was due to a missing check for symbolic links. This bug was found by code auditing, and has been fixed in this release. Added arepack command (also -r, --repack) (previously incomplete and disabled, also suggested by Meino Christian Cramer). Added support for 7-Zip'ed TAR archives (.tar.7z) (suggested by Meino Christian Cramer). Implemented cat support for 7-Zip archives. Completed list of supported archive types in the manual page (some were missing). Improve --simulate and --explain. Added support for acat on Debian packages (patch from Peter Valdemar Mørch). Added support for extracting control files from Debian packages as well (patch from Peter Valdemar Mørch, thanks). Fixed some manual page typos. 2005-07-25: atool 0.30.0 released. Added support for 7-Zip archives (.7z) using p7zip (suggested by Meino Christian Cramer). Added support for ALZip archives (.alz) using unalz. Added support for Debian package archives (.deb) files (contributed by Joao Lourenco). Fixed some typos in the manual page (reported by Stephane Jourdois). Added file matches for LHA SFX archives. Updated building of rpm and debian packages. Updated documentation. Got rid of year ranges in copyright. 2004-07-05: atool 0.29.0 released. Added support for ar archive (.a) files (suggested by Wojtek Sczygiol). Improved and cleaned up handling of compressed files (single file archives), resulting in some bugs fixed. Deal with compressed files (.gz, .bz2, ..) differently, fixing some bugs. These files are now extracted to current directory. Implemented new options 'decompress_to_cwd'. 2004-06-18: atool 0.28.0 released. 'make install' will now build everything before installing. Use detected perl path in atool executable (reported by Ed Avis). Fixed extraction of files from LHA archives (reported by Goetz Waschk and Matthew Mueller). 2003-11-14: atool 0.27.0 released. Support for autoconf has been added (based on files from Hisham Muhammad, thanks). Added support for ARC files (suggested by Ed Avis). Added support for using the arj command for ARJ archives (previously only unarj was supported). Cleaned up and improved the manual page and README document. Fixed RAR identification from file(1) output. Now uses tar --bzip2 option instead of -j. The use_tar_j_option has been renamed to use_tar_bzip2_option (patch submitted by Ed Avis, thanks). Renamed the use_rar_for_unrar option to use_rar_for_unpack (old options will still work). Bumped copyright year. Removed the distdiff make target. 2003-05-23: atool 0.26.0 released. Added a new configuration option, use_rar_for_unrar (always use rar instead of unrar when possible). Added a new configuration option, strip_unknown_ext (strip unknown extensions). Patch submitted by Götz Waschk - thanks! Tried to make atool more portable by using File::Spec more. Some minor bug fixes for --simulate mode. Cleaned up error messages. 2002-11-08: atool 0.25.0 released. Implemented a new option keep_compressed to control whether the original file should be kept after packing/unpacking compressed files. Cleaned up code for handling compressed files. Now refuses to compress multiple files into one. Don't pass -r option to unrar. Cleaned up and simplified the code a little (remove exec argument). Use unrar instead of rar when not creating RAR archives. A new option, path_unrar was added. (Requested by Götz Waschk.) Use cpio for archives that file(1) reports as "ASCII cpio archive". Replaced 'refuse to overwrite' wording with 'refusing to overwrite'. Updated manual page: Replaced 'single-file-compressor' wording with 'file compressor'. Clarified meaning of PATH value to -X option. 2002-10-09: atool 0.24.0 released. If PAGER is set, use that for default pager instead. Debian and RPM packages now include symlinks to the manpage for aunpack, apack etc too. These symlinks are also installed during make install. Build fixes for RPM package from Götz Waschk (thanks). Don't set root:root owner when installing files in Makefile. 2002-09-28: atool 0.23.0 released. Added new feature: If no file arguments are specified with apack, filenames are read from standard in. Added new option: -0, --null to specify that filenames read from standard in are separated by null-bytes. Fixed tab stop in --help message. Exit with non-zero return code if any command failed. Cleaned up code (add parens around subroutine calls) to prevent weird bugs. 2002-09-17: atool 0.22.0 released. Fixed use_gzip_for_z configuration option name typo (was cfg_use_gzip_for_z). New option use_find_cpio_print0 to make find use -print0 and cpio -0. Added support for lzop archives. 2002-09-16: atool 0.21.0 released. Use POSIX::getcwd instead of Cwd::cwd (fixes warnings with perl 5.8). Fixed some bugs for Perl 5.005 compatibility (reported by Nicholas Piper). Use sysopen instead of three argument open to open some files. Use POSIX::isprint instead of /[[:print:]]/. Added --subdir (-D) option to always extract to subdirectory. 2002-09-08: atool 0.20.0 released. Added support for cpio archives. Fixed bugs with --save-outdir (wouldn't save right directory), and updated manpage. Fixed help message ("current directory" => "specified directory"). 2002-07-13: atool 0.19.0 released. Added PREFIX variable to Makefile (patch submitted by Dave Dribin). Updated man page with supported archive formats. Always run rar with the -r (recursive) option. Documented how to make aunpack change into the directory where files were extracted to (feature requested by Brian Hall). 2002-07-02: atool 0.18.0 released. Added support for rpm archives (patch submitted by João Lourenço - thanks!). Added configuration option `show_extracted' to always show what file was extracted. This is also the default behavior now. Added adiff example to manpage. Running atool on files with names beginning with <, >, +, | or other similar characters could potentially have very bad effects on atool (such as files disappearing). This is fixed now. Updated the author's email address in the help and version messages. Improved error messages by quoting all filenames mentioned. No longer change mode on directories before removing them (now considered to be unsafe by myself, despite the fact that I wrote the code originally :). Atool can now be used on files with newline and delete characters in their names. (As a result of this, atool now uses the POSIX perl module.) 2002-04-14: atool 0.17.0 released. Added support for extraction of arj archives. Fixed symlink creation during make install (patch from Brian Hall). Fixed wording ("files in root" instead of "root files"). Fixed adiff on compressed files (would have no effect, and would leave an Unpack dir). 2002-02-09: atool 0.16.0 released. Added new option `args_diff' to control diff arguments (previously `-ru' was hardcoded in). Updated wordings in the README. Reformatted NEWS file. :) Improved Makefile somewhat. Fixed identification and some extension-related issues with LHA and RAR. Added support for ace archives (extraction and listing only). Mention URL for some archiver programs in the README. 2001-12-22: atool 0.15.0 released. Fixed a minor bug that would prevent atool from extracting archives with one non-writable root directory properly (reported by Matthew Mueller). Added files for making RPM packages of atool. Added TODO document. 2001-11-17: atool 0.14.0 released. Added support for .lha archives (with lha command). Fixed and improved the adiff command. (It will no longer ask before deleting files.) Changed default path for the compress command to 'compress'. Improved error messages. Some very minor bug fixes. 2001-10-26: atool 0.13.0 released. New command adiff that generates a diff between two archives. Documentation fixes. 2001-09-18: atool 0.12.0 released. Improved error messages when the program to execute does not exist (no more Perl warnings). The author has changed email-address to oskar@osk.mine.nu. 2001-08-13: atool 0.11.0 released. Improved error messages. The --each option can now be used with the add command. (This can be used to create multiple archives at a time.) 2001-08-01: atool 0.10.0 released. New option -e, --each to extract or list multiple archives in one command. Fixed a bug causing gzip, bzip, bzip2 and compress'd files not to be identified correctly. Added sections `Examples' and `Known Bugs' to the manual page. 2001-07-16: atool 0.9.0 released. Rethought the verbosity options. New options: -v, --verbose and -V, --verbosity. Default verbosity level can now be set in configuration file. Changed behaviour of apack on compressed (gzip, bzip2, ..) files (didn't work before). Now file's -z option is used to identify more formats. Included more information in the manual page (about configuration etc). New option --config to load a specific configuration file. The temporary extraction directory is now removed on exit, if it is empty. Now refuses to overwrite existing files when creating archives. Minor bug fixes, error message improvements and typo corrections. 2001-07-05: atool 0.8.0 released. Added support for configuration files. System-wide (/etc/atool.conf) and user (~/.atoolrc) configuration files are supported. Added support for identifying files using file(1). See the README file for details. Symbolic links that refers to non-existant files will no longer be overwritten when extracting files (these symlinks were previously considered to be non-existant themselves). The NEWS file is included again. Added option (use_gzip_for_z) to control whether to use gzip or uncompress to decompress .Z files. Some minor bug fixes. 2001-04-16: atool 0.7.0 released. Fixed all commands for tar archives (output would be written to stdout and input read from stdin by default), When extracting tar.Z archives, extension wouldn't be removed from output directory. This has been fixed now. Manual format (with --format) wouldn't work at all. This is fixed now. Added -F as an alias for --format. Recognize .war as a JAR archive. 2001-04-04: atool 0.6.0 released. Added this NEWS document. Complete rewrite resulting in cleaner and better code. Added support for rar archives. Added support for .Z (compress) compressed files and .tar.Z archives. New option "-p, --page", to send output through pager. New option "-E, --explain" to have atool explain what is being done. New option "-S, --simulate" to have atool simulate commands. Changed "-X, --extract-here" command to "-X, --extract-to" that requires a PATH argument. The temporary extraction directory is now named "Unpack-XXXX", instead of "atool-unpack-XXXX". Added configuration options for setting path of programs to use. Added configuration options for controlling name of temporary extraction directory. Implemented a command line generation engine so that /bin/sh is used only when necessary. Now uses strict. 2001-03-28: atool 0.5.0 released. Rereleased with new version number (0.3.0 was released as 0.4.0 on Freshmeat). 2001-03-27: atool 0.4.0 released. Added forward function declarations to fix "X called to early to check prototype" messages generated by Perl 5.6. Added files for making Debian packages of atool. Fixed help text for -X command. Added prototypes for functions without them. Added manpage for atool. Added more license text from COPYING to the atool source and README file. 2001-03-24: atool 0.3.0 released. Fixed "Use of uninitialized value" messages when extracting from archives. Added support for jar archives, and use_jar_program configuration variable. The "-q, --quiet" option is now listed in help message. Configuration variables are now better documented in the README. Some cleanup of the atool code. Use exec instead of system where possible. 2001-03-21: atool 0.2.0 released. Now creates temporary extraction directory only when necessary. Display a message when list command is run on compressed files. 2001-03-17: atool 0.1.0 released. First public release. atool-0.39.0/configure.ac0000644000175000017500000000160411720756745012147 00000000000000AC_INIT(atool, 0.39.0, oskar@osk.mine.nu) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([atool]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE AC_DEFINE_DIR(SBINDIR, sbindir) AC_DEFINE_DIR(SYSCONFDIR, sysconfdir) AC_DEFINE_DIR(LOCALSTATEDIR, localstatedir) dnl Perl stuff AC_PATH_PROG([PERL], [perl]) eval `$PERL -V:startperl` if test "${startperl:0:1}" = "#" ; then startperl="\\$startperl" fi AC_SUBST(PERL_SHEBANG, $startperl) eval `$PERL -V:sitelib` AC_SUBST(PERL_SITELIB, $sitelib) AC_CONFIG_FILES([ atool.1 atool.spec Makefile ]) AC_CONFIG_COMMANDS([acat-link], [ln -f -s atool acat]) AC_CONFIG_COMMANDS([adiff-link], [ln -f -s atool adiff]) AC_CONFIG_COMMANDS([als-link], [ln -f -s atool als]) AC_CONFIG_COMMANDS([apack-link], [ln -f -s atool apack]) AC_CONFIG_COMMANDS([aunpack-link], [ln -f -s atool aunpack]) AC_CONFIG_COMMANDS([arepack-link], [ln -f -s atool arepack]) AC_OUTPUT atool-0.39.0/COPYING0000644000175000017500000010451310642030347010700 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . atool-0.39.0/build-aux/0002755000175000017500000000000011736366035011630 500000000000000atool-0.39.0/build-aux/missing0000755000175000017500000002623311324777651013156 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: atool-0.39.0/build-aux/install-sh0000755000175000017500000003253711324777651013567 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: atool-0.39.0/Makefile.in0000644000175000017500000005044111720757356011730 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_bin_SCRIPTS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/atool.1.in $(srcdir)/atool.spec.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO build-aux/install-sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = atool.1 atool.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" SCRIPTS = $(dist_bin_SCRIPTS) SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_SHEBANG = @PERL_SHEBANG@ PERL_SITELIB = @PERL_SITELIB@ SBINDIR = @SBINDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSCONFDIR = @SYSCONFDIR@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 #SUBDIRS = doc etc script_files = atool script_stamp_files = $(script_files:%=.%-stamp) script_old_files = $(script_files:%=.%-old) man_MANS = $(PACKAGE).1 EXTRA_DIST = $(script_files) extra debian/changelog debian/control debian/copyright debian/rules $(man_MANS) DISTCLEANFILES = $(script_stamp_files) MAINTAINERCLEANFILES = $(script_old_files) dist_bin_SCRIPTS = $(script_files) all: all-am .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): atool.1: $(top_builddir)/config.status $(srcdir)/atool.1.in cd $(top_builddir) && $(SHELL) ./config.status $@ atool.spec: $(top_builddir)/config.status $(srcdir)/atool.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-dist_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(MANS) all-local installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-dist_binSCRIPTS install-exec-local install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_binSCRIPTS uninstall-local uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am all-local am--refresh check check-am clean \ clean-generic dist dist-all dist-bzip2 dist-gzip dist-lzma \ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distcleancheck distdir distuninstallcheck \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dist_binSCRIPTS \ install-dvi install-dvi-am install-exec install-exec-am \ install-exec-local install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-dist_binSCRIPTS uninstall-local uninstall-man \ uninstall-man1 .PHONY: debian rpm $(script_stamp_files): .%-stamp: % $(srcdir)/configure.ac touch `basename "$<"` sed "1s|[^ ]*|$(PERL_SHEBANG)|;/^\\$$::SYSCONFDIR = /s|'.*'|'$(SYSCONFDIR)'|;/^\\$$::PACKAGE = /s/'.*'/'$(PACKAGE)'/;/^\\$$::VERSION = /s/'.*'/'$(PACKAGE_VERSION)'/;/^\\$$::BUG_EMAIL = /s/'.*'/'$(PACKAGE_BUGREPORT)'/" < $< > `basename $<.tmp` \ && mv `basename "$<"` .`basename "$<-old"` \ && mv `basename "$<.tmp"` `basename "$<"` chmod a+x `basename "$<"` touch $@ all-local: $(script_stamp_files) debian: cd $(srcdir) && dpkg-buildpackage -rfakeroot -us -uc -sd -b rpm: $(PACKAGE).spec rpmbuild -ba --clean $< install-exec-local: mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(mandir)/man1 for f in aunpack arepack apack acat als adiff; do \ ln -s -f atool $(DESTDIR)$(bindir)/$$f; \ ln -s -f atool.1 $(DESTDIR)$(mandir)/man1/$$f.1; \ done uninstall-local: for f in aunpack arepack apack acat als adiff; do \ if [ -L $(DESTDIR)$(bindir)/$$f ]; then \ rm $(DESTDIR)$(bindir)/$$f; \ fi; \ if [ -L $(DESTDIR)$(mandir)/man1/$$f.1 ]; then \ rm $(DESTDIR)$(mandir)/man1/$$f.1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: atool-0.39.0/INSTALL0000644000175000017500000003633211324777651010717 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. atool-0.39.0/atool.1.in0000644000175000017500000006203011730315333011447 00000000000000.\" -*- nroff -*- .\" atool.1 - Manual page for atool. .\" .\" Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, .\" 2009, 2011 Oskar Liljeblad .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU Library General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with this program; if not, write to the Free Software Foundation, .\" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" .TH ATOOL "1" "August 8, 2009" "atool" .\" Read this file with groff -man -Tascii atool.1 .SH NAME atool \- A script for managing file archives of various types .SH SYNOPSIS .B atool .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B aunpack .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B apack .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B als .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B acat .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B adiff .RI [ OPTION ]... " ARCHIVE " "" ARCHIVE .br .B arepack .RI [ OPTION ]... " OLD-ARCHIVE " "" NEW-ARCHIVE .SH DESCRIPTION This manual page document describes the \fBatool\fP commands. These commands are used for managing file archives of various types, such as tar and Zip archives. Each command can be executed individually or by giving the appropriate options to \fBatool\fP (see \fBOPTIONS\fP below). .PP \fBaunpack\fP extracts files from an archive. Often one wants to extract all files in an archive to a single subdirectory. However, some archives contain multiple files in their root directories. The aunpack program overcomes this problem by first extracting files to a unique (temporary) directory, and then moving its contents back if possible. This also prevents local files from being overwritten by mistake. .PP \fBapack\fP creates archives (or compresses files). If no file arguments are specified, filenames to add are read from standard in. .PP \fBals\fP lists files in an archive. .PP \fBacat\fP extracts files in an archive to standard out. .PP \fBadiff\fP generates a diff between two archives using diff(1). .PP \fBarepack\fP repacks archives to a different format. It does this by first extracting all files of the old archive into a temporary directory, then packing all files extracted to that directory to the new archive. Use the \-\-each (\-e) option in combination with \-\-format (\-F) to repack multiple archives using a single invocation of atool. Note that arepack will not remove the old archive. .PP Unless the \fB\-\-format\fP (\fB\-F\fP) option is provided, the archive format is determined by the archive file extension. I.e. an extension ".tar.gz" or ".tgz" means tar+gzip format. Note that the extensions are checked in the order listed in the section \fBARCHIVE TYPES\fP below, which is why a file with extension ".tar.gz" is considered to a be tar+gzip archive, not a gzip compressed file. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .B \-l, \-\-list List files in archive. This option is automatically assumed when \fBals\fP is executed. .TP .B \-x, \-\-extract Extract files from archive. This option is automatically assumed when \fBaunpack\fP is executed. .TP .B \-X, \-\-extract-to\fR=\fIPATH\fR Extract files from archive to the specified directory. When unpacking compressed files, PATH may refer to either a filename or an existing directory. .TP .B \-a, \-\-add Create archive. This option is automatically assumed when \fBapack\fP is executed. .TP .B \-c, \-\-cat Extract a file from archive to standard out (displaying it on screen). This option is automatically assumed when \fBacat\fP is executed. .TP .B \-d, \-\-diff Extract two archives and use diff(1) to generate differencies between them. This option is automatically assumed when \fBadiff\fP is executed. .TP .B \-e, \-\-each For each argument, execute the specified command. This can be used to quickly extract, list or create multiple archives (see \fBEXAMPLES\fR below). This option can not be used with the cat command. .TP .B \-F, \-\-format\fR=\fIEXTENSION\fR Specify archive format manually (see \fBARCHIVE TYPES\fR below). .TP .B \-S, \-\-simulate Run atool in simulation mode. No changes to the filesystem (i.e. writes) will be made, and all commands that would be executed are displayed instead. This option can't be combined with \fB\-\-explain\fP (since it implies that already). Note that it is not guaranteed that the commands printed in simulation mode will be the same as those executed in non- simulation mode. This is because some operations depend on what files archives contain, and atool can at this time only determine that by extracting archives. .TP .B \-E, \-\-explain Display commands executed by atool. This option can't be combined with \fB\-\-simulate\fP. .TP .B \-p, \-\-page Run output through a pager, usually \fBpager\fP unless the environment variable \fBPAGER\fP is set. .TP .B \-f, \-\-force When extracting from files, allow overwriting of local files. When creating an archive, allow the archive file to be overwritten if it already exists. Note that it is possible to add files to existing RAR and Zip archives (this is not possible for many other formats). .TP .B \-D, \-\-subdir When extracting archives, always create a new directory for the archive even if the archive only contains one file in its root directory. .TP .B \-0, \-\-null If no file arguments are specified when creating or adding files to archives, the list of files will be read from standard in. Normally these filenames are separated by newline, but with this option they are separated by null-bytes. This is useful with the GNU find \-print0 option. .TP .B \-q, \-\-quiet Decrease verbosity level by one. This is subtracted from the default verbosity level, or the level specified with \fB\-\-verbosity\fP. This option may be specified more than once to make atool even less verbose. .TP .B \-v, \-\-verbose Increase verbosity level by one. This is added to the default verbosity level, or the level specified with \fB\-\-verbosity\fP. This option may be specified more than once to make atool even more verbose. .TP .B \-V, \-\-verbosity\fR=\fILEVEL\fR Specify verbosity level. The default level is 1, which means "normal verbosity" - e.g. when creating and extracting from archives, files will be listed. .TP .B \-\-config\fR=\fIFILE\fR Load configuration from the specified file. When using this option, the system-wide and user-wide configuration files will not be loaded. If the specified file does not exist or can not be read, atool will terminate with an error message. .TP .B \-o, \-\-option\fR=\fIKEY=VALUE\fR Override a configuration option. These are applied after reading the configuration files. You can specify this multiple times to override different options. .TP .B \-O, \-\-format\-option\fR=\fIOPTION\fR Send additional options to the archiver command. This can be useful when specifying compression options for some archives, e.g. .br \fBapack \-F7z \-O-mx=9 archive.7z dir\fP .br You can specify this multiple times add different options. .TP .B \-\-save\-outdir\fR=\fIFILE\fR When extracting files, save the name of the directory which the archive was extracted to to the specified file. If the command was not `extract', or the archive was not extracted to a new directory, then nothing will be written to the specified file. If multiple archives were specified (with \-e), then only the last directory that files were extracted to will be written to FILE. This option is used internally (see \fBEXAMPLES\fR below). .TP .B \-\-help Show summary of options. .TP .B \-\-version Output version information and exit. .SH ARCHIVE TYPES Unless the \-f (\-\-format) option is provided, the archive format is determined by the archive file extension. I.e. an extension ".tar.gz" or ".tgz" means tar+gzip format. Note that the extensions are checked in the other listed above, which is why a file with extension ".tar.gz" is considered to a tar+gzip archive, not a gzip archive. .PP The diff command is supported whenever the extract command is supported. .PP The supported archive types are: .TP .RI \fBtar+gzip\fP " " ( .tar.gz ", " .tgz ) All commands are supported. .TP .RI \fBtar+bzip\fP " " ( .tar.bz ", " .tbz ) All commands are supported. .TP .RI \fBtar+bzip2\fP " " ( .tar.bz2 ", " .tbz2 ) All commands are supported. .TP .RI \fBtar+compress\fP " " ( .tar.Z ", " .tZ ) All commands are supported. .TP .RI \fBtar+lzop\fP " " ( .tar.lzo ", " .tzo ) All commands are supported. .TP .RI \fBtar+lzip\fP " " ( .tar.lz ", " .tlz ) All commands are supported. .TP .RI \fBtar+xz\fP " " ( .tar.xz ", " .txz ) All commands are supported. .TP .RI \fBtar+7z\fP " " ( .tar.7z ", " .t7z ) All commands are supported. .TP .RI \fBtar\fP " " ( .tar ) All commands are supported. .TP .RI \fBzip\fP " " ( .zip ) All commands are supported. .TP .RI \fBjar\fP " " ( .jar ", " .war ) List, extract, and add commands are supported. Cat is supported if use_jar_program is disabled. .TP .RI \fBrar\fP " " ( .rar ) All commands are supported. .TP .RI \fBlha\fP " " ( .lha ", " .lzh ) All commands are supported. .TP .RI \fB7z\fP " " ( .7z ) Extract, list and add commands are supported. .TP .RI \fBalzip\fP " " ( .alz ) Extract command is supported. .TP .RI \fBace\fP " " ( .ace ) Extract and list commands are supported. .TP .RI \fBar\fP " " ( .a ) All commands are supported. .TP .RI \fBarj\fP " " ( .arj ) List, extract and add commands are supported. .TP .RI \fBarc\fP " " ( .arc ) All command are supported. (Note that arc outputs an extra newline when the cat command is used.) .TP .RI \fBrpm\fP " " ( .rpm ) Extract and list commands are supported. .TP .RI \fBdeb\fP " " ( .deb ) Extract and list commands are supported. .TP .RI \fBcab\fP " " ( .cab ) Cat, extract, and list commands are supported. .TP .RI \fBgzip\fP " " ( .gz ) Cat, extract, and add commands are supported. .TP .RI \fBbzip\fP " " ( .bz ) Cat, extract, and add commands are supported. .TP .RI \fBbzip2\fP " " ( .bz2 ) Cat, extract, and add commands are supported. .TP .RI \fBcompress\fP " " ( .Z ) Cat, extract, and add commands are supported. .TP .RI \fBlzma\fP " " ( .lzma ) Cat, extract, and add commands are supported. .TP .RI \fBlzop\fP " " ( .lzo ) Extract and add commands are supported. The cat command is not supported because lzop does not want to extract files to standard out unless the \-f flag is given. .TP .RI \fBlzip\fP " " ( .lz ) Cat, extract, and add commands are supported. .TP .RI \fBxz\fP " " ( .xz ) Cat, extract, and add commands are supported. .TP .RI \fBrzip\fP " " ( .rz ) Extract and add commands are supported. .TP .RI \fBlrzip\fP " " ( .lrz ) Extract and add commands are supported. .TP .RI \fB7zip\fP " " ( .7z ) All commands are supported. (Note that 7z refuses to write extracted files to standard out if standard out is a terminal. Use \-p or pipe the output of atool/acat to a pager when reading in a terminal.) .TP .RI \fBcpio\fP " " ( .cpio ) List, extract and add commands are supported. .SH CONFIGURATION Since version 0.8.0, atool can read custom configuration files. First, hardcoded defaults in the atool program file are evaluated. Then system-wide configuration values are loaded from \fI/etc/atool.conf\fR if that file exists. Finally, per-user configuration values are loaded from \fI.atoolrc\fR in the current user's home directory. .PP The format of the configuration files is simple: .IP variable value .PP Here \fBvariable\fR is a variable listed below, and \fBvalue\fR is the value to associate the variable with. \fBvariable\fR and \fBvalue\fR should be separated with at least one whitespace (space, tab etc). Empty lines and lines beginning with # are discarded. .PP A value of `1' means that the option is enabled, and `0' that it is disabled. Strings should not be quoted, as they start at the first non-whitespace character and end at the end of the line. .PP The options are: .TP .B use_tar_bzip2_option \fR(default: 1)\fR Enable this if you use GNU tar and it supports the \fB\-\-bzip2\fP option for filtering bzip2'ed files through bzip2. Versions 1.13.6 or later of GNU tar support \fB\-\-bzip2\fP. Therefore, if you use GNU tar earlier than 1.13.6, you will need to disable this option. This used to be \fBuse_tar_j_option\fP but using \-\-bzip2 is more portable. .TP .B use_tar_lzip_option \fR(default: 0)\fR Enable this if you use GNU tar and it supports the \fB\-\-lzip\fP option for filtering lzip'ed files through lzip. Versions 1.23 or later of GNU tar support \fB\-\-lzip\fP. Therefore, if you use GNU tar earlier than 1.23, you will need to disable this option. .TP .B use_tar_z_option \fR(default: 1)\fR Enable this if you use GNU tar and it supports the \fB\-z\fP option for filtering gzipped files through gzip. You will need to disable this and \fIuse_tar_j_option\fR if you don't use GNU tar. Disabling these two options doesn't mean that atool can't extract bzip2/gzip files. If disabled, atool use a pipe to send output from bzip2/gzip to tar instead. If possible, these options should be enabled since error management is better when filtering is done by tar. .TP .B use_tar_lzma_option \fR(default: 1)\fR Enable this if you use GNU tar and it supports the \fB\-\-lzma\fP option for filtering lzma compressed files through lzma. Versions 1.20 or later of GNU tar support \fB\-\-lzma\fP. .TP .B use_tar_lzop_option \fR(default: 0)\fR Enable this if you use GNU tar and it supports the \fB\-\-lzop\fP option for filtering lzop compressed files through lzop. Versions 1.21 or later of GNU tar support \fB\-\-lzop\fP. .TP .B use_tar_xz_option \fR(default: 0)\fR Enable this if you use GNU tar and it supports the \fB\-\-xz\fP option for filtering xz compressed files through xz. Versions 1.22 or later of GNU tar support \fB\-\-xz\fP. .TP .B use_gzip_for_z \fR(default: 1)\fR Enable this if you want to use gzip instead of uncompress when decompressing compress'ed files (`.Z' files). .TP .B use_rar_for_unpack \fR(default: 0)\fR Enable this if you want to always use rar instead of unrar when possible. This makes atool use the rar command (path_rar) even when listing and extracting RAR files. .TP .B use_arc_for_unpack \fR(default: 0)\fR Enable this if you want to always use arc instead of nomarch when possible. This makes atool use the arc command (path_arc) even when listing and extracting ARC files. .TP .B use_arj_for_unpack \fR(default: 0)\fR Enable this if you want to always use arj instead of unarj when possible. This makes atool use the arj command (path_arj) even when listing and extracting ARJ files. .TP .B use_find_cpio_print0 \fR(default: 1)\fR Enable this if find supports the \-print0 option and cpio supports the \-0 option. Without it, it is impossible/harder to make cpio archives of files with newline characters in their names. .TP .B extract_deb_control \fR(default: 1)\fR Debian .deb package files contain control information in a DEBIAN directory, especially the package's "control" file. Enable this if you want the control information to be exctracted during extraction in addition to the normal files. .TP .B strip_unknown_ext \fR(default: 1)\fR Certain types of files are actually archives, but their extensions doesn't tell so. Examples are Open Office documents (Zip files) and Gnumeric documents (gzip'ed files). Since the extensions of those filenames are unknown to atool, they would not be stripped with this option set to 0. The output file in that case would be something like Unpack-XYZW. Setting this option to 1 will cause the extension to be stripped instead. .TP .B use_pbzip2 \fR(default: 0)\fR Enable this if you want to use pbzip2 rather than bzip2. Please not that if use_tar_bzip2_option is enabled, then bzip2 will be used by tar regardless of the use_pbzip2 option. So if you want tar to use pbzip2 rather than bzip2, set use_pbzip2 to 1 and use_tar_bzip2_option to 0. .TP .B use_lbzip2 \fR(default: 0)\fR Enable this if you want to use lbzip2 rather than bzip2. Please not that if use_tar_bzip2_option is enabled, then bzip2 will be used by tar regardless of the use_lbzip2 option. So if you want tar to use lbzip2 rather than bzip2, set use_lbzip2 to 1 and use_tar_bzip2_option to 0. .TP .B use_pigz \fR(default: 0)\fR Enable this if you want to use pigz rather than gzip. Please not that if use_tar_z_option is enabled, then gzip will be used by tar regardless of the use_pigz option. So if you want tar to use pigz rather than gzip, set use_pigz to 1 and use_tar_z_option to 0. .TP .B use_plzip \fR(default: 0)\fR Enable this if you want to use plzip rather than lzip. Please not that if use_tar_lzip_option is enabled, then lzip will be used by tar regardless of the use_plzip option. So if you want tar to use plzip rather than lzip, set use_plzip to 1 and use_tar_lzip_option to 0. .TP .B use_jar \fR(default: 0)\fR Enable this if you want to use jar for managing jar archives. If you disable this option, zip will be used (which should work just as well, and probably be faster too). This option is disabled by default since extracting files to standard out (`cat') is not supported by jar. .TP .B use_file \fR(default: 1)\fR Enable this if you want atool to identify file types using file(1) for those files with an unrecognized extension (or none at all). .TP .B use_file_always \fR(default: 0)\fR Enable this if you want atool to always identify archives using file(1), regardless of the file extension. Please note that this currently has some drawbacks, such as not being able to identify all archive types (especially tar archives compressed with 7zip, lzop, szip etc). .TP .B tmpdir_name \fR(default: Unpack-%04d)\fR atool extracts to a temporary directory created in the current directory so that no files are overwritten. This variable controlls what name that temporary directory should have. The `%d' string in this variable will be replaced with a random number between 0 and 9999. It is possible change the format of this number by using something else than `%d' - see printf(3). .TP .B tmpfile_name \fR(default: Pack-%04d)\fR When using pbzip2, and creating archives, a temporary file need to be created. This option controls the name of that file. See tmpdir_name for further details on the format. .TP .B path_pager \fR(default: pager)\fR .TP .B path_jar \fR(default: jar)\fR .TP .B path_tar \fR(default: tar)\fR .TP .B path_zip \fR(default: zip)\fR .TP .B path_unzip \fR(default: unzip)\fR .TP .B path_gzip \fR(default: gzip)\fR .TP .B path_bzip \fR(default: bzip)\fR .TP .B path_bzip2 \fR(default: bzip2)\fR .TP .B path_pbzip2 \fR(default: pbzip2)\fR .TP .B path_compress \fR(default: compress)\fR .TP .B path_lzma \fR(default: lzma)\fR .TP .B path_lzop \fR(default: lzop)\fR .TP .B path_lzip \fR(default: lzip)\fR .TP .B path_rar \fR(default: rar)\fR .TP .B path_unrar \fR(default: unrar)\fR .TP .B path_lbzip2 \fR(default: lbzip2)\fR .TP .B path_pigz \fR(default: pigz)\fR .TP .B path_cabextract \fR(default: cabextract)\fR .TP .B path_7z \fR(default: 7z)\fR .TP .B path_unalz \fR(default: unalz)\fR .TP .B path_lha \fR(default: lha)\fR .TP .B path_unace \fR(default: unace)\fR .TP .B path_ar \fR(default: ar)\fR .TP .B path_arj \fR(default: arj)\fR .TP .B path_unarj \fR(default: unarj)\fR .TP .B path_arc \fR(default: arc)\fR .TP .B path_nomarch \fR(default: nomarch)\fR .TP .B path_rpm \fR(default: rpm)\fR .TP .B path_rpm2cpio \fR(default: rpm2cpio)\fR .TP .B path_dpkg_deb \fR(default: dpkg-deb)\fR .TP .B path_cpio \fR(default: cpio)\fR .TP .B path_file \fR(default: file)\fR .TP .B path_find \fR(default: find)\fR .TP .B path_xargs \fR(default: xargs)\fR .TP .B path_cat \fR(default: cat)\fR .TP .B path_diff \fR(default: diff)\fR These are all paths to the corresponding programs. It is usually best to leave them as is, because that way their locations can be looked up from the PATH variable. .TP .B args_diff \fR(default: \-ru)\fR This variable specifies command line arguments to pass to the diff command (as specified by path_diff) when using adiff. Space characters separate arguments in this string. .TP .B path_syscfg \fR(default: /etc/atool.conf)\fR (This variable can only be set in the atool program file.) This variable specifies the directory where the system-wide configuration file is located. .TP .B path_usercfg \fR(default: .atoolrc)\fR (This variable can only be set in the atool program file and system-wide configuration file.) This variable specifies where the user configuration file is located. Note that if this filename is relative (i.e. doesn't being with `/'), it will be relative to the current user's home directory (as determined by the HOME environment variable). .TP .B default_verbosity \fR(default: 1)\fR This is the default verbosity of atool. By using \-q and \-v options, the verbosity level can be raised and lowered. Level 1 means "normal verbosity" - e.g. when creating and extracting from archives, files will be listed. .TP .B show_extracted \fR(default: 1)\fR If this is set to 1, the aunpack command will always show what file or directory that was extracted. Otherwise that will only be printed if the archive was extracted to an unexpected location (as a result of local files already existing or the archive having multiple files in its root directory). This can be quite useful in combinatiaon with `default_verbosity 0'. Note that this option will have no effect when the \-X option is used with aunpack, and it has no effect on compressed files. .TP .B keep_compressed \fR(default: 1)\fR When compressing a file with gzip or bzip2, the original (uncompressed) file is usually deleted once it has been compressed. I.e. if you compress a file "test" you will end up with only one file, "test.gz". With this option set to 1, you will make atool keep the original file as well. The original behaviour is achieved by setting this option to 0. This option also has an equivalent effect on uncompressing compressed files. When set to 1, the original (compressed) file will be kept. Otherwise it will be deleted. Note however that this option has no effect when packing up a compressed file with the \-X option (for specifying an output directory or file). In that case the original file is always kept. .TP .B decompress_to_cwd \fR(default: 1)\fR When decompressing a file with commands such as gzip or bzip2, the decompressed file is usually placed in the same directory as the compressed file. With this option set to 1, the decompressed file is instead placed in the current working directory. Note that this option has no effect when \-X is used. .SH ENVIRONMENT VARIABLES .B PAGER The default pager to use when the \-p/\-\-page option is specified. .SH EXAMPLES To extract all files from archive `foobar.tar.gz' to a subdirectory (or the current directory if it only contains one file): .br \fBaunpack foobar.tar.gz\fP .PP To extract all files from all `.tar.gz' archives in the current directory: .br \fBaunpack \-e *.tar.gz\fP .PP To create a zip archive of two files `foo' and `bar': .br \fBapack myarchive.zip foo bar\fP .PP To display the file `baz' in the archive `myarchive.zip' through a pager: .br \fBacat \-p myarchive.zip baz\fP .PP To list contents of the rar archive `stuff.rar': .br \fBals stuff.rar\fP .PP To create three archives, `dir1.tar.gz', `dir2.tar.gz' and `dir3.tar.gz', so that the first one contains all files in dir1, the second all in dir2 and the third all dir3: .br \fBapack \-e \-F .tar.gz dir1 dir2 dir3\fP .PP To show all differences between version 2.4.17 and 2.4.18 of the kernel: .br \fBadiff linux-2.4.17.tar.gz linux-2.4.18.tar.gz\fP .PP To repack all .tar.gz archives in the current directory to .tar.7z (the old archive will be kept untouched): .br \fBarepack \-F.tar.7z \-e *.tar.gz\fP .PP Here's a shell function that will make the aunpack command change into the directory where files were extracted: .br \fBaunpack () {\fP .br \fB TMP=`mktemp /tmp/aunpack.XXXXXXXXXX`\fP .br \fB atool \-x \-\-save-outdir=$TMP "$@"\fP .br \fB DIR="`cat $TMP`"\fP .br \fB [ "$DIR" != "" \-a \-d "$DIR" ] && cd "$DIR"\fP .br \fB rm $TMP\fP .br \fB}\fP .br If you don't have the mktemp program, you can replace the second line with (note however that this is not entirely safe) .br \fB TMP="/tmp/atool_outdir.$$"\fP .PP .SH KNOWN BUGS Trying to extract gzip and other compressed files without the .gz (or .bz2 etc) extension won't work: .PP aunpack: foo: format not known, identifying using file aunpack: foo: format is `gzip' gzip: foo: unknown suffix -- ignored .PP This last error above is generated by \fBgzip \-d foo\fP. .PP If you find a bug not listed here, please report it to <@PACKAGE_BUGREPORT@>. .SH REPORTING BUGS Report bugs to <\fIoskar@osk.mine.nu\fP>. .SH AUTHOR The author of \fBatool\fP and this manual page is Oskar Liljeblad <\fIoskar@osk.mine.nu\fP>. .SH COPYRIGHT Copyright \(co 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011, 2012 Oskar Liljeblad This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. atool-0.39.0/README0000644000175000017500000002040211714312603010516 00000000000000atool - Introduction ==================== atool is a script for managing file archives of various types (tar, tar+gzip, zip etc). The main command is aunpack which extracts files from an archive. Did you ever extract files from an archive, not checking whether the files were located in a subdirectory or in the top directory of the archive, resulting in files scattered all over the place? aunpack overcomes this problem by first extracting to a new directory. If there was only a single file in the archive, that file is moved to the original directory. aunpack also prevents local files from being overwritten by mistake. The other commands provided are apack (to create archives), als (to list files in archives), and acat (to extract files to standard out). As atool invokes external programs to handle the archives, not all commands may be supported for a certain type of archives. atool identifies archives by their file extension. Sometimes this is not possible - for instance rar archives usually have varying numeric file extensions. In those cases when atool can't identify the format, file is used instead. (atool can be configured not to use file.) atool is written in Perl by Oskar Liljeblad and is free software (GNU General Public License). Copyright and License ===================== atool is Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011 Oskar Liljeblad This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. The source code of this project may contain files from other projects, and files generated by other projects, including: * GNU Autoconf (http://www.gnu.org/software/autoconf/) Such files are licensed under the terms of the GNU General Public License or a license compatible with the GNU GPL (as listed on http://www.gnu.org/licenses/license-list.html). See each file for copyright details. Requirements ============ The following programs are required to run atool: * Perl 5.004 or later atool is written in Perl. The modules File::Spec, File::Basename, Getopt::Long and POSIX must be available (they probably are by default). Web site: http://www.perl.org/ Debian package: perl The following programs are optional for running atool: * file file is used to determine file types, and is found in most unices by default. This program is necessary unless you choose to disable the use_file option. Web site: ftp://ftp.astron.com/pub/file/ Debian package: file * tar (GNU tar) tar is required if you want to use atool with tar archives. Implementations other than GNU's will work with atool as well, but see the Installation section below if you don't use GNU tar 1.13.18 or later. Web site: http://www.gnu.org/software/tar/tar.html Debian package: tar * gzip (GNU zip) gzip is required if you want to use atool with gzip compressed archives. Web site: http://www.gzip.org/ Debian package: gzip * bzip bzip is required if you want to use atool with bzip compressed archives. Note that bzip is obsoleted by bzip2. * bzip2 bzip2 is required if you want to use atool with bzip2 compressed archives. Web site: http://www.bzip.org/ Debian package: bzip2 * pbzip2 pbzip2 is required if you want to use atool with bzip2 compressed archives and utilize parallel processing. Web site: http://compression.ca/pbzip2/ Debian package: pbzip2 * lzip lzip is required if you want to use atool with lzip compressed archives. Web site: http://lzip.nongnu.org/lzip.html Debian package: lzip * plzip plzip is required if you want to use atool with lzip compressed archives and utilize parallel processing. Web site: http://lzip.nongnu.org/plzip.html Debian package (not in stable as of 2012-02-07): plzip * lzop lzop is required if you want to use atool with lzop compressed archives. Web site: http://www.lzop.org/ Debian package: lzop * LZMA LZMA is required if you want to use atool with lzma compressed archives. Web site: http://www.7-zip.org/sdk.html * zip/unzip (Info-ZIP Zip/Unzip) Zip is required if you want to use atool with zip archives. Implementations other than Info-ZIP's might work with atool as well. Web site: http://www.info-zip.org Debian packages: zip, unzip * rar (Eugene Roshal's RAR and UnRAR) RAR is required if you want to use atool with rar archives. Implementations other than Eugene Roshal's might work with atool as well. Web site: http://www.rarsoft.com/ Debian packages: rar, unrar * lha (LHa for UNIX) LHa is required if you want to use atool with lha, lharc and similar archives. Web site: http://www.infor.kanazawa-it.ac.jp/~ishii/lhaunix/ Debian package: lha * unace (UnAce for Linux) UnAce is required if you want to use atool with ace archives. Web site: http://www.winace.com Debian package: unace * arj Arj is required if you want to use atool with arj archives. Web site: http://arj.sourceforge.net Debian package: arj * Red Hat Package Manager The Red Hat Package Manager is required if you want to use atool with rpm archives. Web site: http://www.rpm.org/ Debian package: rpm * cpio (GNU cpio) cpio is required if you want to use atool with cpio archives. Other implmentations than GNU's might work as well. Web site: http://www.gnu.org/software/cpio/ Debian package: cpio * arc arc is required if you want to use atool with ARC archives (all commands supported). Web site: http://sources.isc.org/archiver/arc-5.21.txt Debian package: arc * nomarch nomarch is required if you want to use atool to list and extract files from ARC archives. Web site: http://rus.members.beeb.net/nomarch.html Debian package: nomarch * p7zip p7zip is required if you want to use atool with 7z archives. Web site: http://p7zip.sourceforge.net/ Debian package: p7zip * unalz unalz is required if you want to use atool with alzip archives. Web site: http://www.kipple.pe.kr/win/unalz/ Debian package: unalz Building ======== To build all files, simply run ./configure The configure script accepts a few options - use the following command to show them: ./configure --help Installation ============ Installing atool is a matter of copying the atool file to some appropriate directory for executable files, usually /usr/local/bin. After that, symbolic links for apack, aunpack, als and acat to atool should be created in the same directory. All this can be done automaticly by running make install It is possible to create a system wide configuration file overriding default values found in the top of the atool script (see below). Usage and Configuration ======================= A list of options that atool accepts can be displayed by running atool with the --help option: atool --help Please see the manual page for atool for full use and configuration information. This document can usually be viewed this way: man ./atool.1 Supported formats ================= Please see the supplied manual page, as described above. Homepage ======== Web site and file area for atool is hosted on Savannah: http://www.nongnu.org/atool/ The latest version of atool should always be available on this site. Feedback ======== The author of atool and this document, Oskar Liljeblad, can be reached by e-mail: oskar@osk.mine.nu (mailto:oskar@osk.mine.nu) Please send bug reports, suggestions, ideas or comments in general to me - I would like to hear from you if you like (or don't like) atool. Known bugs and missing features =============================== Please see the KNOWN BUGS section of the atool.1 manual page. Things to do ============ Please see the TODO document. - atool-0.39.0/debian/0002755000175000017500000000000011736366035011160 500000000000000atool-0.39.0/debian/rules0000755000175000017500000000015710271112121012133 00000000000000#! /usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk atool-0.39.0/debian/control0000644000175000017500000000226510775211012012470 00000000000000Source: atool Section: utils Priority: optional Maintainer: Oskar Liljeblad Build-Depends: cdbs, debhelper (>> 4.1.0) Standards-Version: 3.6.1.1 Package: atool Architecture: all Depends: ${perl:Depends} Suggests: unzip, bzip, bzip2, fastjar, lzop, lzma Description: A script for managing file archives of various types atool is a script for managing file archives of various types (tar, tar+gzip, zip etc). . The main command is aunpack which extracts files from an archive. Did you ever extract files from an archive, not checking whether the files were located in a subdirectory or in the top directory of the archive, resulting in files scattered all over the place? aunpack overcomes this problem by first extracting to a new directory. If there was only a single file in the archive, that file is moved to the original directory. aunpack also prevents local files from being overwritten by mistake. . The other commands provided are apack (to create archives), als (to list files in archives), and acat (to extract files to standard out). As atool invokes external programs to handle the archives, not all commands may be supported for a certain type of archives. atool-0.39.0/debian/changelog0000644000175000017500000001157111622276211012743 00000000000000atool (0.38.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 15 Aug 2011 22:07:23 +0200 atool (0.37.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Thu, 13 Aug 2009 18:20:21 +0200 atool (0.36.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Thu, 26 Feb 2009 18:23:34 +0100 atool (0.35.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sun, 08 Jun 2008 18:16:07 +0200 atool (0.34.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Thu, 03 Apr 2008 19:04:35 +0200 atool (0.33.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Wed, 22 Aug 2007 17:49:48 +0200 atool (0.32.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Tue, 13 Dec 2005 14:01:22 +0100 atool (0.31.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 8 Aug 2005 16:33:24 +0200 atool (0.30.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 25 Jul 2005 09:02:05 +0200 atool (0.29.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 5 Jul 2004 20:15:17 +0200 atool (0.28.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Fri, 18 Jun 2004 16:30:25 +0200 atool (0.27.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Fri, 14 Nov 2003 17:17:51 +0100 atool (0.26.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Fri, 23 May 2003 15:57:07 +0200 atool (0.25.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Fri, 8 Nov 2002 18:02:04 +0100 atool (0.24.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Wed, 9 Oct 2002 12:21:02 +0200 atool (0.23.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sat, 28 Sep 2002 14:35:52 +0200 atool (0.22.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Tue, 17 Sep 2002 22:11:00 +0200 atool (0.21.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 16 Sep 2002 14:10:41 +0200 atool (0.20.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sun, 8 Sep 2002 11:42:00 +0200 atool (0.19.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sat, 13 Jul 2002 19:47:59 +0200 atool (0.18.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Tue, 2 Jul 2002 21:33:19 +0200 atool (0.17.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sun, 14 Apr 2002 23:54:41 +0200 atool (0.16.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sat, 9 Feb 2002 12:47:02 +0100 atool (0.15.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sat, 22 Dec 2001 12:28:06 +0100 atool (0.14.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Sat, 17 Nov 2001 17:08:36 +0100 atool (0.13.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Fri, 26 Oct 2001 10:37:38 +0200 atool (0.12.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 18 Sep 2001 17:43:05 +0200 atool (0.11.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 13 Aug 2001 23:06:17 +0200 atool (0.10.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Wed, 1 Aug 2001 10:36:57 +0200 atool (0.9.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Thu, 5 Jul 2001 15:10:00 +0200 atool (0.8.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Thu, 5 Jul 2001 15:10:00 +0200 atool (0.7.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Mon, 16 Apr 2001 13:36:00 +0200 atool (0.6.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Wed, 4 Apr 2001 14:10:00 +0200 atool (0.5.0-1) unstable; urgency=low * New upstream release. -- Oskar Liljeblad Wed, 28 Mar 2001 08:12:00 +0200 atool (0.4.0-1) unstable; urgency=low * Initial Release. -- Oskar Liljeblad Tue, 27 Mar 2001 13:01:18 +0200 Local variables: mode: debian-changelog End: atool-0.39.0/debian/copyright0000644000175000017500000000223111622276303013017 00000000000000This package was debianized by Oskar Liljeblad on Tue, 27 Mar 2001 13:01:18 +0200. The source code can be obtained from http://www.nongnu.org/atool/. Upstream Author: Oskar Liljeblad Copyright: atool is Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011 Oskar Liljeblad This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. atool-0.39.0/atool.spec.in0000644000175000017500000000305310663074661012253 00000000000000%define package @PACKAGE_TARNAME@ %define version @PACKAGE_VERSION@ %define release 1 Summary: A script for managing file archives of various types. Name: %{package} Version: %{version} Release: %{release} License: GPL Group: Applications/Archiving Source: http://savannah.nongnu.org/download/%{package}/%{package}-%{version}.tar.gz URL: http://www.nongnu.org/%{package}/ Packager: Oskar Liljeblad Vendor: Oskar Liljeblad BuildRoot: %{_tmppath}/%{package}-%{version}-%{release}-root BuildArch: noarch Requires: perl %description atool is a script for managing file archives of various types (tar, tar+gzip, zip etc). The main command is aunpack which extracts files from an archive. Did you ever extract files from an archive, not checking whether the files were located in a subdirectory or in the top directory of the archive, resulting in files scattered all over the place? aunpack overcomes this problem by first extracting to a new directory, and if there was only a single file in the archive, moving that file to the original directory. aunpack also prevents local files from being overwritten by mistake. The other commands provided are apack (to create archives), als (to list files in archives), and acat (to extract files to standard out). %prep %setup -q %build ./configure --prefix=%{_prefix} make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README ChangeLog COPYING NEWS TODO %{_prefix}/bin/* %{_prefix}/share/man/man1/* atool-0.39.0/atool0000755000175000017500000023035211736365506010727 00000000000000#!/usr/bin/perl -w # # atool - A script for managing file archives of various types. # # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, # 2009, 2011, 2012 Oskar Liljeblad # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # See the atool(1) manual page for usage details. # # This file uses tab stops with a length of two. # # XXX: We could use -CLSDA but 5.10.0 has a bug which prevents us from # specifying this with shebang. Thanks to some helpful dude on #perl # FreeNode. if (${^UTF8LOCALE}) { use Encode qw(decode_utf8); binmode($_, ':encoding(UTF-8)') for \*STDIN, \*STDOUT, \*STDERR; $_ = decode_utf8($_) for @ARGV, values %ENV; } use File::Basename; use File::Spec; use Getopt::Long; use POSIX; use locale; use strict; # Subroutine prototypes (needed for perl 5.6) sub runcmds($$$;@); sub getmode(); sub multiarchivecmd($$$$@); sub singlearchivecmd($$$$$@); sub maketarcmd($$$$@); sub cmdexec($@); sub parsefmt($$); sub makeoutdir(); sub makeoutfile($); sub explain($); sub extract(@); sub shquotemeta($); sub tailslash($); sub de($); sub makespec(@); sub backticks(@); sub readconfig($$); sub formatext($); sub stripext($); sub findformat($$); sub unlink_directory($); sub find_comparable_file($); sub makeabsolute($); sub quote($); sub shell_execute(@); sub save_outdir($); sub handle_empty_add(@); sub issingleformat($); sub repack_archive($$$$); sub set_config_option($$$); $::SYSCONFDIR = '/usr/local/etc'; # This line is automatically updated by make $::PACKAGE = 'atool'; # This line is automatically updated by make $::VERSION = '0.39.0'; # This line is automatically updated by make $::BUG_EMAIL = 'oskar@osk.mine.nu'; # This line is automatically updated by make $::PROGRAM = $::PACKAGE; # Configuration options and their built-in defaults $::cfg_args_diff = '-ru'; # arguments to pass to diff program $::cfg_decompress_to_cwd = 1; # decompress to current directory $::cfg_default_verbosity = 1; # default verbosity level $::cfg_extract_deb_control = 1; # extract DEBIAN control dir from .deb packages? $::cfg_keep_compressed = 1; # keep compressed file after pack/unpack $::cfg_path_7z = '7z'; # 7z program $::cfg_path_ar = 'ar'; # ar program $::cfg_path_arc = 'arc'; # arc program $::cfg_path_arj = 'arj'; # arj program $::cfg_path_bzip = 'bzip'; # bzip program $::cfg_path_bzip2 = 'bzip2'; # bzip2 program $::cfg_path_cabextract = 'cabextract'; # cabextract program $::cfg_path_cat = 'cat'; # cat program $::cfg_path_compress = 'compress'; # compress program $::cfg_path_cpio = 'cpio'; # cpio program $::cfg_path_diff = 'diff'; # diff program $::cfg_path_dpkg_deb = 'dpkg-deb'; # dpkg-deb program $::cfg_path_file = 'file'; # file program $::cfg_path_find = 'find'; # find program $::cfg_path_gzip = 'gzip'; # gzip program $::cfg_path_jar = 'jar'; # jar program $::cfg_path_lbzip2 = 'lbzip2'; # lbzip2 program $::cfg_path_lha = 'lha'; # lha program $::cfg_path_lrzip = 'lrzip'; # lrzip program $::cfg_path_lzip = 'lzip'; # lzip program $::cfg_path_lzma = 'lzma'; # lzma program $::cfg_path_lzop = 'lzop'; # lzop program $::cfg_path_nomarch = 'nomarch'; # nomarch program $::cfg_path_pager = 'pager'; # pager program $::cfg_path_pbzip2 = 'pbzip2'; # pbzip2 program $::cfg_path_pigz = 'pigz'; # pigz program $::cfg_path_plzip = 'plzip'; # plzip program $::cfg_path_rar = 'rar'; # rar program $::cfg_path_rpm = 'rpm'; # rpm program $::cfg_path_rpm2cpio = 'rpm2cpio'; # rpm2cpio program $::cfg_path_rzip = 'rzip'; # rzip program $::cfg_path_syscfg = File::Spec->catfile($::SYSCONFDIR, $::PROGRAM.'.conf'); # system-wide configuration file $::cfg_path_tar = 'tar'; # tar program $::cfg_path_unace = 'unace'; # unace program $::cfg_path_unalz = 'unalz'; # unalz program $::cfg_path_unarj = 'unarj'; # unarj program $::cfg_path_unrar = 'unrar'; # unrar program $::cfg_path_unzip = 'unzip'; # unzip program $::cfg_path_usercfg = '.'.$::PROGRAM.'rc'; # user configuration file $::cfg_path_xargs = 'xargs'; # xargs program $::cfg_path_xz = 'xz'; # xz program $::cfg_path_zip = 'zip'; # zip program $::cfg_show_extracted = 1; # always show extracted file/directory $::cfg_strip_unknown_ext = 1; # strip unknown extensions $::cfg_tmpdir_name = 'Unpack-%04d'; # extraction directory name $::cfg_tmpfile_name = 'Pack-%04d'; # temporary file used during packing $::cfg_use_arc_for_unpack = 0; # use arc to unpack arc files? $::cfg_use_arj_for_unpack = 0; # use arj to unpack arj files? $::cfg_use_file = 1; # use file(1) for unknown extensions? $::cfg_use_file_always = 0; # always use file to identify archives (ignore extension) $::cfg_use_find_cpio_print0 = 1; # use -print0/-0 find/cpio options? $::cfg_use_gzip_for_z = 1; # use gzip to decompress .Z files? $::cfg_use_jar = 0; # use jar or zip for .jar archives? $::cfg_use_lbzip2 = 0; # use lbzip2 instead of bzip2 $::cfg_use_pbzip2 = 0; # use pbzip2 instead of bzip2 $::cfg_use_pigz = 0; # use pigz instead of gzip $::cfg_use_plzip = 0; # use plzip instead of lzip $::cfg_use_rar_for_unpack = 0; # use rar to unpack rar files? $::cfg_use_tar_bzip2_option = 1; # does tar support --bzip2? $::cfg_use_tar_lzma_option = 1; # does tar support --lzma? $::cfg_use_tar_lzip_option = 0; # does tar support --lzip? $::cfg_use_tar_lzop_option = 0; # does tar support --lzop? $::cfg_use_tar_xz_option = 0; # does tar support --xz? $::cfg_use_tar_z_option = 1; # does tar support -z? # Global variables $::basename = quote(File::Basename::basename($0)); @::rmdirs = (); $::up = File::Spec->updir(); $::cur = File::Spec->curdir(); @::opt_options = (); @::opt_format_options = (); # Parse arguments Getopt::Long::config('bundling'); Getopt::Long::GetOptions( 'l|list' => \$::opt_cmd_list, 'x|extract' => \$::opt_cmd_extract, 'X|extract-to=s' => \$::opt_cmd_extract_to, 'a|add' => \$::opt_cmd_add, 'c|cat' => \$::opt_cmd_cat, 'd|diff' => \$::opt_cmd_diff, 'r|repack' => \$::opt_cmd_repack, 'q|quiet' => sub { $::opt_verbosity--; }, 'v|verbose' => sub { $::opt_verbosity++; }, 'V|verbosity=i' => \$::opt_verbosity, 'config=s' => \$::opt_config, 'o|option=s' => sub { push @::opt_options, $_[1] }, 'help' => \$::opt_cmd_help, 'version' => \$::opt_cmd_version, 'F|format=s' => \$::opt_format, 'O|format-option=s' => sub { push @::opt_format_options, $_[1] }, 'f|force' => \$::opt_force, 'p|page' => \$::opt_use_pager, 'e|each' => \$::opt_each, 'E|explain' => \$::opt_explain, 'S|simulate' => \$::opt_simulate, 'save-outdir=s' => \$::opt_save_outdir, 'D|subdir' => \$::opt_extract_subdir, '0|null' => \$::opt_null, ) or exit 1; # Display --version if ($::opt_cmd_version) { print $::PACKAGE.' '.$::VERSION."\ Copyright (C) 2011 Oskar Liljeblad\ This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by Oskar Liljeblad.\n"; exit; } # Display --help if ($::opt_cmd_help) { print <<_END_; Usage: $::PROGRAM [OPTION]... ARCHIVE [FILE]... $::PROGRAM -e [OPTION]... [ARCHIVE]... Manage file archives of various types. Commands: -l, --list list files in archive (als) -x, --extract extract files from archive (aunpack) -X, --extract-to=PATH extract archive to specified directory -a, --add create archive (apack) -c, --cat extract file to standard out (acat) -d, --diff generate a diff between two archives (adiff) -r, --repack repack archives to a different format (arepack) --help display this help and exit --version output version information and exit Options: -e, --each execute command above for each file specified -F, --format=EXT override archive format (see below) -O, --format-option=OPT give specific options to the archiver -D, --subdir always create subdirectory when extracting -f, --force allow overwriting of local files -q, --quiet decrease verbosity level by one -v, --verbose increase verbosity level by one -V, --verbosity=LEVEL specify verbosity (0, 1 or 2) -p, --page send output through pager -0, --null filenames from standard in are null-byte separated -E, --explain explain what is being done by $::PROGRAM -S, --simulate simulation mode - no filesystem changes are made -o, --option=KEY=VALUE override a configuration option --config=FILE load configuration defaults from file Archive format (for --format) may be specified either as a file extension ("tar.gz") or as "tar+gzip". Report bugs to Oskar Liljeblad <$::BUG_EMAIL>. _END_ exit; } # Read configuration files if (defined $::opt_config) { readconfig($::opt_config, 0); } else { readconfig($::cfg_path_syscfg, 1); if ($::cfg_path_usercfg !~ /^\//) { readconfig(File::Spec->catfile($ENV{HOME}, $::cfg_path_usercfg), 1); } else { readconfig($::cfg_path_usercfg, 1); } } foreach my $opt (@::opt_options) { my ($var,$val) = ($opt =~ /^([^=]+)=(.*)$/); die "$::basename: invalid value for --option: $opt\n" if !defined $val; set_config_option($var, $val, ''); } # Verify option integrity $::opt_verbosity += $::cfg_default_verbosity; if ($::opt_explain && $::opt_simulate) { die "$::basename: --explain and --simulate options are mutually exclusive\n"; #OK } my $mode = getmode(); if (defined $::opt_save_outdir && $mode eq 'extract-to') { die "$::basename: --save-outdir cannot be used in extract-to mode\n"; } if ($::opt_extract_subdir && $mode ne 'extract') { die "$::basename: --subdir can only be used in extract mode\n"; } if ($mode eq 'diff') { die "$::basename: missing archive argument\n" if (@ARGV < 2); #OK my $use_pager = $::opt_use_pager; $::opt_verbosity--; $::opt_use_pager = 0; my $outfile1 = makeoutdir() || exit 1; my $outfile2 = makeoutdir() || exit 1; $::opt_cmd_extract_to = $outfile1; $::opt_cmd_extract_to_type = 'f'; exit 1 if (!runcmds('extract-to', undef, $ARGV[0])); $::opt_cmd_extract_to = $outfile2; $::opt_cmd_extract_to_type = 'f'; exit 1 if (!runcmds('extract-to', undef, $ARGV[1])); my $match1 = find_comparable_file($outfile1); my $match2 = find_comparable_file($outfile2); my @cmd = ($::cfg_path_diff, split(/ /, $::cfg_args_diff), $match1, $match2); push @cmd, ['|'], get_pager_program() if $use_pager; my $allok = cmdexec(1, @cmd); foreach my $file ($outfile1,$outfile2) { warn 'rm -r ',quote($file),"\n" if $::opt_simulate; if (-e $file && -d $file) { #if (-e $file) { #print "$::basename: remove `$file'? "; #select((select(STDOUT), $| = 1)[0]); #my $line = ; #if (defined $line && $line =~ /^y/) { #if (-d $file) { warn 'rm -r ',quote($file),"\n" if $::opt_explain; unlink_directory($file) if !$::opt_simulate; #} else { #unlink $file; #} #} } } exit ($allok ? 0 : 1); } elsif ($mode eq 'repack') { if ($::opt_each) { my $totaldiff = 0; if (!defined $::opt_format) { die "$::basename: specify a format with -F when using --each in repack mode\n"; } my $fmt2 = findformat($::opt_format, 1); exit 1 if !defined $fmt2; # OK for (my $c = 0; $c < @ARGV; $c++) { my $fmt1 = findformat($ARGV[$c], 0); next if !defined $fmt1; if (!issingleformat($fmt1) && issingleformat($fmt2)) { warn "$::basename: format $fmt1 is cannot be repacked into format $fmt2\n"; warn "skipping ", quote($ARGV[$c]), "\n"; next; } if ($fmt1 eq $fmt2) { warn "$::basename: will not repack to same archive type\n"; warn "skipping ", quote($ARGV[$c]), "\n"; next; } my $newname = stripext($ARGV[$c]).formatext($fmt2); if (-e $newname) { warn "$::basename: ".quote($newname).": destination file exists\n"; warn "skipping ", quote($ARGV[$c]), "\n"; next; } repack_archive($ARGV[$c], $newname, $fmt1, $fmt2); my $diff = $::opt_simulate ? 0 : (-s $ARGV[$c]) - (-s $newname); $totaldiff += $diff; if ($::opt_verbosity >= 1) { print quote($newname), ': ', ($diff >= 0 ? 'saved '.$diff : 'grew '.-$diff),' ', ($diff == 1 ? 'byte':'bytes'), "\n"; } } if ($::opt_verbosity >= 1) { print $totaldiff >= 0 ? 'saved '.$totaldiff : 'grew '.-$totaldiff, ' ', $totaldiff == 1 ? 'byte':'bytes', " in total\n"; } } else { die "$::basename: missing archive arguments\n" if @ARGV < 1; #OK die "$::basename: missing archive argument\n" if @ARGV < 2; #OK die "$::basename: will not repack to same archive file\n" if ($ARGV[0] eq $ARGV[1] || File::Spec->canonpath($ARGV[0]) eq File::Spec->canonpath($ARGV[1])); die "$::basename: ".quote($ARGV[1]).": destination file exists\n" if -e $ARGV[1]; my $fmt1 = findformat($ARGV[0], 0); my $fmt2 = findformat($ARGV[1], 0); exit 1 if !defined $fmt1 || !defined $fmt2; # OK die "$::basename: format $fmt1 is cannot be repacked into format $fmt1\n" if (!issingleformat($fmt1) && issingleformat($fmt2)); die "$::basename: will not repack to same archive type\n" if $fmt1 eq $fmt2; repack_archive($ARGV[0], $ARGV[1], $fmt1, $fmt2); my $diff = ($::opt_simulate ? 0 : (-s $ARGV[0]) - (-s $ARGV[1])); if ($::opt_verbosity >= 1) { print quote($ARGV[1]), ': ', ($diff >= 0 ? 'saved '.$diff : 'grew '.-$diff),' ', ($diff == 1 ? 'byte':'bytes'), "\n"; } } } elsif ($::opt_each) { my $allok = 1; if ($mode eq 'cat') { die "$::basename: --each can not be used with cat or add command\n"; #OK } if ($mode eq 'add') { if (!defined $::opt_format) { die "$::basename: specify a format with -F when using --each in add mode\n"; } my $format = findformat($::opt_format, 1); exit 1 if !defined $format; for (my $c = 0; $c < @ARGV; $c++) { my $archive = File::Spec->canonpath($ARGV[$c]) . formatext($format); warn quote($archive).":\n" if $::opt_verbosity > 1; runcmds('add', $format, $archive, $ARGV[$c]) or $allok = 0; } } else { for (my $c = 0; $c < @ARGV; $c++) { warn quote($ARGV[$c]).":\n" if $::opt_verbosity > 1; runcmds($mode, undef, $ARGV[$c]) or $allok = 0; } } exit ($allok ? 0 : 1); } else { die "$::basename: missing archive argument\n" if (@ARGV == 0); #OK runcmds($mode, undef, shift @ARGV, @ARGV) || exit 1; } # runcmds(mode, format, archive, args) # Execute an atool command. This is where it all happens. # If mode is 'extract', returns the directory (or only file) # which was extracted. # If forceformat is undef, the format will be detected from # $::opt_format or the filename. sub runcmds($$$;@) { my ($mode, $format, $archive, @args) = @_; if (!defined $format) { if (defined $::opt_format) { $format = findformat($::opt_format, 1); } else { $format = findformat($archive, 0); } return undef if !defined $format; } my @cmd; my $outdir; if ($format eq 'tar+bzip2') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($::cfg_use_tar_bzip2_option) { push @cmd, maketarcmd($archive, $outdir, $mode, 'f', '--bzip2'), @args; } elsif ($::cfg_use_pbzip2) { push @cmd, $::cfg_path_pbzip2, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_pbzip2, '-c', ['>'], $archive if $mode eq 'add'; #if ($mode eq 'add') { # Unfortunately pbzip2 cannot read from standard in # 2012-03-15: It seems now it does. # my $tmpname = makeoutfile($::cfg_tmpfile_name); # push @cmd, maketarcmd($tmpname, $outdir, $mode, 'f'), @args; # push @cmd, [';'], $::cfg_path_pbzip2, '-c', $tmpname, ['>'], $archive; # push @cmd, [';'], 'rm', $tmpname; #} else { # push @cmd, $::cfg_path_pbzip2, '-cd', $archive, ['|']; # push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; #} } elsif ($::cfg_use_lbzip2) { push @cmd, $::cfg_path_lbzip2, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_lbzip2, '-c', ['>'], $archive if $mode eq 'add'; } else { push @cmd, $::cfg_path_bzip2, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_bzip2, '-c', ['>'], $archive if $mode eq 'add'; } @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+gzip') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($::cfg_use_tar_z_option) { push @cmd, maketarcmd($archive, $outdir, $mode, 'zf'), @args; } elsif ($::cfg_use_pigz) { push @cmd, $::cfg_path_pigz, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_pigz, '-c', ['>'], $archive if $mode eq 'add'; } else { push @cmd, $::cfg_path_gzip, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_gzip, '-c', ['>'], $archive if $mode eq 'add'; } @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+bzip') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); push @cmd, $::cfg_path_bzip, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_bzip, '-c', ['>'], $archive if $mode eq 'add'; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+compress') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($::cfg_use_gzip_for_z) { push @cmd, $::cfg_path_gzip, '-cd', $archive, ['|'] if $mode ne 'add'; } else { push @cmd, $::cfg_path_compress, '-cd', $archive, ['|'] if $mode ne 'add'; } push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_compress, '-c', ['>'], $archive if $mode eq 'add'; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+lzop') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($::cfg_use_tar_lzop_option) { push @cmd, maketarcmd($archive, $outdir, $mode, 'f', '--lzop'), @args; } else { push @cmd, $::cfg_path_lzop, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_lzop, '-c', ['>'], $archive if $mode eq 'add'; } @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+lzip') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($::cfg_use_tar_lzip_option) { push @cmd, maketarcmd($archive, $outdir, $mode, 'f', '--lzip'), @args; } elsif ($::cfg_use_plzip) { push @cmd, $::cfg_path_plzip, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_plzip, '-c', ['>'], $archive if $mode eq 'add'; } else { push @cmd, $::cfg_path_lzip, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_lzip, '-c', ['>'], $archive if $mode eq 'add'; } @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+xz') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($::cfg_use_tar_xz_option) { push @cmd, maketarcmd($archive, $outdir, $mode, 'f', '--xz'), @args; } else { push @cmd, $::cfg_path_xz, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_xz, '-c', ['>'], $archive if $mode eq 'add'; } @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+7z') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); push @cmd, $::cfg_path_7z, 'x', '-so', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_7z, 'a', '-si', $archive if $mode eq 'add'; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar+lzma') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($::cfg_use_tar_lzma_option) { push @cmd, maketarcmd($archive, $outdir, $mode, 'f', '--lzma'), @args; } else { push @cmd, $::cfg_path_lzma, '-cd', $archive, ['|'] if $mode ne 'add'; push @cmd, maketarcmd('-', $outdir, $mode, 'f'), @args; push @cmd, ['|'], $::cfg_path_lzma, '-c', ['>'], $archive if $mode eq 'add'; } @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'tar') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); push @cmd, maketarcmd($archive, $outdir, $mode, 'f'), @args; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'jar' && $::cfg_use_jar) { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); my $opts = ''; if ($mode eq 'add') { warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } $opts .= 'v' if $::opt_verbosity >= 1; push @cmd, $::cfg_path_jar; push @cmd, "x$opts", '-C', $outdir if $mode eq 'extract'; push @cmd, "x$opts", '-C', $::opt_cmd_extract_to if $mode eq 'extract-to'; push @cmd, "t$opts" if $mode eq 'list'; push @cmd, "c$opts" if $mode eq 'add'; push @cmd, $archive, @args; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'jar' || $format eq 'zip') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'add') { push @cmd, $::cfg_path_zip, '-r'; } else { push @cmd, $::cfg_path_unzip; push @cmd, '-p' if $mode eq 'cat'; push @cmd, '-l' if $mode eq 'list'; push @cmd, '-d', $outdir if $mode eq 'extract'; push @cmd, '-d', $::opt_cmd_extract_to if $mode eq 'extract-to'; } push @cmd, '-v' if $::opt_verbosity > 1; push @cmd, '-qq' if $::opt_verbosity < 0; push @cmd, '-q' if $::opt_verbosity == 0; push @cmd, $archive, @args; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($format eq 'rar') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'add' || $::cfg_use_rar_for_unpack) { push @cmd, $::cfg_path_rar; } else { push @cmd, $::cfg_path_unrar; } push @cmd, 'a' if $mode eq 'add'; push @cmd, 'vt' if $mode eq 'list' && $::opt_verbosity >= 3; push @cmd, 'v' if $mode eq 'list' && $::opt_verbosity == 2; push @cmd, 'l' if $mode eq 'list' && $::opt_verbosity <= 1; push @cmd, 'x' if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, '-ierr', 'p' if $mode eq 'cat'; push @cmd, '-r0' if ($mode eq 'add'); push @cmd, $archive, @args; push @cmd, tailslash($outdir) if $mode eq 'extract'; push @cmd, tailslash($::opt_cmd_extract_to) if $mode eq 'extract-to'; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($format eq '7z') { # 7z has the -so option for writing data to stdout, but it doesn't # write data to terminal even if the file is designed to be # read in a terminal... return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); #if ($mode eq 'cat') { # warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; # return undef; #} push @cmd, $::cfg_path_7z; push @cmd, 'a' if $mode eq 'add'; push @cmd, 'l' if $mode eq 'list'; push @cmd, 'x', '-so' if $mode eq 'cat'; push @cmd, 'x', '-o'.$outdir if $mode eq 'extract'; push @cmd, 'x', '-o'.$::opt_cmd_extract_to if $mode eq 'extract-to'; push @cmd, @::opt_format_options, $archive, @args; return multiarchivecmd($archive, $outdir, $mode, 1, 0, \@args, @cmd); } elsif ($format eq 'cab') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'add') { warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } push @cmd, $::cfg_path_cabextract; push @cmd, '--single'; push @cmd, '--directory', $outdir if $mode eq 'extract'; push @cmd, '--directory', $::opt_cmd_extract_to if $mode eq 'extract-to'; push @cmd, '--pipe' if $mode eq 'cat'; push @cmd, '--list' if $mode eq 'list'; push @cmd, $archive; push @cmd, '--filter'; push @cmd, @args; return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($format eq 'alzip') { if ($mode eq 'cat' || $mode eq 'add' || $mode eq 'list') { warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); push @cmd, $::cfg_path_unalz; push @cmd, $archive; push @cmd, $outdir if $mode eq 'extract'; push @cmd, $::opt_cmd_extract_to if $mode eq 'extract-to'; return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($format eq 'lha') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); push @cmd, $::cfg_path_lha; push @cmd, 'a' if $mode eq 'add'; push @cmd, 'v' if $mode eq 'list' && $::opt_verbosity >= 3; push @cmd, 'l' if $mode eq 'list' && $::opt_verbosity == 2; push @cmd, 'lq' if $mode eq 'list' && $::opt_verbosity <= 1; push @cmd, 'xw='.tailslash($outdir) if $mode eq 'extract'; push @cmd, 'xw='.tailslash($::opt_cmd_extract_to) if $mode eq 'extract-to'; push @cmd, 'p' if $mode eq 'cat'; push @cmd, $archive, @args; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($format eq 'ace') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); push @cmd, $::cfg_path_unace; if ($mode eq 'add' || $mode eq 'cat') { warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } push @cmd, 'v', '-c' if $mode eq 'list' && $::opt_verbosity >= 3; push @cmd, 'v' if $mode eq 'list' && $::opt_verbosity == 2; push @cmd, 'l' if $mode eq 'list' && $::opt_verbosity <= 1; push @cmd, 'x' if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, $archive, @args; push @cmd, tailslash($outdir) if $mode eq 'extract'; push @cmd, tailslash($::opt_cmd_extract_to) if $mode eq 'extract-to'; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($format eq 'arj') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'cat') { warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } if ($mode eq 'add' || $::cfg_use_arj_for_unpack) { push @cmd, $::cfg_path_arj; push @cmd, 'a' if $mode eq 'add'; push @cmd, 'v' if $mode eq 'list' && $::opt_verbosity == 2; push @cmd, 'l' if $mode eq 'list' && $::opt_verbosity <= 1; push @cmd, 'x' if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, $archive, @args; push @cmd, tailslash($outdir) if $mode eq 'extract'; push @cmd, tailslash($::opt_cmd_extract_to) if $mode eq 'extract-to'; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } else { push @cmd, $::cfg_path_unarj; # XXX: cat mode might work for arj archives, but it extract to stderr! push @cmd, 'v' if $mode eq 'list' && $::opt_verbosity == 2; push @cmd, 'l' if $mode eq 'list' && $::opt_verbosity <= 1; push @cmd, 'x' if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, $archive if ($mode ne 'extract' && $mode ne 'extract-to');; # we call makeabsolute here because needcwd=1 to the multiarchivecmd call push @cmd, makeabsolute($archive) if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, @args; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 0, 1, \@args, @cmd); } } elsif ($format eq 'arc') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'add' || $::cfg_use_arc_for_unpack) { push @cmd, $::cfg_path_arc; push @cmd, 'a' if $mode eq 'add'; push @cmd, 'v' if $mode eq 'list' && $::opt_verbosity >= 3; push @cmd, 'l' if $mode eq 'list' && $::opt_verbosity == 2; push @cmd, 'ln' if $mode eq 'list' && $::opt_verbosity <= 1; push @cmd, 'x' if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, 'p' if $mode eq 'cat'; } else { push @cmd, $::cfg_path_nomarch; push @cmd, '-lvU' if $mode eq 'list' && $::opt_verbosity >= 2; push @cmd, '-lU' if $mode eq 'list' && $::opt_verbosity <= 1; push @cmd, '-p' if $mode eq 'cat'; } push @cmd, $archive if ($mode ne 'extract' && $mode ne 'extract-to'); # we call makeabsolute here because needcwd=1 to the multiarchivecmd call push @cmd, makeabsolute($archive) if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, @args; @cmd = handle_empty_add(@cmd) if ($mode eq 'add' && @args == 0); return multiarchivecmd($archive, $outdir, $mode, 0, 1, \@args, @cmd); } elsif ($format eq 'rpm') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'list') { push @cmd, $::cfg_path_rpm; push @cmd, '-qlp'; push @cmd, '-v' if $::opt_verbosity >= 1; push @cmd, $archive, @args; return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($mode eq 'extract' || $mode eq 'extract-to') { push @cmd, $::cfg_path_rpm2cpio; push @cmd, makeabsolute($archive); push @cmd, ['|']; push @cmd, $::cfg_path_cpio, '-imd', '--quiet', @args; return multiarchivecmd($archive, $outdir, $mode, 0, 1, \@args, @cmd); } else { # add and cat # FIXME: I guess cat could work too, but it would require that we # extracted to a temporary dir, read and printed it, then removed it. warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } } elsif ($format eq 'deb') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'cat') { push @cmd, $::cfg_path_dpkg_deb, '--fsys-tarfile', makeabsolute($archive), ['|']; push @cmd, $::cfg_path_tar, '-xO', @args; } elsif ($mode eq 'list' || $mode eq 'extract' || $mode eq 'extract-to') { push @cmd, $::cfg_path_dpkg_deb; push @cmd, '--contents' if $mode eq 'list'; if ($mode eq 'extract' || $mode eq 'extract-to') { push @cmd, '--extract' if $::opt_verbosity <= 0; push @cmd, '--vextract' if $::opt_verbosity > 0; } push @cmd, $archive; push @cmd, $outdir if $mode eq 'extract'; push @cmd, $::opt_cmd_extract_to if $mode eq 'extract-to'; push @cmd, @args; if ($::cfg_extract_deb_control && ($mode eq 'extract' || $mode eq 'extract-to')) { push @cmd, [';']; push @cmd, $::cfg_path_dpkg_deb; push @cmd, '--control'; push @cmd, $archive; push @cmd, File::Spec->catdir($outdir, 'DEBIAN') if $mode eq 'extract'; push @cmd, File::Spec->catdir($::opt_cmd_extract_to, 'DEBIAN') if $mode eq 'extract-to'; } } return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($format eq 'ar') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); my $v = ($::opt_verbosity >= 1 ? 'v' : ''); push @cmd, $::cfg_path_ar; push @cmd, 'rc'.$v if $mode eq 'add'; push @cmd, 'x'.$v if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, 't'.$v if $mode eq 'list'; # Don't use v(erbose) with cat command because ar would add "\n\n\n" to output push @cmd, 'p' if $mode eq 'cat'; push @cmd, makeabsolute($archive), @args; return multiarchivecmd($archive, $outdir, $mode, 1, 1, \@args, @cmd); } elsif ($format eq 'cpio') { return undef if ($mode eq 'extract' && !defined ($outdir = makeoutdir())); if ($mode eq 'list') { push @cmd, $::cfg_path_cat, $archive, ['|']; push @cmd, $::cfg_path_cpio, '-t'; push @cmd, '-v' if $::opt_verbosity >= 1; return multiarchivecmd($archive, $outdir, $mode, 0, 0, \@args, @cmd); } elsif ($mode eq 'extract' || $mode eq 'extract-to') { push @cmd, $::cfg_path_cat, makeabsolute($archive), ['|']; push @cmd, $::cfg_path_cpio, '-i'; push @cmd, '-v' if $::opt_verbosity >= 1; return multiarchivecmd($archive, $outdir, $mode, 0, 1, \@args, @cmd); } elsif ($mode eq 'add') { if (@args == 0) { push @cmd, $::cfg_path_cpio; push @cmd, '-0' if $::opt_null; push @cmd, '-o'; push @cmd, '-v' if $::opt_verbosity >= 1; push @cmd, ['>'], $archive; } else { push @cmd, $::cfg_path_find, @args; push @cmd, '-print0' if $::cfg_use_find_cpio_print0; push @cmd, ['|'], $::cfg_path_cpio; push @cmd, '-0' if $::cfg_use_find_cpio_print0; push @cmd, '-o'; push @cmd, '-v' if $::opt_verbosity >= 1; push @cmd, ['>'], $archive; } return multiarchivecmd($archive, $outdir, $mode, 1, 1, \@args, @cmd); } else { # cat warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } } elsif ($format eq 'bzip2') { return singlearchivecmd($archive, $::cfg_path_pbzip2, $format, $mode, 1, @args) if $::cfg_use_pbzip2; return singlearchivecmd($archive, $::cfg_path_lbzip2, $format, $mode, 1, @args) if $::cfg_use_lbzip2; return singlearchivecmd($archive, $::cfg_path_bzip2, $format, $mode, 1, @args); } elsif ($format eq 'bzip') { return singlearchivecmd($archive, $::cfg_path_bzip, $format, $mode, 1, @args); } elsif ($format eq 'gzip') { return singlearchivecmd($archive, $::cfg_use_pigz ? $::cfg_path_pigz : $::cfg_path_gzip, $format, $mode, 1, @args); } elsif ($format eq 'compress') { if ($::cfg_use_gzip_for_z && $mode ne 'add') { return singlearchivecmd($archive, $::cfg_path_gzip, $format, $mode, 1, @args); } else { return singlearchivecmd($archive, $::cfg_path_compress, $format, $mode, 1, @args); } } elsif ($format eq 'lzma') { return singlearchivecmd($archive, $::cfg_path_lzma, $format, $mode, 1, @args); } elsif ($format eq 'lzop') { return singlearchivecmd($archive, $::cfg_path_lzop, $format, $mode, 0, @args); } elsif ($format eq 'lzip') { return singlearchivecmd($archive, $::cfg_use_plzip ? $::cfg_path_plzip : $::cfg_path_lzip, $format, $mode, 1, @args); } elsif ($format eq 'xz') { return singlearchivecmd($archive, $::cfg_path_xz, $format, $mode, 1, @args); } elsif ($format eq 'rzip') { return singlearchivecmd($archive, $::cfg_path_rzip, $format, $mode, 0, @args); } elsif ($format eq 'lrzip') { return singlearchivecmd($archive, $::cfg_path_lrzip, $format, $mode, 0, @args); } return undef; } # de(value): # Return 1 if value defined and is non-zero, 0 otherwise. sub de($) { my ($value) = @_; return defined $value && $value ? 1 : 0; } # getmode() # Identify the execution mode, and return it. # Possible modes are 'cat', 'extract', 'list', 'add' or 'extract-to'. sub getmode() { my $mode; if (de($::opt_cmd_list) + de($::opt_cmd_cat) + de($::opt_cmd_extract) + de($::opt_cmd_add) + de($::opt_cmd_extract_to) + de($::opt_cmd_diff) + de($::opt_cmd_repack) > 1) { die "$::basename: only one command may be specified\n"; #OK } $mode = 'cat' if ($::basename eq 'acat'); $mode = 'extract' if ($::basename eq 'aunpack'); $mode = 'list' if ($::basename eq 'als'); $mode = 'add' if ($::basename eq 'apack'); $mode = 'diff' if ($::basename eq 'adiff'); $mode = 'repack' if ($::basename eq 'arepack'); $mode = 'add' if ($::opt_cmd_add); $mode = 'cat' if ($::opt_cmd_cat); $mode = 'list' if ($::opt_cmd_list); $mode = 'extract' if ($::opt_cmd_extract); $mode = 'extract-to' if ($::opt_cmd_extract_to); $mode = 'diff' if ($::opt_cmd_diff); $mode = 'repack' if ($::opt_cmd_repack); if (!defined $mode) { die "$::basename: no command specified\nTry `$::basename --help' for more information.\n"; #OK } return $mode; } # singlearchivecmd(archive, command, format, mode, args) # Execute a command for single-file archives. # The command parameter specifies what command to execute. # If mode is 'extract-to', returns the directory (or only file) # which was extracted. sub singlearchivecmd($$$$$@) { my ($archive, $cmd, $format, $mode, $can_do_c, @args) = @_; my $outfile; my $reason; my @cmd; push @cmd, $cmd; push @cmd, '-v' if $::opt_verbosity > 1; if ($mode eq 'list') { warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } elsif ($mode eq 'cat') { if (!$can_do_c) { warn "$::basename: ".quote($archive).": $mode command not supported for $format archives\n"; return undef; } push @cmd, '-c', '-d', $archive, @args; $outfile = $archive; # Just so that we don't return undef } elsif ($mode eq 'add') { if (@args > 1) { warn "$::basename: cannot add more than one file with this format\n"; return undef; } if (!$::opt_force && (-e $archive || -l $archive)) { warn "$::basename: ".quote($archive).": refusing to overwrite existing file\n"; return undef; } #if (!$::cfg_keep_compressed && stripext($archive) ne $args[0]) { # warn "$::basename: ".quote($archive).": cannot create a $format archive with this name (use -X)\n"; # return; #} if ($can_do_c) { push @cmd, '-c', @args, ['>'], $archive; } else { push @cmd, '-o', $archive, @args; } $outfile = $archive; # Just so that we don't return undef } elsif ($mode eq 'extract') { $outfile = stripext($archive); if ($::cfg_decompress_to_cwd) { $outfile = basename($outfile); } if (-e $outfile) { $outfile = makeoutfile($::cfg_tmpdir_name); $reason = 'local file exists'; } if ($can_do_c) { push @cmd, '-c', '-d', $archive, @args, ['>'], $outfile; } else { push @cmd, '-o', $outfile, '-d', $archive, @args; } } elsif ($mode eq 'extract-to') { $outfile = $::opt_cmd_extract_to; if ($::opt_simulate ? $::opt_cmd_extract_to_type eq 'd' : -d $outfile) { my $base = File::Basename::basename($archive); $outfile = File::Spec->catfile($outfile, stripext($base)); } if ($can_do_c) { push @cmd, '-c', '-d', $archive, @args, ['>'], $outfile; } else { push @cmd, '-o', $outfile, '-d', $archive, @args; } } push @cmd, ['|'], get_pager_program() if $::opt_use_pager; cmdexec(0, @cmd) || return undef; if ($mode eq 'extract' || $mode eq 'extract-to') { if ($::cfg_show_extracted && !$::opt_simulate) { my $archivebase = File::Basename::basename($archive); my $rmsg = defined $reason ? " ($reason)" : ''; warn quote($archivebase).": extracted to `".quote($outfile)."'$rmsg\n"; } } if (!$::cfg_keep_compressed) { if ($mode eq 'extract') { warn 'unlink ', quote($archive), "\n" if ($::opt_explain || $::opt_simulate); if (!$::opt_simulate) { unlink($archive) || warn "$::basename: ".quote($archive).": cannot remove - $!\n"; } } elsif ($mode eq 'add') { warn 'unlink ', quote($args[0]), "\n" if ($::opt_explain || $::opt_simulate); if (!$::opt_simulate) { unlink($args[0]) || warn "$::basename: ".quote($args[0]).": cannot remove - $!\n"; } } } return $outfile; } # maketarcmd(opts): # Create (partial) command line arguments for a tar command. # The parameter opts specifies additional arguments to add. sub maketarcmd($$$$@) { my ($archive, $outdir, $mode, $opts, @rest) = @_; $opts = 'v'.$opts if $::opt_verbosity >= 1; my @cmd = ($::cfg_path_tar); push @cmd, "xO$opts" if $mode eq 'cat'; push @cmd, "x$opts" if ($mode eq 'extract' || $mode eq 'extract-to'); push @cmd, "t$opts" if $mode eq 'list'; push @cmd, "c$opts" if $mode eq 'add'; push @cmd, $archive if defined $archive; push @cmd, '-C', $outdir if $mode eq 'extract'; push @cmd, '-C', $::opt_cmd_extract_to if $mode eq 'extract-to'; push @cmd, @rest; return @cmd; } # cmdexec(ignore_return, cmdspec) # Execute a command specification. # The cmdspec parameter is a list of string arguments building # the command line. If there's a list reference instead of a # string, it is a shell meta character/string which shouldn't # be quoted. sub cmdexec($@) { my ($ignret, @cmd) = @_; if ($::opt_explain || $::opt_simulate) { my $spec = join(' ', map { ref $_ ? @{$_} : shquotemeta $_ } @cmd); explain quote($spec)."\n"; return 1 if ($::opt_simulate); } my $cmds = makespec(@cmd); if (!shell_execute(@cmd)) { warn "$::basename: ".quote($cmds).": cannot execute - $::errmsg\n"; return 0; } if ($? & 0xFF != 0) { warn "$::basename: ".quote($cmds).": abnormal exit (exit code $?)\n"; return 0; } if (!$ignret && $? >> 8 != 0) { warn "$::basename: ".quote($cmds).": non-zero return-code\n"; return 0; } return 1; } # makespec(@) # Make a command specification when printing errors. sub makespec(@) { my (@cmd) = @_; my $spec = $cmd[0].' ...'; my $lastref = 0; foreach (@cmd, '') { if ($lastref) { $spec .= " | $_ ..."; $lastref = 0; } $lastref = 1 if (ref); } return $spec; } # makeoutfile(template) # Make a unique output file for extraction command. sub makeoutfile($) { my ($template) = @_; my $file; do { $file = sprintf $template, int rand 10000; } while (-e $file); return $file; } # makeoutdir() # Make a temporary (unique) output directory for extraction command. sub makeoutdir() { my $dir; do { $dir = sprintf $::cfg_tmpdir_name, int rand 10000; } while (-e $dir); warn 'mkdir ', $dir, "\n" if $::opt_simulate || $::opt_explain; if (!$::opt_simulate) { if (!mkdir($dir, 0700)) { warn "$::basename: ".quote($dir).": cannot create directory - $!\n"; return undef; } push @::rmdirs, $dir; } return $dir; } # explain($) # Print on screen if $::opt_explain is true. sub explain($) { my ($msg) = @_; print STDERR $msg if ($::opt_explain || $::opt_simulate); } # tailslash($) # If specified filename does not end with a slash, # add one and return the new filename. sub tailslash($) { my ($file) = @_; return ($file =~ /\/$/ ? $file : "$file/"); } # shquotemeta($) # A more sophisticated quotemeta for bourne shells. # (This should be used for printing only.) sub shquotemeta($) { my ($str) = @_; $str =~ s/([^A-Za-z0-9_.+,\/:=@%^-])/\\$1/g; return $str; } # multiarchivecmd(archive, outdir, mode, create, needcwd, argref, cmdspec) # Execute a command for multi-file archives. # The `create' argument controls whether the archive # will be created (1) or just added to (0) if mode is "add". # If mode is 'extract', returns the directory (or only file) # which was extracted. # If needcwd is true, the outdir must be changed to. sub multiarchivecmd($$$$@) { my ($archive, $outdir, $mode, $create, $needcwd, $argref, @cmd) = @_; my @args = @{$argref}; if ($mode eq 'cat' && @args == 0) { die "$::basename: missing file argument\n"; #OK } if ($mode eq 'add' && $create && !$::opt_force && (-e $archive || -l $archive)) { warn "$::basename: ".quote($archive).": refusing to overwrite existing file\n"; return undef; } push @cmd, ['|'], get_pager_program() if $::opt_use_pager; my $olddir = undef; if ($needcwd) { $olddir = getcwd(); if ($mode eq 'extract') { warn "cd ", quote($outdir), "\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate && !chdir($outdir)) { warn "$::basename: ".quote($outdir).": cannot change to - $!\n"; return undef; } } if ($mode eq 'extract-to') { warn "cd ", quote($::opt_cmd_extract_to), "\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate && !chdir($::opt_cmd_extract_to)) { warn "$::basename: ".quote($::opt_cmd_extract_to).": cannot change to - $!\n"; return undef; } } } if ($mode ne 'extract') { cmdexec(0, @cmd) || return undef; if (defined $olddir) { warn "cd ", quote($olddir), "\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate && !chdir($olddir)) { warn "$::basename: ".quote($olddir).": cannot change to - $!\n"; return undef; } } # XXX: can't save outdir with extract-to. return 1; } if (!cmdexec(0, @cmd)) { if (defined $olddir) { warn "cd ", quote($olddir), "\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate && !chdir($olddir)) { warn "$::basename: ".quote($olddir).": cannot change to - $!\n"; } } return undef; } if (defined $olddir) { warn "cd ", quote($olddir), "\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate && !chdir($olddir)) { warn "$::basename: ".quote($olddir).": cannot change to - $!\n"; return undef; } } return undef if $::opt_simulate; if (!opendir(DIR, $outdir)) { warn "$::basename: ".quote($outdir).": cannot list - $!\n"; return undef; } my @files = grep !/^\.\.?$/, readdir DIR; closedir DIR; my $archivebase = File::Basename::basename($archive); my $reason; my $adddir = 0; if (@files == 0) { warn quote($archivebase).": archive is empty\n"; rmdir $outdir; return undef; } elsif ($::opt_extract_subdir) { $reason = 'forced'; } elsif (@files == 1) { my $fromfile = File::Spec->catfile($outdir, $files[0]); if ($::opt_force || (!-l $files[0] && !-e $files[0])) { # If the file is a directory, it can only be moved if writable my $oldmode = undef; if (!-l $fromfile && -d $fromfile) { my @statinfo = stat($fromfile); if (!@statinfo) { warn quote($fromfile).": cannot get file info - $!\n"; return undef; } $oldmode = $statinfo[2]; if (!chmod(0700, $fromfile)) { warn quote($fromfile).": cannot change mode - $!\n"; return undef; } } if (!rename $fromfile, $files[0]) { warn quote($fromfile).": cannot rename - $!\n"; return undef; } rmdir $outdir; # If we changed mode previously, restore that mode now if (defined $oldmode) { if (!chmod($oldmode, $files[0])) { warn quote($files[0]).": cannot change mode - $!\n"; return undef; } } if ($::cfg_show_extracted) { my $file = ($files[0] =~ /\// ? dirname($files[0]) : $files[0]); warn quote($archivebase).": extracted to `".quote($file)."'\n" ; } save_outdir($files[0]); return $files[0]; } $reason = 'local file exists'; $adddir = 1 if (!-l $files[0] && -d $files[0]); } else { $reason = 'multiple files in root'; } my $localoutdir = stripext($archivebase); if (!-e $localoutdir) { if (!rename $outdir, $localoutdir) { warn quote($outdir).": cannot rename - $!\n"; return undef; } $outdir = $localoutdir; } warn quote($archivebase).": extracted to `".quote($outdir)."' ($reason)\n"; save_outdir($adddir ? File::Spec->catfile($outdir, $files[0]) : $outdir); return $outdir; } # stripext(file) # Strip extension from the specified file. sub stripext($) { my ($file) = @_; return $file if ($file =~ s/(\.tar\.bz2|\.tbz2)$//); return $file if ($file =~ s/(\.tar\.bz|\.tbz)$//); return $file if ($file =~ s/(\.tar\.gz|\.tgz)$//); return $file if ($file =~ s/(\.tar\.Z|\.tZ)$//); return $file if ($file =~ s/(\.tar\.7z|\.t7z)$//); return $file if ($file =~ s/(\.tar\.lzma|\.tlzma)$//); return $file if ($file =~ s/(\.tar\.lzo|\.lzo)$//); return $file if ($file =~ s/(\.tar\.lz|\.lz)$//); return $file if ($file =~ s/\.tar$//); return $file if ($file =~ s/\.bz2$//); return $file if ($file =~ s/\.bz$//); return $file if ($file =~ s/\.lz$//); return $file if ($file =~ s/\.gz$//); return $file if ($file =~ s/\.zip$//); return $file if ($file =~ s/\.7z$//); return $file if ($file =~ s/\.alz$//); return $file if ($file =~ s/\.jar$//); return $file if ($file =~ s/\.war$//); return $file if ($file =~ s/\.Z$//); return $file if ($file =~ s/\.rar$//); return $file if ($file =~ s/\.(lha|lzh)$//); return $file if ($file =~ s/\.ace$//); return $file if ($file =~ s/\.arj$//); return $file if ($file =~ s/\.a$//); return $file if ($file =~ s/\.lzma$//); return $file if ($file =~ s/\.rpm$//); return $file if ($file =~ s/\.deb$//); return $file if ($file =~ s/\.cpio$//); return $file if ($file =~ s/\.cab$//); return $file if ($::cfg_strip_unknown_ext && $file =~ s/\.[^.]+$//); return $file; } # formatext(format) # Return the usual extension for the specified file format sub formatext($) { my ($format) = @_; return '.tar.bz2' if $format eq 'tar+bzip2'; return '.tar.gz' if $format eq 'tar+gzip'; return '.tar.bz' if $format eq 'tar+bzip'; return '.tar.7z' if $format eq 'tar+7z'; return '.tar.lzo' if $format eq 'tar+lzop'; return '.tar.lzma' if $format eq 'tar+lzma'; return '.tar.lz' if $format eq 'tar+lzip'; return '.tar.xz' if $format eq 'tar+xz'; return '.tar.Z' if $format eq 'tar+compress'; return '.tar' if $format eq 'tar'; return '.bz2' if $format eq 'bzip2'; return '.lzma' if $format eq 'lzma'; return '.7z' if $format eq '7z'; return '.alz' if $format eq 'alzip'; return '.bz' if $format eq 'bzip'; return '.gz' if $format eq 'gzip'; return '.lzo' if $format eq 'lzop'; return '.lz' if $format eq 'lzip'; return '.xz' if $format eq 'xzip'; return '.rz' if $format eq 'rzip'; return '.lrz' if $format eq 'lrzip'; return '.zip' if $format eq 'zip'; return '.jar' if $format eq 'jar'; return '.Z' if $format eq 'compress'; return '.rar' if $format eq 'rar'; return '.ace' if $format eq 'ace'; return '.a' if $format eq 'ar'; return '.arj' if $format eq 'arj'; return '.lha' if $format eq 'lha'; return '.rpm' if $format eq 'rpm'; return '.deb' if $format eq 'deb'; return '.cpio' if $format eq 'cpio'; return '.cab' if $format eq 'cab'; die "$::basename: ".quote($format).": don't know file extension for format\n"; } # issingleformat(fmt) # fmt is a file specification as returned by findformat. # This function returns true if fmt is a single file archive (gzip etc) # for certain. This means that 7zip is not a single file archive format, # although it can be used in this way. sub issingleformat($) { my ($fmt) = @_; return 1 if $fmt eq 'bzip2'; return 1 if $fmt eq 'gzip'; return 1 if $fmt eq 'bzip'; return 1 if $fmt eq 'compress'; return 1 if $fmt eq 'lzma'; return 1 if $fmt eq 'lzop'; return 1 if $fmt eq 'lzip'; return 1 if $fmt eq 'xz'; return 1 if $fmt eq 'rzip'; return 1 if $fmt eq 'lrzip'; return 0; } # findformat(spec, manual) # Figure out format from specified file/string. # If manual is 0, spec is a filename, otherwise # it is a format description string. sub findformat($$) { my ($file, $manual) = @_; my $spec = lc $file; my @fileoutput = ( ['tar+bzip2', qr/^(GNU|POSIX) tar archive \(bzip2 compressed data(\W|$)/], ['tar+gzip', qr/^(GNU|POSIX) tar archive \(gzip compressed data(\W|$)/], ['tar+bzip', qr/^(GNU|POSIX) tar archive \(bzip compressed data(\W|$)/], ['tar+compress', qr/^(GNU|POSIX) tar archive \(compress'd data(\W|$)/], ['tar', qr/^(GNU|POSIX) tar archive(\W|$)/], ['zip', qr/ \(Zip archive data[^)]*\)$/], ['zip', qr/^Zip archive data(\W|$)/], ['zip', qr/^MS-DOS executable (.*), ZIP self-extracting archive(\W|$)/], ['rar', qr/^RAR archive data(\W|$)/], ['lha', qr/^LHa \(2\.x\) archive data /], ['lha', qr/^LHa 2\.x\? archive data /], ['lha', qr/^LHarc 1\.x archive data /], ['lha', qr/^MS-DOS executable .*, LHA's SFX$/], ['7z', qr/^7(z|-zip) archive data, version .*$/], ['ar', qr/^current ar archive(\W|$)/], ['arj', qr/^ARJ archive data(\W|$)/], ['arc', qr/^ARC archive data(\W|$)/], ['cpio', qr/^cpio archive$/], ['cpio', qr/^ASCII cpio archive /], ['rpm', qr/^RPM v/], ['cab', qr/^Microsoft Cabinet archive data\W/], ['cab', qr/^PE executable for MS Windows /], ['deb', qr/^Debian binary package(\W|$)/], ['bzip2', qr/ \(bzip2 compressed data(\W|$)/], ['bzip', qr/ \(bzip compressed data(\W|$)/], ['gzip', qr/ \(gzip compressed data(\W|$)/], ['compress', qr/ \(compress'd data(\W|$)/], ['lzma', qr/^lzma compressed data /], # Not in my magic ['lzop', qr/^lzop compressed data /], ['lzip', qr/^lzip compressed data /], # Not in my magic ['xz', qr/^xz compressed data /], # Not in my magic ['rzip', qr/^rzip compressed data /], ['lrzip', qr/^lrzip compressed data /], # Not in my magic ['bzip2', qr/^bzip2 compressed data(\W|$)/], ['bzip', qr/^bzip compressed data(\W|$)/], ['gzip', qr/^gzip compressed data(\W|$)/], ['compress', qr/^compress'd data(\W|$)/], ); my @fileextensions = ( ['tar+7z', qr/(\.tar\.7z|\.t7z)$/], ['tar+bzip', qr/(\.tar\.bz|\.tbz)$/], ['tar+bzip2', qr/(\.tar\.bz2|\.tbz2)$/], ['tar+compress', qr/(\.tar\.[zZ]|\.t[zZ])$/], ['tar+gzip', qr/(\.tar\.gz|\.tgz)$/], ['tar+lzip', qr/(\.tar\.lz|\.tlz)$/], ['tar+lzma', qr/(\.tar\.lzma|\.tlzma)$/], ['tar+lzop', qr/(\.tar\.lzo|\.tzo)$/], ['tar+xz', qr/(\.tar\.xz|\.txz)$/], ['7z', qr/\.7z$/], ['ace', qr/\.ace$/], ['alzip', qr/\.alz$/], ['ar', qr/\.a$/], ['arc', qr/\.arc$/], ['arj', qr/\.arj$/], ['bzip', qr/\.bz$/], ['bzip2', qr/\.bz2$/], ['cab', qr/\.cab$/], ['compress', qr/\.[zZ]$/], ['cpio', qr/\.cpio$/], ['deb', qr/\.deb$/], ['gzip', qr/\.gz$/], ['jar', qr/\.(jar|war)$/], ['lha', qr/\.(lha|lzh)$/], ['lrzip', qr/\.lrz$/], ['lzip', qr/\.lz$/], ['lzma', qr/\.lzma$/], ['lzop', qr/\.lzo$/], ['rar', qr/\.rar$/], ['rpm', qr/\.rpm$/], ['rzip', qr/\.rz$/], ['tar', qr/\.tar$/], ['xz', qr/\.xz$/], ['zip', qr/\.zip$/], ); if ($manual) { $spec =~ tr/+/./; $spec =~ s/^\.*/\./; $spec =~ s/lzop/lzo/; $spec =~ s/lzip/lz/; $spec =~ s/rzip/rz/; $spec =~ s/lrzip/lrz/; $spec =~ s/bzip2/bz2/; $spec =~ s/bzip/bz/; $spec =~ s/gzip/gz/; $spec =~ s/7zip/7z/; $spec =~ s/alzip/alz/; $spec =~ s/compress/Z/; $spec =~ s/^ar$/a/; } if (!$::cfg_use_file_always) { foreach my $formatinfo (@fileextensions) { my ($format, $regex) = @{$formatinfo}; return $format if ($spec =~ $regex); } } if (!$manual && $::cfg_use_file) { if (!-e $file) { warn "$::basename: ".quote($file).": no such file and cannot identify format from extension\n"; return; } if (!sysopen(TMP, $file, O_RDONLY)) { warn "$::basename: ".quote($file).": cannot open - $!\n"; return; } close TMP; if (!-f $file) { warn "$::basename: ".quote($file).": not a regular file\n"; return; } if ($::opt_verbosity >= 1) { if ($::cfg_use_file_always) { warn "$::basename: ".quote($file).": identifying format using file\n"; } else { warn "$::basename: ".quote($file).": format not known, identifying using file\n"; } } my @cmd = ($::cfg_path_file, '-b', '-L', '-z', '--', $file); $spec = backticks(@cmd); if (!defined $spec) { warn "$::basename: $::errmsg\n"; return; } if ($? & 0xFF != 0) { warn "$::basename: ".quote($::cfg_path_file).": abnormal exit\n"; return; } if ($? >> 8 != 0) { warn "$::basename: ".quote($file).": unknown file format\n"; return; } chomp $spec; foreach my $formatinfo (@fileoutput) { my ($format, $regex) = @{$formatinfo}; if ($spec =~ $regex) { warn "$::basename: ".quote($file).": format is `$format'\n" if $::opt_verbosity >= 1; return $format; } } warn "$::basename: ".quote($file).": unsupported file format `$spec'\n"; return; } warn "$::basename: ".quote($file).": unrecognized file format\n"; return; } # backticks(cmdargs, ..) # An implementation of the backtick (qx//) operator. # The difference is that command STDERR output will still # be printed on STDERR, and the shell isn't used to parse # the command line. sub backticks(@) { if (!pipe(IN,OUT)) { $::errmsg = "pipe failed - $!"; return; } my $child = fork; if (!defined $child) { $::errmsg = "fork failed - $!"; return; } if ($child == 0) { close IN || exit 1; close STDOUT || exit 1; open(STDOUT, '>&OUT') || exit 1; close OUT || exit 1; $SIG{__WARN__} = sub {}; exec(@_) || exit 1; } close OUT; my $text = join('', ); close IN; if (waitpid($child,0) != $child && $^O ne 'MSWin32') { $::errmsg = "waitpid failed - $!"; return; } return $text; } # set_config_option(variable, value) # Set a configuration option. sub set_config_option($$$) { my ($var, $val, $context) = @_; my %optionmap = ( 'args_diff' => [ 'option', \$::cfg_args_diff, qr/.*/ ], 'decompress_to_cwd' => [ 'option', \$::cfg_decompress_to_cwd, qr/^(0|1)$/ ], 'default_verbosity' => [ 'option', \$::cfg_default_verbosity, qr/^\d+$/ ], 'extract_deb_control' => [ 'option', \$::cfg_extract_deb_control, qr/^(0|1)$/ ], 'keep_compressed' => [ 'option', \$::cfg_keep_compressed, qr/^(0|1)$/ ], 'path_7z' => [ 'option', \$::cfg_path_7z, qr/.*/ ], 'path_ar' => [ 'option', \$::cfg_path_ar, qr/.*/ ], 'path_arc' => [ 'option', \$::cfg_path_arc, qr/.*/ ], 'path_arj' => [ 'option', \$::cfg_path_arj, qr/.*/ ], 'path_bzip' => [ 'option', \$::cfg_path_bzip, qr/.*/ ], 'path_bzip2' => [ 'option', \$::cfg_path_bzip2, qr/.*/ ], 'path_cabextract' => [ 'option', \$::cfg_path_cabextract, qr/.*/ ], 'path_cat' => [ 'option', \$::cfg_path_cat, qr/.*/ ], 'path_compress' => [ 'option', \$::cfg_path_compress, qr/.*/ ], 'path_cpio' => [ 'option', \$::cfg_path_cpio, qr/.*/ ], 'path_diff' => [ 'option', \$::cfg_path_diff, qr/.*/ ], 'path_dpkg_deb' => [ 'option', \$::cfg_path_dpkg_deb, qr/.*/ ], 'path_file' => [ 'option', \$::cfg_path_file, qr/.*/ ], 'path_find' => [ 'option', \$::cfg_path_find, qr/.*/ ], 'path_gzip' => [ 'option', \$::cfg_path_gzip, qr/.*/ ], 'path_jar' => [ 'option', \$::cfg_path_jar, qr/.*/ ], 'path_lbzip2' => [ 'option', \$::cfg_path_lbzip2, qr/.*/ ], 'path_lha' => [ 'option', \$::cfg_path_lha, qr/.*/ ], 'path_lrzip' => [ 'option', \$::cfg_path_lrzip, qr/.*/ ], 'path_lzip' => [ 'option', \$::cfg_path_lzip, qr/.*/ ], 'path_lzma' => [ 'option', \$::cfg_path_lzma, qr/.*/ ], 'path_lzop' => [ 'option', \$::cfg_path_lzop, qr/.*/ ], 'path_nomarch' => [ 'option', \$::cfg_path_nomarch, qr/.*/ ], 'path_pager' => [ 'option', \$::cfg_path_pager, qr/.*/ ], 'path_pbzip2' => [ 'option', \$::cfg_path_pbzip2, qr/.*/ ], 'path_pigz' => [ 'option', \$::cfg_path_pigz, qr/.*/ ], 'path_plzip' => [ 'option', \$::cfg_path_plzip, qr/.*/ ], 'path_rar' => [ 'option', \$::cfg_path_rar, qr/.*/ ], 'path_rpm' => [ 'option', \$::cfg_path_rpm, qr/.*/ ], 'path_rpm2cpio' => [ 'option', \$::cfg_path_rpm2cpio, qr/.*/ ], 'path_rzip' => [ 'option', \$::cfg_path_rzip, qr/.*/ ], 'path_tar' => [ 'option', \$::cfg_path_tar, qr/.*/ ], 'path_unace' => [ 'option', \$::cfg_path_unace, qr/.*/ ], 'path_unalz' => [ 'option', \$::cfg_path_unalz, qr/.*/ ], 'path_unarj' => [ 'option', \$::cfg_path_unarj, qr/.*/ ], 'path_unrar' => [ 'option', \$::cfg_path_unrar, qr/.*/ ], 'path_unzip' => [ 'option', \$::cfg_path_unzip, qr/.*/ ], 'path_usercfg' => [ 'option', \$::cfg_path_usercfg, qr/.*/ ], 'path_xargs' => [ 'option', \$::cfg_path_xargs, qr/.*/ ], 'path_xz' => [ 'option', \$::cfg_path_xz, qr/.*/ ], 'path_zip' => [ 'option', \$::cfg_path_zip, qr/.*/ ], 'show_extracted' => [ 'option', \$::cfg_show_extracted, qr/^(0|1)$/ ], 'strip_unknown_ext' => [ 'option', \$::cfg_strip_unknown_ext, qr/^(0|1)$/ ], 'tmpdir_name' => [ 'option', \$::cfg_tmpdir_name, qr/.*/ ], 'tmpfile_name' => [ 'option', \$::cfg_tmpfile_name, qr/.*/ ], 'use_arc_for_unpack' => [ 'option', \$::cfg_use_arc_for_unpack, qr/^(0|1)$/ ], 'use_arj_for_unpack' => [ 'option', \$::cfg_use_arj_for_unpack, qr/^(0|1)$/ ], 'use_file' => [ 'option', \$::cfg_use_file, qr/^(0|1)$/ ], 'use_file_always' => [ 'option', \$::cfg_use_file_always, qr/^(0|1)$/ ], 'use_find_cpio_print0' => [ 'option', \$::cfg_use_find_cpio_print0, qr/^(0|1)$/ ], 'use_gzip_for_z' => [ 'option', \$::cfg_use_gzip_for_z, qr/^(0|1)$/ ], 'use_lbzip2' => [ 'option', \$::cfg_use_lbzip2, qr/^(0|1)$/ ], 'use_jar' => [ 'option', \$::cfg_use_jar, qr/^(0|1)$/ ], 'use_pbzip2' => [ 'option', \$::cfg_use_pbzip2, qr/^(0|1)$/ ], 'use_pigz' => [ 'option', \$::cfg_use_pigz, qr/^(0|1)$/ ], 'use_plzip' => [ 'option', \$::cfg_use_plzip, qr/^(0|1)$/ ], 'use_rar_for_unpack' => [ 'option', \$::cfg_use_rar_for_unpack, qr/^(0|1)$/ ], 'use_rar_for_unrar' => [ 'obsolete', 'use_rar_for_unpack' ], 'use_tar_bzip2_option' => [ 'option', \$::cfg_use_tar_bzip2_option, qr/^(0|1)$/ ], 'use_tar_lzma_option' => [ 'option', \$::cfg_use_tar_lzma_option, qr/^(0|1)$/ ], 'use_tar_lzop_option' => [ 'option', \$::cfg_use_tar_lzop_option, qr/^(0|1)$/ ], 'use_tar_xz_option' => [ 'option', \$::cfg_use_tar_xz_option, qr/^(0|1)$/ ], 'use_tar_j_option' => [ 'obsolete', 'use_tar_bzip2_option' ], 'use_tar_z_option' => [ 'option', \$::cfg_use_tar_z_option, qr/^(0|1)$/ ], ); die $::basename,': ',$context,'unrecognized directive `',$var,"'\n" if !exists $optionmap{$var}; return 0 if !exists $optionmap{$var}; my ($type) = @{$optionmap{$var}}; if ($type eq 'obsolete') { warn $context.$var.' is obsolete - use '.$optionmap{$var}->[1].')'."\n"; $var = $optionmap{$var}->[1]; } my ($varref,$check) = @{$optionmap{$var}}[1,2]; die $::basename,': ',$context,'invalid value for `',$var,"'\n" if $val !~ $check; ${$varref} = $val; return 1; } # readconfig(file) # Read and parse the specified configuration file. # If the file does not exist, just return. # If there is an error in the configuration file, # the program will be terminated. This could be a # problem when there are errors in the system-wide # configuration file. sub readconfig($$) { my ($file, $failok) = @_; return if ($failok && !-e $file); sysopen(FILE, $file, O_RDONLY) || die "$::basename: ".quote($file).": cannot open for reading - $!\n"; #OK while () { chomp; next if /^\s*(#(.*))?$/; my ($var,$val) = /^(.*?)\s+([^\s].*)$/; # joe markup bug -> ]] set_config_option($var, $val, quote($file).':'.$..': '); } close(FILE); } # Remove a directory recursively. This function used to change # the mode on the directories is traverses, but I now consider # that to be unsafe (what if there's a bug in atool and it # removes a file it shouldn't?). sub unlink_directory($) { my ($dir) = @_; die "$::basename: internal error 1 - please report this bug\n" if ($dir eq '/' || $dir eq $ENV{HOME}); # chmod 0700, $dir || die "$::basename: cannot chmod `".quote($dir)."': $!\n"; chdir $dir || die "$::basename: ".quote($dir).": cannot change to - $!\n"; opendir(DIR, $::cur) || die "$::basename: ".quote($dir).": cannot list - $!\n"; my @files = readdir(DIR); closedir(DIR); foreach my $file (@files) { next if $file eq $::cur || $file eq $::up; if (-d $file && !-l $file) { unlink_directory($file); } else { unlink $file || die "$::basename: ".quote($file).": cannot remove - $!\n"; } } chdir $::up || die "$::basename: $::up: cannot change to - $!\n"; rmdir $dir || die "$::basename: ".quote($dir).": cannot remove - $!\n"; } # find_comparable_file(dir) # Assuming that the contents of some archive has been extracted to dir, # this function will determine the main file or directory in this # archive - the file or directory which will be compared when this # archive is compared to some other. sub find_comparable_file($) { my ($dir) = @_; my $result = $dir; if (opendir(my $dh, $dir)) { my @files; for (0..3) { my $file = readdir($dh); last if !defined $file; next if $file eq '.' || $file eq '..'; push @files, $file; } closedir($dh); $result = File::Spec->catfile($dir, $files[0]) if @files == 1; } return $result; } # makeabsolute(file) # Return the absolute version of file. sub makeabsolute($) { my ($file) = @_; return $file if (substr($file, 0, 1) eq '/'); return File::Spec->catfile(getcwd(), $file); } # quote(string) # Quote a style like the GNU fileutils would do (`locale' # quoting style). sub quote($) { my ($in) = @_; my $out = ''; for (my $c = 0; $c < length($in); $c++) { my $ch = substr($in, $c, 1); if ($ch eq "\b") { $out .= "\\b"; } elsif ($ch eq "\f") { $out .= "\\f"; } elsif ($ch eq "\n") { $out .= "\\n"; } elsif ($ch eq "\r") { $out .= "\\r"; } elsif ($ch eq "\t") { $out .= "\\t"; } elsif (ord($ch) == 11) { # Vertical Tab, \v $out .= "\\v"; } elsif ($ch eq "\\") { $out .= "\\\\"; } elsif ($ch eq "'") { $out .= "\\'"; } elsif ($ch !~ /[[:print:]]/) { $out .= sprintf('\\%03o', ord($ch)); } else { $out .= $ch; } } return $out; } # shell_execute(@) # Execute a command with pipes and output redirection like the # shell does. Only difference is we do it without the shell. # This reason for this is because we don't have to quote # meta-characters - some meta-characters like LF and DEL are # unquotable! sub shell_execute(@) { my @cmdspec = @_; my $start = 0; my $c; for ($c = 0; $c < @cmdspec; $c++) { if (ref $cmdspec[$c] && ${$cmdspec[$c]}[0] eq ';') { return 0 if !shell_execute_single_statement(@cmdspec[$start..$c-1]); $start = $c+1; } } if ($start != $c) { return 0 if !shell_execute_single_statement(@cmdspec[$start..$c-1]); } return 1; } sub shell_execute_single_statement(@) { my (@cmdspec) = @_; while (@cmdspec > 0) { my @cmds = (); my $start = 0; my $redir_out = undef; #my $more_cmds = 0; my $c; for ($c = 0; $c < @cmdspec; $c++) { if (ref $cmdspec[$c]) { push @cmds, [ @cmdspec[$start..$c-1] ]; if (${$cmdspec[$c]}[0] eq '>') { $redir_out = $cmdspec[$c+1]; $start = $c+2; $c++; #} elsif (${$cmdspec[$c]}[0] eq ';') { #$more_cmds = 1; # $start = $c+1; # $c++; # last; } elsif (${$cmdspec[$c]}[0] eq '|') { $start = $c+1; } } } push @cmds, [ @cmdspec[$start..$c-1] ] if $start < $c; #for (my $x = 0; $x < @cmds; $x++) { # print $x, ': ', join(':',@{$cmds[$x]}), "\n"; #} splice @cmdspec,0,$c; $SIG{INT} = 'IGNORE'; my @ip = (); my @op = (); my @children = (); for (my $c = 0; $c <= $#cmds; $c++) { if ($c != $#cmds) { @op = reverse POSIX::pipe(); if (!@op || !defined $op[0] || !defined $op[1]) { $::errmsg = "pipe failed - $!"; return 0; } } if ($c == $#cmds && defined $redir_out) { @_ = (); # XXX: necessary to overcome POSIX autoload bug! @op = (POSIX::open($redir_out, &POSIX::O_WRONLY | &POSIX::O_CREAT)); if (!@op || !defined $op[0]) { $::errmsg = quote($redir_out).": cannot open for writing - $!"; return 0; } } my $pid = fork(); die "fork failed - $!\n" if !defined $pid; if ($pid == 0) { $SIG{INT} = ''; if (@ip) { die "dup2 failed - $!\n" if POSIX::dup2($ip[1], 0) < 0; POSIX::close($_) foreach (@ip); } if (@op) { die "dup2 failed - $!\n" if POSIX::dup2($op[0], 1) < 0; POSIX::close($_) foreach (@op); } exec(@{$cmds[$c]}) || die ${$cmds[$c]}[0].": cannot execute - $!\n"; } POSIX::close($op[0]) if ($c == $#cmds && defined $redir_out); POSIX::close($_) foreach (@ip); @ip = @op; @op = (); push @children, $pid; } foreach (@children) { if (waitpid($_,0) < 0 && $^O ne 'MSWin32') { $::errmsg = "waitpid failed - $!"; return 0; } } $SIG{INT} = ''; } return 1; } # Write dir to file indicated by $::opt_save_outdir. # sub save_outdir($) { my ($dir) = @_; if (defined $::opt_save_outdir && !-l $dir && -d $dir) { if (!sysopen(TMP, $::opt_save_outdir, O_WRONLY)) { warn die "$::basename: ".quote($::opt_save_outdir).": cannot open for writing - $!\n"; } else { print TMP $dir, "\n"; close(TMP); } } } # Somewhat stupid subroutine to add xargs to the command line. # sub handle_empty_add(@) { my @cmd = @_; unshift @cmd, '--'; unshift @cmd, '-0' if ($::opt_null); unshift @cmd, $::cfg_path_xargs; return @cmd; } # Return a suitable pager command # sub get_pager_program { return $ENV{PAGER} if (exists $ENV{PAGER}); return $::cfg_path_pager; } # repack_archive(srcfile,dstfile,srcfmt,dstfmt) # Repack an archive from a file to another (that shouldn't exist). sub repack_archive($$$$) { my ($file1,$file2,$fmt1,$fmt2) = @_; # Special cases for tar-based archives (single file archives). if ($fmt1 =~ /^tar\+/ && $fmt2 =~ /^tar$/) { $fmt1 =~ s/^tar\+//; $::opt_cmd_extract_to = $file2; # XXX: would like to get rid of these $::opt_cmd_extract_to_type = 'f'; # XXX: would like to get rid of these exit 1 if (!runcmds('extract-to', $fmt1, $file1)); return; } elsif ($fmt1 =~ /^tar$/ && $fmt2 =~ /^tar\+/) { $fmt2 =~ s/^tar\+//; exit 1 if (!runcmds('add', $fmt2, $file2, $file1)); return; } if ($fmt1 =~ /^tar\+/ && $fmt2 =~ /^tar\+/) { $fmt1 =~ s/^tar\+//; $fmt2 =~ s/^tar\+//; } my $newarchive; if (File::Spec->file_name_is_absolute($file2)) { $newarchive = $file2; } else { $newarchive = File::Spec->catdir($::up, $file2); } my $outdir; $outdir = makeoutdir() || exit 1; $::opt_cmd_extract_to = $outdir; $::opt_cmd_extract_to_type = 'd'; exit 1 if !runcmds('extract-to', $fmt1, $file1); warn 'cd ',quote($outdir),"\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate) { chdir($outdir) || die "$::basename: ".quote($outdir).": cannot change to - $!\n"; } if (issingleformat($fmt2)) { # Preferrably we would like to find out what file it was # extracted to from the above execute-to command. #my $oldfile = stripext_exactly(basename($file1), $fmt1); my $oldfile = find_comparable_file($::cur); # FIXME: won't work in simulate mode exit 1 if !runcmds('add', $fmt2, $newarchive, $oldfile); } else { exit 1 if !runcmds('add', $fmt2, $newarchive, $::cur); } warn 'cd ',quote($::up),"\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate) { chdir($::up) || die "$::basename: ".$::up.": cannot change to - $!\n"; #OK????? } warn 'rm -r ',quote($outdir),"\n" if $::opt_explain || $::opt_simulate; if (!$::opt_simulate) { unlink_directory($outdir); } } sub END { map (rmdir, @::rmdirs) if !$::opt_simulate; # Errors are ignored } atool-0.39.0/ChangeLog0000644000175000017500000002746010071072635011426 00000000000000Sat Sep 28 14:34:47 CEST 2002 * Release 0.23.0. * This file is no longer being updated. Please see the NEWS file instead. Wed Sep 11 16:11:55 CEST 2002 * atool: "s/cwd/getcwd/g" Remove use Cwd; Sun Sep 8 11:34:34 CEST 2002 * atool: (runcmds) Check for cpio format. (stripext) Strip cpio extension. (formatext) Format cpio extension. (findformat) Identify cpio archives. (shellexecute) Overcome POSIX bug by setting @_ to (). (readconfig) Read path_cat and path_find. Sat Jul 13 19:43:23 CEST 2002 * Release 0.19.0. * atool: New option --save-outdir. (multiarchivecmd) Honor $::opt_save_outdir. * atool.1: Documented --save-outdir, and added example about this. Sun Jul 7 14:40:43 CEST 2002 * atool: (runcmds) Add -r to rar. Thu Jul 4 08:54:20 CEST 2002 * TODO: Cleaned up. Added information about a rules format. Thu Jul 4 08:45:02 CEST 2002 * atool.1: Added some formats to list of supported ones. * README: New section supported formats (referencing man page). Wed Jul 3 15:11:47 CEST 2002 * Makefile: (PREFIX) New variable. Now defaults to /usr/local instead of /usr. (BINDIR, MANDIR) Use PREFIX. * debian/rules: Set PREFIX=/usr. * atool.spec: Fixed to handle new PREFIX. Tue Jul 2 21:34:45 CEST 2002 * Release 0.18.0. * README: Added info about rpm and cpio requirement. * atool: ($::cfg_path_rpm) New variable. ($::cfg_path_rpm2cpio) New variable. ($::cfg_path_cpio) New variable. (runcmds) Handle rpm archives. (stripext) Ditto. (formatext) Ditto. (findformat) Ditto. (readconfig) Load variables mentioned above. Sat Jun 29 11:30:29 CEST 2002 * atool: Changed author mail in help and version messages. (quote) New subroutine. Used almost everywhere. (cmdexec) Rewrote to use shell_execute instead. (shell_execute) New subroutine. (findformat) Use the safer three argument version of open. Use $::errmsg instead of $! after call to backticks. (backticks) Cleaned up a little. Put error message in $::errmsg. (readconfig) Use the safer three argument version of open. (unlink_directory) Don't chmod on directories. Wed May 15 13:47:34 CEST 2002 * atool.1: (EXAMPLES) Added adiff example. Wed Apr 24 09:46:37 CEST 2002 * atool: ($::cfg_show_extracted) New variable. (multiarchivecmd) Print if show_extracted. (readconfig) Handle show_extracted. * atool.1: (CONFIGURATION) Documented show_extracted. Sun Apr 14 23:56:53 CEST 2002 * Release 0.17.0. * atool: ($::cfg_path_unarj) New variable. (runcmds) Handle arj archives. Return return-value of singlearchivecmd. (singlearchivecmd) Return $outdir. (multiarchivecmd) Take a new argument, $needcwd. Change directories correctly if needcwd. (stripext, formatext, findformat) Handle arj format. (readconfig) Handle path_unarj. * atool.1: Document path_unace and path_unarj. * README: (Requirements) Added information about lha and unarj. Mon Mar 4 12:29:16 CET 2002 * atool: s/root files/files in root/. Sun Feb 10 23:06:50 CET 2002 * Makefile: (install) Use ln -s -f instead of ln -s. Sat Feb 9 12:24:36 CET 2002 * Release 0.16.0. * atool: ($::cfg_path_unace) New variable. (runcmds) Handle ace format. (stripext) Handle lha, lzh and ace extensions. (formatext) Ditto. (findformat) Ditto. Also fix rar extension. (readconfig) Read path_unace. * README: Add info for unace and URLs for other programs. Thu Feb 7 11:51:04 CET 2002 * Makefile: (debian) Add -b. (rpm) Build with -bb instead of -ba. Tue Jan 29 12:06:58 CET 2002 * atool.1: (args_diff) Improved documentation. * Makefile: (clean) Remove more. Wed Jan 9 12:37:49 CET 2002 * atool: ($::cfg_args_diff) New variable. (main) Use cfg_args_diff arguments. (readconfig) Parse variable. * atool.1: (args_diff) Added documentation. (path_syslog) Updated wording. Sat Dec 22 12:15:49 CET 2001 * Release 0.15.0. * atool.spec: New file. * Makefile: (dist) Added atool.spec and TOOL to distribution. (rpm) New target. (debian) Added -sd option. (install) Change owner of created directories. * debian/docs: Added TODO. Fri Nov 30 11:14:14 CET 2001 * atool: (multiarchivecmd) Set mode on directories prior to moving, if necessary. Restore mode once moved. Sat Nov 17 15:39:43 CET 2001 * Release 0.14.0. * atool: (runcmds) Cleaned up code (creating outdir). (find_comparable_file) New function. (main) Better handling of adiff command. (unlink_directory) Die if chdir '..' fails. (cmdexec) Improved error messages for abnormal exit ($::cfg_path_compress) Updated. ($::cfg_path_lha) New variable. (runcmds) Handle lha archives. (findformat) Find lha archives. (readconfig) Read path_lha. * atool.1: Document path_lha. Wed Oct 31 15:38:56 CET 2001 * atool: Better check for adiff removal confirmation. Fri Oct 26 10:32:59 CEST 2001 * Release 0.13.0. * atool: (unlink_recursively) New function (main) Ask when deleting files for adiff, use unlink_recursively. (main, readconfig) Remove path_rm variable. (cmdexec) Take an additional argument, ignore_return. * atool.1: Remove path_rm variable. Fri Oct 26 00:34:23 CEST 2001 * atool: (path_diff, path_rm) New configuration variables. (getmode) New command "diff". (main) Added code for new command "diff". (main) Added new option -d, --diff. (runcmds) Returns output directory. (multiarchivecmd) Returns output directory. * atool.1: Added documentation about new configuration variables. Added documentation about new options. Thu Oct 25 15:08:33 CEST 2001 * atool.1: Fixed documentation for --help and --version options. Tue Sep 18 17:41:14 CEST 2001 * Release 0.12.0. * README, atool.1, debian/changelog, debian/copyright, debian/control: New email adress of author. Mon Aug 27 16:57:40 CEST 2001 * TODO: New file. * README: Moved To Do stuff into TODO document. Sun Aug 19 00:47:36 CEST 2001 * atool: (cmdexec) Set SIG{__WARN__} prior to execution, and unset after execution. Mon Aug 13 22:56:41 CEST 2001 * Release 0.11.0. * atool: Added missing prototype for findformat and stripext. Handle --each option in add mode. (formatext) New function. * atool.1: Updated documentation for --each option. Added example with apack and --each. Tue Aug 7 12:51:27 CEST 2001 * atool: (multiarchivecmd) Changed wording `refuse' to `refusing'. Mon Jul 23 17:09:32 CEST 2001 * Release 0.10.0. * README, atool.1: Moved `Known Bugs' section from README file to the man-page. Added a note about extracting compressed files without valid extensions. Sun Jul 22 13:46:19 CEST 2001 * atool: (findformat) Fixed bug causing gzip, bzip, bzip2 and compress'd files not to be identified correctly. Thu Jul 19 18:12:35 CEST 2001 * atool: Added new option, -e, --each. Many changes to accomodate for new --each option. * atool.1: Fixed some omissions in the man-page. Added documentation about --each. Added example section. Mon Jul 16 11:48:51 CEST 2001 * Version 0.9.0. * atool: Added new options, -v, --verbose and --verbosity to control verbosity of atool. Improved verbosity control (fixes #99028). Fixed some bugs regarding verbosity level. Changed behaviour of apack on compressed files. Now uses file's -z option to identify more formats. When identifying using file, now print result of identification. Fixed typo in --help about -V for --explain. Added option --config. Read configuration first after options have been parsed. * README: Now refers to the man-page for usage information. * atool.1: Updated for new options. Included some text previously in README document. Sun Jul 15 11:15:04 CEST 2001 * atool: Added somewhat better error messages when a subprocess fails. Remove the temporary directory on exit if possible. Now refuses to overwrite existing files when creating (non-zip and non-rar) archives (unless --force specified). Thu Jul 12 11:54:52 CEST 2001 * atool: Will only identify format of regular files. Thu Jul 5 15:06:26 CEST 2001 * Version 0.8.0. * atool: Now exit after --version. Sun Jul 1 11:21:53 CEST 2001 * atool: (findformat) Lowercase filenames before checking format. Add option terminator `--' to `file' command line. (getmode) Consider --extract-to to be a separate command. (makeoutdir) Fixed random number generation. Sat Jun 30 00:05:42 CEST 2001 * atool: Adding missing backslash in help text. Wed Jun 20 17:00:47 CEST 2001 * atool: New subroutine "backticks", used instead of `` when identifying file type using "file". * atool: New subroutine "readconfig" to read a configuration file. Called to read /etc/atool.conf and ~/.atoolrc. * atool: Added option use_gzip_for_z. * README: Updated to document configuration options. Wed Apr 25 10:11:16 CEST 2001 Oskar Liljeblad * atool: Added support for identify some file formats using file(1). Tue Apr 24 21:14:49 CEST 2001 Oskar Liljeblad * Makefile: Include NEWS file in distribution. Mon Apr 16 13:35:14 CEST 2001 Oskar Liljeblad * Version 0.7.0. * atool.1: Added .war extension for Jar archives. Sat Apr 7 16:00:17 CEST 2001 Oskar Liljeblad * atool: Fixed commands for tar archive. The 'f' option to tar was missing, causing output to be written to stdout and input read from stdin. Thu Apr 5 14:00:03 CEST 2001 Oskar Liljeblad * atool: Added -F as short option alias for --format. * atool (parsefmt): Fixed recognition of manual formats. Wed Apr 4 17:08:14 CEST 2001 Oskar Liljeblad * atool (parsefmt): Recognize .war as a JAR archive. * atool (stripext): Strip .tar.Z, .tZ, .Z, and .war. 2001-04-04 Oskar Liljeblad * Version 0.6.0. * atool: Complete rewrite. See NEWS file for changes. * NEWS: New file. * debian/docs: Added NEWS. 2001-03-28 Oskar Liljeblad * atool loops when you try to extract to a directory that doesn't exist. This is fixed now. * atool: Fixed commands for .tar archives ("f" was missing in options for all commands). 2001-03-28 Oskar Liljeblad * Version 0.5.0 released because of version mistake (by me) on Freshmeat - 0.3.0 was released as 0.4.0. 2001-03-27 Oskar Liljeblad * Version 0.4.0. * debian/*: New files, for making Debian packages of atool. * atool: Included more license text from COPYING. Fixed help text for -X command. Added prototypes for subroutines without them. * README: Included more license text from COPYING. Minor format changes. * atool.1: New man page. * Makefile: Updated for Debian package generation. New rule "debian". Now installs man page. 2001-03-26 Oskar Liljeblad * Added forward function declarations so that the warnings "main::foo() called too early to check prototype" no longer appear when using Perl 5.6. 2001-03-24 Oskar Liljeblad * Version 0.3.0 released. * Use exec instead of system where possible. 2001-03-22 Oskar Liljeblad * Fixes in last release introduced new bugs when extracting files from multi-file archives. "Use of uninitialized value .." would we printed, along with another bogus error. Hopefully these bugs are fixed now. * Added support for jar archives. * Added use_jar_program variable. * --quiet (-q) option is now listed in --help. * README: Better documentation for configuration variables in atool. * Code cleanup: Simplified generation of command lines for tar/zip. * (Internal) New distdiff rule in Makefile for comparing tars of atool. * (Internal) README: Added more things to do. 2001-03-21 Oskar Liljeblad * Version 0.2.0 relesed. * When extracting single compressed files (foo.gz), a temporary extraction subdirectory would be created even though it was not needed. This is now fixed. * Display a message when `list' command is tried on single compressed files (foo.gz etc). 2001-03-17 Oskar Liljeblad * Version 0.1.0: First public release. atool-0.39.0/configure0000755000175000017500000030751011720757356011574 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67 for atool 0.39.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and oskar@osk.mine.nu $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='atool' PACKAGE_TARNAME='atool' PACKAGE_VERSION='0.39.0' PACKAGE_STRING='atool 0.39.0' PACKAGE_BUGREPORT='oskar@osk.mine.nu' PACKAGE_URL='' ac_unique_file="atool" ac_subst_vars='LTLIBOBJS LIBOBJS PERL_SITELIB PERL_SHEBANG PERL LOCALSTATEDIR SYSCONFDIR SBINDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures atool 0.39.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/atool] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of atool 0.39.0:";; esac cat <<\_ACEOF Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF atool configure 0.39.0 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by atool $as_me 0.39.0, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='atool' VERSION='0.39.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ac_define_dir=`eval echo $sbindir` ac_define_dir=`eval echo $ac_define_dir` SBINDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define SBINDIR "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ac_define_dir=`eval echo $sysconfdir` ac_define_dir=`eval echo $ac_define_dir` SYSCONFDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define SYSCONFDIR "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ac_define_dir=`eval echo $localstatedir` ac_define_dir=`eval echo $ac_define_dir` LOCALSTATEDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define LOCALSTATEDIR "$ac_define_dir" _ACEOF # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi eval `$PERL -V:startperl` if test "${startperl:0:1}" = "#" ; then startperl="\\$startperl" fi PERL_SHEBANG=$startperl eval `$PERL -V:sitelib` PERL_SITELIB=$sitelib ac_config_files="$ac_config_files atool.1 atool.spec Makefile" ac_config_commands="$ac_config_commands acat-link" ac_config_commands="$ac_config_commands adiff-link" ac_config_commands="$ac_config_commands als-link" ac_config_commands="$ac_config_commands apack-link" ac_config_commands="$ac_config_commands aunpack-link" ac_config_commands="$ac_config_commands arepack-link" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by atool $as_me 0.39.0, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ atool config.status 0.39.0 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "atool.1") CONFIG_FILES="$CONFIG_FILES atool.1" ;; "atool.spec") CONFIG_FILES="$CONFIG_FILES atool.spec" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "acat-link") CONFIG_COMMANDS="$CONFIG_COMMANDS acat-link" ;; "adiff-link") CONFIG_COMMANDS="$CONFIG_COMMANDS adiff-link" ;; "als-link") CONFIG_COMMANDS="$CONFIG_COMMANDS als-link" ;; "apack-link") CONFIG_COMMANDS="$CONFIG_COMMANDS apack-link" ;; "aunpack-link") CONFIG_COMMANDS="$CONFIG_COMMANDS aunpack-link" ;; "arepack-link") CONFIG_COMMANDS="$CONFIG_COMMANDS arepack-link" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "acat-link":C) ln -f -s atool acat ;; "adiff-link":C) ln -f -s atool adiff ;; "als-link":C) ln -f -s atool als ;; "apack-link":C) ln -f -s atool apack ;; "aunpack-link":C) ln -f -s atool aunpack ;; "arepack-link":C) ln -f -s atool arepack ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi atool-0.39.0/TODO0000644000175000017500000003344411714312655010347 00000000000000FIXME: update web page and links etc --- when repacking archives, don't specify '.'. Instead specify each extracted file or directory. (Jens Schleusener) --- FIXME: implement -O fully! also, use if for compression only! or? --- $ arepack today.log.bz2 today.log.sz [today.log.bz2 exists, today.log.sz doesn't] arepack: today.log.sz: no such file and cannot identify format from extension Use of uninitialized value $fmt2 in string eq at /home/usel/sys/bin/arepack line 354. today.log.bz2: extracted to `Unpack-4162/today.log' Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1348. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1349. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1350. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1351. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1352. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1353. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1354. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1355. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1356. Use of uninitialized value $fmt in string eq at /home/usel/sys/bin/arepack line 1357. arepack: ../today.log.sz: no such file and cannot identify format from extension --- From Francois Marier: omit_garbage option, do not unpack Thumbs.db __MACOSX/ ._filename .Trashes .DS_Store See also: http://unmac.rubyforge.org/ http://github.com/fxn/unmac/blob/HEAD/lib/unmacer.rb add compression level control arguments: store (0) or 1-9 allow user to add customer parameters to each archiver?? make use of modern tar options, like '--use-compress-program=prog' cfg_use_tar_compress_option? if making RPM, then upload SRPM as well! improve messages printed from arepack. sometimes prints unnecessary messages like "data.tar.gz: extracted to `Unpack-2962/data'" cat mode is not supported for lzop, because it won't write to standard out unless we give it the -f option. Because of this we use lzop as if -c was not supported. This should be fixed in the future. --no-umask option from Reuben to fix permissions of extracted files. perhaps change owner etc. aunpack -e is default - or perhaps with option to make it default? aremove tool how it should work: unpack archive to a separate directory for each unpacked file, check if it exists and is the same in the current directory. if yes, remove that file in the current directory, and (optionally) from unpacked directory as well. if no, remove that file from the unpacked directory From Francois Marier : check if pbzip2 is in the path and use it rewrite atool implement extract_archive that is sensitive or not add option to assume format with -F in some situations (like tar.gz)? add option to always assume -e? and add some option for the reverse (-s, --single) assume -e when passing a single directory as argument? change back error messages to: cannot foo `bar': No such file or directory make function to format error message? have autoconf generate files in debian subdir as well? in readconfig, add datatype checking to options (bool/str/int/..) add 'atest': test archive integrity make sure atool has non-zero rc when acat can't find a file (.arc files and possibly other) improve error message when some program doesn't exist (now gets unnecessary lines) arepack -F.tar.bz2 foo.tar.gz would only gunzip then bzip2. tar not involved! tests: does gzip support --? does tar support -z? does tar support -I? does tar support --? does zip treat *?[]\ chars in filenames specially? use "--" with gzip and others? Reasons to rewrite in C: - use manual ZIP code so that we can extract archive with '../foo' files too! tar fails entirely when the archive contains '../xxx' members. - the option --save-outdir in extract-to mode could be implemented easier. - multiple commands per action more easily (same with perl tho) - always identify format using magic values, ignoring extension (fast!) - i18n much easier (and faster) Bugs implement list command for single compressed archives? only gzip supports -l consider: apack dummy.tar.gz /etc/hostname mkdir etc aunpack dummy.tar.gz Archive is now extracted with file as dummy/etc/hostname Should it be dummy/hostname or etc-1/hostname instead? Other formats add support for SEA arc. add support for szip (hard because its interface is different from gzip) make an ACE archive (using winace stuff), test ACE extraction! add support for DEB files list: dpkg-deb -c FILE.deb extract: dpkg-deb -x FILE.deb $outdir/CONTENTS dpkg-deb -e FILE.deb $outdir/DEBIAN JAR/ZIP: Implement 'use_jar_for_zip' - use jar for zip archives (fastjar) - test Rename 'use_zip_for_jar' - use zip for jar archives - test Enable add command for jar archives! Other features make a script to detect system settings and configure atool appropriately Make it possible to send additional arguments to RAR etc. engine configurable via command line? especially adiff diff -ruN (note the N) option -------------------------------------------------------------------------------- libarchive: OpenArchive(fd)->archive CloseArchive(archive) GetType(archive) BeginJob(archive)->job PerformJob(job) EndJob(job) GetError(job) ErrorManger(job,callback) ProgressManager(job,callback) CreateArchive(file)->archive FileDescriptor close() read(data,amount) write(data,amount) seek(pos,whence) FileIterator(job,fileselector,filecallback) DeleteFile(job,fh) ExtractFile(job,fh,outfd) ReplaceFile(job,fh,infile) AddFile(job,filename,extfile) --- verbosity levels: 0 default, quiet 1 verbose, print filenames 2 very verbose, print long list format extract: what to when local file exists, only when archive contains one file (and not in interactive mode) * (m)ove to subdirectory * (r)ename * move files to subdir, rename directory * for interactive mode only: (o)verwrite how to extract single compressed file * delete original file afterwards * keep original file * don't extract at all (refuse) add: * apack: create new archive (refuse if existing exists) * apack -a: add to existing archives (create if necessary) --- MAJOR options: aunpack -X -x [DIR] extract to dir apack -A -a add files to archive (or create) apack -C -c create only als -L -l list files in archive acat -P -c/-p print file (to standard out) in archive adiff -D -d print difference between two archives afind -F -f find files in archive (emulate find) [?] arepack -R -r extract and pack archives als ARCHIVE1.. -l -l (long) like ls -f -f (classify) like ls -m[TYPE] from all archives, list only files matching (remaining args are matches) prev: als -e *.tar now: als *.tar prev: als foo.tar f* now: als foo.tar -m f* aunpack ARCHIVE1.. -X DIR where to extract to (otherwise be smart) -m[TYPE] from all archives, extract only files matching (remaining args are matches) apack ARCHIVE FILE1.. -a add files if archive already exists (without -a, refuse to overwrite existing) -e all arguments are files (or dirs) to compress individually -F FORMAT force file format -f allow overwriting of archives (clobber). NOTE: for safety, this implies -------------------------------------------------------------------------------- New rules format: # This document shows how a future rules file format for atool could look. It # was written to outline what was necessary for such a format. It is quite # possible this format will never become a reality due to its complexity. # use ; to separate commands! # rules and configuration files are the same noinclude # don't include default rules/configuration file! # (otherwise /etc/atool.rules will be included first) # useful if you want to make your own rules completely set path_zip "foobar" # example of variable set in a configuration file # (can only be done after option declared in format) # the extract command defined here also handles extract-in (only outdir changes) # the create command refuses to create an existing archive # the add command will turn into a create command if the archive doesn't exist # the print command outputs a file in the archive to standard out # variable namespace: # read-only variables - $outdir, $archive, $args # format-local variables - declared with 'variable' # options - declared with option # FIXME: what about about special exit codes (zip)? CHECK atool format { name { zip jar } # a name for users to use in -F option (force format) extension { .zip .jar } # possible file extensions (ignored?) magic { PK\003\004 } # magic bytes (kinda regex?) option string path_zip "zip" option string path_unzip "unzip" command extract { $path_unzip "-d" $outdir $archive $args } command add,create { $path_zip "-r" $archive $args } command print { $path_unzip "-p" $archive $args } command list { $path_unzip "-l" $archive $args } command common { [ $verbosity > 1 ] "-v" # this format means: add "-v" only if $verbosity > 1 [ $verbosity < 0 ] "-qq" # (the first string after [] applies, or block if { } ) [ $verbosity == 0 ] "-q" } multiarchive true # specifies that this archive may contain multiple files needs_cwd false # specifies that this archive doesn't need to cwd to outdir on extract # (technically we could autodetect this by seeing of $outdir is referenced # in the extract command) } format { name { lha lzh } extension { .lha .lzh } magic { "..-lh[01234567 d]-" "..-lz[45s]-" } # what about >20 byte x ; 2 string -lh6- option string path_lha "lha" command common { $path_lha } command extract { "x" $archive $args $outdirslash } # outdirslash = outdir that ends in slash command add,create { "a" $archive $args } command print { "p" $archive $args } command list { "a" [ $verbosity >= 3 ] "v" [ $verbosity = 2 ] "l" [ $verbosity <= 1 ] "lq" } multiarchive true needs_cwd false } format { name { tar[+.]gz(ip)? } extension { .tgz .tar.gz } option string path_tar "tar" # this one assume tar supports -z variable string opts command common { $path_tar [ $verbosity >= 1 ] [ $opts = "v" ] } # a conditional command print { xO ++ $opts ++ zf } # ++ means concatenate command extract { x ++ $opts ++ zf -C $outdir } # -C works on Sun too command list { t ++ $opts ++ zf } command create { c ++ $opts ++ zf } # tar can append (-r), but not tar+gz command common { $archive $args } multiarchive true needs_cwd false } format { disabled # do not use this format at all name { tar[+.]gz(ip)? } extension { .tgz .tar.gz } option string path_tar "tar" # this one does NOT assume tar supports -z option string path_gzip "gzip" variable string opts command common { [ $verbosity >= 1 ] [ $opts = "v" ] } command print { $path_gzip -cd $archive | $path_tar xO ++ $opts $args } command extract { $path_gzip -cd $archive | $path_tar x ++ $opts $args } command list { $path_gzip -cd $archive | $path_tar t ++ $opts $args } command create { $path_tar c ++ $opts $args | $path_gzip > $archive } multiarchive true needs_cwd false create_only true # FIXME: maybe not necessary? (see create/add above) } -------- TODO.v2: better extraction semantics, cleaner code * always use change to directory for extraction, never specify dir on cmd command-line? use ../for instead of absolute dir merges extract-to and extract * core support for multiple commands per mode (think debian) * better control of user arguments to external command (@args) * better solution than multiarchivecmd - cleaned up * more general commands: test * more general options compression level * stripext only based on format! (e.g. unpack gz then strip .gz, not .tar.gz) want aunpack -e to be default! remove dir: failure to remove a single file is fatal. chmod error isn't. chmod errors should be ignored altogheter? always chdir on extract? unified handling of single & non-single (wrt extract etc) acat displays *all* files or just first? apack creating a single archive with many files = ERROR extract-logic with -S: tar xvfz ... content-move DIR or atool --handle-extracted DIR does unlink_dir handle . and .. (i.e. cur and up)? write safety check for those use File::Spec abs2rel --- COMMANDS apack - create a new archive aunpack - extract files from an archive als - list archive like ls afind - list archive like find acat - extract files from an archive to standard out aless - extract files from an archive and pipe into a pager amore - extract files from an archive and pipe into a pager adiff - compare archives using diff agrep - search files for a regular expression using grep aegrep - search files for a regular expression using egrep afgrep - search files for a regular expression using fgrep arepack - extract archives of one type and create archives of another acmp - compare archives using cmp aadd - add files to an existing archive (may require unpacking) atest - test archive integrity (may unpack) amcfs - midnight commander virtual file system (extfs) OPTIONS -F,--format major format --format-in format of files being read --format-out format of files being created -f,--files hereafter comes files (not archives) -o,--options hereafter comes options for archiver programs -X,--extract-to -E,--explain -S,--simulate -q,--quiet display no regular output -v,--verbose display a little more output -z,--compression-level compression level for gzip, bzip2, "1" to "9" ERRORS display at max two errors: one detailed ($!), one general ("command failed") LOCALIZATION FORMATS add SEA arc add szip atool-0.39.0/Makefile.am0000644000175000017500000000303011607761370011702 00000000000000.PHONY: debian rpm ACLOCAL_AMFLAGS = -I m4 #SUBDIRS = doc etc script_files = atool script_stamp_files = $(script_files:%=.%-stamp) script_old_files = $(script_files:%=.%-old) man_MANS = $(PACKAGE).1 EXTRA_DIST = $(script_files) extra debian/changelog debian/control debian/copyright debian/rules $(man_MANS) DISTCLEANFILES = $(script_stamp_files) MAINTAINERCLEANFILES = $(script_old_files) dist_bin_SCRIPTS = $(script_files) $(script_stamp_files): .%-stamp: % $(srcdir)/configure.ac touch `basename "$<"` sed "1s|[^ ]*|$(PERL_SHEBANG)|;/^\\$$::SYSCONFDIR = /s|'.*'|'$(SYSCONFDIR)'|;/^\\$$::PACKAGE = /s/'.*'/'$(PACKAGE)'/;/^\\$$::VERSION = /s/'.*'/'$(PACKAGE_VERSION)'/;/^\\$$::BUG_EMAIL = /s/'.*'/'$(PACKAGE_BUGREPORT)'/" < $< > `basename $<.tmp` \ && mv `basename "$<"` .`basename "$<-old"` \ && mv `basename "$<.tmp"` `basename "$<"` chmod a+x `basename "$<"` touch $@ all-local: $(script_stamp_files) debian: cd $(srcdir) && dpkg-buildpackage -rfakeroot -us -uc -sd -b rpm: $(PACKAGE).spec rpmbuild -ba --clean $< install-exec-local: mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(mandir)/man1 for f in aunpack arepack apack acat als adiff; do \ ln -s -f atool $(DESTDIR)$(bindir)/$$f; \ ln -s -f atool.1 $(DESTDIR)$(mandir)/man1/$$f.1; \ done uninstall-local: for f in aunpack arepack apack acat als adiff; do \ if [ -L $(DESTDIR)$(bindir)/$$f ]; then \ rm $(DESTDIR)$(bindir)/$$f; \ fi; \ if [ -L $(DESTDIR)$(mandir)/man1/$$f.1 ]; then \ rm $(DESTDIR)$(mandir)/man1/$$f.1; \ fi; \ done atool-0.39.0/atool.10000644000175000017500000006202611730315335011051 00000000000000.\" -*- nroff -*- .\" atool.1 - Manual page for atool. .\" .\" Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, .\" 2009, 2011 Oskar Liljeblad .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU Library General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with this program; if not, write to the Free Software Foundation, .\" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" .TH ATOOL "1" "August 8, 2009" "atool" .\" Read this file with groff -man -Tascii atool.1 .SH NAME atool \- A script for managing file archives of various types .SH SYNOPSIS .B atool .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B aunpack .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B apack .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B als .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B acat .RI [ OPTION ]... " ARCHIVE " [ FILE ]... .br .B adiff .RI [ OPTION ]... " ARCHIVE " "" ARCHIVE .br .B arepack .RI [ OPTION ]... " OLD-ARCHIVE " "" NEW-ARCHIVE .SH DESCRIPTION This manual page document describes the \fBatool\fP commands. These commands are used for managing file archives of various types, such as tar and Zip archives. Each command can be executed individually or by giving the appropriate options to \fBatool\fP (see \fBOPTIONS\fP below). .PP \fBaunpack\fP extracts files from an archive. Often one wants to extract all files in an archive to a single subdirectory. However, some archives contain multiple files in their root directories. The aunpack program overcomes this problem by first extracting files to a unique (temporary) directory, and then moving its contents back if possible. This also prevents local files from being overwritten by mistake. .PP \fBapack\fP creates archives (or compresses files). If no file arguments are specified, filenames to add are read from standard in. .PP \fBals\fP lists files in an archive. .PP \fBacat\fP extracts files in an archive to standard out. .PP \fBadiff\fP generates a diff between two archives using diff(1). .PP \fBarepack\fP repacks archives to a different format. It does this by first extracting all files of the old archive into a temporary directory, then packing all files extracted to that directory to the new archive. Use the \-\-each (\-e) option in combination with \-\-format (\-F) to repack multiple archives using a single invocation of atool. Note that arepack will not remove the old archive. .PP Unless the \fB\-\-format\fP (\fB\-F\fP) option is provided, the archive format is determined by the archive file extension. I.e. an extension ".tar.gz" or ".tgz" means tar+gzip format. Note that the extensions are checked in the order listed in the section \fBARCHIVE TYPES\fP below, which is why a file with extension ".tar.gz" is considered to a be tar+gzip archive, not a gzip compressed file. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .B \-l, \-\-list List files in archive. This option is automatically assumed when \fBals\fP is executed. .TP .B \-x, \-\-extract Extract files from archive. This option is automatically assumed when \fBaunpack\fP is executed. .TP .B \-X, \-\-extract-to\fR=\fIPATH\fR Extract files from archive to the specified directory. When unpacking compressed files, PATH may refer to either a filename or an existing directory. .TP .B \-a, \-\-add Create archive. This option is automatically assumed when \fBapack\fP is executed. .TP .B \-c, \-\-cat Extract a file from archive to standard out (displaying it on screen). This option is automatically assumed when \fBacat\fP is executed. .TP .B \-d, \-\-diff Extract two archives and use diff(1) to generate differencies between them. This option is automatically assumed when \fBadiff\fP is executed. .TP .B \-e, \-\-each For each argument, execute the specified command. This can be used to quickly extract, list or create multiple archives (see \fBEXAMPLES\fR below). This option can not be used with the cat command. .TP .B \-F, \-\-format\fR=\fIEXTENSION\fR Specify archive format manually (see \fBARCHIVE TYPES\fR below). .TP .B \-S, \-\-simulate Run atool in simulation mode. No changes to the filesystem (i.e. writes) will be made, and all commands that would be executed are displayed instead. This option can't be combined with \fB\-\-explain\fP (since it implies that already). Note that it is not guaranteed that the commands printed in simulation mode will be the same as those executed in non- simulation mode. This is because some operations depend on what files archives contain, and atool can at this time only determine that by extracting archives. .TP .B \-E, \-\-explain Display commands executed by atool. This option can't be combined with \fB\-\-simulate\fP. .TP .B \-p, \-\-page Run output through a pager, usually \fBpager\fP unless the environment variable \fBPAGER\fP is set. .TP .B \-f, \-\-force When extracting from files, allow overwriting of local files. When creating an archive, allow the archive file to be overwritten if it already exists. Note that it is possible to add files to existing RAR and Zip archives (this is not possible for many other formats). .TP .B \-D, \-\-subdir When extracting archives, always create a new directory for the archive even if the archive only contains one file in its root directory. .TP .B \-0, \-\-null If no file arguments are specified when creating or adding files to archives, the list of files will be read from standard in. Normally these filenames are separated by newline, but with this option they are separated by null-bytes. This is useful with the GNU find \-print0 option. .TP .B \-q, \-\-quiet Decrease verbosity level by one. This is subtracted from the default verbosity level, or the level specified with \fB\-\-verbosity\fP. This option may be specified more than once to make atool even less verbose. .TP .B \-v, \-\-verbose Increase verbosity level by one. This is added to the default verbosity level, or the level specified with \fB\-\-verbosity\fP. This option may be specified more than once to make atool even more verbose. .TP .B \-V, \-\-verbosity\fR=\fILEVEL\fR Specify verbosity level. The default level is 1, which means "normal verbosity" - e.g. when creating and extracting from archives, files will be listed. .TP .B \-\-config\fR=\fIFILE\fR Load configuration from the specified file. When using this option, the system-wide and user-wide configuration files will not be loaded. If the specified file does not exist or can not be read, atool will terminate with an error message. .TP .B \-o, \-\-option\fR=\fIKEY=VALUE\fR Override a configuration option. These are applied after reading the configuration files. You can specify this multiple times to override different options. .TP .B \-O, \-\-format\-option\fR=\fIOPTION\fR Send additional options to the archiver command. This can be useful when specifying compression options for some archives, e.g. .br \fBapack \-F7z \-O-mx=9 archive.7z dir\fP .br You can specify this multiple times add different options. .TP .B \-\-save\-outdir\fR=\fIFILE\fR When extracting files, save the name of the directory which the archive was extracted to to the specified file. If the command was not `extract', or the archive was not extracted to a new directory, then nothing will be written to the specified file. If multiple archives were specified (with \-e), then only the last directory that files were extracted to will be written to FILE. This option is used internally (see \fBEXAMPLES\fR below). .TP .B \-\-help Show summary of options. .TP .B \-\-version Output version information and exit. .SH ARCHIVE TYPES Unless the \-f (\-\-format) option is provided, the archive format is determined by the archive file extension. I.e. an extension ".tar.gz" or ".tgz" means tar+gzip format. Note that the extensions are checked in the other listed above, which is why a file with extension ".tar.gz" is considered to a tar+gzip archive, not a gzip archive. .PP The diff command is supported whenever the extract command is supported. .PP The supported archive types are: .TP .RI \fBtar+gzip\fP " " ( .tar.gz ", " .tgz ) All commands are supported. .TP .RI \fBtar+bzip\fP " " ( .tar.bz ", " .tbz ) All commands are supported. .TP .RI \fBtar+bzip2\fP " " ( .tar.bz2 ", " .tbz2 ) All commands are supported. .TP .RI \fBtar+compress\fP " " ( .tar.Z ", " .tZ ) All commands are supported. .TP .RI \fBtar+lzop\fP " " ( .tar.lzo ", " .tzo ) All commands are supported. .TP .RI \fBtar+lzip\fP " " ( .tar.lz ", " .tlz ) All commands are supported. .TP .RI \fBtar+xz\fP " " ( .tar.xz ", " .txz ) All commands are supported. .TP .RI \fBtar+7z\fP " " ( .tar.7z ", " .t7z ) All commands are supported. .TP .RI \fBtar\fP " " ( .tar ) All commands are supported. .TP .RI \fBzip\fP " " ( .zip ) All commands are supported. .TP .RI \fBjar\fP " " ( .jar ", " .war ) List, extract, and add commands are supported. Cat is supported if use_jar_program is disabled. .TP .RI \fBrar\fP " " ( .rar ) All commands are supported. .TP .RI \fBlha\fP " " ( .lha ", " .lzh ) All commands are supported. .TP .RI \fB7z\fP " " ( .7z ) Extract, list and add commands are supported. .TP .RI \fBalzip\fP " " ( .alz ) Extract command is supported. .TP .RI \fBace\fP " " ( .ace ) Extract and list commands are supported. .TP .RI \fBar\fP " " ( .a ) All commands are supported. .TP .RI \fBarj\fP " " ( .arj ) List, extract and add commands are supported. .TP .RI \fBarc\fP " " ( .arc ) All command are supported. (Note that arc outputs an extra newline when the cat command is used.) .TP .RI \fBrpm\fP " " ( .rpm ) Extract and list commands are supported. .TP .RI \fBdeb\fP " " ( .deb ) Extract and list commands are supported. .TP .RI \fBcab\fP " " ( .cab ) Cat, extract, and list commands are supported. .TP .RI \fBgzip\fP " " ( .gz ) Cat, extract, and add commands are supported. .TP .RI \fBbzip\fP " " ( .bz ) Cat, extract, and add commands are supported. .TP .RI \fBbzip2\fP " " ( .bz2 ) Cat, extract, and add commands are supported. .TP .RI \fBcompress\fP " " ( .Z ) Cat, extract, and add commands are supported. .TP .RI \fBlzma\fP " " ( .lzma ) Cat, extract, and add commands are supported. .TP .RI \fBlzop\fP " " ( .lzo ) Extract and add commands are supported. The cat command is not supported because lzop does not want to extract files to standard out unless the \-f flag is given. .TP .RI \fBlzip\fP " " ( .lz ) Cat, extract, and add commands are supported. .TP .RI \fBxz\fP " " ( .xz ) Cat, extract, and add commands are supported. .TP .RI \fBrzip\fP " " ( .rz ) Extract and add commands are supported. .TP .RI \fBlrzip\fP " " ( .lrz ) Extract and add commands are supported. .TP .RI \fB7zip\fP " " ( .7z ) All commands are supported. (Note that 7z refuses to write extracted files to standard out if standard out is a terminal. Use \-p or pipe the output of atool/acat to a pager when reading in a terminal.) .TP .RI \fBcpio\fP " " ( .cpio ) List, extract and add commands are supported. .SH CONFIGURATION Since version 0.8.0, atool can read custom configuration files. First, hardcoded defaults in the atool program file are evaluated. Then system-wide configuration values are loaded from \fI/etc/atool.conf\fR if that file exists. Finally, per-user configuration values are loaded from \fI.atoolrc\fR in the current user's home directory. .PP The format of the configuration files is simple: .IP variable value .PP Here \fBvariable\fR is a variable listed below, and \fBvalue\fR is the value to associate the variable with. \fBvariable\fR and \fBvalue\fR should be separated with at least one whitespace (space, tab etc). Empty lines and lines beginning with # are discarded. .PP A value of `1' means that the option is enabled, and `0' that it is disabled. Strings should not be quoted, as they start at the first non-whitespace character and end at the end of the line. .PP The options are: .TP .B use_tar_bzip2_option \fR(default: 1)\fR Enable this if you use GNU tar and it supports the \fB\-\-bzip2\fP option for filtering bzip2'ed files through bzip2. Versions 1.13.6 or later of GNU tar support \fB\-\-bzip2\fP. Therefore, if you use GNU tar earlier than 1.13.6, you will need to disable this option. This used to be \fBuse_tar_j_option\fP but using \-\-bzip2 is more portable. .TP .B use_tar_lzip_option \fR(default: 0)\fR Enable this if you use GNU tar and it supports the \fB\-\-lzip\fP option for filtering lzip'ed files through lzip. Versions 1.23 or later of GNU tar support \fB\-\-lzip\fP. Therefore, if you use GNU tar earlier than 1.23, you will need to disable this option. .TP .B use_tar_z_option \fR(default: 1)\fR Enable this if you use GNU tar and it supports the \fB\-z\fP option for filtering gzipped files through gzip. You will need to disable this and \fIuse_tar_j_option\fR if you don't use GNU tar. Disabling these two options doesn't mean that atool can't extract bzip2/gzip files. If disabled, atool use a pipe to send output from bzip2/gzip to tar instead. If possible, these options should be enabled since error management is better when filtering is done by tar. .TP .B use_tar_lzma_option \fR(default: 1)\fR Enable this if you use GNU tar and it supports the \fB\-\-lzma\fP option for filtering lzma compressed files through lzma. Versions 1.20 or later of GNU tar support \fB\-\-lzma\fP. .TP .B use_tar_lzop_option \fR(default: 0)\fR Enable this if you use GNU tar and it supports the \fB\-\-lzop\fP option for filtering lzop compressed files through lzop. Versions 1.21 or later of GNU tar support \fB\-\-lzop\fP. .TP .B use_tar_xz_option \fR(default: 0)\fR Enable this if you use GNU tar and it supports the \fB\-\-xz\fP option for filtering xz compressed files through xz. Versions 1.22 or later of GNU tar support \fB\-\-xz\fP. .TP .B use_gzip_for_z \fR(default: 1)\fR Enable this if you want to use gzip instead of uncompress when decompressing compress'ed files (`.Z' files). .TP .B use_rar_for_unpack \fR(default: 0)\fR Enable this if you want to always use rar instead of unrar when possible. This makes atool use the rar command (path_rar) even when listing and extracting RAR files. .TP .B use_arc_for_unpack \fR(default: 0)\fR Enable this if you want to always use arc instead of nomarch when possible. This makes atool use the arc command (path_arc) even when listing and extracting ARC files. .TP .B use_arj_for_unpack \fR(default: 0)\fR Enable this if you want to always use arj instead of unarj when possible. This makes atool use the arj command (path_arj) even when listing and extracting ARJ files. .TP .B use_find_cpio_print0 \fR(default: 1)\fR Enable this if find supports the \-print0 option and cpio supports the \-0 option. Without it, it is impossible/harder to make cpio archives of files with newline characters in their names. .TP .B extract_deb_control \fR(default: 1)\fR Debian .deb package files contain control information in a DEBIAN directory, especially the package's "control" file. Enable this if you want the control information to be exctracted during extraction in addition to the normal files. .TP .B strip_unknown_ext \fR(default: 1)\fR Certain types of files are actually archives, but their extensions doesn't tell so. Examples are Open Office documents (Zip files) and Gnumeric documents (gzip'ed files). Since the extensions of those filenames are unknown to atool, they would not be stripped with this option set to 0. The output file in that case would be something like Unpack-XYZW. Setting this option to 1 will cause the extension to be stripped instead. .TP .B use_pbzip2 \fR(default: 0)\fR Enable this if you want to use pbzip2 rather than bzip2. Please not that if use_tar_bzip2_option is enabled, then bzip2 will be used by tar regardless of the use_pbzip2 option. So if you want tar to use pbzip2 rather than bzip2, set use_pbzip2 to 1 and use_tar_bzip2_option to 0. .TP .B use_lbzip2 \fR(default: 0)\fR Enable this if you want to use lbzip2 rather than bzip2. Please not that if use_tar_bzip2_option is enabled, then bzip2 will be used by tar regardless of the use_lbzip2 option. So if you want tar to use lbzip2 rather than bzip2, set use_lbzip2 to 1 and use_tar_bzip2_option to 0. .TP .B use_pigz \fR(default: 0)\fR Enable this if you want to use pigz rather than gzip. Please not that if use_tar_z_option is enabled, then gzip will be used by tar regardless of the use_pigz option. So if you want tar to use pigz rather than gzip, set use_pigz to 1 and use_tar_z_option to 0. .TP .B use_plzip \fR(default: 0)\fR Enable this if you want to use plzip rather than lzip. Please not that if use_tar_lzip_option is enabled, then lzip will be used by tar regardless of the use_plzip option. So if you want tar to use plzip rather than lzip, set use_plzip to 1 and use_tar_lzip_option to 0. .TP .B use_jar \fR(default: 0)\fR Enable this if you want to use jar for managing jar archives. If you disable this option, zip will be used (which should work just as well, and probably be faster too). This option is disabled by default since extracting files to standard out (`cat') is not supported by jar. .TP .B use_file \fR(default: 1)\fR Enable this if you want atool to identify file types using file(1) for those files with an unrecognized extension (or none at all). .TP .B use_file_always \fR(default: 0)\fR Enable this if you want atool to always identify archives using file(1), regardless of the file extension. Please note that this currently has some drawbacks, such as not being able to identify all archive types (especially tar archives compressed with 7zip, lzop, szip etc). .TP .B tmpdir_name \fR(default: Unpack-%04d)\fR atool extracts to a temporary directory created in the current directory so that no files are overwritten. This variable controlls what name that temporary directory should have. The `%d' string in this variable will be replaced with a random number between 0 and 9999. It is possible change the format of this number by using something else than `%d' - see printf(3). .TP .B tmpfile_name \fR(default: Pack-%04d)\fR When using pbzip2, and creating archives, a temporary file need to be created. This option controls the name of that file. See tmpdir_name for further details on the format. .TP .B path_pager \fR(default: pager)\fR .TP .B path_jar \fR(default: jar)\fR .TP .B path_tar \fR(default: tar)\fR .TP .B path_zip \fR(default: zip)\fR .TP .B path_unzip \fR(default: unzip)\fR .TP .B path_gzip \fR(default: gzip)\fR .TP .B path_bzip \fR(default: bzip)\fR .TP .B path_bzip2 \fR(default: bzip2)\fR .TP .B path_pbzip2 \fR(default: pbzip2)\fR .TP .B path_compress \fR(default: compress)\fR .TP .B path_lzma \fR(default: lzma)\fR .TP .B path_lzop \fR(default: lzop)\fR .TP .B path_lzip \fR(default: lzip)\fR .TP .B path_rar \fR(default: rar)\fR .TP .B path_unrar \fR(default: unrar)\fR .TP .B path_lbzip2 \fR(default: lbzip2)\fR .TP .B path_pigz \fR(default: pigz)\fR .TP .B path_cabextract \fR(default: cabextract)\fR .TP .B path_7z \fR(default: 7z)\fR .TP .B path_unalz \fR(default: unalz)\fR .TP .B path_lha \fR(default: lha)\fR .TP .B path_unace \fR(default: unace)\fR .TP .B path_ar \fR(default: ar)\fR .TP .B path_arj \fR(default: arj)\fR .TP .B path_unarj \fR(default: unarj)\fR .TP .B path_arc \fR(default: arc)\fR .TP .B path_nomarch \fR(default: nomarch)\fR .TP .B path_rpm \fR(default: rpm)\fR .TP .B path_rpm2cpio \fR(default: rpm2cpio)\fR .TP .B path_dpkg_deb \fR(default: dpkg-deb)\fR .TP .B path_cpio \fR(default: cpio)\fR .TP .B path_file \fR(default: file)\fR .TP .B path_find \fR(default: find)\fR .TP .B path_xargs \fR(default: xargs)\fR .TP .B path_cat \fR(default: cat)\fR .TP .B path_diff \fR(default: diff)\fR These are all paths to the corresponding programs. It is usually best to leave them as is, because that way their locations can be looked up from the PATH variable. .TP .B args_diff \fR(default: \-ru)\fR This variable specifies command line arguments to pass to the diff command (as specified by path_diff) when using adiff. Space characters separate arguments in this string. .TP .B path_syscfg \fR(default: /etc/atool.conf)\fR (This variable can only be set in the atool program file.) This variable specifies the directory where the system-wide configuration file is located. .TP .B path_usercfg \fR(default: .atoolrc)\fR (This variable can only be set in the atool program file and system-wide configuration file.) This variable specifies where the user configuration file is located. Note that if this filename is relative (i.e. doesn't being with `/'), it will be relative to the current user's home directory (as determined by the HOME environment variable). .TP .B default_verbosity \fR(default: 1)\fR This is the default verbosity of atool. By using \-q and \-v options, the verbosity level can be raised and lowered. Level 1 means "normal verbosity" - e.g. when creating and extracting from archives, files will be listed. .TP .B show_extracted \fR(default: 1)\fR If this is set to 1, the aunpack command will always show what file or directory that was extracted. Otherwise that will only be printed if the archive was extracted to an unexpected location (as a result of local files already existing or the archive having multiple files in its root directory). This can be quite useful in combinatiaon with `default_verbosity 0'. Note that this option will have no effect when the \-X option is used with aunpack, and it has no effect on compressed files. .TP .B keep_compressed \fR(default: 1)\fR When compressing a file with gzip or bzip2, the original (uncompressed) file is usually deleted once it has been compressed. I.e. if you compress a file "test" you will end up with only one file, "test.gz". With this option set to 1, you will make atool keep the original file as well. The original behaviour is achieved by setting this option to 0. This option also has an equivalent effect on uncompressing compressed files. When set to 1, the original (compressed) file will be kept. Otherwise it will be deleted. Note however that this option has no effect when packing up a compressed file with the \-X option (for specifying an output directory or file). In that case the original file is always kept. .TP .B decompress_to_cwd \fR(default: 1)\fR When decompressing a file with commands such as gzip or bzip2, the decompressed file is usually placed in the same directory as the compressed file. With this option set to 1, the decompressed file is instead placed in the current working directory. Note that this option has no effect when \-X is used. .SH ENVIRONMENT VARIABLES .B PAGER The default pager to use when the \-p/\-\-page option is specified. .SH EXAMPLES To extract all files from archive `foobar.tar.gz' to a subdirectory (or the current directory if it only contains one file): .br \fBaunpack foobar.tar.gz\fP .PP To extract all files from all `.tar.gz' archives in the current directory: .br \fBaunpack \-e *.tar.gz\fP .PP To create a zip archive of two files `foo' and `bar': .br \fBapack myarchive.zip foo bar\fP .PP To display the file `baz' in the archive `myarchive.zip' through a pager: .br \fBacat \-p myarchive.zip baz\fP .PP To list contents of the rar archive `stuff.rar': .br \fBals stuff.rar\fP .PP To create three archives, `dir1.tar.gz', `dir2.tar.gz' and `dir3.tar.gz', so that the first one contains all files in dir1, the second all in dir2 and the third all dir3: .br \fBapack \-e \-F .tar.gz dir1 dir2 dir3\fP .PP To show all differences between version 2.4.17 and 2.4.18 of the kernel: .br \fBadiff linux-2.4.17.tar.gz linux-2.4.18.tar.gz\fP .PP To repack all .tar.gz archives in the current directory to .tar.7z (the old archive will be kept untouched): .br \fBarepack \-F.tar.7z \-e *.tar.gz\fP .PP Here's a shell function that will make the aunpack command change into the directory where files were extracted: .br \fBaunpack () {\fP .br \fB TMP=`mktemp /tmp/aunpack.XXXXXXXXXX`\fP .br \fB atool \-x \-\-save-outdir=$TMP "$@"\fP .br \fB DIR="`cat $TMP`"\fP .br \fB [ "$DIR" != "" \-a \-d "$DIR" ] && cd "$DIR"\fP .br \fB rm $TMP\fP .br \fB}\fP .br If you don't have the mktemp program, you can replace the second line with (note however that this is not entirely safe) .br \fB TMP="/tmp/atool_outdir.$$"\fP .PP .SH KNOWN BUGS Trying to extract gzip and other compressed files without the .gz (or .bz2 etc) extension won't work: .PP aunpack: foo: format not known, identifying using file aunpack: foo: format is `gzip' gzip: foo: unknown suffix -- ignored .PP This last error above is generated by \fBgzip \-d foo\fP. .PP If you find a bug not listed here, please report it to . .SH REPORTING BUGS Report bugs to <\fIoskar@osk.mine.nu\fP>. .SH AUTHOR The author of \fBatool\fP and this manual page is Oskar Liljeblad <\fIoskar@osk.mine.nu\fP>. .SH COPYRIGHT Copyright \(co 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011, 2012 Oskar Liljeblad This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.