├── filelist
├── ftp.c
├── ftp.h
├── gsi.c
├── gsi.h
├── ml.c
├── ml.h
├── nc.c
├── nc.h
├── README.md
├── cksum.c
├── cksum.h
├── cmds.c
├── cmds.h
├── ftp_a.c
├── ftp_a.h
├── ftp_eb.c
├── ftp_eb.h
├── ftp_s.c
├── ftp_s.h
├── main.c
├── misc.c
├── misc.h
├── output.c
├── output.h
├── perf.c
├── perf.h
├── radix.c
├── radix.h
├── unix.c
├── unix.h
├── copyright
├── errcode.c
├── errcode.h
├── filetree.c
├── filetree.h
├── logical.c
├── logical.h
├── network.c
├── network.h
├── settings.c
├── settings.h
├── Makefile.am
├── Makefile.in
├── configure.ac
├── linterface.h
├── pkg_data_src.gpt
├── pkg_data_src.gpt.in
├── config.h.in
├── compile
├── Changelog.mssftp
├── missing
├── install-sh
├── Changelog
├── mssftp.1
├── depcomp
├── uberftp.1
└── aclocal.m4
/filelist:
--------------------------------------------------------------------------------
1 | bin/uberftp
2 | man/man1/uberftp.1
3 |
--------------------------------------------------------------------------------
/ftp.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp.c
--------------------------------------------------------------------------------
/ftp.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp.h
--------------------------------------------------------------------------------
/gsi.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/gsi.c
--------------------------------------------------------------------------------
/gsi.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/gsi.h
--------------------------------------------------------------------------------
/ml.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ml.c
--------------------------------------------------------------------------------
/ml.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ml.h
--------------------------------------------------------------------------------
/nc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/nc.c
--------------------------------------------------------------------------------
/nc.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/nc.h
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | UberFTP
2 | =======
3 |
4 | Interactive GridFTP client
--------------------------------------------------------------------------------
/cksum.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/cksum.c
--------------------------------------------------------------------------------
/cksum.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/cksum.h
--------------------------------------------------------------------------------
/cmds.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/cmds.c
--------------------------------------------------------------------------------
/cmds.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/cmds.h
--------------------------------------------------------------------------------
/ftp_a.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp_a.c
--------------------------------------------------------------------------------
/ftp_a.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp_a.h
--------------------------------------------------------------------------------
/ftp_eb.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp_eb.c
--------------------------------------------------------------------------------
/ftp_eb.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp_eb.h
--------------------------------------------------------------------------------
/ftp_s.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp_s.c
--------------------------------------------------------------------------------
/ftp_s.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/ftp_s.h
--------------------------------------------------------------------------------
/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/main.c
--------------------------------------------------------------------------------
/misc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/misc.c
--------------------------------------------------------------------------------
/misc.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/misc.h
--------------------------------------------------------------------------------
/output.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/output.c
--------------------------------------------------------------------------------
/output.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/output.h
--------------------------------------------------------------------------------
/perf.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/perf.c
--------------------------------------------------------------------------------
/perf.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/perf.h
--------------------------------------------------------------------------------
/radix.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/radix.c
--------------------------------------------------------------------------------
/radix.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/radix.h
--------------------------------------------------------------------------------
/unix.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/unix.c
--------------------------------------------------------------------------------
/unix.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/unix.h
--------------------------------------------------------------------------------
/copyright:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/copyright
--------------------------------------------------------------------------------
/errcode.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/errcode.c
--------------------------------------------------------------------------------
/errcode.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/errcode.h
--------------------------------------------------------------------------------
/filetree.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/filetree.c
--------------------------------------------------------------------------------
/filetree.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/filetree.h
--------------------------------------------------------------------------------
/logical.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/logical.c
--------------------------------------------------------------------------------
/logical.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/logical.h
--------------------------------------------------------------------------------
/network.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/network.c
--------------------------------------------------------------------------------
/network.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/network.h
--------------------------------------------------------------------------------
/settings.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/settings.c
--------------------------------------------------------------------------------
/settings.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/settings.h
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/Makefile.am
--------------------------------------------------------------------------------
/Makefile.in:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/Makefile.in
--------------------------------------------------------------------------------
/configure.ac:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/configure.ac
--------------------------------------------------------------------------------
/linterface.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonAlt/UberFTP/HEAD/linterface.h
--------------------------------------------------------------------------------
/pkg_data_src.gpt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | GLOBUS_FLAVOR_NAME=FLAVOR_GPTMACRO; export GLOBUS_FLAVOR_NAME
34 | CONFIGENV_GPTMACRO ./configure --prefix=INSTALLDIR_GPTMACRO --with-globus=INSTALLDIR_GPTMACRO --with-globus-flavor=FLAVOR_GPTMACRO
35 |
36 |
37 |
38 | MAKE_GPTMACRO uberftp
39 |
40 |
41 |
42 | MAKE_GPTMACRO gpt-install
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/pkg_data_src.gpt.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | GLOBUS_FLAVOR_NAME=FLAVOR_GPTMACRO; export GLOBUS_FLAVOR_NAME
34 | CONFIGENV_GPTMACRO ./configure --prefix=INSTALLDIR_GPTMACRO --with-globus=INSTALLDIR_GPTMACRO --with-globus-flavor=FLAVOR_GPTMACRO
35 |
36 |
37 |
38 | MAKE_GPTMACRO uberftp
39 |
40 |
41 |
42 | MAKE_GPTMACRO gpt-install
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/config.h.in:
--------------------------------------------------------------------------------
1 | /* config.h.in. Generated from configure.ac by autoheader. */
2 |
3 | /* Setting the default buffer size */
4 | #undef DEFAULT_BLKSIZE
5 |
6 | /* Setting the default TCP window settings */
7 | #undef DEFAULT_TCP_BUFFER_SIZE
8 |
9 | /* Define to 1 if you have the header file. */
10 | #undef HAVE_GLOBUS_COMMON_H
11 |
12 | /* Define to 1 if you have the header file. */
13 | #undef HAVE_GLOBUS_CONFIG_H
14 |
15 | /* Define to 1 if you have the header file. */
16 | #undef HAVE_INTTYPES_H
17 |
18 | /* Define to 1 if you have the `globus_common' library (-lglobus_common). */
19 | #undef HAVE_LIBGLOBUS_COMMON
20 |
21 | /* Define to 1 if you have the `globus_gssapi_gsi' library
22 | (-lglobus_gssapi_gsi). */
23 | #undef HAVE_LIBGLOBUS_GSSAPI_GSI
24 |
25 | /* Define to 1 if you have the header file. */
26 | #undef HAVE_MEMORY_H
27 |
28 | /* Define to 1 if you have the header file. */
29 | #undef HAVE_STDINT_H
30 |
31 | /* Define to 1 if you have the header file. */
32 | #undef HAVE_STDLIB_H
33 |
34 | /* Define to 1 if you have the header file. */
35 | #undef HAVE_STRINGS_H
36 |
37 | /* Define to 1 if you have the header file. */
38 | #undef HAVE_STRING_H
39 |
40 | /* Define to 1 if you have the `strtoll' function. */
41 | #undef HAVE_STRTOLL
42 |
43 | /* Define to 1 if you have the header file. */
44 | #undef HAVE_SYS_STAT_H
45 |
46 | /* Define to 1 if you have the header file. */
47 | #undef HAVE_SYS_TYPES_H
48 |
49 | /* Define to 1 if you have the header file. */
50 | #undef HAVE_UNISTD_H
51 |
52 | /* Whether to build in mssftp functionality */
53 | #undef MSSFTP
54 |
55 | /* mssftp will use a GSI service cert */
56 | #undef MSSFTP_GSI_SERVICE
57 |
58 | /* MSS to connect to */
59 | #undef MSSHOST
60 |
61 | /* Name of package */
62 | #undef PACKAGE
63 |
64 | /* Define to the address where bug reports for this package should be sent. */
65 | #undef PACKAGE_BUGREPORT
66 |
67 | /* Define to the full name of this package. */
68 | #undef PACKAGE_NAME
69 |
70 | /* Define to the full name and version of this package. */
71 | #undef PACKAGE_STRING
72 |
73 | /* Define to the one symbol short name of this package. */
74 | #undef PACKAGE_TARNAME
75 |
76 | /* Define to the home page for this package. */
77 | #undef PACKAGE_URL
78 |
79 | /* Define to the version of this package. */
80 | #undef PACKAGE_VERSION
81 |
82 | /* Define to 1 if you have the ANSI C header files. */
83 | #undef STDC_HEADERS
84 |
85 | /* Version number of package */
86 | #undef VERSION
87 |
--------------------------------------------------------------------------------
/compile:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # Wrapper for compilers which do not understand `-c -o'.
3 |
4 | scriptversion=2005-05-14.22
5 |
6 | # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
7 | # Written by Tom Tromey .
8 | #
9 | # This program is free software; you can redistribute it and/or modify
10 | # it under the terms of the GNU General Public License as published by
11 | # the Free Software Foundation; either version 2, or (at your option)
12 | # any later version.
13 | #
14 | # This program is distributed in the hope that it will be useful,
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | # GNU General Public License for more details.
18 | #
19 | # You should have received a copy of the GNU General Public License
20 | # along with this program; if not, write to the Free Software
21 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 |
23 | # As a special exception to the GNU General Public License, if you
24 | # distribute this file as part of a program that contains a
25 | # configuration script generated by Autoconf, you may include it under
26 | # the same distribution terms that you use for the rest of that program.
27 |
28 | # This file is maintained in Automake, please report
29 | # bugs to or send patches to
30 | # .
31 |
32 | case $1 in
33 | '')
34 | echo "$0: No command. Try \`$0 --help' for more information." 1>&2
35 | exit 1;
36 | ;;
37 | -h | --h*)
38 | cat <<\EOF
39 | Usage: compile [--help] [--version] PROGRAM [ARGS]
40 |
41 | Wrapper for compilers which do not understand `-c -o'.
42 | Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
43 | arguments, and rename the output as expected.
44 |
45 | If you are trying to build a whole package this is not the
46 | right script to run: please start by reading the file `INSTALL'.
47 |
48 | Report bugs to .
49 | EOF
50 | exit $?
51 | ;;
52 | -v | --v*)
53 | echo "compile $scriptversion"
54 | exit $?
55 | ;;
56 | esac
57 |
58 | ofile=
59 | cfile=
60 | eat=
61 |
62 | for arg
63 | do
64 | if test -n "$eat"; then
65 | eat=
66 | else
67 | case $1 in
68 | -o)
69 | # configure might choose to run compile as `compile cc -o foo foo.c'.
70 | # So we strip `-o arg' only if arg is an object.
71 | eat=1
72 | case $2 in
73 | *.o | *.obj)
74 | ofile=$2
75 | ;;
76 | *)
77 | set x "$@" -o "$2"
78 | shift
79 | ;;
80 | esac
81 | ;;
82 | *.c)
83 | cfile=$1
84 | set x "$@" "$1"
85 | shift
86 | ;;
87 | *)
88 | set x "$@" "$1"
89 | shift
90 | ;;
91 | esac
92 | fi
93 | shift
94 | done
95 |
96 | if test -z "$ofile" || test -z "$cfile"; then
97 | # If no `-o' option was seen then we might have been invoked from a
98 | # pattern rule where we don't need one. That is ok -- this is a
99 | # normal compilation that the losing compiler can handle. If no
100 | # `.c' file was seen then we are probably linking. That is also
101 | # ok.
102 | exec "$@"
103 | fi
104 |
105 | # Name of file we expect compiler to create.
106 | cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
107 |
108 | # Create the lock directory.
109 | # Note: use `[/.-]' here to ensure that we don't use the same name
110 | # that we are using for the .o file. Also, base the name on the expected
111 | # object file name, since that is what matters with a parallel build.
112 | lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
113 | while true; do
114 | if mkdir "$lockdir" >/dev/null 2>&1; then
115 | break
116 | fi
117 | sleep 1
118 | done
119 | # FIXME: race condition here if user kills between mkdir and trap.
120 | trap "rmdir '$lockdir'; exit 1" 1 2 15
121 |
122 | # Run the compile.
123 | "$@"
124 | ret=$?
125 |
126 | if test -f "$cofile"; then
127 | mv "$cofile" "$ofile"
128 | elif test -f "${cofile}bj"; then
129 | mv "${cofile}bj" "$ofile"
130 | fi
131 |
132 | rmdir "$lockdir"
133 | exit $ret
134 |
135 | # Local Variables:
136 | # mode: shell-script
137 | # sh-indentation: 2
138 | # eval: (add-hook 'write-file-hooks 'time-stamp)
139 | # time-stamp-start: "scriptversion="
140 | # time-stamp-format: "%:y-%02m-%02d.%02H"
141 | # time-stamp-end: "$"
142 | # End:
143 |
--------------------------------------------------------------------------------
/Changelog.mssftp:
--------------------------------------------------------------------------------
1 | Version 2.11 2/10/14
2 | - Fixed SPOR response during striped third party transfers. SPOR will
3 | pass all addresses returned from SPAS.
4 | - Fixed hang on server disconnect
5 | - On failure, do not attempt to remove destination file if it is a
6 | block or character device
7 | - Added performance reporting for third-party transfers
8 | - Fixed EOF for multi striped client/server transfers
9 |
10 | Version 2.10 11/16/12
11 | - Added a patch from Craig Tierney of NOAA to allow file size suffixes
12 | 'K', 'M', 'G' and 'T' so that values can be converted to kibibytes,
13 | mebibytes, gibibytes and tebibytes, respectively. The chance has been
14 | added to the command blksize, pbsz, tcpbuf, pput and pget.
15 | - Fixed byte transfer rate reporting after files are transferred but
16 | zero bytes are actually transferred, as in 'pput 0 0 file'.
17 | - Fixed hang in extended mode retrieves
18 | - Added fix for globbing when using Globus GridFTP server 6.0 from
19 | Globus Toolkit 5.1.2
20 | - Added support for 'SITE SETFAM'
21 | - Added support for 'SITE STAGE'
22 | - Added new interactive commands link, llink, symlink and lsymlink and
23 | added -link and -symlink to the command line. Not supported by all
24 | GridFTP servers. Symlink requires Globus 5.2.x.
25 | - Fixed how long the stage command will wait before retries
26 | - Changed MLSx processing of owner/group to use uid/gid when
27 | owner/group equals '(null)'.
28 | - Now tries to maintain modification timestamps if the server supports it.
29 | This is only supported on files.
30 | - Added 'cos' command (interactive and commandline) for setting the
31 | class of service (used with HPSS installations).
32 | - Fixed build against Globus 5.2.x
33 | - Removed SETFAM, WIND, SITE BUFSIZE
34 | - Fixed EADDRNOTAVAIL bug on SLES10 when using port ranges
35 | - Fixed typos in the manpage
36 | - Added support for SITE SETCOS
37 | - The commands 'cos' and 'family' now take the value 'default'
38 | which causes the server to decide which cos or family to use when
39 | files are stored.
40 | - Fixed reverse DNS looks for GSI name comparison.
41 | - Added new commands lscos/llscos to list available classes of service and
42 | lsfam/llsfam to list available tape families.
43 | - Added hardlink support for the latest HPSS DSI
44 | - Added the ability 'put /dev/null'.
45 | - Support ALLO with ESTO (partial store).
46 | - Fixed offsets for partial transfers (pget,pput) in extended block mode (mode e)
47 | - Fixed 100% CPU usage during slow and 3rd party transfers.
48 |
49 | Version 2.9 8/5/10
50 | - Fixed a segfault found on a UV10 running SLES11. The crash occurs
51 | when the client tries to print out the server MOTD and the MOTD
52 | has '%' embedded in it.
53 |
54 | Version 2.8 9/08/09
55 | - Removed warnings at connect when service does not support MLST
56 | - Fixed directory listings on systems that do not support MLST
57 | - Removed mlsx usage from the manpage
58 | - No longer issue MLST/MLSD commands for parent directories unless
59 | a regular expression is encountered. This is a slight performance
60 | boost and a workaround for services that disallow access to parent
61 | directories.
62 | - Fixed timestamps when listing in recursive or using regular
63 | expressions. Timestamps are now shown in your local timezone.
64 | - Fixed typos in 'put' help message and 'Unknown commad'
65 |
66 |
67 | Version 2.7 4/17/09
68 | - Fixed misspelling of argument
69 | - Added support for GLOBUS_TCP_PORT_RANGE, GLOBUS_TCP_SOURCE_RANGE,
70 | UBERFTP_TCP_PORT_RANGE and UBERFTP_TCP_SOURCE_RANGE. The GLOBUS_*
71 | versions are there for backwards compatibility. The UBERFTP_*
72 | versions do the same things as their GLOBUS_* counterparts. The
73 | UBERFTP_* versions will override the GLOBUS_* versions if both
74 | are available.
75 | - Fixed a segfault in the stage command
76 |
77 |
78 | Version 2.6 11/12/08
79 | - Fixed directory listings when using 'order' settings. The target
80 | directory no longer appears in the output. './' is no longer
81 | prefixed to 'ls' output. Target directories are now expanded in
82 | the listing output.
83 | - Destination file removed after transfer failure unless using
84 | pget or pput
85 | - Adjusted the list output to be a bit more readable
86 | - Fix for matching names when glob is disabled
87 | - rm and ls will continue after an error is encounted
88 | - mssftp will attempt to stage a file before retrieval even if wait
89 | is disabled. A more detailed message is returned to the user if the
90 | file is not on disk.
91 | - recursive or regular expression transfers which transfer multiple
92 | files will continue after errors are encountered until the current
93 | command has completed
94 |
95 |
96 | Version 2.5 10/24/08
97 | - Added polling when reading server responses to keep the client from
98 | heavily using the CPU during 'quote stage 60'
99 | - Added --with-tcp-window to the configure script to allow the default
100 | TCP window to be set specific to the host system.
101 | - Added -with-blksize to the configure script to allow the default
102 | internal buffer size to be set for optimal performance on the host
103 | system.
104 | - Client will now truncate the local destination file if it exists
105 | - Changed data channel protection level to 'clear' to greatly improve
106 | performance by default
107 | - Fix for NAME_MAX on AIX, now use pathconf()
108 | - Fix for lcd -
109 | - Fix for 'ALLO 0' on some 32 bit platforms
110 |
--------------------------------------------------------------------------------
/missing:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # Common wrapper for a few potentially missing GNU programs.
3 |
4 | scriptversion=2012-06-26.16; # UTC
5 |
6 | # Copyright (C) 1996-2013 Free Software Foundation, Inc.
7 | # Originally written by Fran,cois Pinard , 1996.
8 |
9 | # This program is free software; you can redistribute it and/or modify
10 | # it under the terms of the GNU General Public License as published by
11 | # the Free Software Foundation; either version 2, or (at your option)
12 | # any later version.
13 |
14 | # This program is distributed in the hope that it will be useful,
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | # GNU General Public License for more details.
18 |
19 | # You should have received a copy of the GNU General Public License
20 | # along with this program. If not, see .
21 |
22 | # As a special exception to the GNU General Public License, if you
23 | # distribute this file as part of a program that contains a
24 | # configuration script generated by Autoconf, you may include it under
25 | # the same distribution terms that you use for the rest of that program.
26 |
27 | if test $# -eq 0; then
28 | echo 1>&2 "Try '$0 --help' for more information"
29 | exit 1
30 | fi
31 |
32 | case $1 in
33 |
34 | --is-lightweight)
35 | # Used by our autoconf macros to check whether the available missing
36 | # script is modern enough.
37 | exit 0
38 | ;;
39 |
40 | --run)
41 | # Back-compat with the calling convention used by older automake.
42 | shift
43 | ;;
44 |
45 | -h|--h|--he|--hel|--help)
46 | echo "\
47 | $0 [OPTION]... PROGRAM [ARGUMENT]...
48 |
49 | Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
50 | to PROGRAM being missing or too old.
51 |
52 | Options:
53 | -h, --help display this help and exit
54 | -v, --version output version information and exit
55 |
56 | Supported PROGRAM values:
57 | aclocal autoconf autoheader autom4te automake makeinfo
58 | bison yacc flex lex help2man
59 |
60 | Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
61 | 'g' are ignored when checking the name.
62 |
63 | Send bug reports to ."
64 | exit $?
65 | ;;
66 |
67 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
68 | echo "missing $scriptversion (GNU Automake)"
69 | exit $?
70 | ;;
71 |
72 | -*)
73 | echo 1>&2 "$0: unknown '$1' option"
74 | echo 1>&2 "Try '$0 --help' for more information"
75 | exit 1
76 | ;;
77 |
78 | esac
79 |
80 | # Run the given program, remember its exit status.
81 | "$@"; st=$?
82 |
83 | # If it succeeded, we are done.
84 | test $st -eq 0 && exit 0
85 |
86 | # Also exit now if we it failed (or wasn't found), and '--version' was
87 | # passed; such an option is passed most likely to detect whether the
88 | # program is present and works.
89 | case $2 in --version|--help) exit $st;; esac
90 |
91 | # Exit code 63 means version mismatch. This often happens when the user
92 | # tries to use an ancient version of a tool on a file that requires a
93 | # minimum version.
94 | if test $st -eq 63; then
95 | msg="probably too old"
96 | elif test $st -eq 127; then
97 | # Program was missing.
98 | msg="missing on your system"
99 | else
100 | # Program was found and executed, but failed. Give up.
101 | exit $st
102 | fi
103 |
104 | perl_URL=http://www.perl.org/
105 | flex_URL=http://flex.sourceforge.net/
106 | gnu_software_URL=http://www.gnu.org/software
107 |
108 | program_details ()
109 | {
110 | case $1 in
111 | aclocal|automake)
112 | echo "The '$1' program is part of the GNU Automake package:"
113 | echo "<$gnu_software_URL/automake>"
114 | echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
115 | echo "<$gnu_software_URL/autoconf>"
116 | echo "<$gnu_software_URL/m4/>"
117 | echo "<$perl_URL>"
118 | ;;
119 | autoconf|autom4te|autoheader)
120 | echo "The '$1' program is part of the GNU Autoconf package:"
121 | echo "<$gnu_software_URL/autoconf/>"
122 | echo "It also requires GNU m4 and Perl in order to run:"
123 | echo "<$gnu_software_URL/m4/>"
124 | echo "<$perl_URL>"
125 | ;;
126 | esac
127 | }
128 |
129 | give_advice ()
130 | {
131 | # Normalize program name to check for.
132 | normalized_program=`echo "$1" | sed '
133 | s/^gnu-//; t
134 | s/^gnu//; t
135 | s/^g//; t'`
136 |
137 | printf '%s\n' "'$1' is $msg."
138 |
139 | configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
140 | case $normalized_program in
141 | autoconf*)
142 | echo "You should only need it if you modified 'configure.ac',"
143 | echo "or m4 files included by it."
144 | program_details 'autoconf'
145 | ;;
146 | autoheader*)
147 | echo "You should only need it if you modified 'acconfig.h' or"
148 | echo "$configure_deps."
149 | program_details 'autoheader'
150 | ;;
151 | automake*)
152 | echo "You should only need it if you modified 'Makefile.am' or"
153 | echo "$configure_deps."
154 | program_details 'automake'
155 | ;;
156 | aclocal*)
157 | echo "You should only need it if you modified 'acinclude.m4' or"
158 | echo "$configure_deps."
159 | program_details 'aclocal'
160 | ;;
161 | autom4te*)
162 | echo "You might have modified some maintainer files that require"
163 | echo "the 'automa4te' program to be rebuilt."
164 | program_details 'autom4te'
165 | ;;
166 | bison*|yacc*)
167 | echo "You should only need it if you modified a '.y' file."
168 | echo "You may want to install the GNU Bison package:"
169 | echo "<$gnu_software_URL/bison/>"
170 | ;;
171 | lex*|flex*)
172 | echo "You should only need it if you modified a '.l' file."
173 | echo "You may want to install the Fast Lexical Analyzer package:"
174 | echo "<$flex_URL>"
175 | ;;
176 | help2man*)
177 | echo "You should only need it if you modified a dependency" \
178 | "of a man page."
179 | echo "You may want to install the GNU Help2man package:"
180 | echo "<$gnu_software_URL/help2man/>"
181 | ;;
182 | makeinfo*)
183 | echo "You should only need it if you modified a '.texi' file, or"
184 | echo "any other file indirectly affecting the aspect of the manual."
185 | echo "You might want to install the Texinfo package:"
186 | echo "<$gnu_software_URL/texinfo/>"
187 | echo "The spurious makeinfo call might also be the consequence of"
188 | echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
189 | echo "want to install GNU make:"
190 | echo "<$gnu_software_URL/make/>"
191 | ;;
192 | *)
193 | echo "You might have modified some files without having the proper"
194 | echo "tools for further handling them. Check the 'README' file, it"
195 | echo "often tells you about the needed prerequisites for installing"
196 | echo "this package. You may also peek at any GNU archive site, in"
197 | echo "case some other package contains this missing '$1' program."
198 | ;;
199 | esac
200 | }
201 |
202 | give_advice "$1" | sed -e '1s/^/WARNING: /' \
203 | -e '2,$s/^/ /' >&2
204 |
205 | # Propagate the correct exit status (expected to be 127 for a program
206 | # not found, 63 for a program that failed due to version mismatch).
207 | exit $st
208 |
209 | # Local variables:
210 | # eval: (add-hook 'write-file-hooks 'time-stamp)
211 | # time-stamp-start: "scriptversion="
212 | # time-stamp-format: "%:y-%02m-%02d.%02H"
213 | # time-stamp-time-zone: "UTC"
214 | # time-stamp-end: "; # UTC"
215 | # End:
216 |
--------------------------------------------------------------------------------
/install-sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # install - install a program, script, or datafile
3 |
4 | scriptversion=2011-11-20.07; # UTC
5 |
6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was
7 | # later released in X11R6 (xc/config/util/install.sh) with the
8 | # following copyright and license.
9 | #
10 | # Copyright (C) 1994 X Consortium
11 | #
12 | # Permission is hereby granted, free of charge, to any person obtaining a copy
13 | # of this software and associated documentation files (the "Software"), to
14 | # deal in the Software without restriction, including without limitation the
15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 | # sell copies of the Software, and to permit persons to whom the Software is
17 | # furnished to do so, subject to the following conditions:
18 | #
19 | # The above copyright notice and this permission notice shall be included in
20 | # all copies or substantial portions of the Software.
21 | #
22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | #
29 | # Except as contained in this notice, the name of the X Consortium shall not
30 | # be used in advertising or otherwise to promote the sale, use or other deal-
31 | # ings in this Software without prior written authorization from the X Consor-
32 | # tium.
33 | #
34 | #
35 | # FSF changes to this file are in the public domain.
36 | #
37 | # Calling this script install-sh is preferred over install.sh, to prevent
38 | # 'make' implicit rules from creating a file called install from it
39 | # when there is no Makefile.
40 | #
41 | # This script is compatible with the BSD install script, but was written
42 | # from scratch.
43 |
44 | nl='
45 | '
46 | IFS=" "" $nl"
47 |
48 | # set DOITPROG to echo to test this script
49 |
50 | # Don't use :- since 4.3BSD and earlier shells don't like it.
51 | doit=${DOITPROG-}
52 | if test -z "$doit"; then
53 | doit_exec=exec
54 | else
55 | doit_exec=$doit
56 | fi
57 |
58 | # Put in absolute file names if you don't have them in your path;
59 | # or use environment vars.
60 |
61 | chgrpprog=${CHGRPPROG-chgrp}
62 | chmodprog=${CHMODPROG-chmod}
63 | chownprog=${CHOWNPROG-chown}
64 | cmpprog=${CMPPROG-cmp}
65 | cpprog=${CPPROG-cp}
66 | mkdirprog=${MKDIRPROG-mkdir}
67 | mvprog=${MVPROG-mv}
68 | rmprog=${RMPROG-rm}
69 | stripprog=${STRIPPROG-strip}
70 |
71 | posix_glob='?'
72 | initialize_posix_glob='
73 | test "$posix_glob" != "?" || {
74 | if (set -f) 2>/dev/null; then
75 | posix_glob=
76 | else
77 | posix_glob=:
78 | fi
79 | }
80 | '
81 |
82 | posix_mkdir=
83 |
84 | # Desired mode of installed file.
85 | mode=0755
86 |
87 | chgrpcmd=
88 | chmodcmd=$chmodprog
89 | chowncmd=
90 | mvcmd=$mvprog
91 | rmcmd="$rmprog -f"
92 | stripcmd=
93 |
94 | src=
95 | dst=
96 | dir_arg=
97 | dst_arg=
98 |
99 | copy_on_change=false
100 | no_target_directory=
101 |
102 | usage="\
103 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
104 | or: $0 [OPTION]... SRCFILES... DIRECTORY
105 | or: $0 [OPTION]... -t DIRECTORY SRCFILES...
106 | or: $0 [OPTION]... -d DIRECTORIES...
107 |
108 | In the 1st form, copy SRCFILE to DSTFILE.
109 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
110 | In the 4th, create DIRECTORIES.
111 |
112 | Options:
113 | --help display this help and exit.
114 | --version display version info and exit.
115 |
116 | -c (ignored)
117 | -C install only if different (preserve the last data modification time)
118 | -d create directories instead of installing files.
119 | -g GROUP $chgrpprog installed files to GROUP.
120 | -m MODE $chmodprog installed files to MODE.
121 | -o USER $chownprog installed files to USER.
122 | -s $stripprog installed files.
123 | -t DIRECTORY install into DIRECTORY.
124 | -T report an error if DSTFILE is a directory.
125 |
126 | Environment variables override the default commands:
127 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
128 | RMPROG STRIPPROG
129 | "
130 |
131 | while test $# -ne 0; do
132 | case $1 in
133 | -c) ;;
134 |
135 | -C) copy_on_change=true;;
136 |
137 | -d) dir_arg=true;;
138 |
139 | -g) chgrpcmd="$chgrpprog $2"
140 | shift;;
141 |
142 | --help) echo "$usage"; exit $?;;
143 |
144 | -m) mode=$2
145 | case $mode in
146 | *' '* | *' '* | *'
147 | '* | *'*'* | *'?'* | *'['*)
148 | echo "$0: invalid mode: $mode" >&2
149 | exit 1;;
150 | esac
151 | shift;;
152 |
153 | -o) chowncmd="$chownprog $2"
154 | shift;;
155 |
156 | -s) stripcmd=$stripprog;;
157 |
158 | -t) dst_arg=$2
159 | # Protect names problematic for 'test' and other utilities.
160 | case $dst_arg in
161 | -* | [=\(\)!]) dst_arg=./$dst_arg;;
162 | esac
163 | shift;;
164 |
165 | -T) no_target_directory=true;;
166 |
167 | --version) echo "$0 $scriptversion"; exit $?;;
168 |
169 | --) shift
170 | break;;
171 |
172 | -*) echo "$0: invalid option: $1" >&2
173 | exit 1;;
174 |
175 | *) break;;
176 | esac
177 | shift
178 | done
179 |
180 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
181 | # When -d is used, all remaining arguments are directories to create.
182 | # When -t is used, the destination is already specified.
183 | # Otherwise, the last argument is the destination. Remove it from $@.
184 | for arg
185 | do
186 | if test -n "$dst_arg"; then
187 | # $@ is not empty: it contains at least $arg.
188 | set fnord "$@" "$dst_arg"
189 | shift # fnord
190 | fi
191 | shift # arg
192 | dst_arg=$arg
193 | # Protect names problematic for 'test' and other utilities.
194 | case $dst_arg in
195 | -* | [=\(\)!]) dst_arg=./$dst_arg;;
196 | esac
197 | done
198 | fi
199 |
200 | if test $# -eq 0; then
201 | if test -z "$dir_arg"; then
202 | echo "$0: no input file specified." >&2
203 | exit 1
204 | fi
205 | # It's OK to call 'install-sh -d' without argument.
206 | # This can happen when creating conditional directories.
207 | exit 0
208 | fi
209 |
210 | if test -z "$dir_arg"; then
211 | do_exit='(exit $ret); exit $ret'
212 | trap "ret=129; $do_exit" 1
213 | trap "ret=130; $do_exit" 2
214 | trap "ret=141; $do_exit" 13
215 | trap "ret=143; $do_exit" 15
216 |
217 | # Set umask so as not to create temps with too-generous modes.
218 | # However, 'strip' requires both read and write access to temps.
219 | case $mode in
220 | # Optimize common cases.
221 | *644) cp_umask=133;;
222 | *755) cp_umask=22;;
223 |
224 | *[0-7])
225 | if test -z "$stripcmd"; then
226 | u_plus_rw=
227 | else
228 | u_plus_rw='% 200'
229 | fi
230 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
231 | *)
232 | if test -z "$stripcmd"; then
233 | u_plus_rw=
234 | else
235 | u_plus_rw=,u+rw
236 | fi
237 | cp_umask=$mode$u_plus_rw;;
238 | esac
239 | fi
240 |
241 | for src
242 | do
243 | # Protect names problematic for 'test' and other utilities.
244 | case $src in
245 | -* | [=\(\)!]) src=./$src;;
246 | esac
247 |
248 | if test -n "$dir_arg"; then
249 | dst=$src
250 | dstdir=$dst
251 | test -d "$dstdir"
252 | dstdir_status=$?
253 | else
254 |
255 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
256 | # might cause directories to be created, which would be especially bad
257 | # if $src (and thus $dsttmp) contains '*'.
258 | if test ! -f "$src" && test ! -d "$src"; then
259 | echo "$0: $src does not exist." >&2
260 | exit 1
261 | fi
262 |
263 | if test -z "$dst_arg"; then
264 | echo "$0: no destination specified." >&2
265 | exit 1
266 | fi
267 | dst=$dst_arg
268 |
269 | # If destination is a directory, append the input filename; won't work
270 | # if double slashes aren't ignored.
271 | if test -d "$dst"; then
272 | if test -n "$no_target_directory"; then
273 | echo "$0: $dst_arg: Is a directory" >&2
274 | exit 1
275 | fi
276 | dstdir=$dst
277 | dst=$dstdir/`basename "$src"`
278 | dstdir_status=0
279 | else
280 | # Prefer dirname, but fall back on a substitute if dirname fails.
281 | dstdir=`
282 | (dirname "$dst") 2>/dev/null ||
283 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
284 | X"$dst" : 'X\(//\)[^/]' \| \
285 | X"$dst" : 'X\(//\)$' \| \
286 | X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
287 | echo X"$dst" |
288 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
289 | s//\1/
290 | q
291 | }
292 | /^X\(\/\/\)[^/].*/{
293 | s//\1/
294 | q
295 | }
296 | /^X\(\/\/\)$/{
297 | s//\1/
298 | q
299 | }
300 | /^X\(\/\).*/{
301 | s//\1/
302 | q
303 | }
304 | s/.*/./; q'
305 | `
306 |
307 | test -d "$dstdir"
308 | dstdir_status=$?
309 | fi
310 | fi
311 |
312 | obsolete_mkdir_used=false
313 |
314 | if test $dstdir_status != 0; then
315 | case $posix_mkdir in
316 | '')
317 | # Create intermediate dirs using mode 755 as modified by the umask.
318 | # This is like FreeBSD 'install' as of 1997-10-28.
319 | umask=`umask`
320 | case $stripcmd.$umask in
321 | # Optimize common cases.
322 | *[2367][2367]) mkdir_umask=$umask;;
323 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
324 |
325 | *[0-7])
326 | mkdir_umask=`expr $umask + 22 \
327 | - $umask % 100 % 40 + $umask % 20 \
328 | - $umask % 10 % 4 + $umask % 2
329 | `;;
330 | *) mkdir_umask=$umask,go-w;;
331 | esac
332 |
333 | # With -d, create the new directory with the user-specified mode.
334 | # Otherwise, rely on $mkdir_umask.
335 | if test -n "$dir_arg"; then
336 | mkdir_mode=-m$mode
337 | else
338 | mkdir_mode=
339 | fi
340 |
341 | posix_mkdir=false
342 | case $umask in
343 | *[123567][0-7][0-7])
344 | # POSIX mkdir -p sets u+wx bits regardless of umask, which
345 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
346 | ;;
347 | *)
348 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
349 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
350 |
351 | if (umask $mkdir_umask &&
352 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
353 | then
354 | if test -z "$dir_arg" || {
355 | # Check for POSIX incompatibilities with -m.
356 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357 | # other-writable bit of parent directory when it shouldn't.
358 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359 | ls_ld_tmpdir=`ls -ld "$tmpdir"`
360 | case $ls_ld_tmpdir in
361 | d????-?r-*) different_mode=700;;
362 | d????-?--*) different_mode=755;;
363 | *) false;;
364 | esac &&
365 | $mkdirprog -m$different_mode -p -- "$tmpdir" && {
366 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
367 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
368 | }
369 | }
370 | then posix_mkdir=:
371 | fi
372 | rmdir "$tmpdir/d" "$tmpdir"
373 | else
374 | # Remove any dirs left behind by ancient mkdir implementations.
375 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
376 | fi
377 | trap '' 0;;
378 | esac;;
379 | esac
380 |
381 | if
382 | $posix_mkdir && (
383 | umask $mkdir_umask &&
384 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
385 | )
386 | then :
387 | else
388 |
389 | # The umask is ridiculous, or mkdir does not conform to POSIX,
390 | # or it failed possibly due to a race condition. Create the
391 | # directory the slow way, step by step, checking for races as we go.
392 |
393 | case $dstdir in
394 | /*) prefix='/';;
395 | [-=\(\)!]*) prefix='./';;
396 | *) prefix='';;
397 | esac
398 |
399 | eval "$initialize_posix_glob"
400 |
401 | oIFS=$IFS
402 | IFS=/
403 | $posix_glob set -f
404 | set fnord $dstdir
405 | shift
406 | $posix_glob set +f
407 | IFS=$oIFS
408 |
409 | prefixes=
410 |
411 | for d
412 | do
413 | test X"$d" = X && continue
414 |
415 | prefix=$prefix$d
416 | if test -d "$prefix"; then
417 | prefixes=
418 | else
419 | if $posix_mkdir; then
420 | (umask=$mkdir_umask &&
421 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
422 | # Don't fail if two instances are running concurrently.
423 | test -d "$prefix" || exit 1
424 | else
425 | case $prefix in
426 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
427 | *) qprefix=$prefix;;
428 | esac
429 | prefixes="$prefixes '$qprefix'"
430 | fi
431 | fi
432 | prefix=$prefix/
433 | done
434 |
435 | if test -n "$prefixes"; then
436 | # Don't fail if two instances are running concurrently.
437 | (umask $mkdir_umask &&
438 | eval "\$doit_exec \$mkdirprog $prefixes") ||
439 | test -d "$dstdir" || exit 1
440 | obsolete_mkdir_used=true
441 | fi
442 | fi
443 | fi
444 |
445 | if test -n "$dir_arg"; then
446 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
447 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
448 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
449 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
450 | else
451 |
452 | # Make a couple of temp file names in the proper directory.
453 | dsttmp=$dstdir/_inst.$$_
454 | rmtmp=$dstdir/_rm.$$_
455 |
456 | # Trap to clean up those temp files at exit.
457 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
458 |
459 | # Copy the file name to the temp name.
460 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
461 |
462 | # and set any options; do chmod last to preserve setuid bits.
463 | #
464 | # If any of these fail, we abort the whole thing. If we want to
465 | # ignore errors from any of these, just make sure not to ignore
466 | # errors from the above "$doit $cpprog $src $dsttmp" command.
467 | #
468 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
469 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
470 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
471 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
472 |
473 | # If -C, don't bother to copy if it wouldn't change the file.
474 | if $copy_on_change &&
475 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
476 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
477 |
478 | eval "$initialize_posix_glob" &&
479 | $posix_glob set -f &&
480 | set X $old && old=:$2:$4:$5:$6 &&
481 | set X $new && new=:$2:$4:$5:$6 &&
482 | $posix_glob set +f &&
483 |
484 | test "$old" = "$new" &&
485 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
486 | then
487 | rm -f "$dsttmp"
488 | else
489 | # Rename the file to the real destination.
490 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
491 |
492 | # The rename failed, perhaps because mv can't rename something else
493 | # to itself, or perhaps because mv is so ancient that it does not
494 | # support -f.
495 | {
496 | # Now remove or move aside any old file at destination location.
497 | # We try this two ways since rm can't unlink itself on some
498 | # systems and the destination file might be busy for other
499 | # reasons. In this case, the final cleanup might fail but the new
500 | # file should still install successfully.
501 | {
502 | test ! -f "$dst" ||
503 | $doit $rmcmd -f "$dst" 2>/dev/null ||
504 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
505 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
506 | } ||
507 | { echo "$0: cannot unlink or rename $dst" >&2
508 | (exit 1); exit 1
509 | }
510 | } &&
511 |
512 | # Now rename the file to the real destination.
513 | $doit $mvcmd "$dsttmp" "$dst"
514 | }
515 | fi || exit 1
516 |
517 | trap '' 0
518 | fi
519 | done
520 |
521 | # Local variables:
522 | # eval: (add-hook 'write-file-hooks 'time-stamp)
523 | # time-stamp-start: "scriptversion="
524 | # time-stamp-format: "%:y-%02m-%02d.%02H"
525 | # time-stamp-time-zone: "UTC"
526 | # time-stamp-end: "; # UTC"
527 | # End:
528 |
--------------------------------------------------------------------------------
/Changelog:
--------------------------------------------------------------------------------
1 | Version 2.8 2/10/14
2 | - Fixed SPOR response during striped third party transfers. SPOR will
3 | pass all addresses returned from SPAS.
4 | - Fixed hang on server disconnect
5 | - On failure, do not attempt to remove destination file if it is a
6 | block or character device
7 | - Added performance reporting for third-party transfers
8 | - Fixed EOF for multi striped client/server transfers
9 |
10 | Version 2.7 11/26/12
11 | - Added a patch from Craig Tierney of NOAA to allow file size suffixes
12 | 'K', 'M', 'G' and 'T' so that values can be converted to kibibytes,
13 | mebibytes, gibibytes and tebibytes, respectively. The chance has been
14 | added to the command blksize, pbsz, tcpbuf, pput and pget.
15 | - Fixed byte transfer rate reporting after files are transferred but
16 | zero bytes are actually transferred, as in 'pput 0 0 file'.
17 | - Fixed hang in extended mode retrieves
18 | - Added fix for globbing when using Globus GridFTP server 6.0 from
19 | Globus Toolkit 5.1.2
20 | - Added support for 'SITE SETFAM'
21 | - Added support for 'SITE STAGE'
22 | - Added new interactive commands link, llink, symlink and lsymlink and
23 | added -link and -symlink to the command line. Not supported by all
24 | GridFTP servers. Symlink requires Globus 5.2.x.
25 | - Fixed how long the stage command will wait before retries
26 | - Changed MLSx processing of owner/group to use uid/gid when
27 | owner/group equals '(null)'.
28 | - Now tries to maintain modification timestamps if the server supports it.
29 | This is only supported on files.
30 | - Added 'cos' command (interactive and commandline) for setting the
31 | class of service (used with HPSS installations).
32 | - Fixed build against Globus 5.2.x
33 | - Removed SETFAM, WIND, SITE BUFSIZE
34 | - Fixed EADDRNOTAVAIL bug on SLES10 when using port ranges
35 | - Fixed typos in the manpage
36 | - Added support for SITE SETCOS
37 | - The commands 'cos' and 'family' now take the value 'default' which
38 | causes the server to decide which cos or family to use when files
39 | are stored.
40 | - Fixed reverse DNS looks for GSI name comparison.
41 | - Added new commands lscos/llscos to list available classes of service and
42 | lsfam/llsfam to list available tape families.
43 | - Added hardlink support for the latest HPSS DSI
44 | - Added the ability 'put /dev/null'.
45 | - Added check for "File not found" to MLST operations in order to support
46 | dCache.
47 | - Support ALLO with ESTO (partial store).
48 | - Fixed offsets for partial transfers (pget,pput) in extended block mode (mode e)
49 | - Fixed 100% CPU usage during slow and 3rd party transfers.
50 |
51 | Version 2.6 8/5/10
52 | - Fixed a segfault found on a UV10 running SLES11. The crash occurs
53 | when the client tries to print out the server MOTD and the MOTD
54 | has '%' embedded in it.
55 |
56 | Version 2.5 9/08/09
57 | - Removed warnings at connect when service does not support MLST
58 | - Fixed directory listings on systems that do not support MLST
59 | - Removed mlsx usage from the manpage
60 | - No longer issue MLST/MLSD commands for parent directories unless
61 | a regular expression is encountered. This is a slight performance
62 | boost and a workaround for services that disallow access to parent
63 | directories.
64 | - Fixed timestamps when listing in recursive or using regular
65 | expressions. Timestamps are now shown in your local timezone.
66 | - Added check for src and dst URLs when using URL command line
67 | transfer syntax
68 | - Fixed URL command line transfers when the destination is local
69 | - Fixed typos in 'put' help message and 'Unknown commad'
70 |
71 | Version 2.4 4/17/09
72 | - Fixed a segfault in the stage command
73 |
74 | Version 2.3 4/1/09
75 | - Added support for GLOBUS_TCP_PORT_RANGE, GLOBUS_TCP_SOURCE_RANGE,
76 | UBERFTP_TCP_PORT_RANGE and UBERFTP_TCP_SOURCE_RANGE. The GLOBUS_*
77 | versions are there for backwards compatibility. The UBERFTP_*
78 | versions do the same things as their GLOBUS_* counterparts. The
79 | UBERFTP_* versions will override the GLOBUS_* versions if both
80 | are available.
81 |
82 | Version 2.2 1/6/09
83 | - Fixed misspelling of argument
84 | - Added '-a ' command line argument which only gives a warning
85 | that it has been deprecated
86 |
87 | Version 2.1 11/12/08
88 | - Fixed a bug where stdin was closed if local file wasn't opened
89 | successfully during transfers
90 | - Fixed a build problem on OS X with the variable name 'wait'
91 | - Alphabetized the help menu
92 | - Added '?' command as an alias for help
93 | - Added runique/sunique for unique filenaming during transfers
94 | - directory listings can now be saved to a file
95 | - Added cdup/lcdup commands
96 | - Added 'glob' command and '-glob' commandline option to toggle
97 | filename expansion
98 | - Added '!' command to escape to a shell prompt
99 | - Changed precision of reported transfer rates
100 | - Moved the 'CHGRP' call to 'SITE CHGRP' since that is where NCSA's
101 | mss has it and that is where it fits under globus servers
102 | - Comma can be used in addition to semi colons to delimit commands given
103 | on the command line.
104 | - Fixed the misspelled word 'conneciton' in the manpage
105 | - Fixed FTP syntax for pget and pput functions
106 | - Fixed pget manpage entry for srcfile and destfile definitions
107 | - Fixed command piping in put commands by not coping stderr into the
108 | resulting file
109 | - Fixed wildcards in pipe commands
110 | - Fixed 'put file directory'
111 | - Fixed offset used in cat/lcat
112 | - Changed 'quote setfam' & 'quote site setfam' to pass through to
113 | the server first and then handle the response accordingly
114 | - Added polling when reading server responses to keep the client from
115 | heavily using the CPU during 'quote stage 60'
116 | - Added --with-tcp-window to the configure script to allow the default
117 | TCP window to be set specific to the host system
118 | - Added -with-blksize to the configure script to allow the default
119 | internal buffer size to be set for optimal performance on the host system
120 | - Client will now truncate the local destination file if it exists
121 | - Changed data channel protection level to 'clear' to greatly improve
122 | performance by default
123 | - Fix for NAME_MAX on AIX, now use pathconf()
124 | - Fix for lcd -
125 | - Fix for 'ALLO 0' on some 32 bit platforms
126 | - Fixed directory listings when using 'order' settings. The target
127 | directory no longer appears in the output. './' is no longer
128 | prefixed to 'ls' output. Target directories are now expanded in
129 | the listing output.
130 | - Fixed default type when MLSD/MLST is not available
131 | - Destination file removed after transfer failure unless using
132 | pget or pput
133 | - Adjusted the list output to be a bit more readable
134 | - rm and ls will continue after an error is encounted
135 | - UberFTP will attempt to stage a file before retrieval even if wait
136 | is disabled. A more detailed message is returned to the user if the
137 | file is not on disk.
138 | - recursive or regular expression transfers which transfer multiple
139 | files will continue after errors are encountered until the current
140 | command has completed
141 |
142 |
143 |
144 | Version 2.0 8/06/08
145 | - Complete re write to fix some outstanding issues
146 | - No longer dependent upon globus ftp control libraries, only requires
147 | the globus_gssapi_gsi library.
148 | - Added retry. Set this to the number of times you would like to retry
149 | commands that fail with transient failures.
150 | - remove bget/bput and added 'retry' so all operations can recover
151 | - Added reconnect on connection timeout
152 | - Removed MSS authentication since it will be removed soon from NCSA's
153 | mass storage system.
154 | - Removed the -a option to open. Now the authentication mechanism is
155 | implied by the use a password
156 | - Now using MSLT/MLSD for recursive or globbing. The client will not
157 | perform these operations for systems that do not support it.
158 | - cat, mkdir, rmdir, chmod, rm can take multiple targets
159 | - Added support for command piping the local target to get/put
160 | - Added chgrp
161 | - GSI code will now reuse the previously retrieved credential instead of
162 | re retreiving it.
163 | - Checksums are now computed automatically after transfers if requested
164 | - Expanded command line options
165 | - Mkdir will not fail when the directory already exists if
166 | MLSx is supported
167 | - put -r will not fail when creating directories that already exist
168 | if MLSx is supported
169 | - Added the 'family' command for setting tape family with FTP
170 | services that support it
171 | - Added the 'resume' command. Give it the last attempted file transfer
172 | or directory created during a failed recursive transfer and it will
173 | skip to that target when you re run the recursive transfer
174 | - Added cksum which will compare local and remote CRC's
175 | - Added stage/lstage commands which take multiple objects. This also
176 | suports recursion and regular expressions.
177 | - Control Channel keepalive is no optional and disabled by default
178 | - Added Data Channel Authentication and the command "dcau"
179 | - Added data channel encryption and the command "prot"
180 | - Added pbsz for changing the protection buffer size which is the maximum
181 | encrypted message size on the data channel
182 | - Added a reconnect feature. If your connection has timed out or is dropped,
183 | the client will reconnect you and preform your operation.
184 | - wait is now built into the client. This causes the client to attempt
185 | to stage a file before downloading it.
186 | - Added size/lsize to give you the size of remote objects
187 | - Added ~ path expansion
188 | - Added 'cd -' capabilities
189 |
190 | Version 1.27 02/8/08
191 | - Fixed bug were passive addresses were interpretted as IPv6 addresses
192 | - Flush out error messages so that the appear inline
193 |
194 | Version 1.26 01/10/08
195 | - Rework of recursive operations to fix some failures
196 | - Destination directory must exist when transferring files
197 |
198 | Version 1.25 07/24/07
199 | - 'quote stage' is now handled within the client to avoid firewall timeouts.
200 | - 'quote sum' no longer uses firewall timeouts
201 |
202 | Version 1.24 04/27/07
203 | - Fixed parsing for -c option
204 | - Fix in filelist.h, filelist.c and ftpSession.h to fix build
205 | with xlc on AIX.
206 |
207 | Version 1.23 02/16/07
208 | - Fixes for OSX including how optind is reset and dealing with
209 | return values from strchr_r().
210 |
211 | Version 1.22 10/23/06
212 | - Username/password authentication added to the commandline and the
213 | open/lopen commands.
214 | - Username added to GSI authentication for advanced users that have
215 | multiple accounts that map to the same public key.
216 | - Enhanced help menus with much more detail on each command.
217 | - New keepalive issue added to data transfers to fix hanging issues related
218 | to some firewalls. The client will now send 'NOP' to the server if it
219 | suspects that a problem has occurred. This fix is related (and in some
220 | situations requires the fix for) globus bug 4735.
221 | - Added timeouts to fix server crash related hangs during data transfers.
222 | - Fixed hangs caused by bad third-party transfers. If a problem occurs with
223 | one service involved in the transfer, the connections are closed to
224 | prevent the client from haning.
225 | - Enhanced error reporting and handling. Fixed exit values for various
226 | commands. Expanded the GSI related error messages to include more details.
227 | Fixed the mput/mget return value for no match. Solved several memory
228 | leaks related to globus error objects and globus printable strings.
229 | - Added URL style command line transfers. So now you can specify source
230 | and destination from the command line using one of the prefixes
231 | gsiftp://, file: or mss://. Or you can put source/destinations pairs in
232 | a file and use the -f option.
233 | - Added the 'bugs' command to interactive mode which prints a short message
234 | about who to send bugs and feature requests to.
235 | - Added -m mode command line option to set the transfer mode to 'S' streams
236 | mode or 'E' extended block mode.
237 | - Added -versions command line option to print the version of all related
238 | globus libraries.
239 | - Added debug information to directory listings for problem debugging.
240 | - Rewrote the directory parsing to work with the Fermilab server.
241 | - Added the recursive feature to mput and mget. These functions also allow
242 | for multiple sources to be listed similar to the bput and bget functions.
243 | - Rewrote lrm when not connected to a local service so that error messages
244 | are printed instead of ignored.
245 | - Added the 'order' interactive command to change the order of directory
246 | listings to to name, size or type.
247 | - Added debug levels with differing amounts of output. This can be set from
248 | the command line using the -D option or from the debug interactive
249 | command.
250 |
251 | Version 1.21 08/29/06
252 | - It fixes a couple bugs in 1.20 including the lls bug on mercury (in
253 | which you see no listing) and the lcd bug (which causes a core dump).
254 |
255 | Version 1.20 07/21/06
256 | - Improved regular expressions. Version 1.19 only handled expressions in
257 | the last portion of the path. Version 1.20 allows the expression to be
258 | in any, or all, portions of the path. Added recursive listing and now
259 | you can use quotes and backslashes to work with file names with spaces.
260 |
261 | Version 1.19 03/15/06
262 | - Includes a new recursive feature available with the rm, lrm, chmod,
263 | lchmod, get and put commands. Each of these commands accept the '-r'
264 | option to activate recursive mode. In recursive mode, get and put take
265 | directories as the source and destination rather than regular files.
266 | Be careful when using recursive in third-party transfers since a simple
267 | mistake such as incorrect permissions can cause the transfers to hang.
268 | This is a known deficiency in the FTP protocol which is exaggerated by
269 | the recursive feature.
270 | - Fixes a hanging bug associated with pattern matching that was found
271 | when using rmdir and mput.
272 |
273 | Version 1.18 10/14/05
274 | - Fixed a segfault from improper use of vsnprintf() in SendCmd().
275 |
276 | Version 1.17 09/21/05
277 | - Added 'bye' as an alias to 'quit'.
278 | - It now handles bad PASV/SPAS responses which contain zero valid addresses.
279 | - Fixed the 'fixed-sized' buffers which truncated long commands and
280 | - long pathnames.
281 |
282 | Version 1.16 08/29/05
283 | - Added support for third-party striping. Since the client is streams mode
284 | by default, you need to switch to extended block mode ('mode e' or
285 | 'parallel x'). If the transfer has more than one stripe, a message is
286 | printed informing you of how many stripes are being used.
287 | - ALLO is no longer sent on partial transfers.
288 | - Removed server messages during transfers and replaced it with a
289 | completion message that gives the time elapsed, data transferred and rate.
290 | - Fixed SIZE usage to handle non existent files.
291 | - The local file is truncated when using 'get' to fix the 'zero-length
292 | transfer not overwriting the local file' bug.
293 |
294 | Version 1.15 08/10/05
295 | - Fixed the exit values for batch mode. If an error occurs, the client
296 | exits immediately with a value of 1. Otherwise it exits with a value of
297 | 0 once all commands have finished executing. Interactive mode always
298 | exits with a value of 0.
299 |
300 | Version 1.14 08/5/05
301 | - rm/rmdir/lrm/lrmdir now handle regular expressions. These commands do not
302 | accept the unix command flags ie. '-f', '-r'. Be careful when using rm
303 | because it uses DELE which will delete files AND directories.
304 |
305 | Version 1.13 03/25/05
306 | - Adds rename/lrename.
307 | - A new manpage is included.
308 | - Removed '-?' from the help menu because it doesn't work under tcsh.
309 | - Added a new environment variable UBERFTP_ACTIVE_MODE. If set, it
310 | defaults to ACTIVE rather than passive mode which is essential for good
311 | performance when using NCSA's mass storage system.
312 | - 'passive' no longer toggles passive/active modes, instead an 'active'
313 | command was added and each command sets (not toggles) the corresponding
314 | mode.
315 | - 'OPT RETR PARALLELISM' has been changed to 'OPTS RETR Parallelism' to
316 | work around a case sensitiviy bug in the Globus's beta striping gridftp
317 | server.
318 |
319 | Version 1.12 02/22/05
320 | - Removes the 0 length local copy of a file when the user receives
321 | permission denied (if uberftp created the local copy).
322 |
323 | Version 1.11 09/9/04
324 | - Accepts code 125 when opening a data connection.
325 |
326 | Version 1.10 08/25/04
327 | - Fixes the strtoll() build problem on Tru64.
328 |
329 | Version 1.9 07/27/04
330 | - Adds a fix for tcpbuf.
331 |
332 | Version 1.8 07/26/04
333 | - 'tcpbuf ' will set the TCP buffer size.
334 |
335 | Version 1.7 06/25/04
336 | - ALLO support was added.
337 | - username/password was removed.
338 | - The -H option on the commandline or to open/lopen is optional so users
339 | can now specify 'uberftp mss.ncsa.uiuc.edu' which connects to mass
340 | storage using GSI on port 2811.
341 | - 15 minute timeouts form the Globus gridftp server are now handled
342 | correctly.
343 |
344 | Version 1.6 05/6/04
345 | - UberFtp now defaults to passive streams mode to avoid firewall issues. If
346 | you issue 'parallel x' where x >= 2, or perform third-party transfers,
347 | the client will use an active data connection. It will also failover to
348 | active if the service denies passive mode. This change will also be more
349 | efficient then the previous versions where it used extended block mode on
350 | a single data channel.
351 |
352 | Version 1.5 04/22/04
353 | - Fixes build problems on AIX 5.x.
354 |
355 | Version 1.4 04/1/04
356 | - Fixes a build problem with Globus Toolkit 3.2 Beta.
357 |
358 | Version 1.3 12/8/03
359 | - Includes improved handling of directory listing commands. Now all
360 | options given to 'ls' are passed to the remote service. Note: this is
361 | not supported by all FTP implementations and this change only affects
362 | those implementations that can handle this feature.
363 |
364 | Version 1.2 12/8/03
365 | - Fixes a build problem on Solaris and a typo in a help message.
366 |
367 | Version 1.1 11/17/03
368 | - Fixes pget/pput offsets, removes '\r' from LIST output, removed pthr
369 | requirement, fixed crash caused when remote server sends empty responses.
370 |
371 | Version 1.0 11/11/03
372 | - Version 1.0 is available for download.
373 |
374 | Version ALPHA_8_7 10/1/03
375 | - Added a rate message after completed transfers
376 | - Fix for the put bug
377 | - Added the new command blksize which allows you to set the buffer and
378 | block size used in data transfers.
379 |
380 | Version ALPHA_8_6 09/24/03
381 | - Head on over to the downloads section.
382 |
--------------------------------------------------------------------------------
/mssftp.1:
--------------------------------------------------------------------------------
1 | .\" @(#)mssftp.1c 1.34 90/02/15 SMI; from UCB 4.3
2 | .TH MSSFTP 1C "16 May 2008"
3 | .SH NAME
4 | mssftp \- File transfer program for NCSA's mass storage system
5 | .SH SYNOPSIS
6 | .B mssftp
7 | .RB [options]
8 | .RB [cmds]
9 |
10 | .SH DESCRIPTION
11 | .IX "mssftp command" "" "\fLmssftp\fP \(em file transfer"
12 | .IX GridFTP grid files transfer
13 | .IX "file transfer protocol" "mssftp command" "" "\fLmssftp\fP command"
14 | .LP
15 | .B mssftp
16 | is a GridFTP-enabled client that supports both interactive use and
17 | FTP commands on the command line to transfer files between NCSA's mass
18 | storage system and the local system. It is based upon NCSA's UberFTP client.
19 | \fBmssftp\fR supports GSI authentication, parallel data
20 | channels and striping. For more information about GridFTP, see the GridFTP
21 | URL in the "SEE ALSO" section below.
22 |
23 | .B mssftp
24 | connects only to NCSA's mass storage system (mss.ncsa.uiuc.edu). User
25 | authentication is done without requiring a password, so you can
26 | access the mass storage system from a batch job without putting the password
27 | into a .netrc file.
28 |
29 | Upon execution,
30 | .B mssftp
31 | immediately attempts to establish a connection to the FTP server
32 | on mss.ncsa.uiuc.edu. If no commands are given on the command, the client
33 | will enter its command interpreter and await instructions from the user. If
34 | commands are given on the commandline, the client will execute these commands
35 | in order and exit upon the first error encountered or upon successful
36 | completion of all given commands. This list must be enclosed in quotes.
37 | Multiple commands are semicolon or comma delimited.
38 |
39 |
40 | .SH OPTIONS
41 | .TP
42 | .B \-active
43 | Use ACTIVE mode for data transfers.
44 | .TP
45 | .B \-ascii
46 | Use ASCII mode for data transfers.
47 | .TP
48 | .B \-binary
49 | Use BINARY mode for data transfers.
50 | .TP
51 | .B \-blksize \fIn\fR
52 | Set the internal buffer size to \fIn\fR.
53 | .TP
54 | .B \-cksum [\fIon\fR|\fIoff\fR]
55 | Enable/Disable CRC checks after file transfers.
56 | .TP
57 | .B \-cos \fIname\fR
58 | Set the storage class of service to \fIname\fR. Used with HPSS installations.
59 | Use the class of service name \fIdefault\fR to allow the remote
60 | server to decide which class of service to use.
61 | .TP
62 | .B \-d
63 | Enable debugging. Same as '-debug 3'. Deprecated.
64 | .TP
65 | .B \-debug \fIn\fR
66 | Set the debug level to \fIn\fR.
67 | .TP
68 | .B \-family \fIname\fR
69 | Set the remote storage family to \fIname\fR.
70 | Use the family name \fIdefault\fR to allow the remote
71 | server to decide which family to use.
72 | .TP
73 | .B \-g
74 | Disable filename globbing. Same as '-glob off'. Deprecated.
75 | .TP
76 | .B \-glob [\fIon\fR|\fIoff\fR]
77 | Enable/Disable filename expansion.
78 | .TP
79 | .B \-hash
80 | Enable printing of hash marks during transfers.
81 | .TP
82 | .B \-keepalive \fIn\fR
83 | Send control channel keepalive messages every \fIn\fR seconds
84 | during data transfers.
85 | .TP
86 | .B \-mode [\fIE\fR|\fIS\fR]
87 | Switch the transfer mode to extended block (\fIE\fR) or
88 | streams mode (\fIS\fR).
89 | .TP
90 | .B \-parallel \fIn\fR
91 | Use \fIn\fR parallel data channels during extended block transfers.
92 | .TP
93 | .B \-passive
94 | Use PASSIVE mode for data transfers.
95 | .TP
96 | .B \-pbsz \fIn\fR
97 | Set the data protection buffer size to \fIn\fR n bytes.
98 | .TP
99 | .B \-prot [\fIC\fR|\fIS\fR|\fIE\fR|\fIP\fR]
100 | Set the data protection lelvel to clear (\fIC\fR), safe (\fIS\fR),
101 | confidential (\fIE\fR) or private (\fIP\fR).
102 | .TP
103 | .B \-retry \fIn\fR
104 | Retry commands that fail with transient errors \fIn\fR times.
105 | .TP
106 | .B \-resume \fIpath\fR
107 | Retry the recursive transfer starting at \fIpath\fR.
108 | .TP
109 | .B \-tcpbuf \fIn\fR
110 | Set the TCP read/write buffers to \fIn\fR bytes.
111 | .TP
112 | .B \-wait
113 | This will cause the client to wait for remote files to stage before
114 | attempting to transfer them.
115 | .TP
116 | .B \-v
117 | Enable verbose mode. Same as '-debug 3'. Deprecated.
118 | .TP
119 | .B \-version
120 | Print mssftp version information and exit.
121 | .TP
122 | .B \-versions
123 | Print version information about all used globus modules and exit.
124 |
125 | .SH DEFAULT TRANSFER MODE
126 | .LP
127 | By default, without any special environment variables, command line options
128 | or commands, \fBmssftp\fR will transfer files in ACTIVE STREAMS mode.
129 | ACTIVE means that the server will initiate the data connection which increases
130 | performance to NCSA's mass storage system. STREAMS mode implies that GRIDFTP
131 | features including striping and parallel data connections are not used. In
132 | order to take advantage of these features with GridFTP capable servers, you
133 | must either change the mode directly using \-m command line switch or the
134 | .B mode
135 | interactive command, or you can change the mode indirectly by specifying
136 | more than one parallel data connection using the \-c command line switch or
137 | by using the
138 | .B parallel
139 | interactive command.
140 |
141 | .SH COMMANDS
142 | .TP
143 | .B ! [\fIcommand\fR]
144 | Run the command using a shell on the local machine. If no command is given,
145 | invoke an interactive shell.
146 | .TP
147 | .B ? [\fIcommand\fR]
148 | If \fIcommand\fR is given, print a (hopefully) helpful blurb about it.
149 | Otherwise, list all commands.
150 | .TP
151 | .B active
152 | Change to ACTIVE mode which causes the server to initiate the data
153 | connection. The is the default for mssftp.
154 | If you are behind a firewall you must use PASSIVE mode.
155 | .TP
156 | .B ascii
157 | Change the data transfer type to ASCII which causes the server to do some
158 | simple transformations to the file being transferred. This is mostly useful
159 | for changing EOL (end of line) in text files when moving between platforms.
160 | This option is almost never necessary today. The default is BINARY mode
161 | also known as IMAGE mode.
162 | .TP
163 | .B binary
164 | Change the data transfer type to BINARY (aka IMAGE) which causes the server
165 | to not perform transformations to the file being transferred. This is the
166 | default and is faster than an ASCII transfer.
167 | .TP
168 | .B blksize \fIsize\fR
169 | Change the size of the memory buffer used to read and write data to disks
170 | to \fIsize\fR bytes. The default block size is 1024*1024 (1048576) bytes but it can be changed at compile time. The
171 | block size can be increased to improve file transfer performance. This is
172 | not related to the extended block mode block size used to determine the
173 | ratio of data to header for data transferred on the data channel.
174 | .TP
175 | .B bugs
176 | Prints information regarding bug reporting and feature requests.
177 | .TP
178 | .B bye
179 | Close all control and data connections and exit.
180 | .TP
181 | .B cat \fIfile1\fR [\fIfile2\fR ... \fIfilen\fR]
182 | Print the contents of the remote file(s) to stdout.
183 | .TP
184 | .B cd [\fIdir\fR]
185 | Change the remote working directory to \fIdir\fR. If \fIdir\fR is not given,
186 | the client will make every attempt to change to the user's home directory.
187 | '~' expansion and '-' previous directory are supported.
188 | .TP
189 | .B cdup
190 | Change the remote working directory up one level.
191 | .TP
192 | .B chgrp [\fI-r\fR] \fIgroup\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
193 | Change group ownership on the remote object(s).
194 | .br
195 | \fI-r\fR Recursively chgrp everything in the given directory.
196 |
197 | .TP
198 | .B chmod [\fI-r\fR] \fIperms\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
199 | Change permissions on the remote object(s).
200 | .br
201 | \fI-r\fR Recursively chmod everything in the given directory.
202 | .TP
203 | .B cksum [\fIon\fR|\fIoff\fR]
204 | Enable file cksum comparison after each file transfer. This only works with
205 | NCSA's mass storage system.
206 | .br
207 | \fIon\fR Enable checksum comparison
208 | .br
209 | \fIoff\fR Disable checksum comparison
210 | .TP
211 | .B close
212 | Close the control connection to the remote host.
213 | .TP
214 | .B cos \fIname\fR
215 | Sets the HPSS class of service to \fIname\fR on the FTP service if the service
216 | supports it. If \fIname\fR is omitted, the current class of service is printed.
217 | Use the class of service name \fIdefault\fR to allow the remote
218 | server to decide which class of service to use.
219 | .TP
220 | .B dcau [\fIN\fR|\fIA\fR|\fIS\fR \fIsubject\fR]
221 | Change the data channel authentication settings. If the service does not
222 | support DCAU, these settings are ignored.
223 | .br
224 | \fIN\fR Disabled dcau.
225 | .br
226 | \fIA\fR Expect the remote identity to be mine. (Default)
227 | .br
228 | \fIS\fR \fIsubject\fR Expect the remote identity to be \fIsubject\fR.
229 | .TP
230 | .B debug [\fI0-3\fR]
231 | Turn debug statements on/off. If no value is given, this command will
232 | toggle between debug(2) and non debug(1) mode. Otherwise the debug level
233 | is set to the given level.
234 | .br
235 | 0 Only errors are printed
236 | .br
237 | 1 Default. Errors and some helpful messages are printed
238 | .br
239 | 2 Print useful control channel information
240 | .br
241 | 3 Print all information
242 | .TP
243 | .B delete [\fI-r\fR] object1 [object1...objectn]
244 | Alias for rm. This command has been deprecated.
245 | .br
246 | -r Recursively remove the given directory.
247 | .TP
248 | .B dir [\fI-r\fR] [\fItarget\fR]
249 | List the contents of the remote target directory. If \fItarget\fR is not given,
250 | then the current working directory is used.
251 | .br
252 | \fI-r\fR Recursively list \fItarget\fR.
253 | .br
254 | \fItarget\fR Directory or file to list. '.' is used by default.
255 | .TP
256 | .B disconnect
257 | Alias for close. This command has been deprecated.
258 | .TP
259 | .B family \fIname\fR
260 | Sets the tape family to \fIname\fR on the FTP service if the service
261 | supports it. If \fIname\fR is omitted, the current family is printed.
262 | Use the family name \fIdefault\fR to allow the remote
263 | server to decide which family to use.
264 | .TP
265 | .B get [\fI-r\fR] \fIsource\fR [\fIdestination\fR]
266 | Retrieve file(s) from the remote service. If \fIsource\fR implies multiple
267 | transfers, either through regular expressions or by using the recursive
268 | feature, then \fIdestination\fR must be a directory. If \fIdestination\fR is not
269 | specified, \fIsource\fR is used.
270 | .br
271 | \fI-r\fR Recursively transfer the given directory.
272 | .TP
273 | .B glob [\fIon\fR|\fIoff\fR]
274 | Enable or disable filename globbing. If no option is given, this command
275 | will toggle the current setting.
276 | .br
277 | \fIon\fR Enable filename globbing
278 | .br
279 | \fIoff\fR Disable filename globbing
280 | .TP
281 | .B hash
282 | Print hash marks during data transfers. This does not work during third
283 | party transfers.
284 | .TP
285 | .B help [\fIcommand\fR]
286 | If \fIcommand\fR is given, print a helpful blurb about \fIcommand\fR.
287 | Otherwise, list all commands.
288 | .TP
289 | .B keepalive [\fIseconds\fR]
290 | Attempts to keep the control channel from being blocked by firewalls during
291 | long data channel operations. mssftp sends a NOOP command to the service
292 | at intervals equal to the specified number of \fIseconds\fR. Setting it to zero
293 | will disable keepalive. If \fIseconds\fR are not given, the current timeout is
294 | displayed. This feature is disabled by default.
295 | .br
296 | seconds number of seconds between NOOPs. Disabled if zero.
297 | .TP
298 | .B lcat \fIfile1\fR [\fIfile2\fR ... \fIfilen\fR]
299 | Print the contents of the local file(s) to stdout.
300 | .TP
301 | .B lcd [\fIdir\fR]
302 | Change the local working directory to \fIdir\fR. If \fIdir\fR is not given,
303 | the client will make every attempt to change to the user's home directory.
304 | '~' expansion and '-' previous directory are supported.
305 | .TP
306 | .B lcdup
307 | Change the local working directory up one level.
308 | .TP
309 | .B lchgrp [\fI-r\fR] \fIgroup\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
310 | Change group ownership on the local object(s).
311 | .br
312 | \fI-r\fR Recursively chgrp everything in the given directory.
313 | .TP
314 | .B lchmod [\fI-r\fR] \fIperms\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
315 | Change permissions on the local object(s).
316 | .br
317 | \fI-r\fR Recursively chmod everything in the given directory.
318 | .TP
319 | .B ldir [\fI-r\fR] [\fItarget\fR]
320 | List the contents of the local \fItarget\fR directory. If \fItarget\fR is not given,
321 | then the current working directory is used.
322 | .br
323 | \fI-r\fR Recursively list \fItarget\fR.
324 | .br
325 | target Directory or file to list. '.' is used by default.
326 | .TP
327 | .B link [\fIoldfile\fR] [\fInewfile\fR]
328 | Create a hardlink to oldfile named newfile on the remote service.
329 | .TP
330 | .B llink [\fIoldfile\fR] [\fInewfile\fR]
331 | Create a hardlink to oldfile named newfile on the local service.
332 | .TP
333 | .B lls [\fI-r\fR] [\fItarget\fR]
334 | List the contents of the local \fItarget\fR directory. If \fItarget\fR is not given,
335 | then the current working directory is used.
336 | .br
337 | \fI-r\fR Recursively list \fItarget\fR.
338 | .br
339 | target Directory or file to list. '.' is used by default.
340 | .TP
341 | .B lmkdir \fIdir1\fR [\fIdir2\fR ... \fIdirn\fR]
342 | Create the local directory(ies).
343 | .TP
344 | .B lpwd
345 | Prints the current local working directory.
346 | .TP
347 | .B lquote \fIcmd\fR
348 | Pass \fIcmd\fR to the local FTP service. This allows the user to use
349 | server-specific commands that are not available through the mssftp
350 | interface.
351 | .TP
352 | .B lrename \fIsrc\fR \fIdst\fR
353 | Rename the local object \fIsrc\fR to \fIdst\fR.
354 | .TP
355 | .B lrm [\fI-r\fR] \fIobject1\fR [\fIobject1\fR...\fIobjectn\fR]
356 | Removes the local file system object(s).
357 | .br
358 | \fI-r\fR Recursively remove the given directory.
359 | .TP
360 | .B lrmdir \fIdir1\fR [\fIdir2\fR...\fIdirn\fR]
361 | Removes the given directories from the local service.
362 | .TP
363 | .B ls [\fI-r\fR] [\fItarget\fR]
364 | List the contents of the remote target directory. If [\fItarget\fR] is not given,
365 | then the current working directory is used.
366 | .br
367 | \fI-r\fR Recursively list \fItarget\fR.
368 | .br
369 | \fItarget\fR Directory or file to list. '.' is used by default.
370 | .TP
371 | .TP
372 | .B lscos
373 | List the available class of services on the remote server (HPSS only).
374 | .TP
375 | .B lsfam
376 | List the available tape families on the remote server (HPSS only).
377 | .TP
378 | .B lsize \fIfile1\fR [\fIfile2\fR...\fIfilen\fR]
379 | Prints the size of the given object(s).
380 | .TP
381 | .B lstage [\fI-r\fR] \fIseconds\fR \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
382 | Attempt to stage all matching files within the given number of \fIseconds\fR
383 | on the local service.
384 | .br
385 | seconds number of seconds to attempt staging
386 | .br
387 | \fI-r\fR Recursively stage all files in the given subdirectory.
388 | .TP
389 | .B lsymlink [\fIoldfile\fR] [\fInewfile\fR]
390 | Create a symlink to oldfile named newfile on the local service.
391 | .TP
392 | .B mput [\fI-r\fR] \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
393 | Retrieve file(s) from the remote service. This is similiar to making
394 | multiple calls to get without specifying a destination.
395 | .br
396 | \fI-r\fR Recursively transfer the given directory.
397 | .TP
398 | .B mkdir \fIdir\fR
399 | Create the remote directory.
400 | .TP
401 | .B mode [\fIE\fR|\fIS\fR]
402 | Toggle the data transfer mode between Streams mode and Extended Block
403 | mode. The default is Streams mode. If no option is given, it will
404 | display the current mode.
405 | .br
406 | E Extended block mode
407 | .br
408 | S Streams mode
409 | .TP
410 | .B mput [\fI-r\fR] \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
411 | Store file(s) to the remote service. This is similiar to making
412 | multiple calls to put without specifying a destination.
413 | .br
414 | \fI-r\fR Recursively transfer the given directory.
415 | .TP
416 | .B open
417 | Opens a control channel to mss.ncsa.uiuc.edu and that host becomes
418 | the 'remote' machine. GSI authentication is used.
419 | .TP
420 | .B order [\fItype\fR]
421 | Changes the order of lists returned from ls and lls to the given scheme.
422 | If \fItype\fR is not given, the current order is displayed.
423 | .br
424 | \fItype\fR Ordering scheme to use. Value options are:
425 | .br
426 | none Do not order listings
427 | .br
428 | name Order listings by name
429 | .br
430 | size Order listings by size
431 | .br
432 | type Order listings by type
433 | .TP
434 | .B parallel [\fInumber\fR]
435 | Set the number of parallel data connections to \fInumber\fR. This is only
436 | useful for extended block mode transfers. The default number of data
437 | connections is one. If no number is given, the current setting for the
438 | number of parallel connects is printed.
439 | .TP
440 | .B passive
441 | Change to PASSIVE mode which causes the client to initiate the data
442 | connection. The default is ACTIVE mode. If you are behind a
443 | firewall you must use PASSIVE mode.
444 | .TP
445 | .B pbsz [\fIsize\fR]
446 | Change the length of the protection buffer. The protection buffer is used
447 | to encrypt data on the data channel. The length of the protection buffer
448 | represents the largest encoded message that is allowed on the data channel.
449 | By default, the protection buffer is grown to match the internal buffer
450 | used. For efficient transfers, pbsz should be sufficiently larger than
451 | blksize so that the wrapped buffer fits within the protection buffer.
452 | Otherwise, the blksize buffer is broken into multiple pieces so that each
453 | write is less than pbsz when wrapped. If \fIpbsz\fR is not given, the
454 | current size is displayed.
455 | .br
456 | \fIsize\fR length of protection buffer. 0 will set it to its default.
457 | .TP
458 | .B pget \fIoffset\fR \fIsize\fR \fIsrcfile\fR [\fIdestfile\fR]
459 | Retrieve only the specified portion of the file(s). If srcfile is a regular
460 | expression and expands to multiple files, and destination is given,
461 | destination must refer to a directory.
462 | .br
463 | \fIoffset\fR Offset within the file
464 | .br
465 | \fIsize\fR Amount of data to retrieve
466 | .br
467 | \fIsrcfile\fR Name of remote file
468 | .br
469 | \fIdestfile\fR Name of local file. srcfile is used if destfile
470 | .br
471 | is not specified
472 | .TP
473 | .B pput \fIoffset\fR \fIsize\fR \fIsrcfile\fR [\fIdestfile\fR]
474 | Store only the specified portion of the file(s). If srcfile is a regular
475 | expression and expands to multiple files, and destination is given,
476 | destination must refer to a directory.
477 | .br
478 | \fIoffset\fR Offset within the file
479 | .br
480 | \fIsize\fR Amount of data to retrieve
481 | .br
482 | \fIsrcfile\fR Name of local file
483 | .br
484 | \fIdestfile\fR Name of remote file. srcfile is used if destfile
485 | .br
486 | is not specified
487 | .TP
488 | .B prot [\fIC\fR|\fIS\fR|\fIE\fR|\fIP\fR]
489 | This command configures the level of security on the data channel after
490 | data channel authentication has completed. Clear means that the data will
491 | not be protected. Safe means that the data will be integrity protected
492 | meaning that altered data will be detected. Confidential means that the data
493 | will be unreadable to third parties. Private mode means the data will be
494 | confidential and safe.
495 | .br
496 | \fIC\fR Set protection level to clear.
497 | .br
498 | \fIS\fR Set protection level to safe.
499 | .br
500 | \fIE\fR Set protection level to confidential.
501 | .br
502 | \fIP\fR Set protection level to private.
503 | .TP
504 | .B put [\fI-r\fR] \fIsource\fR [\fIdestination\fR]
505 | Store file(s) to the remote service. If \fIsource\fR implies multiple
506 | transfers, either through regular expressions or by using the recursive
507 | feature, then \fIdestination\fR must be a directory. If \fIdestination\fR is not
508 | specified, \fIsource\fR is used.
509 | .br
510 | \fI-r\fR Recursively transfer the given directory.
511 | .TP
512 | .B pwd
513 | Prints the current working directory.
514 | .TP
515 | .B quit
516 | Close all control and data connections and exit.
517 | .TP
518 | .B quote \fIcmd\fR
519 | Pass \fIcmd\fR to the remote FTP service. This allows the user to use
520 | server-specific commands that are not available through the mssftp
521 | interface.
522 | .TP
523 | .B rename \fIsrc\fR \fIdst\fR
524 | Rename the remote object \fIsrc\fR to \fIdst\fR.
525 | .TP
526 | .B retry [\fIcnt\fR]
527 | Configures retry on failed commands that have transient errors. \fIcnt\fR
528 | represents the number of times a failed command is retried. A value of
529 | zero effectively disables retry. Zero is the default. If no value is given
530 | the current setting is displayed.
531 | .br
532 | \fIcnt\fR Number of times a failed command is retried.
533 | .TP
534 | .B resume [\fI-d\fR] \fIpath\fR
535 | Sets a restart point for recursive transfers. If a long recursive transfer
536 | fails, you can set resume to the path that failed and mssftp will skip
537 | all file and directory creations up to the given path.
538 | .br
539 | \fIpath\fR Path to resume transfer at. If \fIpath\fR is not given, print the current
540 | .br
541 | resume target.
542 | .br
543 | \fI-d\fR Remove the current resume path.
544 | .TP
545 | .B rm [\fI-r\fR] \fIobject1\fR [\fIobject1\fR...\fIobjectn\fR]
546 | Removes the remote file system object(s).
547 | .br
548 | \fI-r\fR Recursively remove the given directory.
549 | .TP
550 | .B rmdir \fIdir1\fR [\fIdir2\fR...\fIdirn\fR]
551 | Removes the given directories from the remote service.
552 | .TP
553 | .B runique
554 | Toggles the client to store files using unique names during put operations.
555 | .TP
556 | .B size \fIfile1\fR [\fIfile2\fR...\fIfilen\fR]
557 | Prints the size of the given object(s).
558 | .TP
559 | .B stage [\fI-r\fR] \fIseconds\fR \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
560 | Attempt to stage all matching files within the given number of seconds
561 | on the remote service.
562 | .br
563 | \fIseconds\fR number of seconds to attempt staging
564 | .br
565 | \fI-r\fR Recursively stage all files in the given subdirectory.
566 | .TP
567 | .B sunique
568 | Toggles the client to store files using unique names during get operations.
569 | .TP
570 | .B symlink [\fIoldfile\fR] [\fInewfile\fR]
571 | Create a symlink to oldfile named newfile on the remote service.
572 | .TP
573 | .B tcpbuf [\fIsize\fR]
574 | Set the data channel TCP buffer size to \fIsize\fR bytes. If \fIsize\fR is not
575 | given, the current TCP buffer size will be printed.
576 | .TP
577 | .B versions
578 | Prints the versions of all Globus modules being used.
579 | .TP
580 | .B wait
581 | Toggles whether the client should wait for files to stage before attempting
582 | to retrieve them.
583 |
584 |
585 | .SH IMPROVING FILE TRANSFER PERFORMANCE
586 | .LP
587 | When tranferring files over long distances, use a large value (for example,
588 | 16777216) for \fBtcpbuf\fR.
589 | When there is high network traffic, you may be able to improve
590 | performance using the \fBparallel\fR command to increase the number of
591 | parallel data connections to 2-4.
592 | .SH THIRD-PARTY TRANSFERS
593 | .LP
594 | All remote service commands have "l*" counterparts that allow you
595 | to specifiy that the command is to be performed on the local host.
596 |
597 | .SH CONTROLLING EPHEMERAL PORT SELECTION
598 | .LP
599 | By default, local port selection is managed by the operating system. However,
600 | you may wish to specify which ports mssftp should use for incoming and
601 | out going connections. This is useful when dealing with firewalls.
602 |
603 | Setting UBERFTP_TCP_PORT_RANGE in your environment will cause all inbound
604 | connections to use the specified port range. Likewise, setting
605 | UBERFTP_TCP_SOURCE_RANGE in your environment will cause all outbound connections
606 | to use the specified port range.
607 |
608 | The environment variables GLOBUS_TCP_PORT_RANGE and GLOBUS_TCP_SOURCE_RANGE
609 | will also control the ephemeral port selection. These variables behave exactly
610 | as their UBERFTP counterparts and are available for backwards compatibility with
611 | older versions. The UBERFTP variables take precedence over the GLOBUS variables.
612 |
613 | The values of the variables specify a port range, a minimum port number and a
614 | maximum port number, separated by either a comma or a space. For example, to
615 | set the inbound port range, you would set:
616 |
617 | UBERFTP_TCP_PORT_RANGE=40000,50000
618 |
619 | Using the space delimiter, this format is also acceptable:
620 |
621 | UBERFTP_TCP_PORT_RANGE="40000 50000"
622 |
623 | See your shell documentation for the proper syntax for settings variables within
624 | your environment.
625 |
626 | Setting the ephemeral port range to an unusable range will cause mssftp connections
627 | to fail. For instance, setting a port range from 10 to 100 with a non root process will
628 | fail on most operating systems.
629 |
630 | .SH EXIT VALUES
631 | .LP
632 | mssftp will exit with a value of 0 if no errors occurred during the session,
633 | otherwise it will exit with a value of 1. In non interactive, commandline mode,
634 | it will exit after the first error occurs.
635 | .SH EXAMPLES
636 | .LP
637 | Connect to NCSA's mass storage system interactively from
638 | NCSA's TeraGrid cluster:
639 |
640 | % mssftp
641 | ...
642 | 220 UNIX Archive FTP server ready.
643 | 230 User consult logged in.
644 | ftp>
645 |
646 | Use the command-line interface to copy a file from NCSA's TeraGrid cluster
647 | to the mass storage system:
648 |
649 | % mssftp "cd work; get file.tar"
650 |
651 | .SH "SEE ALSO"
652 | .BR uberftp (1),
653 | .BR msscmd (1),
654 | .BR ftp (1),
655 | .br
656 | GridFTP:
657 | .br
658 | http://www.globus.org/datagrid/gridftp.html
659 | .br
660 | TCP Window Size:
661 | .br
662 | http://dast.nlanr.net/Articles/GettingStarted/TCP_window_size.html
663 | .br
664 | Active vs. Passive FTP:
665 | .br
666 | http://slacksite.com/other/ftp.html
667 |
668 | \fBNote: The links above are not under NCSA's control
669 | so they may become obsolete.\fR
670 |
671 |
--------------------------------------------------------------------------------
/depcomp:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # depcomp - compile a program generating dependencies as side-effects
3 |
4 | scriptversion=2013-05-30.07; # UTC
5 |
6 | # Copyright (C) 1999-2013 Free Software Foundation, Inc.
7 |
8 | # This program is free software; you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation; either version 2, or (at your option)
11 | # any later version.
12 |
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 |
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see .
20 |
21 | # As a special exception to the GNU General Public License, if you
22 | # distribute this file as part of a program that contains a
23 | # configuration script generated by Autoconf, you may include it under
24 | # the same distribution terms that you use for the rest of that program.
25 |
26 | # Originally written by Alexandre Oliva .
27 |
28 | case $1 in
29 | '')
30 | echo "$0: No command. Try '$0 --help' for more information." 1>&2
31 | exit 1;
32 | ;;
33 | -h | --h*)
34 | cat <<\EOF
35 | Usage: depcomp [--help] [--version] PROGRAM [ARGS]
36 |
37 | Run PROGRAMS ARGS to compile a file, generating dependencies
38 | as side-effects.
39 |
40 | Environment variables:
41 | depmode Dependency tracking mode.
42 | source Source file read by 'PROGRAMS ARGS'.
43 | object Object file output by 'PROGRAMS ARGS'.
44 | DEPDIR directory where to store dependencies.
45 | depfile Dependency file to output.
46 | tmpdepfile Temporary file to use when outputting dependencies.
47 | libtool Whether libtool is used (yes/no).
48 |
49 | Report bugs to .
50 | EOF
51 | exit $?
52 | ;;
53 | -v | --v*)
54 | echo "depcomp $scriptversion"
55 | exit $?
56 | ;;
57 | esac
58 |
59 | # Get the directory component of the given path, and save it in the
60 | # global variables '$dir'. Note that this directory component will
61 | # be either empty or ending with a '/' character. This is deliberate.
62 | set_dir_from ()
63 | {
64 | case $1 in
65 | */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
66 | *) dir=;;
67 | esac
68 | }
69 |
70 | # Get the suffix-stripped basename of the given path, and save it the
71 | # global variable '$base'.
72 | set_base_from ()
73 | {
74 | base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
75 | }
76 |
77 | # If no dependency file was actually created by the compiler invocation,
78 | # we still have to create a dummy depfile, to avoid errors with the
79 | # Makefile "include basename.Plo" scheme.
80 | make_dummy_depfile ()
81 | {
82 | echo "#dummy" > "$depfile"
83 | }
84 |
85 | # Factor out some common post-processing of the generated depfile.
86 | # Requires the auxiliary global variable '$tmpdepfile' to be set.
87 | aix_post_process_depfile ()
88 | {
89 | # If the compiler actually managed to produce a dependency file,
90 | # post-process it.
91 | if test -f "$tmpdepfile"; then
92 | # Each line is of the form 'foo.o: dependency.h'.
93 | # Do two passes, one to just change these to
94 | # $object: dependency.h
95 | # and one to simply output
96 | # dependency.h:
97 | # which is needed to avoid the deleted-header problem.
98 | { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
99 | sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
100 | } > "$depfile"
101 | rm -f "$tmpdepfile"
102 | else
103 | make_dummy_depfile
104 | fi
105 | }
106 |
107 | # A tabulation character.
108 | tab=' '
109 | # A newline character.
110 | nl='
111 | '
112 | # Character ranges might be problematic outside the C locale.
113 | # These definitions help.
114 | upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
115 | lower=abcdefghijklmnopqrstuvwxyz
116 | digits=0123456789
117 | alpha=${upper}${lower}
118 |
119 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then
120 | echo "depcomp: Variables source, object and depmode must be set" 1>&2
121 | exit 1
122 | fi
123 |
124 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
125 | depfile=${depfile-`echo "$object" |
126 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
127 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
128 |
129 | rm -f "$tmpdepfile"
130 |
131 | # Avoid interferences from the environment.
132 | gccflag= dashmflag=
133 |
134 | # Some modes work just like other modes, but use different flags. We
135 | # parameterize here, but still list the modes in the big case below,
136 | # to make depend.m4 easier to write. Note that we *cannot* use a case
137 | # here, because this file can only contain one case statement.
138 | if test "$depmode" = hp; then
139 | # HP compiler uses -M and no extra arg.
140 | gccflag=-M
141 | depmode=gcc
142 | fi
143 |
144 | if test "$depmode" = dashXmstdout; then
145 | # This is just like dashmstdout with a different argument.
146 | dashmflag=-xM
147 | depmode=dashmstdout
148 | fi
149 |
150 | cygpath_u="cygpath -u -f -"
151 | if test "$depmode" = msvcmsys; then
152 | # This is just like msvisualcpp but w/o cygpath translation.
153 | # Just convert the backslash-escaped backslashes to single forward
154 | # slashes to satisfy depend.m4
155 | cygpath_u='sed s,\\\\,/,g'
156 | depmode=msvisualcpp
157 | fi
158 |
159 | if test "$depmode" = msvc7msys; then
160 | # This is just like msvc7 but w/o cygpath translation.
161 | # Just convert the backslash-escaped backslashes to single forward
162 | # slashes to satisfy depend.m4
163 | cygpath_u='sed s,\\\\,/,g'
164 | depmode=msvc7
165 | fi
166 |
167 | if test "$depmode" = xlc; then
168 | # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
169 | gccflag=-qmakedep=gcc,-MF
170 | depmode=gcc
171 | fi
172 |
173 | case "$depmode" in
174 | gcc3)
175 | ## gcc 3 implements dependency tracking that does exactly what
176 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
177 | ## it if -MD -MP comes after the -MF stuff. Hmm.
178 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
179 | ## the command line argument order; so add the flags where they
180 | ## appear in depend2.am. Note that the slowdown incurred here
181 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
182 | for arg
183 | do
184 | case $arg in
185 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
186 | *) set fnord "$@" "$arg" ;;
187 | esac
188 | shift # fnord
189 | shift # $arg
190 | done
191 | "$@"
192 | stat=$?
193 | if test $stat -ne 0; then
194 | rm -f "$tmpdepfile"
195 | exit $stat
196 | fi
197 | mv "$tmpdepfile" "$depfile"
198 | ;;
199 |
200 | gcc)
201 | ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
202 | ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
203 | ## (see the conditional assignment to $gccflag above).
204 | ## There are various ways to get dependency output from gcc. Here's
205 | ## why we pick this rather obscure method:
206 | ## - Don't want to use -MD because we'd like the dependencies to end
207 | ## up in a subdir. Having to rename by hand is ugly.
208 | ## (We might end up doing this anyway to support other compilers.)
209 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
210 | ## -MM, not -M (despite what the docs say). Also, it might not be
211 | ## supported by the other compilers which use the 'gcc' depmode.
212 | ## - Using -M directly means running the compiler twice (even worse
213 | ## than renaming).
214 | if test -z "$gccflag"; then
215 | gccflag=-MD,
216 | fi
217 | "$@" -Wp,"$gccflag$tmpdepfile"
218 | stat=$?
219 | if test $stat -ne 0; then
220 | rm -f "$tmpdepfile"
221 | exit $stat
222 | fi
223 | rm -f "$depfile"
224 | echo "$object : \\" > "$depfile"
225 | # The second -e expression handles DOS-style file names with drive
226 | # letters.
227 | sed -e 's/^[^:]*: / /' \
228 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
229 | ## This next piece of magic avoids the "deleted header file" problem.
230 | ## The problem is that when a header file which appears in a .P file
231 | ## is deleted, the dependency causes make to die (because there is
232 | ## typically no way to rebuild the header). We avoid this by adding
233 | ## dummy dependencies for each header file. Too bad gcc doesn't do
234 | ## this for us directly.
235 | ## Some versions of gcc put a space before the ':'. On the theory
236 | ## that the space means something, we add a space to the output as
237 | ## well. hp depmode also adds that space, but also prefixes the VPATH
238 | ## to the object. Take care to not repeat it in the output.
239 | ## Some versions of the HPUX 10.20 sed can't process this invocation
240 | ## correctly. Breaking it into two sed invocations is a workaround.
241 | tr ' ' "$nl" < "$tmpdepfile" \
242 | | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
243 | | sed -e 's/$/ :/' >> "$depfile"
244 | rm -f "$tmpdepfile"
245 | ;;
246 |
247 | hp)
248 | # This case exists only to let depend.m4 do its work. It works by
249 | # looking at the text of this script. This case will never be run,
250 | # since it is checked for above.
251 | exit 1
252 | ;;
253 |
254 | sgi)
255 | if test "$libtool" = yes; then
256 | "$@" "-Wp,-MDupdate,$tmpdepfile"
257 | else
258 | "$@" -MDupdate "$tmpdepfile"
259 | fi
260 | stat=$?
261 | if test $stat -ne 0; then
262 | rm -f "$tmpdepfile"
263 | exit $stat
264 | fi
265 | rm -f "$depfile"
266 |
267 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
268 | echo "$object : \\" > "$depfile"
269 | # Clip off the initial element (the dependent). Don't try to be
270 | # clever and replace this with sed code, as IRIX sed won't handle
271 | # lines with more than a fixed number of characters (4096 in
272 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
273 | # the IRIX cc adds comments like '#:fec' to the end of the
274 | # dependency line.
275 | tr ' ' "$nl" < "$tmpdepfile" \
276 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
277 | | tr "$nl" ' ' >> "$depfile"
278 | echo >> "$depfile"
279 | # The second pass generates a dummy entry for each header file.
280 | tr ' ' "$nl" < "$tmpdepfile" \
281 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
282 | >> "$depfile"
283 | else
284 | make_dummy_depfile
285 | fi
286 | rm -f "$tmpdepfile"
287 | ;;
288 |
289 | xlc)
290 | # This case exists only to let depend.m4 do its work. It works by
291 | # looking at the text of this script. This case will never be run,
292 | # since it is checked for above.
293 | exit 1
294 | ;;
295 |
296 | aix)
297 | # The C for AIX Compiler uses -M and outputs the dependencies
298 | # in a .u file. In older versions, this file always lives in the
299 | # current directory. Also, the AIX compiler puts '$object:' at the
300 | # start of each line; $object doesn't have directory information.
301 | # Version 6 uses the directory in both cases.
302 | set_dir_from "$object"
303 | set_base_from "$object"
304 | if test "$libtool" = yes; then
305 | tmpdepfile1=$dir$base.u
306 | tmpdepfile2=$base.u
307 | tmpdepfile3=$dir.libs/$base.u
308 | "$@" -Wc,-M
309 | else
310 | tmpdepfile1=$dir$base.u
311 | tmpdepfile2=$dir$base.u
312 | tmpdepfile3=$dir$base.u
313 | "$@" -M
314 | fi
315 | stat=$?
316 | if test $stat -ne 0; then
317 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
318 | exit $stat
319 | fi
320 |
321 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
322 | do
323 | test -f "$tmpdepfile" && break
324 | done
325 | aix_post_process_depfile
326 | ;;
327 |
328 | tcc)
329 | # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
330 | # FIXME: That version still under development at the moment of writing.
331 | # Make that this statement remains true also for stable, released
332 | # versions.
333 | # It will wrap lines (doesn't matter whether long or short) with a
334 | # trailing '\', as in:
335 | #
336 | # foo.o : \
337 | # foo.c \
338 | # foo.h \
339 | #
340 | # It will put a trailing '\' even on the last line, and will use leading
341 | # spaces rather than leading tabs (at least since its commit 0394caf7
342 | # "Emit spaces for -MD").
343 | "$@" -MD -MF "$tmpdepfile"
344 | stat=$?
345 | if test $stat -ne 0; then
346 | rm -f "$tmpdepfile"
347 | exit $stat
348 | fi
349 | rm -f "$depfile"
350 | # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
351 | # We have to change lines of the first kind to '$object: \'.
352 | sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
353 | # And for each line of the second kind, we have to emit a 'dep.h:'
354 | # dummy dependency, to avoid the deleted-header problem.
355 | sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
356 | rm -f "$tmpdepfile"
357 | ;;
358 |
359 | ## The order of this option in the case statement is important, since the
360 | ## shell code in configure will try each of these formats in the order
361 | ## listed in this file. A plain '-MD' option would be understood by many
362 | ## compilers, so we must ensure this comes after the gcc and icc options.
363 | pgcc)
364 | # Portland's C compiler understands '-MD'.
365 | # Will always output deps to 'file.d' where file is the root name of the
366 | # source file under compilation, even if file resides in a subdirectory.
367 | # The object file name does not affect the name of the '.d' file.
368 | # pgcc 10.2 will output
369 | # foo.o: sub/foo.c sub/foo.h
370 | # and will wrap long lines using '\' :
371 | # foo.o: sub/foo.c ... \
372 | # sub/foo.h ... \
373 | # ...
374 | set_dir_from "$object"
375 | # Use the source, not the object, to determine the base name, since
376 | # that's sadly what pgcc will do too.
377 | set_base_from "$source"
378 | tmpdepfile=$base.d
379 |
380 | # For projects that build the same source file twice into different object
381 | # files, the pgcc approach of using the *source* file root name can cause
382 | # problems in parallel builds. Use a locking strategy to avoid stomping on
383 | # the same $tmpdepfile.
384 | lockdir=$base.d-lock
385 | trap "
386 | echo '$0: caught signal, cleaning up...' >&2
387 | rmdir '$lockdir'
388 | exit 1
389 | " 1 2 13 15
390 | numtries=100
391 | i=$numtries
392 | while test $i -gt 0; do
393 | # mkdir is a portable test-and-set.
394 | if mkdir "$lockdir" 2>/dev/null; then
395 | # This process acquired the lock.
396 | "$@" -MD
397 | stat=$?
398 | # Release the lock.
399 | rmdir "$lockdir"
400 | break
401 | else
402 | # If the lock is being held by a different process, wait
403 | # until the winning process is done or we timeout.
404 | while test -d "$lockdir" && test $i -gt 0; do
405 | sleep 1
406 | i=`expr $i - 1`
407 | done
408 | fi
409 | i=`expr $i - 1`
410 | done
411 | trap - 1 2 13 15
412 | if test $i -le 0; then
413 | echo "$0: failed to acquire lock after $numtries attempts" >&2
414 | echo "$0: check lockdir '$lockdir'" >&2
415 | exit 1
416 | fi
417 |
418 | if test $stat -ne 0; then
419 | rm -f "$tmpdepfile"
420 | exit $stat
421 | fi
422 | rm -f "$depfile"
423 | # Each line is of the form `foo.o: dependent.h',
424 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
425 | # Do two passes, one to just change these to
426 | # `$object: dependent.h' and one to simply `dependent.h:'.
427 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
428 | # Some versions of the HPUX 10.20 sed can't process this invocation
429 | # correctly. Breaking it into two sed invocations is a workaround.
430 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
431 | | sed -e 's/$/ :/' >> "$depfile"
432 | rm -f "$tmpdepfile"
433 | ;;
434 |
435 | hp2)
436 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64
437 | # compilers, which have integrated preprocessors. The correct option
438 | # to use with these is +Maked; it writes dependencies to a file named
439 | # 'foo.d', which lands next to the object file, wherever that
440 | # happens to be.
441 | # Much of this is similar to the tru64 case; see comments there.
442 | set_dir_from "$object"
443 | set_base_from "$object"
444 | if test "$libtool" = yes; then
445 | tmpdepfile1=$dir$base.d
446 | tmpdepfile2=$dir.libs/$base.d
447 | "$@" -Wc,+Maked
448 | else
449 | tmpdepfile1=$dir$base.d
450 | tmpdepfile2=$dir$base.d
451 | "$@" +Maked
452 | fi
453 | stat=$?
454 | if test $stat -ne 0; then
455 | rm -f "$tmpdepfile1" "$tmpdepfile2"
456 | exit $stat
457 | fi
458 |
459 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
460 | do
461 | test -f "$tmpdepfile" && break
462 | done
463 | if test -f "$tmpdepfile"; then
464 | sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
465 | # Add 'dependent.h:' lines.
466 | sed -ne '2,${
467 | s/^ *//
468 | s/ \\*$//
469 | s/$/:/
470 | p
471 | }' "$tmpdepfile" >> "$depfile"
472 | else
473 | make_dummy_depfile
474 | fi
475 | rm -f "$tmpdepfile" "$tmpdepfile2"
476 | ;;
477 |
478 | tru64)
479 | # The Tru64 compiler uses -MD to generate dependencies as a side
480 | # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
481 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
482 | # dependencies in 'foo.d' instead, so we check for that too.
483 | # Subdirectories are respected.
484 | set_dir_from "$object"
485 | set_base_from "$object"
486 |
487 | if test "$libtool" = yes; then
488 | # Libtool generates 2 separate objects for the 2 libraries. These
489 | # two compilations output dependencies in $dir.libs/$base.o.d and
490 | # in $dir$base.o.d. We have to check for both files, because
491 | # one of the two compilations can be disabled. We should prefer
492 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
493 | # automatically cleaned when .libs/ is deleted, while ignoring
494 | # the former would cause a distcleancheck panic.
495 | tmpdepfile1=$dir$base.o.d # libtool 1.5
496 | tmpdepfile2=$dir.libs/$base.o.d # Likewise.
497 | tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
498 | "$@" -Wc,-MD
499 | else
500 | tmpdepfile1=$dir$base.d
501 | tmpdepfile2=$dir$base.d
502 | tmpdepfile3=$dir$base.d
503 | "$@" -MD
504 | fi
505 |
506 | stat=$?
507 | if test $stat -ne 0; then
508 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
509 | exit $stat
510 | fi
511 |
512 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
513 | do
514 | test -f "$tmpdepfile" && break
515 | done
516 | # Same post-processing that is required for AIX mode.
517 | aix_post_process_depfile
518 | ;;
519 |
520 | msvc7)
521 | if test "$libtool" = yes; then
522 | showIncludes=-Wc,-showIncludes
523 | else
524 | showIncludes=-showIncludes
525 | fi
526 | "$@" $showIncludes > "$tmpdepfile"
527 | stat=$?
528 | grep -v '^Note: including file: ' "$tmpdepfile"
529 | if test $stat -ne 0; then
530 | rm -f "$tmpdepfile"
531 | exit $stat
532 | fi
533 | rm -f "$depfile"
534 | echo "$object : \\" > "$depfile"
535 | # The first sed program below extracts the file names and escapes
536 | # backslashes for cygpath. The second sed program outputs the file
537 | # name when reading, but also accumulates all include files in the
538 | # hold buffer in order to output them again at the end. This only
539 | # works with sed implementations that can handle large buffers.
540 | sed < "$tmpdepfile" -n '
541 | /^Note: including file: *\(.*\)/ {
542 | s//\1/
543 | s/\\/\\\\/g
544 | p
545 | }' | $cygpath_u | sort -u | sed -n '
546 | s/ /\\ /g
547 | s/\(.*\)/'"$tab"'\1 \\/p
548 | s/.\(.*\) \\/\1:/
549 | H
550 | $ {
551 | s/.*/'"$tab"'/
552 | G
553 | p
554 | }' >> "$depfile"
555 | echo >> "$depfile" # make sure the fragment doesn't end with a backslash
556 | rm -f "$tmpdepfile"
557 | ;;
558 |
559 | msvc7msys)
560 | # This case exists only to let depend.m4 do its work. It works by
561 | # looking at the text of this script. This case will never be run,
562 | # since it is checked for above.
563 | exit 1
564 | ;;
565 |
566 | #nosideeffect)
567 | # This comment above is used by automake to tell side-effect
568 | # dependency tracking mechanisms from slower ones.
569 |
570 | dashmstdout)
571 | # Important note: in order to support this mode, a compiler *must*
572 | # always write the preprocessed file to stdout, regardless of -o.
573 | "$@" || exit $?
574 |
575 | # Remove the call to Libtool.
576 | if test "$libtool" = yes; then
577 | while test "X$1" != 'X--mode=compile'; do
578 | shift
579 | done
580 | shift
581 | fi
582 |
583 | # Remove '-o $object'.
584 | IFS=" "
585 | for arg
586 | do
587 | case $arg in
588 | -o)
589 | shift
590 | ;;
591 | $object)
592 | shift
593 | ;;
594 | *)
595 | set fnord "$@" "$arg"
596 | shift # fnord
597 | shift # $arg
598 | ;;
599 | esac
600 | done
601 |
602 | test -z "$dashmflag" && dashmflag=-M
603 | # Require at least two characters before searching for ':'
604 | # in the target name. This is to cope with DOS-style filenames:
605 | # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
606 | "$@" $dashmflag |
607 | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
608 | rm -f "$depfile"
609 | cat < "$tmpdepfile" > "$depfile"
610 | # Some versions of the HPUX 10.20 sed can't process this sed invocation
611 | # correctly. Breaking it into two sed invocations is a workaround.
612 | tr ' ' "$nl" < "$tmpdepfile" \
613 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
614 | | sed -e 's/$/ :/' >> "$depfile"
615 | rm -f "$tmpdepfile"
616 | ;;
617 |
618 | dashXmstdout)
619 | # This case only exists to satisfy depend.m4. It is never actually
620 | # run, as this mode is specially recognized in the preamble.
621 | exit 1
622 | ;;
623 |
624 | makedepend)
625 | "$@" || exit $?
626 | # Remove any Libtool call
627 | if test "$libtool" = yes; then
628 | while test "X$1" != 'X--mode=compile'; do
629 | shift
630 | done
631 | shift
632 | fi
633 | # X makedepend
634 | shift
635 | cleared=no eat=no
636 | for arg
637 | do
638 | case $cleared in
639 | no)
640 | set ""; shift
641 | cleared=yes ;;
642 | esac
643 | if test $eat = yes; then
644 | eat=no
645 | continue
646 | fi
647 | case "$arg" in
648 | -D*|-I*)
649 | set fnord "$@" "$arg"; shift ;;
650 | # Strip any option that makedepend may not understand. Remove
651 | # the object too, otherwise makedepend will parse it as a source file.
652 | -arch)
653 | eat=yes ;;
654 | -*|$object)
655 | ;;
656 | *)
657 | set fnord "$@" "$arg"; shift ;;
658 | esac
659 | done
660 | obj_suffix=`echo "$object" | sed 's/^.*\././'`
661 | touch "$tmpdepfile"
662 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
663 | rm -f "$depfile"
664 | # makedepend may prepend the VPATH from the source file name to the object.
665 | # No need to regex-escape $object, excess matching of '.' is harmless.
666 | sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
667 | # Some versions of the HPUX 10.20 sed can't process the last invocation
668 | # correctly. Breaking it into two sed invocations is a workaround.
669 | sed '1,2d' "$tmpdepfile" \
670 | | tr ' ' "$nl" \
671 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
672 | | sed -e 's/$/ :/' >> "$depfile"
673 | rm -f "$tmpdepfile" "$tmpdepfile".bak
674 | ;;
675 |
676 | cpp)
677 | # Important note: in order to support this mode, a compiler *must*
678 | # always write the preprocessed file to stdout.
679 | "$@" || exit $?
680 |
681 | # Remove the call to Libtool.
682 | if test "$libtool" = yes; then
683 | while test "X$1" != 'X--mode=compile'; do
684 | shift
685 | done
686 | shift
687 | fi
688 |
689 | # Remove '-o $object'.
690 | IFS=" "
691 | for arg
692 | do
693 | case $arg in
694 | -o)
695 | shift
696 | ;;
697 | $object)
698 | shift
699 | ;;
700 | *)
701 | set fnord "$@" "$arg"
702 | shift # fnord
703 | shift # $arg
704 | ;;
705 | esac
706 | done
707 |
708 | "$@" -E \
709 | | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
710 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
711 | | sed '$ s: \\$::' > "$tmpdepfile"
712 | rm -f "$depfile"
713 | echo "$object : \\" > "$depfile"
714 | cat < "$tmpdepfile" >> "$depfile"
715 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
716 | rm -f "$tmpdepfile"
717 | ;;
718 |
719 | msvisualcpp)
720 | # Important note: in order to support this mode, a compiler *must*
721 | # always write the preprocessed file to stdout.
722 | "$@" || exit $?
723 |
724 | # Remove the call to Libtool.
725 | if test "$libtool" = yes; then
726 | while test "X$1" != 'X--mode=compile'; do
727 | shift
728 | done
729 | shift
730 | fi
731 |
732 | IFS=" "
733 | for arg
734 | do
735 | case "$arg" in
736 | -o)
737 | shift
738 | ;;
739 | $object)
740 | shift
741 | ;;
742 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
743 | set fnord "$@"
744 | shift
745 | shift
746 | ;;
747 | *)
748 | set fnord "$@" "$arg"
749 | shift
750 | shift
751 | ;;
752 | esac
753 | done
754 | "$@" -E 2>/dev/null |
755 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
756 | rm -f "$depfile"
757 | echo "$object : \\" > "$depfile"
758 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
759 | echo "$tab" >> "$depfile"
760 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
761 | rm -f "$tmpdepfile"
762 | ;;
763 |
764 | msvcmsys)
765 | # This case exists only to let depend.m4 do its work. It works by
766 | # looking at the text of this script. This case will never be run,
767 | # since it is checked for above.
768 | exit 1
769 | ;;
770 |
771 | none)
772 | exec "$@"
773 | ;;
774 |
775 | *)
776 | echo "Unknown depmode $depmode" 1>&2
777 | exit 1
778 | ;;
779 | esac
780 |
781 | exit 0
782 |
783 | # Local Variables:
784 | # mode: shell-script
785 | # sh-indentation: 2
786 | # eval: (add-hook 'write-file-hooks 'time-stamp)
787 | # time-stamp-start: "scriptversion="
788 | # time-stamp-format: "%:y-%02m-%02d.%02H"
789 | # time-stamp-time-zone: "UTC"
790 | # time-stamp-end: "; # UTC"
791 | # End:
792 |
--------------------------------------------------------------------------------
/uberftp.1:
--------------------------------------------------------------------------------
1 | .\" @(#)uberftp.1c 1.34 90/02/15 SMI; from UCB 4.3
2 | .TH UBERFTP 1C "16 May 2008"
3 | .SH NAME
4 | uberftp \- GridFTP-enabled client
5 | .SH SYNOPSIS
6 | .B uberftp
7 | .RB [options]
8 | .RB [host
9 | .RB options]
10 | .RB [\fIhost\fR]
11 |
12 | .B uberftp
13 | .RB [options]
14 | .RB [host
15 | .RB options]
16 | .RB host
17 | \*(lq\fIcmd\fR\*(rq
18 |
19 | .B uberftp
20 | .RB [options]
21 | \fIsrcurl\fR
22 | \fIdsturl\fR
23 |
24 | .B uberftp
25 | .RB [options]
26 | .RB -f
27 | \fIurlfile\fR
28 |
29 | .B uberftp
30 | .RB [options]
31 | .RB -cmd
32 | \fIurl\fR
33 |
34 | .SH DESCRIPTION
35 | .IX "uberftp command" "" "\fLuberftp\fP \(em file transfer"
36 | .IX GridFTP grid files transfer
37 | .IX "file transfer protocol" "uberftp command" "" "\fLuberftp\fP command"
38 | .LP
39 | .B uberftp
40 | is a GridFTP-enabled client that supports both interactive use and
41 | FTP commands on the \fBuberftp\fR command line to transfer files between two
42 | computers. It is intended for use with computers that have a GridFTP
43 | server installed. \fBUberftp\fR supports GSI authentication, parallel data
44 | channels and striping. For more information about GridFTP, see the GridFTP
45 | URL in the "SEE ALSO" section below.
46 |
47 | Only the first usage shown above will create an interactive session. If
48 | \fIhost\fR is specified,
49 | .B uberftp
50 | immediately attempts to establish a connection to the
51 | .SM GridFTP
52 | server on
53 | \fIhost\fR,
54 | enters its command interpreter and awaits commands from the user. If
55 | \fIhost\fR is not specified,
56 | .B uberftp
57 | immediately drops into the command interpreter without connecting to any
58 | .SM GridFTP
59 | server.
60 |
61 | The second usage option denotes a non interactive session in which
62 | \*(lq\fIcmd\fR\*(rq
63 | is a series of one or more commands as described in the
64 | .B COMMANDS
65 | section below to run once the control connection is established. These
66 | commands are run exactly as if they had been entered from the interactive
67 | prompt. This list must be enclosed in quotes. Multiple commands
68 | are semicolon or comma delimited. uberftp will execute these commands and
69 | then exit.
70 | .B Uberftp
71 | will exit upon the first error encountered.
72 |
73 | The third and forth usage statements use the URL style format for specifying
74 | the source and destination for the files to transfer. The third usage statement
75 | places these URLs on the command line. The forth usage allows the user to
76 | specify multiple URL pairs in a separate file for
77 | .B Uberftp
78 | to transfer one at a time. The supported URL syntaxes are gsiftp://[user@]host[:port]/file,
79 | ftp://[user[:pass]@]host[:port]/file and file://path.
80 |
81 | The fifth usage statement allows for commands that take pathnames to accept
82 | URLs instead. The allowable commands are listed in the
83 | .B -cmds
84 | section below.
85 |
86 | .SH HOST OPTIONS
87 | .TP
88 | .B \-P \fIport\fR
89 | Connect to \fIport\fR instead of the default. The default for GSI
90 | authentication is 2811. The default for password authentication
91 | is 21.
92 | .TP
93 | .B \-u \fIuser\fR
94 | Connect as \fIuser\fR. This is useful for both password and GSI
95 | authentication mechanisms.
96 | .TP
97 | .B \-p \fIpass\fR
98 | Use \fIpass\fR when authenticating. If \fIpass\fR equals X, UberFTP will
99 | prompt for the password with character echoing turned off.
100 |
101 |
102 | .SH OPTIONS
103 | .TP
104 | .B \-active
105 | Use ACTIVE mode for data transfers.
106 | .TP
107 | .B \-ascii
108 | Use ASCII mode for data transfers.
109 | .TP
110 | .B \-binary
111 | Use BINARY mode for data transfers.
112 | .TP
113 | .B \-blksize \fIn\fR
114 | Set the internal buffer size to \fIn\fR.
115 | .TP
116 | .B \-cksum [\fIon\fR|\fIoff\fR]
117 | Enable/Disable CRC checks after file transfers.
118 | .TP
119 | .B \-cos \fIname\fR
120 | Set the storage class of service to \fIname\fR. Used with HPSS installations.
121 | Use the class of service name \fIdefault\fR to allow the remote
122 | server to decide which class of service to use.
123 | .TP
124 | .B \-d
125 | Enable debugging. Same as '-debug 3'. Deprecated.
126 | .TP
127 | .B \-debug \fIn\fR
128 | Set the debug level to \fIn\fR.
129 | .TP
130 | .B \-family \fIname\fR
131 | Set the storage family to \fIname\fR. Use the family name \fIdefault\fR to allow the remote
132 | server to decide which family to use.
133 | .TP
134 | .B \-glob [\fIon\fR|\fIoff\fR]
135 | Enable/Disable filename expansion.
136 | .TP
137 | .B \-hash
138 | Enable printing of hash marks during transfers.
139 | .TP
140 | .B \-keepalive \fIn\fR
141 | Send control channel keepalive messages every \fIn\fR seconds
142 | during data transfers.
143 | .TP
144 | .B \-mode [\fIE\fR|\fIS\fR]
145 | Switch the transfer mode to extended block (\fIE\fR) or
146 | streams mode (\fIS\fR).
147 | .TP
148 | .B \-parallel \fIn\fR
149 | Use \fIn\fR parallel data channels during extended block transfers.
150 | .TP
151 | .B \-passive
152 | Use PASSIVE mode for data transfers.
153 | .TP
154 | .B \-pbsz \fIn\fR
155 | Set the data protection buffer size to \fIn\fR n bytes.
156 | .TP
157 | .B \-prot [\fIC\fR|\fIS\fR|\fIE\fR|\fIP\fR]
158 | Set the data protection lelvel to clear (\fIC\fR), safe (\fIS\fR),
159 | confidential (\fIE\fR) or private (\fIP\fR).
160 | .TP
161 | .B \-retry \fIn\fR
162 | Retry commands that fail with transient errors \fIn\fR times.
163 | .TP
164 | .B \-resume \fIpath\fR
165 | Retry the recursive transfer starting at \fIpath\fR.
166 | .TP
167 | .B \-tcpbuf \fIn\fR
168 | Set the TCP read/write buffers to \fIn\fR bytes.
169 | .TP
170 | .B \-wait
171 | This will cause the client to wait for remote files to stage before
172 | attempting to transfer them.
173 | .TP
174 | .B \-v
175 | Print UberFTP version information and exit.
176 | .TP
177 | .B \-version
178 | Print UberFTP version information and exit.
179 | .TP
180 | .B \-versions
181 | Print version information about all used globus modules and exit.
182 |
183 | .SH Supported \-cmds
184 | .TP
185 | .B \-cat \fIurl\fR
186 | Print to stdout the contents of the remote file.
187 | .TP
188 | .B \-chgrp [\fI-r\fR] \fIgroup\fR \fIurl\fR
189 | Set the group ownership of the remote object(s).
190 | .TP
191 | .B \-chmod [\fI-r\fR] \fIperms\fR \fIurl\fR
192 | Set the permissions of the remote object(s).
193 | .TP
194 | .B \-dir [\fI-r\fR] \fIurl\fR
195 | List the contents of the remote object.
196 | .TP
197 | .B \-link \fIurl\fR \fIpath\fR
198 | Create a hardlink named to the remote object.
199 | .TP
200 | .B \-ls [\fI-r\fR] \fIurl\fR
201 | List the contents of the remote object.
202 | .TP
203 | .B \-mkdir \fIurl\fR
204 | Create the remote directory.
205 | .TP
206 | .B \-rename \fIurl\fR \fIpath\fR
207 | Rename the remote object to the given path.
208 | .TP
209 | .B \-rm [\fI-r\fR] \fIurl\fR
210 | Remove the remote object(s).
211 | .TP
212 | .B \-rmdir \fIurl\fR
213 | Remove the remote directory.
214 | .TP
215 | .B \-size \fIurl\fR
216 | Return the size of the remote object.
217 | .TP
218 | .B \-stage [\fI-r\fR] \fIseconds\fR \fIurl\fR
219 | Attempt to stage the remote object(s) over the time
220 | period given in seconds.
221 | .TP
222 | .B \-symlink \fIurl\fR \fIpath\fR
223 | Create a symlink named to the remote object.
224 |
225 | .SH DEFAULT TRANSFER MODE
226 | .LP
227 | By default, without any special environment variables, command line options
228 | or commands, \fBuberftp\fR will transfer files in PASSIVE STREAMS mode.
229 | PASSIVE means that the client will initiate the data connection which is
230 | useful for users behind firewalls. STREAMS mode implies that GRIDFTP features
231 | including striping and parallel data connections are not used. In order to
232 | take advantage of these features with GridFTP capable servers, you must either
233 | change the mode directly using \-m command line switch or the
234 | .B mode
235 | interactive command, or you can change the mode indirectly by specifying
236 | more than one parallel data connection using the \-c command line switch or
237 | by using the
238 | .B parallel
239 | interactive command.
240 |
241 | .SH GETTING YOUR GSI PROXY
242 | .LP
243 | .B By default, \fBuberftp\fR requires a GSI certificate. If you do not
244 | already have a certificate, see the following web page to learn how to get one:
245 |
246 | http://www.ncsa.uiuc.edu/UserInfo/Grid/Security/GetUserCert.html
247 |
248 | Once you have a certificate, use the \fBgrid-proxy-init\fR command to get
249 | a valid proxy.
250 |
251 | .SH COMMANDS
252 | .TP
253 | .B ! [\fIcommand\fR]
254 | Run the command using a shell on the local machine. If no command is given,
255 | invoke an interactive shell.
256 | .TP
257 | .B ? [\fIcommand\fR]
258 | If \fIcommand\fR is given, print a (hopefully) helpful blurb about it.
259 | Otherwise, list all commands.
260 | .TP
261 | .B active
262 | Change to ACTIVE mode which causes the server to initiate the data
263 | connection. The default is PASSIVE mode unless the variable
264 | UBERFTP_ACTIVE_MODE is set in the environment. If you are behind a
265 | firewall you must use PASSIVE mode.
266 | .TP
267 | .B ascii
268 | Change the data transfer type to ASCII which causes the server to do some
269 | simple transformations to the file being transferred. This is mostly useful
270 | for changing EOL (end of line) in text files when moving between platforms.
271 | This option is almost never necessary today. The default is BINARY mode
272 | also known as IMAGE mode.
273 | .TP
274 | .B binary
275 | Change the data transfer type to BINARY (aka IMAGE) which causes the server
276 | to not perform transformations to the file being transferred. This is the
277 | default and is faster than an ASCII transfer.
278 | .TP
279 | .B blksize \fIsize\fR
280 | Change the size of the memory buffer used to read and write data to disks
281 | to \fIsize\fR bytes. The default block size is 1024*1024 (1048576) bytes but it can be changed at compile time. The
282 | block size can be increased to improve file transfer performance. This is
283 | not related to the extended block mode block size used to determine the
284 | ratio of data to header for data transferred on the data channel.
285 | .TP
286 | .B bugs
287 | Prints information regarding bug reporting and feature requests.
288 | .TP
289 | .B bye
290 | Close all control and data connections and exit.
291 | .TP
292 | .B cat \fIfile1\fR [\fIfile2\fR ... \fIfilen\fR]
293 | Print the contents of the remote file(s) to stdout.
294 | .TP
295 | .B cdup
296 | Change the remote working directory up one level.
297 | .TP
298 | .B cd [\fIdir\fR]
299 | Change the remote working directory to \fIdir\fR. If \fIdir\fR is not given,
300 | the client will make every attempt to change to the user's home directory.
301 | '~' expansion and '-' previous directory are supported.
302 |
303 | .TP
304 | .B chgrp [\fI-r\fR] \fIgroup\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
305 | Change group ownership on the remote object(s).
306 | .br
307 | \fI-r\fR Recursively chgrp everything in the given directory.
308 |
309 | .TP
310 | .B chmod [\fI-r\fR] \fIperms\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
311 | Change permissions on the remote object(s).
312 | .br
313 | \fI-r\fR Recursively chmod everything in the given directory.
314 | .TP
315 | .B close
316 | Close the control connection to the remote host.
317 | .TP
318 | .B cksum [\fIon\fR|\fIoff\fR]
319 | Enable file cksum comparison after each file transfer. This only works with
320 | NCSA's mass storage system.
321 | .br
322 | \fIon\fR Enable checksum comparison
323 | .br
324 | \fIoff\fR Disable checksum comparison
325 | .TP
326 | .B cos \fIname\fR
327 | Sets the HPSS class of service to \fIname\fR on the FTP service if the service
328 | supports it. If \fIname\fR is omitted, the current class of service is printed.
329 | Use the class of service name \fIdefault\fR to allow the remote
330 | server to decide which class of service to use.
331 | .TP
332 | .B dcau [\fIN\fR|\fIA\fR|\fIS\fR \fIsubject\fR]
333 | Change the data channel authentication settings. If the service does not
334 | support DCAU, these settings are ignored.
335 | .br
336 | \fIN\fR Disabled dcau.
337 | .br
338 | \fIA\fR Expect the remote identity to be mine. (Default)
339 | .br
340 | \fIS\fR \fIsubject\fR Expect the remote identity to be \fIsubject\fR.
341 | .TP
342 | .B debug [\fI0-3\fR]
343 | Turn debug statements on/off. If no value is given, this command will
344 | toggle between debug(2) and non debug(1) mode. Otherwise the debug level
345 | is set to the given level.
346 | .br
347 | 0 Only errors are printed
348 | .br
349 | 1 Default. Errors and some helpful messages are printed
350 | .br
351 | 2 Print useful control channel information
352 | .br
353 | 3 Print all information
354 | .TP
355 | .B family \fIname\fR
356 | Sets the tape family to \fIname\fR on the FTP service if the service
357 | supports it. If \fIname\fR is omitted, the current family is printed.
358 | Use the family name \fIdefault\fR to allow the remote
359 | server to decide which family to use.
360 | .TP
361 | .B glob [\fIon\fR|\fIoff\fR]
362 | Enable or disable filename globbing. If no option is given, this command
363 | will toggle the current setting.
364 | .br
365 | \fIon\fR Enable filename globbing
366 | .br
367 | \fIoff\fR Disable filename globbing
368 | .TP
369 | .B dir [\fI-r\fR] [\fItarget\fR]
370 | List the contents of the remote target directory. If \fItarget\fR is not given,
371 | then the current working directory is used.
372 | .br
373 | \fI-r\fR Recursively list \fItarget\fR.
374 | .br
375 | \fItarget\fR Directory or file to list. '.' is used by default.
376 | .TP
377 | .B get [\fI-r\fR] \fIsource\fR [\fIdestination\fR]
378 | Retrieve file(s) from the remote service. If \fIsource\fR implies multiple
379 | transfers, either through regular expressions or by using the recursive
380 | feature, then \fIdestination\fR must be a directory. If \fIdestination\fR is not
381 | specified, \fIsource\fR is used.
382 | .br
383 | \fI-r\fR Recursively transfer the given directory.
384 | .TP
385 | .B hash
386 | Print hash marks during data transfers. This does not work during third
387 | party transfers.
388 | .TP
389 | .B help [\fIcommand\fR]
390 | If \fIcommand\fR is given, print a helpful blurb about \fIcommand\fR.
391 | Otherwise, list all commands.
392 | .TP
393 | .B keepalive [\fIseconds\fR]
394 | Attempts to keep the control channel from being blocked by firewalls during
395 | long data channel operations. UberFTP sends a NOOP command to the service
396 | at intervals equal to the specified number of \fIseconds\fR. Setting it to zero
397 | will disable keepalive. If \fIseconds\fR are not given, the current timeout is
398 | displayed. This feature is disabled by default.
399 | .br
400 | seconds number of seconds between NOOPs. Disabled if zero.
401 | .TP
402 | .B lcat \fIfile1\fR [\fIfile2\fR ... \fIfilen\fR]
403 | Print the contents of the local file(s) to stdout.
404 | .TP
405 | .B lcd [\fIdir\fR]
406 | Change the local working directory to \fIdir\fR. If \fIdir\fR is not given,
407 | the client will make every attempt to change to the user's home directory.
408 | '~' expansion and '-' previous directory are supported.
409 | .TP
410 | .B lcdup
411 | Change the local working directory up one level.
412 | .TP
413 | .B lchgrp [\fI-r\fR] \fIgroup\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
414 | Change group ownership on the local object(s).
415 | .br
416 | \fI-r\fR Recursively chgrp everything in the given directory.
417 |
418 | .TP
419 | .B lchmod [\fI-r\fR] \fIperms\fR \fIobject\fR [\fIobject2\fR ... \fIobjectn\fR]
420 | Change permissions on the local object(s).
421 | .br
422 | \fI-r\fR Recursively chmod everything in the given directory.
423 | .TP
424 | .B lclose
425 | Close the control connection to the local host.
426 | .TP
427 | .B ldir [\fI-r\fR] [\fItarget\fR]
428 | List the contents of the local \fItarget\fR directory. If \fItarget\fR is not given,
429 | then the current working directory is used.
430 | .br
431 | \fI-r\fR Recursively list \fItarget\fR.
432 | .br
433 | target Directory or file to list. '.' is used by default.
434 | .TP
435 | .B link [\fIoldfile\fR] [\fInewfile\fR]
436 | Create a hardlink to oldfile named newfile on the remote service.
437 | .TP
438 | .B llink [\fIoldfile\fR] [\fInewfile\fR]
439 | Create a hardlink to oldfile named newfile on the local service.
440 | .TP
441 | .B lls [\fI-r\fR] [\fItarget\fR]
442 | List the contents of the local \fItarget\fR directory. If \fItarget\fR is not given,
443 | then the current working directory is used.
444 | .br
445 | \fI-r\fR Recursively list \fItarget\fR.
446 | .br
447 | target Directory or file to list. '.' is used by default.
448 | .TP
449 | .B llscos
450 | List the available class of services on the local server (HPSS only).
451 | .TP
452 | .B llsfam
453 | List the available tape families on the local server (HPSS only).
454 | .TP
455 | .B lmkdir \fIdir1\fR [\fIdir2\fR ... \fIdirn\fR]
456 | Create the local directory(ies).
457 | .TP
458 | .B lopen [\fI-P port\fR] [\fI-u user\fR] [\fI-p pass\fR | \fIX\fR] \fIhost\fR
459 | Opens a control channel to \fIhost\fR and that host becomes the 'local' machine.
460 | After using lopen, all local (l*) commands perform their respective
461 | operations on \fIhost\fR rather than the local machine. This is how third
462 | party transfers are accomplished. GSI authentication is used unless the
463 | \fI-p\fR option is used.
464 | .br
465 | \fI-P port\fR Connect to port (Default 2811 for GSI, 21 for password).
466 | .br
467 | \fI-u user\fR Connect as alternate user.
468 | .br
469 | \fI-p pass\fR | \fIX\fR
470 | .br
471 | Use password \fIpass\fR when authenticating with \fIhost\fR.
472 | .br
473 | If \fIpass\fR equals \fIX\fR, read the password from STDIN with
474 | .br
475 | character echoing turned off.
476 | .br
477 | \fIhost\fR Connect to \fIhost\fR.
478 | .TP
479 | .B lpwd
480 | Prints the current local working directory.
481 | .TP
482 | .B lrename \fIsrc\fR \fIdst\fR
483 | Rename the local object \fIsrc\fR to \fIdst\fR.
484 | .TP
485 | .B lrm [\fI-r\fR] \fIobject1\fR [\fIobject1\fR...\fIobjectn\fR]
486 | Removes the local file system object(s).
487 | .br
488 | \fI-r\fR Recursively remove the given directory.
489 | .TP
490 | .B lrmdir \fIdir1\fR [\fIdir2\fR...\fIdirn\fR]
491 | Removes the given directories from the local service.
492 | .TP
493 | .B lquote \fIcmd\fR
494 | Pass \fIcmd\fR to the local FTP service. This allows the user to use
495 | server-specific commands that are not available through the uberftp
496 | interface.
497 | .TP
498 | .B ls [\fI-r\fR] [\fItarget\fR]
499 | List the contents of the remote target directory. If [\fItarget\fR] is not given,
500 | then the current working directory is used.
501 | .br
502 | \fI-r\fR Recursively list \fItarget\fR.
503 | .br
504 | \fItarget\fR Directory or file to list. '.' is used by default.
505 | .TP
506 | .B lscos
507 | List the available class of services on the remote server (HPSS only).
508 | .TP
509 | .B lsfam
510 | List the available tape families on the remote server (HPSS only).
511 | .TP
512 | .B lsize \fIfile1\fR [\fIfile2\fR...\fIfilen\fR]
513 | Prints the size of the given object(s).
514 | .TP
515 | .B lstage [\fI-r\fR] \fIseconds\fR \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
516 | Attempt to stage all matching files within the given number of \fIseconds\fR
517 | on the local service.
518 | .br
519 | seconds number of seconds to attempt staging
520 | .br
521 | \fI-r\fR Recursively stage all files in the given subdirectory.
522 | .TP
523 | .B lsymlink [\fIoldfile\fR] [\fInewfile\fR]
524 | Create a symlink to oldfile named newfile on the local service.
525 | .TP
526 | .B mput [\fI-r\fR] \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
527 | Retrieve file(s) from the remote service. This is similiar to making
528 | multiple calls to get without specifying a destination.
529 | .br
530 | \fI-r\fR Recursively transfer the given directory.
531 | .TP
532 | .B mkdir \fIdir\fR
533 | Create the remote directory.
534 | .TP
535 | .B mode [\fIE\fR|\fIS\fR]
536 | Toggle the data transfer mode between Streams mode and Extended Block
537 | mode. The default is Streams mode. If no option is given, it will
538 | display the current mode.
539 | .br
540 | E Extended block mode
541 | .br
542 | S Streams mode
543 | .TP
544 | .B mput [\fI-r\fR] \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
545 | Store file(s) to the remote service. This is similiar to making
546 | multiple calls to put without specifying a destination.
547 | .br
548 | \fI-r\fR Recursively transfer the given directory.
549 | .TP
550 | .B open [\fI-P port\fR] [\fI-u user\fR] [\fI-p pass\fR | \fIX\fR] \fIhost\fR
551 | Opens a control channel to \fIhost\fR and that host becomes the 'remote'
552 | machine. GSI authentication is used unless the -p option is used.
553 | .br
554 | \fI-P port\fR Connect to \fIport\fR (Default 2811 for GSI, 21 for password).
555 | .br
556 | \fI-u user\fR Connect as \fIuser\fR.
557 | .br
558 | \fI-p pass\fR | \fIX\fR
559 | .br
560 | Use password \fIpass\fR when authenticating with \fIhost\fR.
561 | .br
562 | If \fIpass\fR equals \fIX\fR, read the password from STDIN with
563 | .br
564 | character echoing turned off.
565 | .br
566 | \fIhost\fR Connect to \fIhost\fR.
567 | .TP
568 | .B order [\fItype\fR]
569 | Changes the order of lists returned from ls and lls to the given scheme.
570 | If \fItype\fR is not given, the current order is displayed.
571 | .br
572 | \fItype\fR Ordering scheme to use. Value options are:
573 | .br
574 | none Do not order listings
575 | .br
576 | name Order listings by name
577 | .br
578 | size Order listings by size
579 | .br
580 | type Order listings by type
581 | .TP
582 | .B parallel [\fInumber\fR]
583 | Set the number of parallel data connections to \fInumber\fR. This is only
584 | useful for extended block mode transfers. The default number of data
585 | connections is one. If no number is given, the current setting for the
586 | number of parallel connects is printed.
587 | .TP
588 | .B passive
589 | Change to PASSIVE mode which causes the client to initiate the data
590 | connection. This is the default mode unless the variable
591 | UBERFTP_ACTIVE_MODE is set in the environment. If you are behind a
592 | firewall you must use PASSIVE mode.
593 | .TP
594 | .B pbsz [\fIsize\fR]
595 | Change the length of the protection buffer. The protection buffer is used
596 | to encrypt data on the data channel. The length of the protection buffer
597 | represents the largest encoded message that is allowed on the data channel.
598 | By default, the protection buffer is grown to match the internal buffer
599 | used. For efficient transfers, pbsz should be sufficiently larger than
600 | blksize so that the wrapped buffer fits within the protection buffer.
601 | Otherwise, the blksize buffer is broken into multiple pieces so that each
602 | write is less than pbsz when wrapped. If \fIpbsz\fR is not given, the
603 | current size is displayed.
604 | .br
605 | \fIsize\fR length of protection buffer. 0 will set it to its default.
606 | .TP
607 | .B pget \fIoffset\fR \fIsize\fR \fIsrcfile\fR [\fIdestfile\fR]
608 | Retrieve only the specified portion of the file(s). If srcfile is a regular
609 | expression and expands to multiple files, and destination is given,
610 | destination must refer to a directory.
611 | .br
612 | \fIoffset\fR Offset within the file
613 | .br
614 | \fIsize\fR Amount of data to retrieve
615 | .br
616 | \fIsrcfile\fR Name of remote file
617 | .br
618 | \fIdestfile\fR Name of local file. srcfile is used if destfile
619 | .br
620 | is not specified
621 | .TP
622 | .B pput \fIoffset\fR \fIsize\fR \fIsrcfile\fR [\fIdestfile\fR]
623 | Store only the specified portion of the file(s). If srcfile is a regular
624 | expression and expands to multiple files, and destination is given,
625 | destination must refer to a directory.
626 | .br
627 | \fIoffset\fR Offset within the file
628 | .br
629 | \fIsize\fR Amount of data to retrieve
630 | .br
631 | \fIsrcfile\fR Name of local file
632 | .br
633 | \fIdestfile\fR Name of remote file. srcfile is used if destfile
634 | .br
635 | is not specified
636 | .TP
637 | .B prot [\fIC\fR|\fIS\fR|\fIE\fR|\fIP\fR]
638 | This command configures the level of security on the data channel after
639 | data channel authentication has completed. Clear means that the data will
640 | not be protected. Safe means that the data will be integrity protected
641 | meaning that altered data will be detected. Confidential means that the data
642 | will be unreadable to third parties. Private mode means the data will be
643 | confidential and safe.
644 | .br
645 | \fIC\fR Set protection level to clear.
646 | .br
647 | \fIS\fR Set protection level to safe.
648 | .br
649 | \fIE\fR Set protection level to confidential.
650 | .br
651 | \fIP\fR Set protection level to private.
652 | .TP
653 | .B put [\fI-r\fR] \fIsource\fR [\fIdestination\fR]
654 | Store file(s) to the remote service. If \fIsource\fR implies multiple
655 | transfers, either through regular expressions or by using the recursive
656 | feature, then \fIdestination\fR must be a directory. If \fIdestination\fR is not
657 | specified, \fIsource\fR is used.
658 | .br
659 | \fI-r\fR Recursively transfer the given directory.
660 | .TP
661 | .B pwd
662 | Prints the current working directory.
663 | .TP
664 | .B quit
665 | Close all control and data connections and exit.
666 | .TP
667 | .B quote \fIcmd\fR
668 | Pass \fIcmd\fR to the remote FTP service. This allows the user to use
669 | server-specific commands that are not available through the uberftp
670 | interface.
671 | .TP
672 | .B rename \fIsrc\fR \fIdst\fR
673 | Rename the remote object \fIsrc\fR to \fIdst\fR.
674 | .TP
675 | .B retry [\fIcnt\fR]
676 | Configures retry on failed commands that have transient errors. \fIcnt\fR
677 | represents the number of times a failed command is retried. A value of
678 | zero effectively disables retry. Zero is the default. If no value is given
679 | the current setting is displayed.
680 | .br
681 | \fIcnt\fR Number of times a failed command is retried.
682 | .TP
683 | .B resume [\fI-d\fR] \fIpath\fR
684 | Sets a restart point for recursive transfers. If a long recursive transfer
685 | fails, you can set resume to the path that failed and UberFTP will skip
686 | all file and directory creations up to the given path.
687 | .br
688 | \fIpath\fR Path to resume transfer at. If \fIpath\fR is not given, print the current
689 | .br
690 | resume target.
691 | .br
692 | \fI-d\fR Remove the current resume path.
693 | .TP
694 | .B rm [\fI-r\fR] \fIobject1\fR [\fIobject1\fR...\fIobjectn\fR]
695 | Removes the remote file system object(s).
696 | .br
697 | \fI-r\fR Recursively remove the given directory.
698 | .TP
699 | .B rmdir \fIdir1\fR [\fIdir2\fR...\fIdirn\fR]
700 | Removes the given directories from the remote service.
701 | .TP
702 | .B runique
703 | Toggles the client to store files using unique names during put operations.
704 | .TP
705 | .B size \fIfile1\fR [\fIfile2\fR...\fIfilen\fR]
706 | Prints the size of the given object(s).
707 | .TP
708 | .B stage [\fI-r\fR] \fIseconds\fR \fIobject1\fR [\fIobject2\fR...\fIobjectn\fR]
709 | Attempt to stage all matching files within the given number of seconds
710 | on the remote service.
711 | .br
712 | \fIseconds\fR number of seconds to attempt staging
713 | .br
714 | \fI-r\fR Recursively stage all files in the given subdirectory.
715 | .TP
716 | .B sunique
717 | Toggles the client to store files using unique names during get operations.
718 | .TP
719 | .B symlink [\fIoldfile\fR] [\fInewfile\fR]
720 | Create a symlink to oldfile named newfile on the remote service.
721 | .TP
722 | .B tcpbuf [\fIsize\fR]
723 | Set the data channel TCP buffer size to \fIsize\fR bytes. If \fIsize\fR is not
724 | given, the current TCP buffer size will be printed.
725 | .TP
726 | .B versions
727 | Prints the versions of all Globus modules being used.
728 | .TP
729 | .B wait
730 | Toggles whether the client should wait for files to stage before attempting
731 | to retrieve them.
732 |
733 |
734 | .SH IMPROVING FILE TRANSFER PERFORMANCE
735 | .LP
736 | Use the \fBactive\fR command to enable \fIactive\fR mode FTP when
737 | using NCSA's UniTree mass storage system if possible since it
738 | will give much better file transfer performance.
739 | When tranferring files over long distances, use a large value (for example,
740 | 16777216) for \fBtcpbuf\fR.
741 | When there is high network traffic, you may be able to improve
742 | performance using the \fBparallel\fR command to increase the number of
743 | parallel data connections to 2-4.
744 | .SH THIRD-PARTY TRANSFERS
745 | .LP
746 | In order to perform a third-party transfer, you must log into two
747 | \fBFTP\fR servers. Typically, you connect to a single \fBFTP\fR service to
748 | "get" files to the local machine and "put" files to the remote service.
749 | For third-party transfers, you must connect to a second service
750 | thereby replacing the former local machine. In \fBUberFTP\fR terminology,
751 | it is referred to as "opening a new local service" since, from
752 | the perspective of the user, the new local service will appear
753 | as though the user initiated the FTP session from that machine.
754 |
755 | All remote service commands have "l*" counterparts that allow you
756 | to specify that the command is to be performed on the local service,
757 | whether that service is the local machine or a new local service.
758 | So to open a new local service, use the "l*" version of the open command:
759 |
760 | UberFTP> lopen mss.ncsa.teragrid.org
761 | UberFTP> lclose
762 |
763 | Once you have connected to both services, files can be transferred as
764 | before with the change that files you "get" go to the new local service
765 | and files you "put" are sent from the new local service.
766 | .SH CONTROLLING EPHEMERAL PORT SELECTION
767 | .LP
768 | By default, local port selection is managed by the operating system. However,
769 | you may wish to specify which ports UberFTP should use for incoming and
770 | out going connections. This is useful when dealing with firewalls.
771 |
772 | Setting UBERFTP_TCP_PORT_RANGE in your environment will cause all inbound
773 | connections to use the specified port range. Likewise, setting
774 | UBERFTP_TCP_SOURCE_RANGE in your environment will cause all outbound connections
775 | to use the specified port range.
776 |
777 | The environment variables GLOBUS_TCP_PORT_RANGE and GLOBUS_TCP_SOURCE_RANGE
778 | will also control the ephemeral port selection. These variables behave exactly
779 | as their UBERFTP counterparts and are available for backwards compatibility with
780 | older versions. The UBERFTP variables take precedence over the GLOBUS variables.
781 |
782 | The values of the variables specify a port range, a minimum port number and a
783 | maximum port number, separated by either a comma or a space. For example, to
784 | set the inbound port range, you would set:
785 |
786 | UBERFTP_TCP_PORT_RANGE=40000,50000
787 |
788 | Using the space delimiter, this format is also acceptable:
789 |
790 | UBERFTP_TCP_PORT_RANGE="40000 50000"
791 |
792 | See your shell documentation for the proper syntax for settings variables within
793 | your environment.
794 |
795 | Setting the ephemeral port range to an unusable range will cause UberFTP connections
796 | to fail. For instance, setting a port range from 10 to 100 with a non root process will
797 | fail on most operating systems.
798 |
799 | .SH EXIT VALUES
800 | .LP
801 | UberFTP will exit with a value of 0 if no errors occurred during the session,
802 | otherwise it will exit with a value of 1. In non interactive, commandline mode,
803 | it will exit after the first error occurs.
804 | .SH EXAMPLES
805 | .LP
806 | Set the environment variable to set \fIactive\fR mode FTP
807 | (improves file transfer performance to the mass storage system).
808 | Connect to NCSA's UniTree mass storage system interactively from
809 | NCSA's TeraGrid cluster:
810 |
811 | setenv UBERFTP_ACTIVE_MODE on
812 | % uberftp mss.ncsa.teragrid.org
813 | ...
814 | 220 UNIX Archive FTP server ready.
815 | 230 User consult logged in.
816 | UberFTP>
817 |
818 | Use the command-line interface to copy a file from NCSA's TeraGrid cluster
819 | to the UniTree mass storage system. (There is no need to set
820 | \fBtcpbuf\fR since it is over a LAN but \fIactive\fR mode is turned on
821 | to improve file transfer performance to the mass storage system.):
822 |
823 | uberftp mss.ncsa.teragrid.org \\
824 | "active; cd work; get file.tar"
825 |
826 | Copy a file from SDSC's TeraGrid cluster to NCSA's TeraGrid cluster.
827 | (Note that \fBtcpbuf\fR is set to 16777216 since there is a long
828 | network latency between NCSA and SDSC):
829 |
830 | uberftp tg-gridftp.sdsc.teragrid.org \\
831 | "tcpbuf 16777216; cd scr; put file.tar"
832 | .SH "SEE ALSO"
833 | .BR mssftp (1),
834 | .BR msscmd (1),
835 | .BR ftp (1),
836 | .br
837 | GridFTP:
838 | .br
839 | http://www.globus.org/datagrid/gridftp.html
840 | .br
841 | TCP Window Size:
842 | .br
843 | http://dast.nlanr.net/Articles/GettingStarted/TCP_window_size.html
844 | .br
845 | Active vs. Passive FTP:
846 | .br
847 | http://slacksite.com/other/ftp.html
848 |
849 | \fBNote: The links above are not under NCSA's control
850 | so they may become obsolete.\fR
851 |
852 |
--------------------------------------------------------------------------------
/aclocal.m4:
--------------------------------------------------------------------------------
1 | # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2 |
3 | # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4 |
5 | # This file is free software; the Free Software Foundation
6 | # gives unlimited permission to copy and/or distribute it,
7 | # with or without modifications, as long as this notice is preserved.
8 |
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 | # PARTICULAR PURPOSE.
13 |
14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 | m4_ifndef([AC_AUTOCONF_VERSION],
16 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 | [m4_warning([this file was generated for autoconf 2.69.
19 | You have another version of autoconf. It may work, but is not guaranteed to.
20 | If you have problems, you may need to regenerate the build system entirely.
21 | To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22 |
23 | # Copyright (C) 2002-2013 Free Software Foundation, Inc.
24 | #
25 | # This file is free software; the Free Software Foundation
26 | # gives unlimited permission to copy and/or distribute it,
27 | # with or without modifications, as long as this notice is preserved.
28 |
29 | # AM_AUTOMAKE_VERSION(VERSION)
30 | # ----------------------------
31 | # Automake X.Y traces this macro to ensure aclocal.m4 has been
32 | # generated from the m4 files accompanying Automake X.Y.
33 | # (This private macro should not be called outside this file.)
34 | AC_DEFUN([AM_AUTOMAKE_VERSION],
35 | [am__api_version='1.13'
36 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37 | dnl require some minimum version. Point them to the right macro.
38 | m4_if([$1], [1.13.4], [],
39 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40 | ])
41 |
42 | # _AM_AUTOCONF_VERSION(VERSION)
43 | # -----------------------------
44 | # aclocal traces this macro to find the Autoconf version.
45 | # This is a private macro too. Using m4_define simplifies
46 | # the logic in aclocal, which can simply ignore this definition.
47 | m4_define([_AM_AUTOCONF_VERSION], [])
48 |
49 | # AM_SET_CURRENT_AUTOMAKE_VERSION
50 | # -------------------------------
51 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54 | [AM_AUTOMAKE_VERSION([1.13.4])dnl
55 | m4_ifndef([AC_AUTOCONF_VERSION],
56 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58 |
59 | # AM_AUX_DIR_EXPAND -*- Autoconf -*-
60 |
61 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
62 | #
63 | # This file is free software; the Free Software Foundation
64 | # gives unlimited permission to copy and/or distribute it,
65 | # with or without modifications, as long as this notice is preserved.
66 |
67 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68 | # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69 | # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70 | #
71 | # Of course, Automake must honor this variable whenever it calls a
72 | # tool from the auxiliary directory. The problem is that $srcdir (and
73 | # therefore $ac_aux_dir as well) can be either absolute or relative,
74 | # depending on how configure is run. This is pretty annoying, since
75 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top
76 | # source directory, any form will work fine, but in subdirectories a
77 | # relative path needs to be adjusted first.
78 | #
79 | # $ac_aux_dir/missing
80 | # fails when called from a subdirectory if $ac_aux_dir is relative
81 | # $top_srcdir/$ac_aux_dir/missing
82 | # fails if $ac_aux_dir is absolute,
83 | # fails when called from a subdirectory in a VPATH build with
84 | # a relative $ac_aux_dir
85 | #
86 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87 | # are both prefixed by $srcdir. In an in-source build this is usually
88 | # harmless because $srcdir is '.', but things will broke when you
89 | # start a VPATH build or use an absolute $srcdir.
90 | #
91 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
93 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94 | # and then we would define $MISSING as
95 | # MISSING="\${SHELL} $am_aux_dir/missing"
96 | # This will work as long as MISSING is not called from configure, because
97 | # unfortunately $(top_srcdir) has no meaning in configure.
98 | # However there are other variables, like CC, which are often used in
99 | # configure, and could therefore not use this "fixed" $ac_aux_dir.
100 | #
101 | # Another solution, used here, is to always expand $ac_aux_dir to an
102 | # absolute PATH. The drawback is that using absolute paths prevent a
103 | # configured tree to be moved without reconfiguration.
104 |
105 | AC_DEFUN([AM_AUX_DIR_EXPAND],
106 | [dnl Rely on autoconf to set up CDPATH properly.
107 | AC_PREREQ([2.50])dnl
108 | # expand $ac_aux_dir to an absolute path
109 | am_aux_dir=`cd $ac_aux_dir && pwd`
110 | ])
111 |
112 | # AM_CONDITIONAL -*- Autoconf -*-
113 |
114 | # Copyright (C) 1997-2013 Free Software Foundation, Inc.
115 | #
116 | # This file is free software; the Free Software Foundation
117 | # gives unlimited permission to copy and/or distribute it,
118 | # with or without modifications, as long as this notice is preserved.
119 |
120 | # AM_CONDITIONAL(NAME, SHELL-CONDITION)
121 | # -------------------------------------
122 | # Define a conditional.
123 | AC_DEFUN([AM_CONDITIONAL],
124 | [AC_PREREQ([2.52])dnl
125 | m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
126 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
127 | AC_SUBST([$1_TRUE])dnl
128 | AC_SUBST([$1_FALSE])dnl
129 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl
130 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl
131 | m4_define([_AM_COND_VALUE_$1], [$2])dnl
132 | if $2; then
133 | $1_TRUE=
134 | $1_FALSE='#'
135 | else
136 | $1_TRUE='#'
137 | $1_FALSE=
138 | fi
139 | AC_CONFIG_COMMANDS_PRE(
140 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
141 | AC_MSG_ERROR([[conditional "$1" was never defined.
142 | Usually this means the macro was only invoked conditionally.]])
143 | fi])])
144 |
145 | # Copyright (C) 1999-2013 Free Software Foundation, Inc.
146 | #
147 | # This file is free software; the Free Software Foundation
148 | # gives unlimited permission to copy and/or distribute it,
149 | # with or without modifications, as long as this notice is preserved.
150 |
151 |
152 | # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
153 | # written in clear, in which case automake, when reading aclocal.m4,
154 | # will think it sees a *use*, and therefore will trigger all it's
155 | # C support machinery. Also note that it means that autoscan, seeing
156 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
157 |
158 |
159 | # _AM_DEPENDENCIES(NAME)
160 | # ----------------------
161 | # See how the compiler implements dependency checking.
162 | # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
163 | # We try a few techniques and use that to set a single cache variable.
164 | #
165 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
166 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
167 | # dependency, and given that the user is not expected to run this macro,
168 | # just rely on AC_PROG_CC.
169 | AC_DEFUN([_AM_DEPENDENCIES],
170 | [AC_REQUIRE([AM_SET_DEPDIR])dnl
171 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
172 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl
173 | AC_REQUIRE([AM_DEP_TRACK])dnl
174 |
175 | m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
176 | [$1], [CXX], [depcc="$CXX" am_compiler_list=],
177 | [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178 | [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
179 | [$1], [UPC], [depcc="$UPC" am_compiler_list=],
180 | [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
181 | [depcc="$$1" am_compiler_list=])
182 |
183 | AC_CACHE_CHECK([dependency style of $depcc],
184 | [am_cv_$1_dependencies_compiler_type],
185 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
186 | # We make a subdir and do the tests there. Otherwise we can end up
187 | # making bogus files that we don't know about and never remove. For
188 | # instance it was reported that on HP-UX the gcc test will end up
189 | # making a dummy file named 'D' -- because '-MD' means "put the output
190 | # in D".
191 | rm -rf conftest.dir
192 | mkdir conftest.dir
193 | # Copy depcomp to subdir because otherwise we won't find it if we're
194 | # using a relative directory.
195 | cp "$am_depcomp" conftest.dir
196 | cd conftest.dir
197 | # We will build objects and dependencies in a subdirectory because
198 | # it helps to detect inapplicable dependency modes. For instance
199 | # both Tru64's cc and ICC support -MD to output dependencies as a
200 | # side effect of compilation, but ICC will put the dependencies in
201 | # the current directory while Tru64 will put them in the object
202 | # directory.
203 | mkdir sub
204 |
205 | am_cv_$1_dependencies_compiler_type=none
206 | if test "$am_compiler_list" = ""; then
207 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
208 | fi
209 | am__universal=false
210 | m4_case([$1], [CC],
211 | [case " $depcc " in #(
212 | *\ -arch\ *\ -arch\ *) am__universal=true ;;
213 | esac],
214 | [CXX],
215 | [case " $depcc " in #(
216 | *\ -arch\ *\ -arch\ *) am__universal=true ;;
217 | esac])
218 |
219 | for depmode in $am_compiler_list; do
220 | # Setup a source with many dependencies, because some compilers
221 | # like to wrap large dependency lists on column 80 (with \), and
222 | # we should not choose a depcomp mode which is confused by this.
223 | #
224 | # We need to recreate these files for each test, as the compiler may
225 | # overwrite some of them when testing with obscure command lines.
226 | # This happens at least with the AIX C compiler.
227 | : > sub/conftest.c
228 | for i in 1 2 3 4 5 6; do
229 | echo '#include "conftst'$i'.h"' >> sub/conftest.c
230 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
231 | # Solaris 10 /bin/sh.
232 | echo '/* dummy */' > sub/conftst$i.h
233 | done
234 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
235 |
236 | # We check with '-c' and '-o' for the sake of the "dashmstdout"
237 | # mode. It turns out that the SunPro C++ compiler does not properly
238 | # handle '-M -o', and we need to detect this. Also, some Intel
239 | # versions had trouble with output in subdirs.
240 | am__obj=sub/conftest.${OBJEXT-o}
241 | am__minus_obj="-o $am__obj"
242 | case $depmode in
243 | gcc)
244 | # This depmode causes a compiler race in universal mode.
245 | test "$am__universal" = false || continue
246 | ;;
247 | nosideeffect)
248 | # After this tag, mechanisms are not by side-effect, so they'll
249 | # only be used when explicitly requested.
250 | if test "x$enable_dependency_tracking" = xyes; then
251 | continue
252 | else
253 | break
254 | fi
255 | ;;
256 | msvc7 | msvc7msys | msvisualcpp | msvcmsys)
257 | # This compiler won't grok '-c -o', but also, the minuso test has
258 | # not run yet. These depmodes are late enough in the game, and
259 | # so weak that their functioning should not be impacted.
260 | am__obj=conftest.${OBJEXT-o}
261 | am__minus_obj=
262 | ;;
263 | none) break ;;
264 | esac
265 | if depmode=$depmode \
266 | source=sub/conftest.c object=$am__obj \
267 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
268 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
269 | >/dev/null 2>conftest.err &&
270 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
271 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
272 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
273 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
274 | # icc doesn't choke on unknown options, it will just issue warnings
275 | # or remarks (even with -Werror). So we grep stderr for any message
276 | # that says an option was ignored or not supported.
277 | # When given -MP, icc 7.0 and 7.1 complain thusly:
278 | # icc: Command line warning: ignoring option '-M'; no argument required
279 | # The diagnosis changed in icc 8.0:
280 | # icc: Command line remark: option '-MP' not supported
281 | if (grep 'ignoring option' conftest.err ||
282 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
283 | am_cv_$1_dependencies_compiler_type=$depmode
284 | break
285 | fi
286 | fi
287 | done
288 |
289 | cd ..
290 | rm -rf conftest.dir
291 | else
292 | am_cv_$1_dependencies_compiler_type=none
293 | fi
294 | ])
295 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
296 | AM_CONDITIONAL([am__fastdep$1], [
297 | test "x$enable_dependency_tracking" != xno \
298 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
299 | ])
300 |
301 |
302 | # AM_SET_DEPDIR
303 | # -------------
304 | # Choose a directory name for dependency files.
305 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
306 | AC_DEFUN([AM_SET_DEPDIR],
307 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
308 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
309 | ])
310 |
311 |
312 | # AM_DEP_TRACK
313 | # ------------
314 | AC_DEFUN([AM_DEP_TRACK],
315 | [AC_ARG_ENABLE([dependency-tracking], [dnl
316 | AS_HELP_STRING(
317 | [--enable-dependency-tracking],
318 | [do not reject slow dependency extractors])
319 | AS_HELP_STRING(
320 | [--disable-dependency-tracking],
321 | [speeds up one-time build])])
322 | if test "x$enable_dependency_tracking" != xno; then
323 | am_depcomp="$ac_aux_dir/depcomp"
324 | AMDEPBACKSLASH='\'
325 | am__nodep='_no'
326 | fi
327 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
328 | AC_SUBST([AMDEPBACKSLASH])dnl
329 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
330 | AC_SUBST([am__nodep])dnl
331 | _AM_SUBST_NOTMAKE([am__nodep])dnl
332 | ])
333 |
334 | # Generate code to set up dependency tracking. -*- Autoconf -*-
335 |
336 | # Copyright (C) 1999-2013 Free Software Foundation, Inc.
337 | #
338 | # This file is free software; the Free Software Foundation
339 | # gives unlimited permission to copy and/or distribute it,
340 | # with or without modifications, as long as this notice is preserved.
341 |
342 |
343 | # _AM_OUTPUT_DEPENDENCY_COMMANDS
344 | # ------------------------------
345 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
346 | [{
347 | # Older Autoconf quotes --file arguments for eval, but not when files
348 | # are listed without --file. Let's play safe and only enable the eval
349 | # if we detect the quoting.
350 | case $CONFIG_FILES in
351 | *\'*) eval set x "$CONFIG_FILES" ;;
352 | *) set x $CONFIG_FILES ;;
353 | esac
354 | shift
355 | for mf
356 | do
357 | # Strip MF so we end up with the name of the file.
358 | mf=`echo "$mf" | sed -e 's/:.*$//'`
359 | # Check whether this is an Automake generated Makefile or not.
360 | # We used to match only the files named 'Makefile.in', but
361 | # some people rename them; so instead we look at the file content.
362 | # Grep'ing the first line is not enough: some people post-process
363 | # each Makefile.in and add a new line on top of each file to say so.
364 | # Grep'ing the whole file is not good either: AIX grep has a line
365 | # limit of 2048, but all sed's we know have understand at least 4000.
366 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
367 | dirpart=`AS_DIRNAME("$mf")`
368 | else
369 | continue
370 | fi
371 | # Extract the definition of DEPDIR, am__include, and am__quote
372 | # from the Makefile without running 'make'.
373 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
374 | test -z "$DEPDIR" && continue
375 | am__include=`sed -n 's/^am__include = //p' < "$mf"`
376 | test -z "$am__include" && continue
377 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
378 | # Find all dependency output files, they are included files with
379 | # $(DEPDIR) in their names. We invoke sed twice because it is the
380 | # simplest approach to changing $(DEPDIR) to its actual value in the
381 | # expansion.
382 | for file in `sed -n "
383 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
384 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
385 | # Make sure the directory exists.
386 | test -f "$dirpart/$file" && continue
387 | fdir=`AS_DIRNAME(["$file"])`
388 | AS_MKDIR_P([$dirpart/$fdir])
389 | # echo "creating $dirpart/$file"
390 | echo '# dummy' > "$dirpart/$file"
391 | done
392 | done
393 | }
394 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
395 |
396 |
397 | # AM_OUTPUT_DEPENDENCY_COMMANDS
398 | # -----------------------------
399 | # This macro should only be invoked once -- use via AC_REQUIRE.
400 | #
401 | # This code is only required when automatic dependency tracking
402 | # is enabled. FIXME. This creates each '.P' file that we will
403 | # need in order to bootstrap the dependency handling code.
404 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
405 | [AC_CONFIG_COMMANDS([depfiles],
406 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
407 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
408 | ])
409 |
410 | # Do all the work for Automake. -*- Autoconf -*-
411 |
412 | # Copyright (C) 1996-2013 Free Software Foundation, Inc.
413 | #
414 | # This file is free software; the Free Software Foundation
415 | # gives unlimited permission to copy and/or distribute it,
416 | # with or without modifications, as long as this notice is preserved.
417 |
418 | # This macro actually does too much. Some checks are only needed if
419 | # your package does certain things. But this isn't really a big deal.
420 |
421 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
422 | # AM_INIT_AUTOMAKE([OPTIONS])
423 | # -----------------------------------------------
424 | # The call with PACKAGE and VERSION arguments is the old style
425 | # call (pre autoconf-2.50), which is being phased out. PACKAGE
426 | # and VERSION should now be passed to AC_INIT and removed from
427 | # the call to AM_INIT_AUTOMAKE.
428 | # We support both call styles for the transition. After
429 | # the next Automake release, Autoconf can make the AC_INIT
430 | # arguments mandatory, and then we can depend on a new Autoconf
431 | # release and drop the old call support.
432 | AC_DEFUN([AM_INIT_AUTOMAKE],
433 | [AC_PREREQ([2.65])dnl
434 | dnl Autoconf wants to disallow AM_ names. We explicitly allow
435 | dnl the ones we care about.
436 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
437 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
438 | AC_REQUIRE([AC_PROG_INSTALL])dnl
439 | if test "`cd $srcdir && pwd`" != "`pwd`"; then
440 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
441 | # is not polluted with repeated "-I."
442 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
443 | # test to see if srcdir already configured
444 | if test -f $srcdir/config.status; then
445 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
446 | fi
447 | fi
448 |
449 | # test whether we have cygpath
450 | if test -z "$CYGPATH_W"; then
451 | if (cygpath --version) >/dev/null 2>/dev/null; then
452 | CYGPATH_W='cygpath -w'
453 | else
454 | CYGPATH_W=echo
455 | fi
456 | fi
457 | AC_SUBST([CYGPATH_W])
458 |
459 | # Define the identity of the package.
460 | dnl Distinguish between old-style and new-style calls.
461 | m4_ifval([$2],
462 | [AC_DIAGNOSE([obsolete],
463 | [$0: two- and three-arguments forms are deprecated.])
464 | m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465 | AC_SUBST([PACKAGE], [$1])dnl
466 | AC_SUBST([VERSION], [$2])],
467 | [_AM_SET_OPTIONS([$1])dnl
468 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469 | m4_if(
470 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
471 | [ok:ok],,
472 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
473 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
474 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
475 |
476 | _AM_IF_OPTION([no-define],,
477 | [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
478 | AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
479 |
480 | # Some tools Automake needs.
481 | AC_REQUIRE([AM_SANITY_CHECK])dnl
482 | AC_REQUIRE([AC_ARG_PROGRAM])dnl
483 | AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
484 | AM_MISSING_PROG([AUTOCONF], [autoconf])
485 | AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
486 | AM_MISSING_PROG([AUTOHEADER], [autoheader])
487 | AM_MISSING_PROG([MAKEINFO], [makeinfo])
488 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
489 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
490 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl
491 | # For better backward compatibility. To be removed once Automake 1.9.x
492 | # dies out for good. For more background, see:
493 | #
494 | #
495 | AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
496 | # We need awk for the "check" target. The system "awk" is bad on
497 | # some platforms.
498 | AC_REQUIRE([AC_PROG_AWK])dnl
499 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl
500 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl
501 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
502 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
503 | [_AM_PROG_TAR([v7])])])
504 | _AM_IF_OPTION([no-dependencies],,
505 | [AC_PROVIDE_IFELSE([AC_PROG_CC],
506 | [_AM_DEPENDENCIES([CC])],
507 | [m4_define([AC_PROG_CC],
508 | m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
509 | AC_PROVIDE_IFELSE([AC_PROG_CXX],
510 | [_AM_DEPENDENCIES([CXX])],
511 | [m4_define([AC_PROG_CXX],
512 | m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
513 | AC_PROVIDE_IFELSE([AC_PROG_OBJC],
514 | [_AM_DEPENDENCIES([OBJC])],
515 | [m4_define([AC_PROG_OBJC],
516 | m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
517 | AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
518 | [_AM_DEPENDENCIES([OBJCXX])],
519 | [m4_define([AC_PROG_OBJCXX],
520 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
521 | ])
522 | AC_REQUIRE([AM_SILENT_RULES])dnl
523 | dnl The testsuite driver may need to know about EXEEXT, so add the
524 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
525 | dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
526 | AC_CONFIG_COMMANDS_PRE(dnl
527 | [m4_provide_if([_AM_COMPILER_EXEEXT],
528 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
529 | ])
530 |
531 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
532 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
533 | dnl mangled by Autoconf and run in a shell conditional statement.
534 | m4_define([_AC_COMPILER_EXEEXT],
535 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
536 |
537 |
538 | # When config.status generates a header, we must update the stamp-h file.
539 | # This file resides in the same directory as the config header
540 | # that is generated. The stamp files are numbered to have different names.
541 |
542 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
543 | # loop where config.status creates the headers, so we can generate
544 | # our stamp files there.
545 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
546 | [# Compute $1's index in $config_headers.
547 | _am_arg=$1
548 | _am_stamp_count=1
549 | for _am_header in $config_headers :; do
550 | case $_am_header in
551 | $_am_arg | $_am_arg:* )
552 | break ;;
553 | * )
554 | _am_stamp_count=`expr $_am_stamp_count + 1` ;;
555 | esac
556 | done
557 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
558 |
559 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
560 | #
561 | # This file is free software; the Free Software Foundation
562 | # gives unlimited permission to copy and/or distribute it,
563 | # with or without modifications, as long as this notice is preserved.
564 |
565 | # AM_PROG_INSTALL_SH
566 | # ------------------
567 | # Define $install_sh.
568 | AC_DEFUN([AM_PROG_INSTALL_SH],
569 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
570 | if test x"${install_sh}" != xset; then
571 | case $am_aux_dir in
572 | *\ * | *\ *)
573 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
574 | *)
575 | install_sh="\${SHELL} $am_aux_dir/install-sh"
576 | esac
577 | fi
578 | AC_SUBST([install_sh])])
579 |
580 | # Copyright (C) 2003-2013 Free Software Foundation, Inc.
581 | #
582 | # This file is free software; the Free Software Foundation
583 | # gives unlimited permission to copy and/or distribute it,
584 | # with or without modifications, as long as this notice is preserved.
585 |
586 | # Check whether the underlying file-system supports filenames
587 | # with a leading dot. For instance MS-DOS doesn't.
588 | AC_DEFUN([AM_SET_LEADING_DOT],
589 | [rm -rf .tst 2>/dev/null
590 | mkdir .tst 2>/dev/null
591 | if test -d .tst; then
592 | am__leading_dot=.
593 | else
594 | am__leading_dot=_
595 | fi
596 | rmdir .tst 2>/dev/null
597 | AC_SUBST([am__leading_dot])])
598 |
599 | # Check to see how 'make' treats includes. -*- Autoconf -*-
600 |
601 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
602 | #
603 | # This file is free software; the Free Software Foundation
604 | # gives unlimited permission to copy and/or distribute it,
605 | # with or without modifications, as long as this notice is preserved.
606 |
607 | # AM_MAKE_INCLUDE()
608 | # -----------------
609 | # Check to see how make treats includes.
610 | AC_DEFUN([AM_MAKE_INCLUDE],
611 | [am_make=${MAKE-make}
612 | cat > confinc << 'END'
613 | am__doit:
614 | @echo this is the am__doit target
615 | .PHONY: am__doit
616 | END
617 | # If we don't find an include directive, just comment out the code.
618 | AC_MSG_CHECKING([for style of include used by $am_make])
619 | am__include="#"
620 | am__quote=
621 | _am_result=none
622 | # First try GNU make style include.
623 | echo "include confinc" > confmf
624 | # Ignore all kinds of additional output from 'make'.
625 | case `$am_make -s -f confmf 2> /dev/null` in #(
626 | *the\ am__doit\ target*)
627 | am__include=include
628 | am__quote=
629 | _am_result=GNU
630 | ;;
631 | esac
632 | # Now try BSD make style include.
633 | if test "$am__include" = "#"; then
634 | echo '.include "confinc"' > confmf
635 | case `$am_make -s -f confmf 2> /dev/null` in #(
636 | *the\ am__doit\ target*)
637 | am__include=.include
638 | am__quote="\""
639 | _am_result=BSD
640 | ;;
641 | esac
642 | fi
643 | AC_SUBST([am__include])
644 | AC_SUBST([am__quote])
645 | AC_MSG_RESULT([$_am_result])
646 | rm -f confinc confmf
647 | ])
648 |
649 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
650 |
651 | # Copyright (C) 1997-2013 Free Software Foundation, Inc.
652 | #
653 | # This file is free software; the Free Software Foundation
654 | # gives unlimited permission to copy and/or distribute it,
655 | # with or without modifications, as long as this notice is preserved.
656 |
657 | # AM_MISSING_PROG(NAME, PROGRAM)
658 | # ------------------------------
659 | AC_DEFUN([AM_MISSING_PROG],
660 | [AC_REQUIRE([AM_MISSING_HAS_RUN])
661 | $1=${$1-"${am_missing_run}$2"}
662 | AC_SUBST($1)])
663 |
664 | # AM_MISSING_HAS_RUN
665 | # ------------------
666 | # Define MISSING if not defined so far and test if it is modern enough.
667 | # If it is, set am_missing_run to use it, otherwise, to nothing.
668 | AC_DEFUN([AM_MISSING_HAS_RUN],
669 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
670 | AC_REQUIRE_AUX_FILE([missing])dnl
671 | if test x"${MISSING+set}" != xset; then
672 | case $am_aux_dir in
673 | *\ * | *\ *)
674 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
675 | *)
676 | MISSING="\${SHELL} $am_aux_dir/missing" ;;
677 | esac
678 | fi
679 | # Use eval to expand $SHELL
680 | if eval "$MISSING --is-lightweight"; then
681 | am_missing_run="$MISSING "
682 | else
683 | am_missing_run=
684 | AC_MSG_WARN(['missing' script is too old or missing])
685 | fi
686 | ])
687 |
688 | # Helper functions for option handling. -*- Autoconf -*-
689 |
690 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
691 | #
692 | # This file is free software; the Free Software Foundation
693 | # gives unlimited permission to copy and/or distribute it,
694 | # with or without modifications, as long as this notice is preserved.
695 |
696 | # _AM_MANGLE_OPTION(NAME)
697 | # -----------------------
698 | AC_DEFUN([_AM_MANGLE_OPTION],
699 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
700 |
701 | # _AM_SET_OPTION(NAME)
702 | # --------------------
703 | # Set option NAME. Presently that only means defining a flag for this option.
704 | AC_DEFUN([_AM_SET_OPTION],
705 | [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
706 |
707 | # _AM_SET_OPTIONS(OPTIONS)
708 | # ------------------------
709 | # OPTIONS is a space-separated list of Automake options.
710 | AC_DEFUN([_AM_SET_OPTIONS],
711 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
712 |
713 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
714 | # -------------------------------------------
715 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
716 | AC_DEFUN([_AM_IF_OPTION],
717 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
718 |
719 | # Check to make sure that the build environment is sane. -*- Autoconf -*-
720 |
721 | # Copyright (C) 1996-2013 Free Software Foundation, Inc.
722 | #
723 | # This file is free software; the Free Software Foundation
724 | # gives unlimited permission to copy and/or distribute it,
725 | # with or without modifications, as long as this notice is preserved.
726 |
727 | # AM_SANITY_CHECK
728 | # ---------------
729 | AC_DEFUN([AM_SANITY_CHECK],
730 | [AC_MSG_CHECKING([whether build environment is sane])
731 | # Reject unsafe characters in $srcdir or the absolute working directory
732 | # name. Accept space and tab only in the latter.
733 | am_lf='
734 | '
735 | case `pwd` in
736 | *[[\\\"\#\$\&\'\`$am_lf]]*)
737 | AC_MSG_ERROR([unsafe absolute working directory name]);;
738 | esac
739 | case $srcdir in
740 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
741 | AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
742 | esac
743 |
744 | # Do 'set' in a subshell so we don't clobber the current shell's
745 | # arguments. Must try -L first in case configure is actually a
746 | # symlink; some systems play weird games with the mod time of symlinks
747 | # (eg FreeBSD returns the mod time of the symlink's containing
748 | # directory).
749 | if (
750 | am_has_slept=no
751 | for am_try in 1 2; do
752 | echo "timestamp, slept: $am_has_slept" > conftest.file
753 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
754 | if test "$[*]" = "X"; then
755 | # -L didn't work.
756 | set X `ls -t "$srcdir/configure" conftest.file`
757 | fi
758 | if test "$[*]" != "X $srcdir/configure conftest.file" \
759 | && test "$[*]" != "X conftest.file $srcdir/configure"; then
760 |
761 | # If neither matched, then we have a broken ls. This can happen
762 | # if, for instance, CONFIG_SHELL is bash and it inherits a
763 | # broken ls alias from the environment. This has actually
764 | # happened. Such a system could not be considered "sane".
765 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
766 | alias in your environment])
767 | fi
768 | if test "$[2]" = conftest.file || test $am_try -eq 2; then
769 | break
770 | fi
771 | # Just in case.
772 | sleep 1
773 | am_has_slept=yes
774 | done
775 | test "$[2]" = conftest.file
776 | )
777 | then
778 | # Ok.
779 | :
780 | else
781 | AC_MSG_ERROR([newly created file is older than distributed files!
782 | Check your system clock])
783 | fi
784 | AC_MSG_RESULT([yes])
785 | # If we didn't sleep, we still need to ensure time stamps of config.status and
786 | # generated files are strictly newer.
787 | am_sleep_pid=
788 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then
789 | ( sleep 1 ) &
790 | am_sleep_pid=$!
791 | fi
792 | AC_CONFIG_COMMANDS_PRE(
793 | [AC_MSG_CHECKING([that generated files are newer than configure])
794 | if test -n "$am_sleep_pid"; then
795 | # Hide warnings about reused PIDs.
796 | wait $am_sleep_pid 2>/dev/null
797 | fi
798 | AC_MSG_RESULT([done])])
799 | rm -f conftest.file
800 | ])
801 |
802 | # Copyright (C) 2009-2013 Free Software Foundation, Inc.
803 | #
804 | # This file is free software; the Free Software Foundation
805 | # gives unlimited permission to copy and/or distribute it,
806 | # with or without modifications, as long as this notice is preserved.
807 |
808 | # AM_SILENT_RULES([DEFAULT])
809 | # --------------------------
810 | # Enable less verbose build rules; with the default set to DEFAULT
811 | # ("yes" being less verbose, "no" or empty being verbose).
812 | AC_DEFUN([AM_SILENT_RULES],
813 | [AC_ARG_ENABLE([silent-rules], [dnl
814 | AS_HELP_STRING(
815 | [--enable-silent-rules],
816 | [less verbose build output (undo: "make V=1")])
817 | AS_HELP_STRING(
818 | [--disable-silent-rules],
819 | [verbose build output (undo: "make V=0")])dnl
820 | ])
821 | case $enable_silent_rules in @%:@ (((
822 | yes) AM_DEFAULT_VERBOSITY=0;;
823 | no) AM_DEFAULT_VERBOSITY=1;;
824 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
825 | esac
826 | dnl
827 | dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
828 | dnl do not support nested variable expansions.
829 | dnl See automake bug#9928 and bug#10237.
830 | am_make=${MAKE-make}
831 | AC_CACHE_CHECK([whether $am_make supports nested variables],
832 | [am_cv_make_support_nested_variables],
833 | [if AS_ECHO([['TRUE=$(BAR$(V))
834 | BAR0=false
835 | BAR1=true
836 | V=1
837 | am__doit:
838 | @$(TRUE)
839 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
840 | am_cv_make_support_nested_variables=yes
841 | else
842 | am_cv_make_support_nested_variables=no
843 | fi])
844 | if test $am_cv_make_support_nested_variables = yes; then
845 | dnl Using '$V' instead of '$(V)' breaks IRIX make.
846 | AM_V='$(V)'
847 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
848 | else
849 | AM_V=$AM_DEFAULT_VERBOSITY
850 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
851 | fi
852 | AC_SUBST([AM_V])dnl
853 | AM_SUBST_NOTMAKE([AM_V])dnl
854 | AC_SUBST([AM_DEFAULT_V])dnl
855 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
856 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
857 | AM_BACKSLASH='\'
858 | AC_SUBST([AM_BACKSLASH])dnl
859 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
860 | ])
861 |
862 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
863 | #
864 | # This file is free software; the Free Software Foundation
865 | # gives unlimited permission to copy and/or distribute it,
866 | # with or without modifications, as long as this notice is preserved.
867 |
868 | # AM_PROG_INSTALL_STRIP
869 | # ---------------------
870 | # One issue with vendor 'install' (even GNU) is that you can't
871 | # specify the program used to strip binaries. This is especially
872 | # annoying in cross-compiling environments, where the build's strip
873 | # is unlikely to handle the host's binaries.
874 | # Fortunately install-sh will honor a STRIPPROG variable, so we
875 | # always use install-sh in "make install-strip", and initialize
876 | # STRIPPROG with the value of the STRIP variable (set by the user).
877 | AC_DEFUN([AM_PROG_INSTALL_STRIP],
878 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
879 | # Installed binaries are usually stripped using 'strip' when the user
880 | # run "make install-strip". However 'strip' might not be the right
881 | # tool to use in cross-compilation environments, therefore Automake
882 | # will honor the 'STRIP' environment variable to overrule this program.
883 | dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
884 | if test "$cross_compiling" != no; then
885 | AC_CHECK_TOOL([STRIP], [strip], :)
886 | fi
887 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
888 | AC_SUBST([INSTALL_STRIP_PROGRAM])])
889 |
890 | # Copyright (C) 2006-2013 Free Software Foundation, Inc.
891 | #
892 | # This file is free software; the Free Software Foundation
893 | # gives unlimited permission to copy and/or distribute it,
894 | # with or without modifications, as long as this notice is preserved.
895 |
896 | # _AM_SUBST_NOTMAKE(VARIABLE)
897 | # ---------------------------
898 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
899 | # This macro is traced by Automake.
900 | AC_DEFUN([_AM_SUBST_NOTMAKE])
901 |
902 | # AM_SUBST_NOTMAKE(VARIABLE)
903 | # --------------------------
904 | # Public sister of _AM_SUBST_NOTMAKE.
905 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
906 |
907 | # Check how to create a tarball. -*- Autoconf -*-
908 |
909 | # Copyright (C) 2004-2013 Free Software Foundation, Inc.
910 | #
911 | # This file is free software; the Free Software Foundation
912 | # gives unlimited permission to copy and/or distribute it,
913 | # with or without modifications, as long as this notice is preserved.
914 |
915 | # _AM_PROG_TAR(FORMAT)
916 | # --------------------
917 | # Check how to create a tarball in format FORMAT.
918 | # FORMAT should be one of 'v7', 'ustar', or 'pax'.
919 | #
920 | # Substitute a variable $(am__tar) that is a command
921 | # writing to stdout a FORMAT-tarball containing the directory
922 | # $tardir.
923 | # tardir=directory && $(am__tar) > result.tar
924 | #
925 | # Substitute a variable $(am__untar) that extract such
926 | # a tarball read from stdin.
927 | # $(am__untar) < result.tar
928 | #
929 | AC_DEFUN([_AM_PROG_TAR],
930 | [# Always define AMTAR for backward compatibility. Yes, it's still used
931 | # in the wild :-( We should find a proper way to deprecate it ...
932 | AC_SUBST([AMTAR], ['$${TAR-tar}'])
933 |
934 | # We'll loop over all known methods to create a tar archive until one works.
935 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
936 |
937 | m4_if([$1], [v7],
938 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
939 |
940 | [m4_case([$1],
941 | [ustar],
942 | [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
943 | # There is notably a 21 bits limit for the UID and the GID. In fact,
944 | # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
945 | # and bug#13588).
946 | am_max_uid=2097151 # 2^21 - 1
947 | am_max_gid=$am_max_uid
948 | # The $UID and $GID variables are not portable, so we need to resort
949 | # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
950 | # below are definitely unexpected, so allow the users to see them
951 | # (that is, avoid stderr redirection).
952 | am_uid=`id -u || echo unknown`
953 | am_gid=`id -g || echo unknown`
954 | AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
955 | if test $am_uid -le $am_max_uid; then
956 | AC_MSG_RESULT([yes])
957 | else
958 | AC_MSG_RESULT([no])
959 | _am_tools=none
960 | fi
961 | AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
962 | if test $am_gid -le $am_max_gid; then
963 | AC_MSG_RESULT([yes])
964 | else
965 | AC_MSG_RESULT([no])
966 | _am_tools=none
967 | fi],
968 |
969 | [pax],
970 | [],
971 |
972 | [m4_fatal([Unknown tar format])])
973 |
974 | AC_MSG_CHECKING([how to create a $1 tar archive])
975 |
976 | # Go ahead even if we have the value already cached. We do so because we
977 | # need to set the values for the 'am__tar' and 'am__untar' variables.
978 | _am_tools=${am_cv_prog_tar_$1-$_am_tools}
979 |
980 | for _am_tool in $_am_tools; do
981 | case $_am_tool in
982 | gnutar)
983 | for _am_tar in tar gnutar gtar; do
984 | AM_RUN_LOG([$_am_tar --version]) && break
985 | done
986 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
987 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
988 | am__untar="$_am_tar -xf -"
989 | ;;
990 | plaintar)
991 | # Must skip GNU tar: if it does not support --format= it doesn't create
992 | # ustar tarball either.
993 | (tar --version) >/dev/null 2>&1 && continue
994 | am__tar='tar chf - "$$tardir"'
995 | am__tar_='tar chf - "$tardir"'
996 | am__untar='tar xf -'
997 | ;;
998 | pax)
999 | am__tar='pax -L -x $1 -w "$$tardir"'
1000 | am__tar_='pax -L -x $1 -w "$tardir"'
1001 | am__untar='pax -r'
1002 | ;;
1003 | cpio)
1004 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1005 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1006 | am__untar='cpio -i -H $1 -d'
1007 | ;;
1008 | none)
1009 | am__tar=false
1010 | am__tar_=false
1011 | am__untar=false
1012 | ;;
1013 | esac
1014 |
1015 | # If the value was cached, stop now. We just wanted to have am__tar
1016 | # and am__untar set.
1017 | test -n "${am_cv_prog_tar_$1}" && break
1018 |
1019 | # tar/untar a dummy directory, and stop if the command works.
1020 | rm -rf conftest.dir
1021 | mkdir conftest.dir
1022 | echo GrepMe > conftest.dir/file
1023 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1024 | rm -rf conftest.dir
1025 | if test -s conftest.tar; then
1026 | AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
1029 | fi
1030 | done
1031 | rm -rf conftest.dir
1032 |
1033 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1034 | AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1035 |
1036 | AC_SUBST([am__tar])
1037 | AC_SUBST([am__untar])
1038 | ]) # _AM_PROG_TAR
1039 |
1040 |
--------------------------------------------------------------------------------