Merge branch 'master' of https://github.com/SamiAhmed7777/triangles_v5
# Conflicts: # src/tor/build-libtor.sh
This commit is contained in:
+39
-1
@@ -31,6 +31,7 @@ Notes:
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <cctype>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
@@ -568,7 +569,44 @@ bool SecMsgDB::Open(const char* pszMode)
|
||||
rocksdb::Options options;
|
||||
options.create_if_missing = fCreate;
|
||||
rocksdb::Status s = OpenSmsgDB(options, fullpath.string(), &smsgDB);
|
||||
|
||||
|
||||
// Self-heal: when smsgDB was written by a newer RocksDB (>=7.4 uses
|
||||
// XXH3, checksum type 4) and this build is linked against an older
|
||||
// RocksDB that doesn't recognise the type, Open() fails with
|
||||
// "Corruption: unknown checksum type N in <path>/<file>.sst ...".
|
||||
// Quarantine the offending SST and retry — RocksDB only needs the
|
||||
// missing file to recover; the rest of the DB is intact. Without this
|
||||
// fallback the daemon burns 99% CPU retrying open() on every RPC.
|
||||
if (!s.ok() && s.ToString().find("unknown checksum type") != std::string::npos)
|
||||
{
|
||||
auto msg = s.ToString();
|
||||
auto pos = msg.find(fullpath.string());
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
auto rest = msg.substr(pos + fullpath.string().size() + 1);
|
||||
auto end = rest.find_first_of(" \t");
|
||||
std::string sstName = (end == std::string::npos) ? rest : rest.substr(0, end);
|
||||
fs::path badFile = fullpath / sstName;
|
||||
if (fs::exists(badFile))
|
||||
{
|
||||
auto stamp = std::to_string(
|
||||
std::chrono::duration_cast<std::chrono::seconds>(
|
||||
std::chrono::system_clock::now().time_since_epoch()).count());
|
||||
fs::path quarantine = fullpath / (sstName + ".quarantined-" + stamp);
|
||||
std::error_code ec;
|
||||
fs::rename(badFile, quarantine, ec);
|
||||
if (!ec)
|
||||
{
|
||||
printf("SecMsgDB::open() - quarantined %s "
|
||||
"(newer-RocksDB checksum type not supported by this build)\n",
|
||||
badFile.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
smsgDB = nullptr;
|
||||
s = OpenSmsgDB(options, fullpath.string(), &smsgDB);
|
||||
}
|
||||
|
||||
if (!s.ok())
|
||||
{
|
||||
printf("SecMsgDB::open() - Error opening db: %s.\n", s.ToString().c_str());
|
||||
|
||||
Regular → Executable
+175
-24
@@ -11,33 +11,184 @@ fi
|
||||
|
||||
cd "$TOR_SRC_DIR"
|
||||
|
||||
if [[ ! -x "./configure" ]] || [[ "${AUTORECONF_FORCE:-0}" == "1" ]]; then
|
||||
echo "Running autoreconf with -W no-error (autogen.sh -W all,error is too strict for autoconf 2.73+)"
|
||||
autoreconf -i -f -W no-error
|
||||
|
||||
# autoconf 2.73 generates ./configure with backtick command
|
||||
# substitutions inside variable assignments such as
|
||||
# as_ac_var=`printf '%s\n' "ac_cv_func_$ac_func" | sed "$as_sed_sh"`
|
||||
# bash on MSYS2/MINGW64 parses this with a syntax error at the
|
||||
# nested backticks with quoted $-vars. autoconf 2.71 doesn't
|
||||
# generate this pattern, but pinning the MSYS2 autoconf version
|
||||
# is fragile (meta-package pulls whatever's current). Convert
|
||||
# all `var=\`cmd\`` assignments to `var=$(cmd)` form, which is
|
||||
# POSIX-ly equivalent and nests cleanly.
|
||||
if grep -qE '^[ \t]*[A-Za-z_][A-Za-z0-9_]*=`[^`]*`[ \t]*$' configure; then
|
||||
echo "Patching generated configure: \`...\` -> \$(...) in assignments"
|
||||
# Match leading whitespace, identifier, =, single backtick,
|
||||
# any chars except backtick, single backtick, optional whitespace.
|
||||
perl -i -pe 's/^([ \t]*[A-Za-z_][A-Za-z0-9_]*=)`([^`]*)`([ \t]*)$/$1\$($2)$3/' configure \
|
||||
|| echo "perl not available, falling back to sed"
|
||||
# Prefer the vendored configure (../configure.vendored, committed to
|
||||
# this repo). It was generated with autoconf 2.71 on Linux, which emits
|
||||
# a known-good bash/dash-compatible script that does NOT contain:
|
||||
# - backtick command substitutions (Patch 1)
|
||||
# - the `${ac_cv_func_${ac_func}+y}` nested-expansion form (Patches 4/5)
|
||||
# - the `printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` form (Patches 2/3)
|
||||
# Skipping autoreconf on the CI runner eliminates the entire
|
||||
# MSYS2/autoconf-wrapper/dash/bash interaction that was producing
|
||||
# `${ac_cv_func_ RtlSecureZeroMemory+y}: bad substitution` at line 2220.
|
||||
#
|
||||
# To regenerate (Linux only — needs autoconf 2.71):
|
||||
# bash src/tor/regenerate-tor-configure.sh
|
||||
# To force a fresh autoreconf on the runner instead (legacy behavior):
|
||||
# AUTORECONF_FORCE=1 bash src/tor/build-libtor.sh
|
||||
VENDORED_CONFIGURE="$ROOT_DIR/configure.vendored"
|
||||
VENDORED_AUX_DIR="$ROOT_DIR/configure-aux"
|
||||
VENDORED_INPUT_DIR="$ROOT_DIR/configure-input"
|
||||
if [[ -f "$VENDORED_CONFIGURE" ]] && [[ "${AUTORECONF_FORCE:-0}" != "1" ]]; then
|
||||
echo "Using vendored configure from $VENDORED_CONFIGURE"
|
||||
cp -f "$VENDORED_CONFIGURE" "./configure"
|
||||
chmod +x "./configure"
|
||||
# configure looks for auxiliary files (ar-lib, config.guess,
|
||||
# config.sub, compile, depcomp, install-sh, missing, test-driver)
|
||||
# in the same directory as itself. autoreconf -i normally creates
|
||||
# them, but we skipped autoreconf — so vendor them alongside.
|
||||
if [[ -d "$VENDORED_AUX_DIR" ]]; then
|
||||
cp -f "$VENDORED_AUX_DIR"/* ./
|
||||
chmod +x ./ar-lib ./compile ./config.guess ./config.sub \
|
||||
./depcomp ./install-sh ./missing ./test-driver 2>/dev/null || true
|
||||
echo "Vendored $(ls "$VENDORED_AUX_DIR" | wc -l) auxiliary files"
|
||||
fi
|
||||
# configure also reads AC_CONFIG_FILES inputs (Makefile.in,
|
||||
# Doxyfile.in, torrc.sample.in, etc.) from the source tree.
|
||||
# automake normally generates these from *.am files. Since we
|
||||
# skipped autoreconf, vendor the .in files too. We preserve the
|
||||
# directory structure (e.g. src/config/torrc.sample.in) because
|
||||
# configure looks for them at their original paths.
|
||||
# aclocal.m4 is also vendored because the generated Makefile has a
|
||||
# rule to regenerate it from acinclude.m4 + m4/*.m4 — which would
|
||||
# invoke aclocal on the runner (an automake dependency we don't
|
||||
# want to install there). With aclocal.m4 vendored, the rule's
|
||||
# dependency check sees an up-to-date file and skips regeneration.
|
||||
if [[ -d "$VENDORED_INPUT_DIR" ]]; then
|
||||
cp -rf "$VENDORED_INPUT_DIR"/. ./
|
||||
# CRITICAL: set every vendored file's mtime to "now+1s" so it's
|
||||
# strictly NEWER than configure.ac, acinclude.m4, and m4/*.m4
|
||||
# (which were just checked out from git and have older mtimes).
|
||||
# Also include ./configure in the list — the Makefile has an
|
||||
# automake rule that regenerates configure via autoconf if
|
||||
# configure.ac is newer. Without touching ./configure, make
|
||||
# would invoke autoconf on the runner, which emits the
|
||||
# MSYS2-incompatible backtick patterns we just went out of our
|
||||
# way to vendor a clean version of.
|
||||
NEWMTIME=$(date -d 'now + 1 second' '+%Y%m%d%H%M.%S' 2>/dev/null \
|
||||
|| date -v+1S '+%Y%m%d%H%M.%S' 2>/dev/null \
|
||||
|| stat -c %y aclocal.m4 | awk '{print $1, $2}')
|
||||
VENDORED_FILES=(configure aclocal.m4
|
||||
Makefile.in Doxyfile.in orconfig.h.in warning_flags.in
|
||||
src/config/torrc.sample.in src/config/torrc.minimal.in
|
||||
contrib/operator-tools/tor.logrotate.in
|
||||
contrib/win32build/tor.nsi.in
|
||||
contrib/win32build/tor-mingw.nsi.in
|
||||
scripts/maint/checkOptionDocs.pl.in)
|
||||
for vf in "${VENDORED_FILES[@]}"; do
|
||||
[[ -f "$vf" ]] && touch -t "$NEWMTIME" "$vf"
|
||||
done
|
||||
echo "Vendored $(find "$VENDORED_INPUT_DIR" -type f | wc -l) configure input files"
|
||||
fi
|
||||
elif [[ "${AUTORECONF_FORCE:-0}" == "1" ]] || [[ ! -x "./configure" ]]; then
|
||||
echo "Running autoreconf with -W no-error (autogen.sh -W all,error is too strict for autoconf 2.73+)"
|
||||
# Prefer autoconf 2.71 when available. autoreconf 2.73 emits
|
||||
# configure patterns that bash on MSYS2/MINGW64 chokes on even
|
||||
# after the patches below. autoreconf 2.71 emits clean backtick
|
||||
# assignments; it is installed as a side effect of
|
||||
# mingw-w64-x86_64-autotools on MSYS2 but autoconf-wrapper still
|
||||
# picks 2.73 unless we call the versioned binary directly.
|
||||
if command -v autoreconf-2.71 >/dev/null 2>&1; then
|
||||
AUTORECONF=autoreconf-2.71
|
||||
else
|
||||
AUTORECONF=autoreconf
|
||||
fi
|
||||
"$AUTORECONF" -i -f -W no-error
|
||||
|
||||
# Apply both configure patches via a single perl script. We write
|
||||
# the script to /tmp first to avoid the quoting nightmare of nested
|
||||
# single quotes inside bash single-quoted strings.
|
||||
#
|
||||
# CRITICAL perl replacement gotchas (cost me several iterations):
|
||||
# - `$(` in the replacement source is parsed by perl as `$$` (process
|
||||
# ID). Use `\$(` to emit a literal `$(`.
|
||||
# - `\n` in the replacement source is parsed by perl as a newline.
|
||||
# Use `\\n` to emit a literal backslash-n.
|
||||
# We avoid these entirely by building replacement strings with
|
||||
# sprintf() and %s placeholders, so perl never sees the dollar
|
||||
# signs or backslashes that would trigger interpolation.
|
||||
cat > /tmp/patch-tor-configure.pl <<'PERL_EOF'
|
||||
use strict;
|
||||
use warnings;
|
||||
local $/;
|
||||
open(my $fh, "<", "configure") or die "open: $!";
|
||||
my $s = <$fh>;
|
||||
close($fh);
|
||||
my $before = $s;
|
||||
|
||||
# Patch 1: convert single-line backtick assignments.
|
||||
# `var=`cmd`` -> `var=$(cmd)`
|
||||
# Exclude newlines from the content class so we don't greedily match
|
||||
# multi-line backtick command substitutions (which would break their
|
||||
# internal paren balance). sprintf here is safe — $1/$2/$3 are backrefs.
|
||||
$s =~ s/^([ \t]*[A-Za-z_][A-Za-z0-9_]*=)`([^`\n]*)`([ \t]*$)/sprintf('%s$(%s)%s', $1, $2, $3)/egm;
|
||||
|
||||
# Patch 2 + 3 (combined): AC_CHECK_FUNCS printf format and as_tr_sh.
|
||||
# Replace:
|
||||
# $(printf "%s\n" "ac_cv_func_$ac_func" ...) ->
|
||||
# $(printf '%s\n' "ac_cv_func_$ac_func" | sed 's/[^a-zA-Z0-9_]/_/g')
|
||||
# Uses sprintf with chr() to build the replacement text WITHOUT
|
||||
# triggering perl's $VAR interpolation or \n newline interpretation.
|
||||
# The only $ in sprintf's format string is via chr(36) = '$', which
|
||||
# perl doesn't interpret.
|
||||
my $DOLLAR = chr(36);
|
||||
my $BSLASH_N = '\\n'; # 2 chars: backslash + n; perl sees this literally
|
||||
# Use single-dollar $ac_func (not ${ac_func}) so the value is fully
|
||||
# resolved at assignment time. Otherwise the downstream autoconf
|
||||
# pattern `${$as_ac_var+y}` becomes `${ac_cv_func_${ac_func}+y}`
|
||||
# which bash cannot parse (nested ${} inside ${}).
|
||||
my $p23_repl = sprintf(
|
||||
'ac_cv_func_%s%s',
|
||||
$DOLLAR, 'ac_func'
|
||||
);
|
||||
$s =~ s{\$\(printf "%s\\n" "ac_cv_func_\$ac_func"[^)]*\)}{$p23_repl}g;
|
||||
$s =~ s{\$\(printf '%s\\n' "ac_cv_func_\$ac_func"[^)]*\)}{$p23_repl}g;
|
||||
|
||||
# Patch 4: replace literal ${ac_func} (curly-brace form) in the
|
||||
# AC_CHECK_FUNCS cache check with single-dollar $ac_func. MSYS2's
|
||||
# autoconf 2.71 generates code like
|
||||
# if eval test \${ac_cv_func_${ac_func}+y}
|
||||
# which bash can't parse (nested ${} inside ${+y}), emitting
|
||||
# ${ac_cv_func_ RtlSecureZeroMemory+y}: bad substitution
|
||||
# (bash expands the inner ${ac_func} before displaying the error,
|
||||
# hence the space). Switching to single-dollar form fixes this.
|
||||
my $p4_repl = sprintf('ac_cv_func_%s%s', $DOLLAR, 'ac_func');
|
||||
$s =~ s/ac_cv_func_\$\{ac_func\}/$p4_repl/g;
|
||||
|
||||
# Patch 5: rewrite the bash-incompatible cache-check pattern
|
||||
# if eval test x${ac_cv_func_${ac_func}+y} = xyes
|
||||
# to the bash-compatible form using indirect expansion:
|
||||
# if eval "[ -n \"\${$as_ac_var+x}\" ]"
|
||||
# bash 4.4 on MSYS2 cannot parse ${VAR1${VAR2}+y} OR ${VAR1$VAR2+y}
|
||||
# at script-load time, regardless of eval. The replacement uses
|
||||
# ${$as_ac_var+x} where bash's `!` indirect prefix looks up the
|
||||
# variable whose name is the VALUE of $as_ac_var. With eval, the
|
||||
# inner $as_ac_var is expanded to e.g. ac_cv_func_vsnprintf, then
|
||||
# ${ac_cv_func_vsnprintf+x} is the standard parameter-expansion
|
||||
# test (returns 'x' if set, empty otherwise).
|
||||
my $p5_repl = q{if eval "[ -n \"\${$as_ac_var+x}\" ]"};
|
||||
# The \{ in the pattern is correct (perl still treats it as literal {) but
|
||||
# Perl 5.36+ emits an "Unescaped left brace" warning. Disable warnings
|
||||
# locally around just this s/// to keep CI logs clean.
|
||||
{
|
||||
local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /Unescaped left brace/ };
|
||||
$s =~ s/if eval test x\${ac_cv_func_(.+?)\+y\} = xyes/$p5_repl/g;
|
||||
}
|
||||
|
||||
if ($s ne $before) {
|
||||
open(my $out, ">", "configure") or die "write: $!";
|
||||
print $out $s;
|
||||
close($out);
|
||||
}
|
||||
PERL_EOF
|
||||
perl /tmp/patch-tor-configure.pl \
|
||||
&& echo "Patched configure (backtick + printf format + as_tr_sh)" \
|
||||
|| echo "perl patch failed (continuing)"
|
||||
fi
|
||||
|
||||
echo "Configuring Tor static library build from: $TOR_SRC_DIR"
|
||||
# Even after the perl patch above, the configure script's shebang
|
||||
# is `#!/bin/sh` and MSYS2's /bin/sh is dash. Force bash so any
|
||||
# remaining edge cases (nested quoting, $RANDOM usage, etc.) parse
|
||||
# the same way on every platform.
|
||||
# Even after the patches above, the configure script's shebang is
|
||||
# `#!/bin/sh` and MSYS2's /bin/sh is dash. Force bash so any
|
||||
# remaining edge cases parse the same way on every platform.
|
||||
export CONFIG_SHELL="${CONFIG_SHELL:-$(command -v bash)}"
|
||||
"$CONFIG_SHELL" ./configure \
|
||||
--enable-static-tor \
|
||||
@@ -63,4 +214,4 @@ echo " $TOR_SRC_DIR"
|
||||
echo " $TOR_SRC_DIR/src/lib"
|
||||
echo
|
||||
echo "Suggested next step for Triangles:"
|
||||
echo ' make -f src/makefile.unix USE_TOR_EMBEDDED=1 TOR_SOURCE_ROOT=src/tor/tor-src'
|
||||
echo ' make -f src/makefile.unix USE_TOR_EMBEDDED=1 TOR_SOURCE_ROOT=src/tor/tor-src'
|
||||
Executable
+271
@@ -0,0 +1,271 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2019-07-04.01; # UTC
|
||||
|
||||
# Copyright (C) 2010-2021 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
|
||||
# func_error message
|
||||
func_error ()
|
||||
{
|
||||
echo "$me: $1" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv in
|
||||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin | msys)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_at_file at_file operation archive
|
||||
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
||||
# for each of them.
|
||||
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
||||
# since the user would need to supply preconverted file names to
|
||||
# binutils ar, at least for MinGW.
|
||||
func_at_file ()
|
||||
{
|
||||
operation=$2
|
||||
archive=$3
|
||||
at_file_contents=`cat "$1"`
|
||||
eval set x "$at_file_contents"
|
||||
shift
|
||||
|
||||
for member
|
||||
do
|
||||
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
func_error "no command. Try '$0 --help' for more information."
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<EOF
|
||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
||||
|
||||
Members may be specified in a file named with @FILE.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "$me, version $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $# -lt 3; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
|
||||
AR=$1
|
||||
shift
|
||||
while :
|
||||
do
|
||||
if test $# -lt 2; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
case $1 in
|
||||
-lib | -LIB \
|
||||
| -ltcg | -LTCG \
|
||||
| -machine* | -MACHINE* \
|
||||
| -subsystem* | -SUBSYSTEM* \
|
||||
| -verbose | -VERBOSE \
|
||||
| -wx* | -WX* )
|
||||
AR="$AR $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
action=$1
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
orig_archive=$1
|
||||
shift
|
||||
func_file_conv "$orig_archive"
|
||||
archive=$file
|
||||
|
||||
# strip leading dash in $action
|
||||
action=${action#-}
|
||||
|
||||
delete=
|
||||
extract=
|
||||
list=
|
||||
quick=
|
||||
replace=
|
||||
index=
|
||||
create=
|
||||
|
||||
while test -n "$action"
|
||||
do
|
||||
case $action in
|
||||
d*) delete=yes ;;
|
||||
x*) extract=yes ;;
|
||||
t*) list=yes ;;
|
||||
q*) quick=yes ;;
|
||||
r*) replace=yes ;;
|
||||
s*) index=yes ;;
|
||||
S*) ;; # the index is always updated implicitly
|
||||
c*) create=yes ;;
|
||||
u*) ;; # TODO: don't ignore the update modifier
|
||||
v*) ;; # TODO: don't ignore the verbose modifier
|
||||
*)
|
||||
func_error "unknown action specified"
|
||||
;;
|
||||
esac
|
||||
action=${action#?}
|
||||
done
|
||||
|
||||
case $delete$extract$list$quick$replace,$index in
|
||||
yes,* | ,yes)
|
||||
;;
|
||||
yesyes*)
|
||||
func_error "more than one action specified"
|
||||
;;
|
||||
*)
|
||||
func_error "no action specified"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$delete"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -REMOVE "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
elif test -n "$extract"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -EXTRACT "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
|
||||
| while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
if test -z "$create"; then
|
||||
echo "$me: creating $orig_archive"
|
||||
fi
|
||||
orig_archive=
|
||||
else
|
||||
orig_archive=$archive
|
||||
fi
|
||||
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_file_conv "${1#@}"
|
||||
set x "$@" "@$file"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
set x "$@" "$file"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
done
|
||||
|
||||
if test -n "$orig_archive"; then
|
||||
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
||||
else
|
||||
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
||||
fi
|
||||
|
||||
elif test -n "$list"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
$AR -NOLOGO -LIST "$archive" || exit $?
|
||||
fi
|
||||
Executable
+348
@@ -0,0 +1,348 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
+1754
File diff suppressed because it is too large
Load Diff
+1890
File diff suppressed because it is too large
Load Diff
Executable
+791
@@ -0,0 +1,791 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Executable
+541
@@ -0,0 +1,541 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Executable
+215
@@ -0,0 +1,215 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=https://www.perl.org/
|
||||
flex_URL=https://github.com/westes/flex
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Executable
+153
@@ -0,0 +1,153 @@
|
||||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name NAME --log-file PATH --trs-file PATH
|
||||
[--expect-failure {yes|no}] [--color-tests {yes|no}]
|
||||
[--enable-hard-errors {yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
See the GNU Automake documentation for information.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here. We create the file first, then append to it,
|
||||
# to ameliorate tests themselves also writing to the log file. Our tests
|
||||
# don't, but others can (automake bug#35762).
|
||||
: >"$log_file"
|
||||
"$@" >>"$log_file" 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
tweaked_estatus=1
|
||||
else
|
||||
tweaked_estatus=$estatus
|
||||
fi
|
||||
|
||||
case $tweaked_estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report the test outcome and exit status in the logs, so that one can
|
||||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Vendored
+1255
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
@LOCALSTATEDIR@/log/tor/*log {
|
||||
daily
|
||||
rotate 5
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
# you may need to change the username/groupname below
|
||||
create 0640 _tor _tor
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/tor reload > /dev/null
|
||||
endscript
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
;tor.nsi - A basic win32 installer for Tor
|
||||
; Originally written by J Doe.
|
||||
; Modified by Steve Topletz, Andrew Lewman
|
||||
; See the Tor LICENSE for licensing information
|
||||
;-----------------------------------------
|
||||
;
|
||||
!include "MUI.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
!insertmacro GetParameters
|
||||
!define VERSION "0.4.9.6"
|
||||
!define INSTALLER "tor-${VERSION}-win32.exe"
|
||||
!define WEBSITE "https://www.torproject.org/"
|
||||
!define LICENSE "LICENSE"
|
||||
!define BIN "..\bin" ;BIN is where it expects to find tor.exe, tor-resolve.exe
|
||||
|
||||
|
||||
SetCompressor /SOLID LZMA ;Tighter compression
|
||||
RequestExecutionLevel user ;Updated for Vista compatibility
|
||||
OutFile ${INSTALLER}
|
||||
InstallDir $PROGRAMFILES\Tor
|
||||
SetOverWrite ifnewer
|
||||
Name "Tor"
|
||||
Caption "Tor ${VERSION} Setup"
|
||||
BrandingText "The Onion Router"
|
||||
CRCCheck on
|
||||
XPStyle on
|
||||
VIProductVersion "${VERSION}"
|
||||
VIAddVersionKey "ProductName" "The Onion Router: Tor"
|
||||
VIAddVersionKey "Comments" "${WEBSITE}"
|
||||
VIAddVersionKey "LegalTrademarks" "Three line BSD"
|
||||
VIAddVersionKey "LegalCopyright" "©2004-2008, Roger Dingledine, Nick Mathewson. ©2009 The Tor Project, Inc. "
|
||||
VIAddVersionKey "FileDescription" "Tor is an implementation of Onion Routing. You can read more at ${WEBSITE}"
|
||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
||||
|
||||
!define MUI_WELCOMEPAGE_TITLE "Welcome to the Tor Setup Wizard"
|
||||
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Tor ${VERSION}.\r\n\r\nIf you have previously installed Tor and it is currently running, please exit Tor first before continuing this installation.\r\n\r\n$_CLICK"
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
|
||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico"
|
||||
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\tor.exe"
|
||||
!define MUI_FINISHPAGE_LINK "Visit the Tor website for the latest updates."
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION ${WEBSITE}
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; There's no point in having a clickthrough license: Our license adds
|
||||
; certain rights, but doesn't remove them.
|
||||
; !insertmacro MUI_PAGE_LICENSE "${LICENSE}"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Var CONFIGDIR
|
||||
Var CONFIGFILE
|
||||
|
||||
Function .onInit
|
||||
Call ParseCmdLine
|
||||
FunctionEnd
|
||||
|
||||
;Sections
|
||||
;--------
|
||||
|
||||
Section "Tor" Tor
|
||||
;Files that have to be installed for tor to run and that the user
|
||||
;cannot choose not to install
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
Call ExtractBinaries
|
||||
Call ExtractIcon
|
||||
WriteINIStr "$INSTDIR\Tor Website.url" "InternetShortcut" "URL" ${WEBSITE}
|
||||
|
||||
StrCpy $CONFIGFILE "torrc"
|
||||
StrCpy $CONFIGDIR $APPDATA\Tor
|
||||
; ;If $APPDATA isn't valid here (Early win95 releases with no updated
|
||||
; ; shfolder.dll) then we put it in the program directory instead.
|
||||
; StrCmp $APPDATA "" "" +2
|
||||
; StrCpy $CONFIGDIR $INSTDIR
|
||||
SetOutPath $CONFIGDIR
|
||||
;If there's already a torrc config file, ask if they want to
|
||||
;overwrite it with the new one.
|
||||
${If} ${FileExists} "$CONFIGDIR\torrc"
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO "You already have a Tor config file.$\r$\nDo you want to overwrite it with the default sample config file?" IDYES Yes IDNO No
|
||||
Yes:
|
||||
Delete $CONFIGDIR\torrc
|
||||
Goto Next
|
||||
No:
|
||||
StrCpy $CONFIGFILE "torrc.sample"
|
||||
Next:
|
||||
${EndIf}
|
||||
File /oname=$CONFIGFILE "..\src\config\torrc.sample"
|
||||
|
||||
; the geoip file needs to be included and stuffed into the right directory
|
||||
; otherwise tor is unhappy
|
||||
SetOutPath $APPDATA\Tor
|
||||
Call ExtractGEOIP
|
||||
SectionEnd
|
||||
|
||||
Section "Documents" Docs
|
||||
Call ExtractDocuments
|
||||
SectionEnd
|
||||
|
||||
SubSection /e "Shortcuts" Shortcuts
|
||||
|
||||
Section "Start Menu" StartMenu
|
||||
SetOutPath $INSTDIR
|
||||
${If} ${FileExists} "$SMPROGRAMS\Tor\*.*"
|
||||
RMDir /r "$SMPROGRAMS\Tor"
|
||||
${EndIf}
|
||||
Call CreateTorLinks
|
||||
${If} ${FileExists} "$INSTDIR\Documents\*.*"
|
||||
Call CreateDocLinks
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
Section "Desktop" Desktop
|
||||
SetOutPath $INSTDIR
|
||||
CreateShortCut "$DESKTOP\Tor.lnk" "$INSTDIR\tor.exe" "" "$INSTDIR\tor.ico"
|
||||
SectionEnd
|
||||
|
||||
Section /o "Run at startup" Startup
|
||||
SetOutPath $INSTDIR
|
||||
CreateShortCut "$SMSTARTUP\Tor.lnk" "$INSTDIR\tor.exe" "" "$INSTDIR\tor.ico" "" SW_SHOWMINIMIZED
|
||||
SectionEnd
|
||||
|
||||
SubSectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
Call un.InstallPackage
|
||||
SectionEnd
|
||||
|
||||
Section -End
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
;The registry entries simply add the Tor uninstaller to the Windows
|
||||
;uninstall list.
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "DisplayName" "Tor (remove only)"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
||||
SectionEnd
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Tor} "The core executable and config files needed for Tor to run."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Docs} "Documentation about Tor."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${ShortCuts} "Shortcuts to easily start Tor"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${StartMenu} "Shortcuts to access Tor and its documentation from the Start Menu"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Desktop} "A shortcut to start Tor from the desktop"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Startup} "Launches Tor automatically at startup in a minimized window"
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
;####################Functions#########################
|
||||
|
||||
Function ExtractBinaries
|
||||
File "${BIN}\tor.exe"
|
||||
File "${BIN}\tor-resolve.exe"
|
||||
FunctionEnd
|
||||
|
||||
Function ExtractGEOIP
|
||||
File "${BIN}\geoip"
|
||||
FunctionEnd
|
||||
|
||||
Function ExtractIcon
|
||||
File "${BIN}\tor.ico"
|
||||
FunctionEnd
|
||||
|
||||
Function ExtractSpecs
|
||||
File "..\doc\HACKING"
|
||||
File "..\doc\spec\address-spec.txt"
|
||||
File "..\doc\spec\bridges-spec.txt"
|
||||
File "..\doc\spec\control-spec.txt"
|
||||
File "..\doc\spec\dir-spec.txt"
|
||||
File "..\doc\spec\path-spec.txt"
|
||||
File "..\doc\spec\rend-spec.txt"
|
||||
File "..\doc\spec\socks-extensions.txt"
|
||||
File "..\doc\spec\tor-spec.txt"
|
||||
File "..\doc\spec\version-spec.txt"
|
||||
FunctionEnd
|
||||
|
||||
Function ExtractHTML
|
||||
File "..\doc\tor.html"
|
||||
File "..\doc\torify.html"
|
||||
File "..\doc\tor-resolve.html"
|
||||
File "..\doc\tor-gencert.html"
|
||||
FunctionEnd
|
||||
|
||||
Function ExtractReleaseDocs
|
||||
File "..\README"
|
||||
File "..\ChangeLog"
|
||||
File "..\LICENSE"
|
||||
FunctionEnd
|
||||
|
||||
Function ExtractDocuments
|
||||
SetOutPath "$INSTDIR\Documents"
|
||||
Call ExtractSpecs
|
||||
Call ExtractHTML
|
||||
Call ExtractReleaseDocs
|
||||
FunctionEnd
|
||||
|
||||
Function un.InstallFiles
|
||||
Delete "$DESKTOP\Tor.lnk"
|
||||
Delete "$INSTDIR\tor.exe"
|
||||
Delete "$INSTDIR\tor-resolve.exe"
|
||||
Delete "$INSTDIR\Tor Website.url"
|
||||
Delete "$INSTDIR\torrc"
|
||||
Delete "$INSTDIR\torrc.sample"
|
||||
Delete "$INSTDIR\tor.ico"
|
||||
Delete "$SMSTARTUP\Tor.lnk"
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
Delete "$INSTDIR\geoip"
|
||||
FunctionEnd
|
||||
|
||||
Function un.InstallDirectories
|
||||
${If} $CONFIGDIR == $INSTDIR
|
||||
RMDir /r $CONFIGDIR
|
||||
${EndIf}
|
||||
RMDir /r "$INSTDIR\Documents"
|
||||
RMDir $INSTDIR
|
||||
RMDir /r "$SMPROGRAMS\Tor"
|
||||
RMDir /r "$APPDATA\Tor"
|
||||
FunctionEnd
|
||||
|
||||
Function un.WriteRegistry
|
||||
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Tor"
|
||||
FunctionEnd
|
||||
|
||||
Function un.InstallPackage
|
||||
Call un.InstallFiles
|
||||
Call un.InstallDirectories
|
||||
Call un.WriteRegistry
|
||||
FunctionEnd
|
||||
|
||||
Function CreateTorLinks
|
||||
CreateDirectory "$SMPROGRAMS\Tor"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Tor.lnk" "$INSTDIR\tor.exe" "" "$INSTDIR\tor.ico"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Torrc.lnk" "Notepad.exe" "$CONFIGDIR\torrc"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Tor Website.lnk" "$INSTDIR\Tor Website.url"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
FunctionEnd
|
||||
|
||||
Function CreateDocLinks
|
||||
CreateDirectory "$SMPROGRAMS\Tor\Documents"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Documentation.lnk" "$INSTDIR\Documents"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Specification.lnk" "$INSTDIR\Documents\tor-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Address Specification.lnk" "$INSTDIR\Documents\address-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Bridges Specification.lnk" "$INSTDIR\Documents\bridges-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Control Specification.lnk" "$INSTDIR\Documents\control-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Directory Specification.lnk" "$INSTDIR\Documents\dir-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Path Specification.lnk" "$INSTDIR\Documents\path-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Rend Specification.lnk" "$INSTDIR\Documents\rend-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Version Specification.lnk" "$INSTDIR\Documents\version-spec.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor SOCKS Extensions.lnk" "$INSTDIR\Documents\socks-extensions.txt"
|
||||
FunctionEnd
|
||||
|
||||
Function ParseCmdLine
|
||||
${GetParameters} $1
|
||||
${If} $1 == "-x" ;Extract All Files
|
||||
StrCpy $INSTDIR $EXEDIR
|
||||
Call ExtractBinaries
|
||||
Call ExtractDocuments
|
||||
Quit
|
||||
${ElseIf} $1 == "-b" ;Extract Binaries Only
|
||||
StrCpy $INSTDIR $EXEDIR
|
||||
Call ExtractBinaries
|
||||
Quit
|
||||
${ElseIf} $1 != ""
|
||||
MessageBox MB_OK|MB_TOPMOST `${Installer} [-x|-b]$\r$\n$\r$\n -x Extract all files$\r$\n -b Extract binary files only`
|
||||
Quit
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
;tor.nsi - A basic win32 installer for Tor
|
||||
; Originally written by J Doe.
|
||||
; See LICENSE for licensing information
|
||||
;-----------------------------------------
|
||||
; NOTE: This file might be obsolete. Look at tor-mingw.nsi.in instead.
|
||||
;-----------------------------------------
|
||||
; How to make an installer:
|
||||
; Step 0. If you are a Tor maintainer, make sure that tor.nsi has
|
||||
; the correct version number.
|
||||
; Step 1. Download and install OpenSSL. Make sure that the OpenSSL
|
||||
; version listed below matches the one you downloaded.
|
||||
; Step 2. Download and install NSIS (http://nsis.sourceforge.net)
|
||||
; Step 3. Make a directory under the main tor directory called "bin".
|
||||
; Step 4. Copy ssleay32.dll and libeay32.dll from OpenSSL into "bin".
|
||||
; Step 5. Run man2html on tor.1.in; call the result tor-reference.html
|
||||
; Run man2html on tor-resolve.1; call the result tor-resolve.html
|
||||
; Step 6. Copy torrc.sample.in to torrc.sample.
|
||||
; Step 7. Build tor.exe and tor_resolve.exe; save the result into bin.
|
||||
; Step 8. cd into contrib and run "makensis tor.nsi".
|
||||
;
|
||||
; Problems:
|
||||
; - Copying torrc.sample.in to torrc.sample and tor.1.in (implicitly)
|
||||
; to tor.1 is a Bad Thing, and leaves us with @autoconf@ vars in the final
|
||||
; result.
|
||||
; - Building Tor requires too much windows C clue.
|
||||
; - We should have actual makefiles for VC that do the right thing.
|
||||
; - I need to learn more NSIS juju to solve these:
|
||||
; - There should be a batteries-included installer that comes with
|
||||
; privoxy too. (Check privoxy license on this; be sure to include
|
||||
; all privoxy documents.)
|
||||
; - The filename should probably have a revision number.
|
||||
|
||||
!include "MUI.nsh"
|
||||
|
||||
!define VERSION "0.1.2.3-alpha-dev"
|
||||
!define INSTALLER "tor-${VERSION}-win32.exe"
|
||||
!define WEBSITE "https://www.torproject.org/"
|
||||
|
||||
!define LICENSE "..\LICENSE"
|
||||
;BIN is where it expects to find tor.exe, tor_resolve.exe, libeay32.dll and
|
||||
; ssleay32.dll
|
||||
!define BIN "..\bin"
|
||||
|
||||
SetCompressor lzma
|
||||
;SetCompressor zlib
|
||||
OutFile ${INSTALLER}
|
||||
InstallDir $PROGRAMFILES\Tor
|
||||
SetOverWrite ifnewer
|
||||
|
||||
Name "Tor"
|
||||
Caption "Tor ${VERSION} Setup"
|
||||
BrandingText "The Onion Router"
|
||||
CRCCheck on
|
||||
|
||||
;Use upx on the installer header to shrink the size.
|
||||
!packhdr header.dat "upx --best header.dat"
|
||||
|
||||
!define MUI_WELCOMEPAGE_TITLE "Welcome to the Tor ${VERSION} Setup Wizard"
|
||||
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Tor ${VERSION}.\r\n\r\nIf you have previously installed Tor and it is currently running, please exit Tor first before continuing this installation.\r\n\r\n$_CLICK"
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
|
||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico"
|
||||
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\tor.exe"
|
||||
!define MUI_FINISHPAGE_LINK "Visit the Tor website for the latest updates."
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION ${WEBSITE}
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; There's no point in having a clickthrough license: Our license adds
|
||||
; certain rights, but doesn't remove them.
|
||||
; !insertmacro MUI_PAGE_LICENSE "${LICENSE}"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Var configdir
|
||||
Var configfile
|
||||
|
||||
;Sections
|
||||
;--------
|
||||
|
||||
Section "Tor" Tor
|
||||
;Files that have to be installed for tor to run and that the user
|
||||
;cannot choose not to install
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "${BIN}\tor.exe"
|
||||
File "${BIN}\tor_resolve.exe"
|
||||
WriteIniStr "$INSTDIR\Tor Website.url" "InternetShortcut" "URL" ${WEBSITE}
|
||||
|
||||
StrCpy $configfile "torrc"
|
||||
StrCpy $configdir $APPDATA\Tor
|
||||
; ;If $APPDATA isn't valid here (Early win95 releases with no updated
|
||||
; ; shfolder.dll) then we put it in the program directory instead.
|
||||
; StrCmp $APPDATA "" "" +2
|
||||
; StrCpy $configdir $INSTDIR
|
||||
SetOutPath $configdir
|
||||
;If there's already a torrc config file, ask if they want to
|
||||
;overwrite it with the new one.
|
||||
IfFileExists "$configdir\torrc" "" endiftorrc
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO "You already have a Tor config file.$\r$\nDo you want to overwrite it with the default sample config file?" IDNO yesreplace
|
||||
Delete $configdir\torrc
|
||||
Goto endiftorrc
|
||||
yesreplace:
|
||||
StrCpy $configfile "torrc.sample"
|
||||
endiftorrc:
|
||||
File /oname=$configfile "..\src\config\torrc.sample"
|
||||
SectionEnd
|
||||
|
||||
Section "OpenSSL 0.9.8a" OpenSSL
|
||||
SetOutPath $INSTDIR
|
||||
File "${BIN}\libeay32.dll"
|
||||
File "${BIN}\ssleay32.dll"
|
||||
SectionEnd
|
||||
|
||||
Section "Documents" Docs
|
||||
SetOutPath "$INSTDIR\Documents"
|
||||
;File "..\doc\FAQ"
|
||||
File "..\doc\HACKING"
|
||||
File "..\doc\spec\control-spec.txt"
|
||||
File "..\doc\spec\dir-spec.txt"
|
||||
File "..\doc\spec\rend-spec.txt"
|
||||
File "..\doc\spec\socks-extensions.txt"
|
||||
File "..\doc\spec\tor-spec.txt"
|
||||
File "..\doc\spec\version-spec.txt"
|
||||
;
|
||||
; WEBSITE-FILES-HERE
|
||||
;
|
||||
File "..\doc\tor-resolve.html"
|
||||
File "..\doc\tor-reference.html"
|
||||
;
|
||||
File "..\doc\design-paper\tor-design.pdf"
|
||||
;
|
||||
File "..\README"
|
||||
File "..\AUTHORS"
|
||||
File "..\ChangeLog"
|
||||
File "..\LICENSE"
|
||||
SectionEnd
|
||||
|
||||
SubSection /e "Shortcuts" Shortcuts
|
||||
|
||||
Section "Start Menu" StartMenu
|
||||
SetOutPath $INSTDIR
|
||||
IfFileExists "$SMPROGRAMS\Tor\*.*" "" +2
|
||||
RMDir /r "$SMPROGRAMS\Tor"
|
||||
CreateDirectory "$SMPROGRAMS\Tor"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Tor.lnk" "$INSTDIR\tor.exe"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Torrc.lnk" "Notepad.exe" "$configdir\torrc"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Tor Website.lnk" "$INSTDIR\Tor Website.url"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
IfFileExists "$INSTDIR\Documents\*.*" "" endifdocs
|
||||
CreateDirectory "$SMPROGRAMS\Tor\Documents"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Manual.lnk" "$INSTDIR\Documents\tor-reference.html"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Documentation.lnk" "$INSTDIR\Documents"
|
||||
CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Specification.lnk" "$INSTDIR\Documents\tor-spec.txt"
|
||||
endifdocs:
|
||||
SectionEnd
|
||||
|
||||
Section "Desktop" Desktop
|
||||
SetOutPath $INSTDIR
|
||||
CreateShortCut "$DESKTOP\Tor.lnk" "$INSTDIR\tor.exe"
|
||||
SectionEnd
|
||||
|
||||
Section /o "Run at startup" Startup
|
||||
SetOutPath $INSTDIR
|
||||
CreateShortCut "$SMSTARTUP\Tor.lnk" "$INSTDIR\tor.exe" "" "" 0 SW_SHOWMINIMIZED
|
||||
SectionEnd
|
||||
|
||||
SubSectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
Delete "$DESKTOP\Tor.lnk"
|
||||
Delete "$INSTDIR\libeay32.dll"
|
||||
Delete "$INSTDIR\ssleay32.dll"
|
||||
Delete "$INSTDIR\tor.exe"
|
||||
Delete "$INSTDIR\tor_resolve.exe"
|
||||
Delete "$INSTDIR\Tor Website.url"
|
||||
Delete "$INSTDIR\torrc"
|
||||
Delete "$INSTDIR\torrc.sample"
|
||||
StrCmp $configdir $INSTDIR +2 ""
|
||||
RMDir /r $configdir
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
RMDir /r "$INSTDIR\Documents"
|
||||
RMDir $INSTDIR
|
||||
RMDir /r "$SMPROGRAMS\Tor"
|
||||
Delete "$SMSTARTUP\Tor.lnk"
|
||||
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Tor"
|
||||
SectionEnd
|
||||
|
||||
Section -End
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
;The registry entries simply add the Tor uninstaller to the Windows
|
||||
;uninstall list.
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "DisplayName" "Tor (remove only)"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
||||
SectionEnd
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Tor} "The core executable and config files needed for Tor to run."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${OpenSSL} "OpenSSL libraries required by Tor."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Docs} "Documentation about Tor."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${ShortCuts} "Shortcuts to easily start Tor"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${StartMenu} "Shortcuts to access Tor and its documentation from the Start Menu"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Desktop} "A shortcut to start Tor from the desktop"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Startup} "Launches Tor automatically at startup in a minimized window"
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
@@ -0,0 +1,918 @@
|
||||
/* orconfig.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* All assert failures are fatal */
|
||||
#undef ALL_BUGS_ARE_FATAL
|
||||
|
||||
/* # for 0.4.9.6 Approximate date when this software was released. (Updated
|
||||
when the version changes.) */
|
||||
#undef APPROX_RELEASE_DATE
|
||||
|
||||
/* tor's build directory */
|
||||
#undef BUILDDIR
|
||||
|
||||
/* Compiler name */
|
||||
#undef COMPILER
|
||||
|
||||
/* Compiler vendor */
|
||||
#undef COMPILER_VENDOR
|
||||
|
||||
/* Compiler version */
|
||||
#undef COMPILER_VERSION
|
||||
|
||||
/* tor's configuration directory */
|
||||
#undef CONFDIR
|
||||
|
||||
/* Flags passed to configure */
|
||||
#undef CONFIG_FLAGS
|
||||
|
||||
/* Enable smartlist debugging */
|
||||
#undef DEBUG_SMARTLIST
|
||||
|
||||
/* Defined if we're turning off memory safety code to look for bugs */
|
||||
#undef DISABLE_MEMORY_SENTINELS
|
||||
|
||||
/* Defined if we're not going to look for a torrc in SYSCONF */
|
||||
#undef DISABLE_SYSTEM_TORRC
|
||||
|
||||
/* Define to 1 iff memset(0) sets doubles to 0.0 */
|
||||
#undef DOUBLE_0_REP_IS_ZERO_BYTES
|
||||
|
||||
/* Defined if coverage support is enabled for the unit tests */
|
||||
#undef ENABLE_COVERAGE
|
||||
|
||||
/* Defined if we're building with additional, fragile and expensive compiler
|
||||
hardening */
|
||||
#undef ENABLE_FRAGILE_HARDENING
|
||||
|
||||
/* Defined if tor is building in GPL-licensed mode. */
|
||||
#undef ENABLE_GPL
|
||||
|
||||
/* Defined if we default to host local appdata paths on Windows */
|
||||
#undef ENABLE_LOCAL_APPDATA
|
||||
|
||||
/* Defined if we're building with NSS. */
|
||||
#undef ENABLE_NSS
|
||||
|
||||
/* Defined if we're building with OpenSSL or LibreSSL */
|
||||
#undef ENABLE_OPENSSL
|
||||
|
||||
/* Defined if we're building with support for in-process restart debugging. */
|
||||
#undef ENABLE_RESTART_DEBUGGING
|
||||
|
||||
/* Defined if we're going to try to use zstd's "static-only" APIs. */
|
||||
#undef ENABLE_ZSTD_ADVANCED_APIS
|
||||
|
||||
/* Define if enum is always signed */
|
||||
#undef ENUM_VALS_ARE_SIGNED
|
||||
|
||||
/* We statically link with EquiX */
|
||||
#undef EQUIX_STATIC
|
||||
|
||||
/* Define to nothing if C supports flexible array members, and to 1 if it does
|
||||
not. That way, with a declaration like `struct s { int n; double
|
||||
d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
|
||||
compilers. When computing the size of such an object, don't use 'sizeof
|
||||
(struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
|
||||
instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
|
||||
MSVC and with C++ compilers. */
|
||||
#undef FLEXIBLE_ARRAY_MEMBER
|
||||
|
||||
/* Output size in bytes for the internal customization of HashX */
|
||||
#undef HASHX_SIZE
|
||||
|
||||
/* We statically link with HashX */
|
||||
#undef HASHX_STATIC
|
||||
|
||||
/* Define to 1 if you have the `accept4' function. */
|
||||
#undef HAVE_ACCEPT4
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* defined if we have the fallthrough attribute. */
|
||||
#undef HAVE_ATTR_FALLTHROUGH
|
||||
|
||||
/* defined if we have the nonstring attribute. */
|
||||
#undef HAVE_ATTR_NONSTRING
|
||||
|
||||
/* Define to 1 if you have the `backtrace' function. */
|
||||
#undef HAVE_BACKTRACE
|
||||
|
||||
/* Define to 1 if you have the `backtrace_symbols_fd' function. */
|
||||
#undef HAVE_BACKTRACE_SYMBOLS_FD
|
||||
|
||||
/* Define to 1 if you have the `cap_set_proc' function. */
|
||||
#undef HAVE_CAP_SET_PROC
|
||||
|
||||
/* True if we have -Wnull-dereference */
|
||||
#undef HAVE_CFLAG_WNULL_DEREFERENCE
|
||||
|
||||
/* True if we have -Woverlength-strings */
|
||||
#undef HAVE_CFLAG_WOVERLENGTH_STRINGS
|
||||
|
||||
/* True if we have -Wunused-const-variable */
|
||||
#undef HAVE_CFLAG_WUNUSED_CONST_VARIABLE
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||
#undef HAVE_CRT_EXTERNS_H
|
||||
|
||||
/* Define to 1 if you have the <crypto_scalarmult_curve25519.h> header file.
|
||||
*/
|
||||
#undef HAVE_CRYPTO_SCALARMULT_CURVE25519_H
|
||||
|
||||
/* Define to 1 if you have the <cygwin/signal.h> header file. */
|
||||
#undef HAVE_CYGWIN_SIGNAL_H
|
||||
|
||||
/* Define to 1 if you have the declaration of `mlockall', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_MLOCKALL
|
||||
|
||||
/* Define to 1 if you have the declaration of `SecureZeroMemory', and to 0 if
|
||||
you don't. */
|
||||
#undef HAVE_DECL_SECUREZEROMEMORY
|
||||
|
||||
/* Define to 1 if you have the declaration of `_getwch', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL__GETWCH
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the `evdns_base_get_nameserver_addr' function. */
|
||||
#undef HAVE_EVDNS_BASE_GET_NAMESERVER_ADDR
|
||||
|
||||
/* Define to 1 if you have the <event2/bufferevent_ssl.h> header file. */
|
||||
#undef HAVE_EVENT2_BUFFEREVENT_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <event2/dns.h> header file. */
|
||||
#undef HAVE_EVENT2_DNS_H
|
||||
|
||||
/* Define to 1 if you have the <event2/event.h> header file. */
|
||||
#undef HAVE_EVENT2_EVENT_H
|
||||
|
||||
/* Define to 1 if you have the `eventfd' function. */
|
||||
#undef HAVE_EVENTFD
|
||||
|
||||
/* Define to 1 if you have the `EVP_PBE_scrypt' function. */
|
||||
#undef HAVE_EVP_PBE_SCRYPT
|
||||
|
||||
/* Define to 1 if you have the `evutil_secure_rng_add_bytes' function. */
|
||||
#undef HAVE_EVUTIL_SECURE_RNG_ADD_BYTES
|
||||
|
||||
/* Define to 1 if you have the `evutil_secure_rng_set_urandom_device_file'
|
||||
function. */
|
||||
#undef HAVE_EVUTIL_SECURE_RNG_SET_URANDOM_DEVICE_FILE
|
||||
|
||||
/* Define to 1 if you have the <execinfo.h> header file. */
|
||||
#undef HAVE_EXECINFO_H
|
||||
|
||||
/* Define to 1 if you have the `explicit_bzero' function. */
|
||||
#undef HAVE_EXPLICIT_BZERO
|
||||
|
||||
/* Defined if we have extern char **environ already declared */
|
||||
#undef HAVE_EXTERN_ENVIRON_DECLARED
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#undef HAVE_FLOCK
|
||||
|
||||
/* Define to 1 if you have the `fsync' function. */
|
||||
#undef HAVE_FSYNC
|
||||
|
||||
/* Define to 1 if you have the `ftime' function. */
|
||||
#undef HAVE_FTIME
|
||||
|
||||
/* Define to 1 if you have the `getaddrinfo' function. */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* Define to 1 if you have the `getdelim' function. */
|
||||
#undef HAVE_GETDELIM
|
||||
|
||||
/* Define to 1 if you have the `getentropy' function. */
|
||||
#undef HAVE_GETENTROPY
|
||||
|
||||
/* Define this if you have any gethostbyname_r() */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* Define this if gethostbyname_r takes 3 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3_ARG
|
||||
|
||||
/* Define this if gethostbyname_r takes 5 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5_ARG
|
||||
|
||||
/* Define this if gethostbyname_r takes 6 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6_ARG
|
||||
|
||||
/* Define to 1 if you have the `getifaddrs' function. */
|
||||
#undef HAVE_GETIFADDRS
|
||||
|
||||
/* Define to 1 if you have the `getline' function. */
|
||||
#undef HAVE_GETLINE
|
||||
|
||||
/* Define to 1 if you have the `getresgid' function. */
|
||||
#undef HAVE_GETRESGID
|
||||
|
||||
/* Define to 1 if you have the `getresuid' function. */
|
||||
#undef HAVE_GETRESUID
|
||||
|
||||
/* Define to 1 if you have the `getrlimit' function. */
|
||||
#undef HAVE_GETRLIMIT
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the `get_current_dir_name' function. */
|
||||
#undef HAVE_GET_CURRENT_DIR_NAME
|
||||
|
||||
/* Define to 1 if you have the `glob' function. */
|
||||
#undef HAVE_GLOB
|
||||
|
||||
/* Define to 1 if you have the <glob.h> header file. */
|
||||
#undef HAVE_GLOB_H
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#undef HAVE_GMTIME_R
|
||||
|
||||
/* Define to 1 if you have the `gnu_get_libc_version' function. */
|
||||
#undef HAVE_GNU_GET_LIBC_VERSION
|
||||
|
||||
/* Define to 1 if you have the <gnu/libc-version.h> header file. */
|
||||
#undef HAVE_GNU_LIBC_VERSION_H
|
||||
|
||||
/* Define to 1 if you have the <grp.h> header file. */
|
||||
#undef HAVE_GRP_H
|
||||
|
||||
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
||||
#undef HAVE_IFADDRS_H
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `ioctl' function. */
|
||||
#undef HAVE_IOCTL
|
||||
|
||||
/* Define to 1 if you have the `issetugid' function. */
|
||||
#undef HAVE_ISSETUGID
|
||||
|
||||
/* Defined if KIST scheduler is supported on this system */
|
||||
#undef HAVE_KIST_SUPPORT
|
||||
|
||||
/* Define to 1 if you have the `cap' library (-lcap). */
|
||||
#undef HAVE_LIBCAP
|
||||
|
||||
/* Define to 1 if you have the <libscrypt.h> header file. */
|
||||
#undef HAVE_LIBSCRYPT_H
|
||||
|
||||
/* Define to 1 if you have the `libscrypt_scrypt' function. */
|
||||
#undef HAVE_LIBSCRYPT_SCRYPT
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <linux/if.h> header file. */
|
||||
#undef HAVE_LINUX_IF_H
|
||||
|
||||
/* Define to 1 if you have the <linux/netfilter_ipv4.h> header file. */
|
||||
#undef HAVE_LINUX_NETFILTER_IPV4_H
|
||||
|
||||
/* Define to 1 if you have the <linux/netfilter_ipv6/ip6_tables.h> header
|
||||
file. */
|
||||
#undef HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H
|
||||
|
||||
/* Define to 1 if you have the <linux/types.h> header file. */
|
||||
#undef HAVE_LINUX_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the `llround' function. */
|
||||
#undef HAVE_LLROUND
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if you have the `lround' function. */
|
||||
#undef HAVE_LROUND
|
||||
|
||||
/* Define to 1 if you have the <lttng/tracepoint.h> header file. */
|
||||
#undef HAVE_LTTNG_TRACEPOINT_H
|
||||
|
||||
/* Have LZMA */
|
||||
#undef HAVE_LZMA
|
||||
|
||||
/* Define to 1 if you have the <machine/limits.h> header file. */
|
||||
#undef HAVE_MACHINE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the `mach_approximate_time' function. */
|
||||
#undef HAVE_MACH_APPROXIMATE_TIME
|
||||
|
||||
/* Define to 1 if you have the <mach/vm_inherit.h> header file. */
|
||||
#undef HAVE_MACH_VM_INHERIT_H
|
||||
|
||||
/* Defined if the compiler supports __FUNCTION__ */
|
||||
#undef HAVE_MACRO__FUNCTION__
|
||||
|
||||
/* Defined if the compiler supports __FUNC__ */
|
||||
#undef HAVE_MACRO__FUNC__
|
||||
|
||||
/* Defined if the compiler supports __func__ */
|
||||
#undef HAVE_MACRO__func__
|
||||
|
||||
/* Define to 1 if you have the `madvise' function. */
|
||||
#undef HAVE_MADVISE
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define to 1 if you have the `memmem' function. */
|
||||
#undef HAVE_MEMMEM
|
||||
|
||||
/* Define to 1 if you have the `memset_s' function. */
|
||||
#undef HAVE_MEMSET_S
|
||||
|
||||
/* Define to 1 if you have the `minherit' function. */
|
||||
#undef HAVE_MINHERIT
|
||||
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
#undef HAVE_MINIX_CONFIG_H
|
||||
|
||||
/* Define to 1 if you have the `mlockall' function. */
|
||||
#undef HAVE_MLOCKALL
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Compile with Directory Authority feature support */
|
||||
#undef HAVE_MODULE_DIRAUTH
|
||||
|
||||
/* Compile with directory cache support */
|
||||
#undef HAVE_MODULE_DIRCACHE
|
||||
|
||||
/* Compile with proof-of-work support */
|
||||
#undef HAVE_MODULE_POW
|
||||
|
||||
/* Compile with Relay feature support */
|
||||
#undef HAVE_MODULE_RELAY
|
||||
|
||||
/* Define to 1 if you have the <nacl/crypto_scalarmult_curve25519.h> header
|
||||
file. */
|
||||
#undef HAVE_NACL_CRYPTO_SCALARMULT_CURVE25519_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in6.h> header file. */
|
||||
#undef HAVE_NETINET_IN6_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if you have the <net/pfvar.h> header file. */
|
||||
#undef HAVE_NET_PFVAR_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
#undef HAVE_OPENSSL_ENGINE_H
|
||||
|
||||
/* Define to 1 if you have the `pipe' function. */
|
||||
#undef HAVE_PIPE
|
||||
|
||||
/* Define to 1 if you have the `pipe2' function. */
|
||||
#undef HAVE_PIPE2
|
||||
|
||||
/* Define to 1 if you have the `prctl' function. */
|
||||
#undef HAVE_PRCTL
|
||||
|
||||
/* Define to 1 if you have the `pthread_condattr_setclock' function. */
|
||||
#undef HAVE_PTHREAD_CONDATTR_SETCLOCK
|
||||
|
||||
/* Define to 1 if you have the `pthread_create' function. */
|
||||
#undef HAVE_PTHREAD_CREATE
|
||||
|
||||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
#undef HAVE_PTHREAD_H
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the `readpassphrase' function. */
|
||||
#undef HAVE_READPASSPHRASE
|
||||
|
||||
/* Define to 1 if you have the <readpassphrase.h> header file. */
|
||||
#undef HAVE_READPASSPHRASE_H
|
||||
|
||||
/* Define to 1 if you have the `rint' function. */
|
||||
#undef HAVE_RINT
|
||||
|
||||
/* Define to 1 if the system has the type `rlim_t'. */
|
||||
#undef HAVE_RLIM_T
|
||||
|
||||
/* Define to 1 if you have the `RtlSecureZeroMemory' function. */
|
||||
#undef HAVE_RTLSECUREZEROMEMORY
|
||||
|
||||
/* Define to 1 if the system has the type `sa_family_t'. */
|
||||
#undef HAVE_SA_FAMILY_T
|
||||
|
||||
/* Define to 1 if you have the <seccomp.h> header file. */
|
||||
#undef HAVE_SECCOMP_H
|
||||
|
||||
/* Define to 1 if you have the `SecureZeroMemory' function. */
|
||||
#undef HAVE_SECUREZEROMEMORY
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#undef HAVE_SIGNAL_H
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `socketpair' function. */
|
||||
#undef HAVE_SOCKETPAIR
|
||||
|
||||
/* Define to 1 if the system has the type `ssize_t'. */
|
||||
#undef HAVE_SSIZE_T
|
||||
|
||||
/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
|
||||
#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL
|
||||
|
||||
/* Define to 1 if you have the `SSL_set_ciphersuites' function. */
|
||||
#undef HAVE_SSL_SET_CIPHERSUITES
|
||||
|
||||
/* Define to 1 if you have the `statvfs' function. */
|
||||
#undef HAVE_STATVFS
|
||||
|
||||
/* Define to 1 if you have the <stdatomic.h> header file. */
|
||||
#undef HAVE_STDATOMIC_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#undef HAVE_STRNCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strnlen' function. */
|
||||
#undef HAVE_STRNLEN
|
||||
|
||||
/* Define to 1 if you have the `strptime' function. */
|
||||
#undef HAVE_STRPTIME
|
||||
|
||||
/* Define to 1 if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
/* Define to 1 if you have the `strtoull' function. */
|
||||
#undef HAVE_STRTOULL
|
||||
|
||||
/* Define to 1 if the system has the type `struct in6_addr'. */
|
||||
#undef HAVE_STRUCT_IN6_ADDR
|
||||
|
||||
/* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */
|
||||
#undef HAVE_STRUCT_IN6_ADDR_S6_ADDR16
|
||||
|
||||
/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */
|
||||
#undef HAVE_STRUCT_IN6_ADDR_S6_ADDR32
|
||||
|
||||
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
|
||||
#undef HAVE_STRUCT_SOCKADDR_IN6
|
||||
|
||||
/* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */
|
||||
#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
|
||||
|
||||
/* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */
|
||||
#undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
|
||||
|
||||
/* Define to 1 if `tcpi_snd_mss' is a member of `struct tcp_info'. */
|
||||
#undef HAVE_STRUCT_TCP_INFO_TCPI_SND_MSS
|
||||
|
||||
/* Define to 1 if `tcpi_unacked' is a member of `struct tcp_info'. */
|
||||
#undef HAVE_STRUCT_TCP_INFO_TCPI_UNACKED
|
||||
|
||||
/* Define to 1 if `tv_sec' is a member of `struct timeval'. */
|
||||
#undef HAVE_STRUCT_TIMEVAL_TV_SEC
|
||||
|
||||
/* Define to 1 if you have the `sysconf' function. */
|
||||
#undef HAVE_SYSCONF
|
||||
|
||||
/* Define to 1 if you have the `sysctl' function. */
|
||||
#undef HAVE_SYSCTL
|
||||
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
/* Have systemd */
|
||||
#undef HAVE_SYSTEMD
|
||||
|
||||
/* Have systemd v209 or greater */
|
||||
#undef HAVE_SYSTEMD_209
|
||||
|
||||
/* Define to 1 if you have the <sys/capability.h> header file. */
|
||||
#undef HAVE_SYS_CAPABILITY_H
|
||||
|
||||
/* Define to 1 if you have the <sys/eventfd.h> header file. */
|
||||
#undef HAVE_SYS_EVENTFD_H
|
||||
|
||||
/* Define to 1 if you have the <sys/fcntl.h> header file. */
|
||||
#undef HAVE_SYS_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#undef HAVE_SYS_FILE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/limits.h> header file. */
|
||||
#undef HAVE_SYS_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
#undef HAVE_SYS_MMAN_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/prctl.h> header file. */
|
||||
#undef HAVE_SYS_PRCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/random.h> header file. */
|
||||
#undef HAVE_SYS_RANDOM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#undef HAVE_SYS_RESOURCE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/sdt.h> header file. */
|
||||
#undef HAVE_SYS_SDT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
||||
#undef HAVE_SYS_STATVFS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/syscall.h> header file. */
|
||||
#undef HAVE_SYS_SYSCALL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
#undef HAVE_SYS_SYSCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ucontext.h> header file. */
|
||||
#undef HAVE_SYS_UCONTEXT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
#undef HAVE_SYS_UN_H
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#undef HAVE_SYS_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define to 1 if you have the `timegm' function. */
|
||||
#undef HAVE_TIMEGM
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the `timingsafe_memcmp' function. */
|
||||
#undef HAVE_TIMINGSAFE_MEMCMP
|
||||
|
||||
/* Compiled with tracing support */
|
||||
#undef HAVE_TRACING
|
||||
|
||||
/* Define to 1 if you have the `truncate' function. */
|
||||
#undef HAVE_TRUNCATE
|
||||
|
||||
/* Define to 1 if you have the <ucontext.h> header file. */
|
||||
#undef HAVE_UCONTEXT_H
|
||||
|
||||
/* Define to 1 if the system has the type `uint'. */
|
||||
#undef HAVE_UINT
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#undef HAVE_UNAME
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#undef HAVE_USLEEP
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Define to 1 if the system has the type `u_char'. */
|
||||
#undef HAVE_U_CHAR
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#undef HAVE_VASPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Have Zstd */
|
||||
#undef HAVE_ZSTD
|
||||
|
||||
/* Define to 1 if you have the `ZSTD_estimateCStreamSize' function. */
|
||||
#undef HAVE_ZSTD_ESTIMATECSTREAMSIZE
|
||||
|
||||
/* Define to 1 if you have the `ZSTD_estimateDCtxSize' function. */
|
||||
#undef HAVE_ZSTD_ESTIMATEDCTXSIZE
|
||||
|
||||
/* Define to 1 if you have the `_NSGetEnviron' function. */
|
||||
#undef HAVE__NSGETENVIRON
|
||||
|
||||
/* Define to 1 if you have the `_vscprintf' function. */
|
||||
#undef HAVE__VSCPRINTF
|
||||
|
||||
/* name of the syslog facility */
|
||||
#undef LOGFACILITY
|
||||
|
||||
/* Define to 1 iff malloc(0) returns a pointer */
|
||||
#undef MALLOC_ZERO_WORKS
|
||||
|
||||
/* whether nss defines ecdh_hybrid key exchange. */
|
||||
#undef NSS_HAS_ECDH_HYBRID
|
||||
|
||||
/* Define to 1 iff memset(0) sets pointers to NULL */
|
||||
#undef NULL_REP_IS_ZERO_BYTES
|
||||
|
||||
/* disable openssl deprecated-function warnings */
|
||||
#undef OPENSSL_SUPPRESS_DEPRECATED
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* How to access the PC from a struct ucontext */
|
||||
#undef PC_FROM_UCONTEXT
|
||||
|
||||
/* Define to 1 iff right-shifting a negative value performs sign-extension */
|
||||
#undef RSHIFT_DOES_SIGN_EXTEND
|
||||
|
||||
/* The size of `cell_t', as computed by sizeof. */
|
||||
#undef SIZEOF_CELL_T
|
||||
|
||||
/* The size of `char', as computed by sizeof. */
|
||||
#undef SIZEOF_CHAR
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The size of `pid_t', as computed by sizeof. */
|
||||
#undef SIZEOF_PID_T
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
/* The size of `socklen_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SOCKLEN_T
|
||||
|
||||
/* The size of `time_t', as computed by sizeof. */
|
||||
#undef SIZEOF_TIME_T
|
||||
|
||||
/* The size of `unsigned int', as computed by sizeof. */
|
||||
#undef SIZEOF_UNSIGNED_INT
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* The size of `__int64', as computed by sizeof. */
|
||||
#undef SIZEOF___INT64
|
||||
|
||||
/* tor's sourcedir directory */
|
||||
#undef SRCDIR
|
||||
|
||||
/* Set to 1 if we can compile a simple stdatomic example. */
|
||||
#undef STDATOMIC_WORKS
|
||||
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Compile with Android specific features enabled */
|
||||
#undef USE_ANDROID
|
||||
|
||||
/* Defined if we should use an internal curve25519_donna{,_c64} implementation
|
||||
*/
|
||||
#undef USE_CURVE25519_DONNA
|
||||
|
||||
/* Defined if we should use a curve25519 from nacl */
|
||||
#undef USE_CURVE25519_NACL
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on macOS. */
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
# undef _DARWIN_C_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable X/Open compliant socket functions that do not require linking
|
||||
with -lxnet on HP-UX 11.11. */
|
||||
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
# undef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
#endif
|
||||
/* Identify the host operating system as Minix.
|
||||
This macro does not affect the system headers' behavior.
|
||||
A future release of Autoconf may stop defining this macro. */
|
||||
#ifndef _MINIX
|
||||
# undef _MINIX
|
||||
#endif
|
||||
/* Enable general extensions on NetBSD.
|
||||
Enable NetBSD compatibility extensions on Minix. */
|
||||
#ifndef _NETBSD_SOURCE
|
||||
# undef _NETBSD_SOURCE
|
||||
#endif
|
||||
/* Enable OpenBSD compatibility extensions on NetBSD.
|
||||
Oddly enough, this does nothing on OpenBSD. */
|
||||
#ifndef _OPENBSD_SOURCE
|
||||
# undef _OPENBSD_SOURCE
|
||||
#endif
|
||||
/* Define to 1 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_SOURCE
|
||||
# undef _POSIX_SOURCE
|
||||
#endif
|
||||
/* Define to 2 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_1_SOURCE
|
||||
# undef _POSIX_1_SOURCE
|
||||
#endif
|
||||
/* Enable POSIX-compatible threading on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
|
||||
#ifndef __STDC_WANT_LIB_EXT2__
|
||||
# undef __STDC_WANT_LIB_EXT2__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC 24747:2009. */
|
||||
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
# undef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable X/Open extensions. Define to 500 only if necessary
|
||||
to make mbstate_t available. */
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# undef _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
/* Tracepoints to log debug */
|
||||
#undef USE_TRACING_INSTRUMENTATION_LOG_DEBUG
|
||||
|
||||
/* Using LTTng instrumentation */
|
||||
#undef USE_TRACING_INSTRUMENTATION_LTTNG
|
||||
|
||||
/* Using USDT instrumentation */
|
||||
#undef USE_TRACING_INSTRUMENTATION_USDT
|
||||
|
||||
/* "Define to enable transparent proxy support" */
|
||||
#undef USE_TRANSPARENT
|
||||
|
||||
/* Define to 1 iff we represent negative integers with two's complement */
|
||||
#undef USING_TWOS_COMPLEMENT
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define on some platforms to activate x_r() functions in time.h */
|
||||
#undef _REENTRANT
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Defined to access windows functions and definitions for >=WinVista */
|
||||
# ifndef WINVER
|
||||
# define WINVER 0x0600
|
||||
# endif
|
||||
|
||||
/* Defined to access _other_ windows functions and definitions for >=WinVista */
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0600
|
||||
# endif
|
||||
|
||||
/* Defined to avoid including some windows headers as part of Windows.h */
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
my %options = ();
|
||||
my %descOptions = ();
|
||||
my %torrcSampleOptions = ();
|
||||
my %manPageOptions = ();
|
||||
|
||||
# Load the canonical list as actually accepted by Tor.
|
||||
open(F, "@abs_top_builddir@/src/app/tor --list-torrc-options |") or die;
|
||||
while (<F>) {
|
||||
next if m!\[notice\] Tor v0\.!;
|
||||
if (m!^([A-Za-z0-9_]+)!) {
|
||||
$options{$1} = 1;
|
||||
} else {
|
||||
print "Unrecognized output> ";
|
||||
print;
|
||||
}
|
||||
}
|
||||
close F;
|
||||
|
||||
# Load the contents of torrc.sample
|
||||
sub loadTorrc {
|
||||
my ($fname, $options) = @_;
|
||||
local *F;
|
||||
open(F, "$fname") or die;
|
||||
while (<F>) {
|
||||
next if (m!##+!);
|
||||
if (m!#([A-Za-z0-9_]+)!) {
|
||||
$options->{$1} = 1;
|
||||
}
|
||||
}
|
||||
close F;
|
||||
0;
|
||||
}
|
||||
|
||||
loadTorrc("@abs_top_srcdir@/src/config/torrc.sample.in", \%torrcSampleOptions);
|
||||
|
||||
# Try to figure out what's in the man page.
|
||||
|
||||
my $considerNextLine = 0;
|
||||
open(F, "@abs_top_srcdir@/doc/man/tor.1.txt") or die;
|
||||
while (<F>) {
|
||||
if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*! && $considerNextLine) {
|
||||
$manPageOptions{$2} = 1;
|
||||
print "Missing an anchor: $2\n" unless (defined $1 or $2 eq 'tor');
|
||||
$considerNextLine = 1;
|
||||
} elsif (m!^\s*$! or
|
||||
m!^\s*\+\s*$! or
|
||||
m!^\s*//!) {
|
||||
$considerNextLine = 1;
|
||||
} else {
|
||||
$considerNextLine = 0;
|
||||
}
|
||||
}
|
||||
close F;
|
||||
|
||||
# Now, display differences:
|
||||
|
||||
sub subtractHashes {
|
||||
my ($s, $a, $b) = @_;
|
||||
my @lst = ();
|
||||
for my $k (keys %$a) {
|
||||
push @lst, $k unless (exists $b->{$k});
|
||||
}
|
||||
print "$s: ", join(' ', sort @lst), "\n\n";
|
||||
0;
|
||||
}
|
||||
|
||||
# subtractHashes("No online docs", \%options, \%descOptions);
|
||||
# subtractHashes("Orphaned online docs", \%descOptions, \%options);
|
||||
|
||||
subtractHashes("Orphaned in torrc.sample.in", \%torrcSampleOptions, \%options);
|
||||
|
||||
subtractHashes("Not in man page", \%options, \%manPageOptions);
|
||||
subtractHashes("Orphaned in man page", \%manPageOptions, \%options);
|
||||
@@ -0,0 +1,192 @@
|
||||
## Configuration file for a typical Tor user
|
||||
## Last updated 9 October 2013 for Tor 0.2.5.2-alpha.
|
||||
## (may or may not work for much older or much newer versions of Tor.)
|
||||
##
|
||||
## Lines that begin with "## " try to explain what's going on. Lines
|
||||
## that begin with just "#" are disabled commands: you can enable them
|
||||
## by removing the "#" symbol.
|
||||
##
|
||||
## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
|
||||
## for more options you can use in this file.
|
||||
##
|
||||
## Tor will look for this file in various places based on your platform:
|
||||
## https://www.torproject.org/docs/faq#torrc
|
||||
|
||||
## Tor opens a socks proxy on port 9050 by default -- even if you don't
|
||||
## configure one below. Set "SocksPort 0" if you plan to run Tor only
|
||||
## as a relay, and not make any local application connections yourself.
|
||||
#SocksPort 9050 # Default: Bind to localhost:9050 for local connections.
|
||||
#SocksPort 192.168.0.1:9100 # Bind to this address:port too.
|
||||
|
||||
## Entry policies to allow/deny SOCKS requests based on IP address.
|
||||
## First entry that matches wins. If no SocksPolicy is set, we accept
|
||||
## all (and only) requests that reach a SocksPort. Untrusted users who
|
||||
## can access your SocksPort may be able to learn about the connections
|
||||
## you make.
|
||||
#SocksPolicy accept 192.168.0.0/16
|
||||
#SocksPolicy reject *
|
||||
|
||||
## Logs go to stdout at level "notice" unless redirected by something
|
||||
## else, like one of the below lines. You can have as many Log lines as
|
||||
## you want.
|
||||
##
|
||||
## We advise using "notice" in most cases, since anything more verbose
|
||||
## may provide sensitive information to an attacker who obtains the logs.
|
||||
##
|
||||
## Send all messages of level 'notice' or higher to @LOCALSTATEDIR@/log/tor/notices.log
|
||||
#Log notice file @LOCALSTATEDIR@/log/tor/notices.log
|
||||
## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
|
||||
#Log debug file @LOCALSTATEDIR@/log/tor/debug.log
|
||||
## Use the system log instead of Tor's logfiles
|
||||
#Log notice syslog
|
||||
## To send all messages to stderr:
|
||||
#Log debug stderr
|
||||
|
||||
## Uncomment this to start the process in the background... or use
|
||||
## --runasdaemon 1 on the command line. This is ignored on Windows;
|
||||
## see the FAQ entry if you want Tor to run as an NT service.
|
||||
#RunAsDaemon 1
|
||||
|
||||
## The directory for keeping all the keys/etc. By default, we store
|
||||
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
|
||||
#DataDirectory @LOCALSTATEDIR@/lib/tor
|
||||
|
||||
## The port on which Tor will listen for local connections from Tor
|
||||
## controller applications, as documented in control-spec.txt.
|
||||
#ControlPort 9051
|
||||
## If you enable the controlport, be sure to enable one of these
|
||||
## authentication methods, to prevent attackers from accessing it.
|
||||
#HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C
|
||||
#CookieAuthentication 1
|
||||
|
||||
############### This section is just for location-hidden services ###
|
||||
|
||||
## Once you have configured a hidden service, you can look at the
|
||||
## contents of the file ".../hidden_service/hostname" for the address
|
||||
## to tell people.
|
||||
##
|
||||
## HiddenServicePort x y:z says to redirect requests on port x to the
|
||||
## address y:z.
|
||||
|
||||
#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/
|
||||
#HiddenServicePort 80 127.0.0.1:80
|
||||
|
||||
#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/
|
||||
#HiddenServicePort 80 127.0.0.1:80
|
||||
#HiddenServicePort 22 127.0.0.1:22
|
||||
|
||||
################ This section is just for relays #####################
|
||||
#
|
||||
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
||||
|
||||
## Required: what port to advertise for incoming Tor connections.
|
||||
#ORPort 9001
|
||||
## If you want to listen on a port other than the one advertised in
|
||||
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
||||
## follows. You'll need to do ipchains or other port forwarding
|
||||
## yourself to make this work.
|
||||
#ORPort 443 NoListen
|
||||
#ORPort 127.0.0.1:9090 NoAdvertise
|
||||
|
||||
## The IP address or full DNS name for incoming connections to your
|
||||
## relay. Leave commented out and Tor will guess.
|
||||
#Address noname.example.com
|
||||
|
||||
## If you have multiple network interfaces, you can specify one for
|
||||
## outgoing traffic to use.
|
||||
# OutboundBindAddress 10.0.0.5
|
||||
|
||||
## A handle for your relay, so people don't have to refer to it by key.
|
||||
#Nickname ididnteditheconfig
|
||||
|
||||
## Define these to limit how much relayed traffic you will allow. Your
|
||||
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||
## be at least 20 KB.
|
||||
## Note that units for these config options are bytes per second, not bits
|
||||
## per second, and that prefixes are binary prefixes, i.e. 2^10, 2^20, etc.
|
||||
#RelayBandwidthRate 100 KB # Throttle traffic to 100KB/s (800Kbps)
|
||||
#RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)
|
||||
|
||||
## Use these to restrict the maximum traffic per day, week, or month.
|
||||
## Note that this threshold applies separately to sent and received bytes,
|
||||
## not to their sum: setting "4 GB" may allow up to 8 GB total before
|
||||
## hibernating.
|
||||
##
|
||||
## Set a maximum of 4 gigabytes each way per period.
|
||||
#AccountingMax 4 GB
|
||||
## Each period starts daily at midnight (AccountingMax is per day)
|
||||
#AccountingStart day 00:00
|
||||
## Each period starts on the 3rd of the month at 15:00 (AccountingMax
|
||||
## is per month)
|
||||
#AccountingStart month 3 15:00
|
||||
|
||||
## Administrative contact information for this relay or bridge. This line
|
||||
## can be used to contact you if your relay or bridge is misconfigured or
|
||||
## something else goes wrong. Note that we archive and publish all
|
||||
## descriptors containing these lines and that Google indexes them, so
|
||||
## spammers might also collect them. You may want to obscure the fact that
|
||||
## it's an email address and/or generate a new address for this purpose.
|
||||
#ContactInfo Random Person <nobody AT example dot com>
|
||||
## You might also include your PGP or GPG fingerprint if you have one:
|
||||
#ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com>
|
||||
|
||||
## Uncomment this to mirror directory information for others. Please do
|
||||
## if you have enough bandwidth.
|
||||
#DirPort 9030 # what port to advertise for directory connections
|
||||
## If you want to listen on a port other than the one advertised in
|
||||
## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as
|
||||
## follows. below too. You'll need to do ipchains or other port
|
||||
## forwarding yourself to make this work.
|
||||
#DirPort 80 NoListen
|
||||
#DirPort 127.0.0.1:9091 NoAdvertise
|
||||
## Uncomment to return an arbitrary blob of html on your DirPort. Now you
|
||||
## can explain what Tor is if anybody wonders why your IP address is
|
||||
## contacting them. See contrib/tor-exit-notice.html in Tor's source
|
||||
## distribution for a sample.
|
||||
#DirPortFrontPage @CONFDIR@/tor-exit-notice.html
|
||||
|
||||
## Uncomment this if you run more than one Tor relay, and add the identity
|
||||
## key fingerprint of each Tor relay you control, even if they're on
|
||||
## different networks. You declare it here so Tor clients can avoid
|
||||
## using more than one of your relays in a single circuit. See
|
||||
## https://www.torproject.org/docs/faq#MultipleRelays
|
||||
## However, you should never include a bridge's fingerprint here, as it would
|
||||
## break its concealability and potentionally reveal its IP/TCP address.
|
||||
#MyFamily $keyid,$keyid,...
|
||||
|
||||
## A comma-separated list of exit policies. They're considered first
|
||||
## to last, and the first match wins. If you want to _replace_
|
||||
## the default exit policy, end this with either a reject *:* or an
|
||||
## accept *:*. Otherwise, you're _augmenting_ (prepending to) the
|
||||
## default exit policy. Leave commented to just use the default, which is
|
||||
## described in the man page or at
|
||||
## https://www.torproject.org/documentation.html
|
||||
##
|
||||
## Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses
|
||||
## for issues you might encounter if you use the default exit policy.
|
||||
##
|
||||
## If certain IPs and ports are blocked externally, e.g. by your firewall,
|
||||
## you should update your exit policy to reflect this -- otherwise Tor
|
||||
## users will be told that those destinations are down.
|
||||
##
|
||||
## For security, by default Tor rejects connections to private (local)
|
||||
## networks, including to your public IP address. See the man page entry
|
||||
## for ExitPolicyRejectPrivate if you want to allow "exit enclaving".
|
||||
##
|
||||
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports but no more
|
||||
#ExitPolicy accept *:119 # accept nntp as well as default exit policy
|
||||
#ExitPolicy reject *:* # no exits allowed
|
||||
|
||||
## Bridge relays (or "bridges") are Tor relays that aren't listed in the
|
||||
## main directory. Since there is no complete public list of them, even an
|
||||
## ISP that filters connections to all the known Tor relays probably
|
||||
## won't be able to block all the bridges. Also, websites won't treat you
|
||||
## differently because they won't know you're running Tor. If you can
|
||||
## be a real relay, please do; but if not, be a bridge!
|
||||
#BridgeRelay 1
|
||||
## By default, Tor will advertise your bridge to users through various
|
||||
## mechanisms like https://bridges.torproject.org/. If you want to run
|
||||
## a private bridge, for example because you'll give out your bridge
|
||||
## address manually to your friends, uncomment this line:
|
||||
#PublishServerDescriptor 0
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
## Configuration file for a typical Tor user
|
||||
## Last updated 28 February 2019 for Tor 0.3.5.1-alpha.
|
||||
## (may or may not work for much older or much newer versions of Tor.)
|
||||
##
|
||||
## Lines that begin with "## " try to explain what's going on. Lines
|
||||
## that begin with just "#" are disabled commands: you can enable them
|
||||
## by removing the "#" symbol.
|
||||
##
|
||||
## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
|
||||
## for more options you can use in this file.
|
||||
##
|
||||
## Tor will look for this file in various places based on your platform:
|
||||
## https://support.torproject.org/tbb/tbb-editing-torrc/
|
||||
|
||||
## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't
|
||||
## configure one below. Set "SOCKSPort 0" if you plan to run Tor only
|
||||
## as a relay, and not make any local application connections yourself.
|
||||
#SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections.
|
||||
#SOCKSPort 192.168.0.1:9100 # Bind to this address:port too.
|
||||
|
||||
## Entry policies to allow/deny SOCKS requests based on IP address.
|
||||
## First entry that matches wins. If no SOCKSPolicy is set, we accept
|
||||
## all (and only) requests that reach a SOCKSPort. Untrusted users who
|
||||
## can access your SOCKSPort may be able to learn about the connections
|
||||
## you make.
|
||||
#SOCKSPolicy accept 192.168.0.0/16
|
||||
#SOCKSPolicy accept6 FC00::/7
|
||||
#SOCKSPolicy reject *
|
||||
|
||||
## Logs go to stdout at level "notice" unless redirected by something
|
||||
## else, like one of the below lines. You can have as many Log lines as
|
||||
## you want.
|
||||
##
|
||||
## We advise using "notice" in most cases, since anything more verbose
|
||||
## may provide sensitive information to an attacker who obtains the logs.
|
||||
##
|
||||
## Send all messages of level 'notice' or higher to @LOCALSTATEDIR@/log/tor/notices.log
|
||||
#Log notice file @LOCALSTATEDIR@/log/tor/notices.log
|
||||
## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
|
||||
#Log debug file @LOCALSTATEDIR@/log/tor/debug.log
|
||||
## Use the system log instead of Tor's logfiles
|
||||
#Log notice syslog
|
||||
## To send all messages to stderr:
|
||||
#Log debug stderr
|
||||
|
||||
## Uncomment this to start the process in the background... or use
|
||||
## --runasdaemon 1 on the command line. This is ignored on Windows;
|
||||
## see the FAQ entry if you want Tor to run as an NT service.
|
||||
#RunAsDaemon 1
|
||||
|
||||
## The directory for keeping all the keys/etc. By default, we store
|
||||
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
|
||||
#DataDirectory @LOCALSTATEDIR@/lib/tor
|
||||
|
||||
## The port on which Tor will listen for local connections from Tor
|
||||
## controller applications, as documented in control-spec.txt.
|
||||
#ControlPort 9051
|
||||
## If you enable the controlport, be sure to enable one of these
|
||||
## authentication methods, to prevent attackers from accessing it.
|
||||
#HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C
|
||||
#CookieAuthentication 1
|
||||
|
||||
############### This section is just for location-hidden services ###
|
||||
|
||||
## Once you have configured a hidden service, you can look at the
|
||||
## contents of the file ".../hidden_service/hostname" for the address
|
||||
## to tell people.
|
||||
##
|
||||
## HiddenServicePort x y:z says to redirect requests on port x to the
|
||||
## address y:z.
|
||||
|
||||
#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/
|
||||
#HiddenServicePort 80 127.0.0.1:80
|
||||
|
||||
#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/
|
||||
#HiddenServicePort 80 127.0.0.1:80
|
||||
#HiddenServicePort 22 127.0.0.1:22
|
||||
|
||||
################ This section is just for relays #####################
|
||||
#
|
||||
## See https://community.torproject.org/relay for details.
|
||||
|
||||
## Required: what port to advertise for incoming Tor connections.
|
||||
#ORPort 9001
|
||||
## If you want to listen on a port other than the one advertised in
|
||||
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
||||
## follows. You'll need to do ipchains or other port forwarding
|
||||
## yourself to make this work.
|
||||
#ORPort 443 NoListen
|
||||
#ORPort 127.0.0.1:9090 NoAdvertise
|
||||
## If you want to listen on IPv6 your numeric address must be explicitly
|
||||
## between square brackets as follows. You must also listen on IPv4.
|
||||
#ORPort [2001:DB8::1]:9050
|
||||
|
||||
## The IP address or full DNS name for incoming connections to your
|
||||
## relay. Leave commented out and Tor will guess.
|
||||
#Address noname.example.com
|
||||
|
||||
## If you have multiple network interfaces, you can specify one for
|
||||
## outgoing traffic to use.
|
||||
## OutboundBindAddressExit will be used for all exit traffic, while
|
||||
## OutboundBindAddressOR will be used for all OR and Dir connections
|
||||
## (DNS connections ignore OutboundBindAddress).
|
||||
## If you do not wish to differentiate, use OutboundBindAddress to
|
||||
## specify the same address for both in a single line.
|
||||
#OutboundBindAddressExit 10.0.0.4
|
||||
#OutboundBindAddressOR 10.0.0.5
|
||||
|
||||
## A handle for your relay, so people don't have to refer to it by key.
|
||||
## Nicknames must be between 1 and 19 characters inclusive, and must
|
||||
## contain only the characters [a-zA-Z0-9].
|
||||
## If not set, "Unnamed" will be used.
|
||||
#Nickname ididnteditheconfig
|
||||
|
||||
## Define these to limit how much relayed traffic you will allow. Your
|
||||
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||
## be at least 75 kilobytes per second.
|
||||
## Note that units for these config options are bytes (per second), not
|
||||
## bits (per second), and that prefixes are binary prefixes, i.e. 2^10,
|
||||
## 2^20, etc.
|
||||
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
||||
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
||||
|
||||
## Use these to restrict the maximum traffic per day, week, or month.
|
||||
## Note that this threshold applies separately to sent and received bytes,
|
||||
## not to their sum: setting "40 GB" may allow up to 80 GB total before
|
||||
## hibernating.
|
||||
##
|
||||
## Set a maximum of 40 gigabytes each way per period.
|
||||
#AccountingMax 40 GBytes
|
||||
## Each period starts daily at midnight (AccountingMax is per day)
|
||||
#AccountingStart day 00:00
|
||||
## Each period starts on the 3rd of the month at 15:00 (AccountingMax
|
||||
## is per month)
|
||||
#AccountingStart month 3 15:00
|
||||
|
||||
## Administrative contact information for this relay or bridge. This line
|
||||
## can be used to contact you if your relay or bridge is misconfigured or
|
||||
## something else goes wrong. Note that we archive and publish all
|
||||
## descriptors containing these lines and that Google indexes them, so
|
||||
## spammers might also collect them. You may want to obscure the fact that
|
||||
## it's an email address and/or generate a new address for this purpose.
|
||||
##
|
||||
## If you are running multiple relays, you MUST set this option.
|
||||
##
|
||||
#ContactInfo Random Person <nobody AT example dot com>
|
||||
## You might also include your PGP or GPG fingerprint if you have one:
|
||||
#ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com>
|
||||
|
||||
## Uncomment this to mirror directory information for others. Please do
|
||||
## if you have enough bandwidth.
|
||||
#DirPort 9030 # what port to advertise for directory connections
|
||||
## If you want to listen on a port other than the one advertised in
|
||||
## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as
|
||||
## follows. below too. You'll need to do ipchains or other port
|
||||
## forwarding yourself to make this work.
|
||||
#DirPort 80 NoListen
|
||||
#DirPort 127.0.0.1:9091 NoAdvertise
|
||||
## Uncomment to return an arbitrary blob of html on your DirPort. Now you
|
||||
## can explain what Tor is if anybody wonders why your IP address is
|
||||
## contacting them. See contrib/tor-exit-notice.html in Tor's source
|
||||
## distribution for a sample.
|
||||
#DirPortFrontPage @CONFDIR@/tor-exit-notice.html
|
||||
|
||||
## Uncomment this if you run more than one Tor relay, and add the identity
|
||||
## key fingerprint of each Tor relay you control, even if they're on
|
||||
## different networks. You declare it here so Tor clients can avoid
|
||||
## using more than one of your relays in a single circuit. See
|
||||
## https://support.torproject.org/relay-operators/multiple-relays/
|
||||
## However, you should never include a bridge's fingerprint here, as it would
|
||||
## break its concealability and potentially reveal its IP/TCP address.
|
||||
##
|
||||
## If you are running multiple relays, you MUST set this option.
|
||||
##
|
||||
## Note: do not use MyFamily on bridge relays.
|
||||
#MyFamily $keyid,$keyid,...
|
||||
|
||||
## Uncomment this if you want your relay to be an exit, with the default
|
||||
## exit policy (or whatever exit policy you set below).
|
||||
## (If ReducedExitPolicy, ExitPolicy, or IPv6Exit are set, relays are exits.
|
||||
## If none of these options are set, relays are non-exits.)
|
||||
#ExitRelay 1
|
||||
|
||||
## Uncomment this if you want your relay to allow IPv6 exit traffic.
|
||||
## (Relays do not allow any exit traffic by default.)
|
||||
#IPv6Exit 1
|
||||
|
||||
## Uncomment this if you want your relay to be an exit, with a reduced set
|
||||
## of exit ports.
|
||||
#ReducedExitPolicy 1
|
||||
|
||||
## Uncomment these lines if you want your relay to be an exit, with the
|
||||
## specified set of exit IPs and ports.
|
||||
##
|
||||
## A comma-separated list of exit policies. They're considered first
|
||||
## to last, and the first match wins.
|
||||
##
|
||||
## If you want to allow the same ports on IPv4 and IPv6, write your rules
|
||||
## using accept/reject *. If you want to allow different ports on IPv4 and
|
||||
## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules
|
||||
## using accept/reject *4.
|
||||
##
|
||||
## If you want to _replace_ the default exit policy, end this with either a
|
||||
## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to)
|
||||
## the default exit policy. Leave commented to just use the default, which is
|
||||
## described in the man page or at
|
||||
## https://support.torproject.org/relay-operators
|
||||
##
|
||||
## Look at https://support.torproject.org/abuse/exit-relay-expectations/
|
||||
## for issues you might encounter if you use the default exit policy.
|
||||
##
|
||||
## If certain IPs and ports are blocked externally, e.g. by your firewall,
|
||||
## you should update your exit policy to reflect this -- otherwise Tor
|
||||
## users will be told that those destinations are down.
|
||||
##
|
||||
## For security, by default Tor rejects connections to private (local)
|
||||
## networks, including to the configured primary public IPv4 and IPv6 addresses,
|
||||
## and any public IPv4 and IPv6 addresses on any interface on the relay.
|
||||
## See the man page entry for ExitPolicyRejectPrivate if you want to allow
|
||||
## "exit enclaving".
|
||||
##
|
||||
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more
|
||||
#ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy
|
||||
#ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy
|
||||
#ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy
|
||||
#ExitPolicy reject *:* # no exits allowed
|
||||
|
||||
## Uncomment this if you want your exit relay to reevaluate its exit policy on
|
||||
## existing connections when the exit policy is modified.
|
||||
#ReevaluateExitPolicy 1
|
||||
|
||||
## Bridge relays (or "bridges") are Tor relays that aren't listed in the
|
||||
## main directory. Since there is no complete public list of them, even an
|
||||
## ISP that filters connections to all the known Tor relays probably
|
||||
## won't be able to block all the bridges. Also, websites won't treat you
|
||||
## differently because they won't know you're running Tor. If you can
|
||||
## be a real relay, please do; but if not, be a bridge!
|
||||
##
|
||||
## Warning: when running your Tor as a bridge, make sure than MyFamily is
|
||||
## NOT configured.
|
||||
#BridgeRelay 1
|
||||
## By default, Tor will advertise your bridge to users through various
|
||||
## mechanisms like https://bridges.torproject.org/. If you want to run
|
||||
## a private bridge, for example because you'll give out your bridge
|
||||
## address manually to your friends, uncomment this line:
|
||||
#BridgeDistribution none
|
||||
|
||||
## Configuration options can be imported from files or folders using the %include
|
||||
## option with the value being a path. This path can have wildcards. Wildcards are
|
||||
## expanded first, using lexical order. Then, for each matching file or folder, the following
|
||||
## rules are followed: if the path is a file, the options from the file will be parsed as if
|
||||
## they were written where the %include option is. If the path is a folder, all files on that
|
||||
## folder will be parsed following lexical order. Files starting with a dot are ignored. Files
|
||||
## on subfolders are ignored.
|
||||
## The %include option can be used recursively.
|
||||
#%include /etc/torrc.d/*.conf
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@TOR_WARNING_FLAGS@
|
||||
Executable
+37966
File diff suppressed because it is too large
Load Diff
Executable
+172
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env bash
|
||||
# Regenerate the vendored tor configure from the pinned tor submodule.
|
||||
#
|
||||
# Run this when:
|
||||
# - The tor submodule is updated (src/tor/tor-src) to a new commit
|
||||
# - We need to test if a newer autoconf emits a parseable script
|
||||
#
|
||||
# Requirements:
|
||||
# - autoconf 2.71 (other versions emit patterns bash 4.4 / dash
|
||||
# cannot parse — see ../src/tor/build-libtor.sh history for details)
|
||||
# - The tor submodule must be initialized
|
||||
#
|
||||
# Output: ./configure.vendored in this directory
|
||||
#
|
||||
# Usage: bash src/tor/regenerate-tor-configure.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TOR_SRC_DIR="$ROOT_DIR/tor-src"
|
||||
|
||||
if [[ ! -d "$TOR_SRC_DIR" ]]; then
|
||||
echo "Tor source tree not found at: $TOR_SRC_DIR" >&2
|
||||
echo "Run: git submodule update --init --recursive" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find autoconf 2.71
|
||||
AUTOCONF_BIN=""
|
||||
for candidate in /tmp/autoconf271/bin/autoconf /usr/local/bin/autoconf-2.71 \
|
||||
/opt/autoconf/2.71/bin/autoconf; do
|
||||
if [[ -x "$candidate" ]]; then
|
||||
AUTOCONF_BIN="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -z "$AUTOCONF_BIN" ]]; then
|
||||
if command -v autoreconf-2.71 >/dev/null 2>&1; then
|
||||
AUTOCONF_BIN="$(command -v autoreconf-2.71)"
|
||||
elif command -v autoconf-2.71 >/dev/null 2>&1; then
|
||||
AUTOCONF_BIN="$(command -v autoconf-2.71)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$AUTOCONF_BIN" ]]; then
|
||||
echo "autoconf 2.71 not found. Install with:" >&2
|
||||
echo " cd /tmp && wget -q https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz && \\" >&2
|
||||
echo " tar xf autoconf-2.71.tar.xz && cd autoconf-2.71 && \\" >&2
|
||||
echo " ./configure --prefix=/tmp/autoconf271 && make -j\$(nproc) install" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make autoreconf use 2.71. The versioned binary might be named
|
||||
# autoreconf2.71 or autoreconf-2.71 depending on how it was built.
|
||||
AUTORECONF_BIN="$(dirname "$AUTOCONF_BIN")/autoreconf$(echo "$AUTOCONF_BIN" | sed 's/.*autoconf/autoreconf/')"
|
||||
if [[ ! -x "$AUTORECONF_BIN" ]]; then
|
||||
AUTORECONF_BIN="$(dirname "$AUTOCONF_BIN")/autoreconf"
|
||||
fi
|
||||
|
||||
echo "Using AUTOCONF_BIN=$AUTOCONF_BIN"
|
||||
echo "Using AUTORECONF_BIN=$AUTORECONF_BIN"
|
||||
|
||||
cd "$TOR_SRC_DIR"
|
||||
|
||||
# Wipe any existing generated files to ensure a clean regenerate.
|
||||
rm -f configure configure.ac~
|
||||
"$AUTORECONF_BIN" -i -f -W no-error
|
||||
|
||||
if [[ ! -x ./configure ]]; then
|
||||
echo "autoreconf did not produce ./configure" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sanity-check the output: warn if it contains patterns that bash 4.4
|
||||
# or dash cannot parse. If you see warnings, do NOT commit the result.
|
||||
WARN=0
|
||||
if grep -qE '^\s*\S+=\`' configure; then
|
||||
echo "WARNING: configure still contains backtick command substitutions" >&2
|
||||
WARN=1
|
||||
fi
|
||||
if grep -qE '\$\{ac_cv_func_\$\{ac_func\}\+y\}' configure; then
|
||||
echo "WARNING: configure still contains nested \${ac_cv_func_\${ac_func}+y}" >&2
|
||||
WARN=1
|
||||
fi
|
||||
if grep -qE '\$\{ac_cv_func_\$ac_func\+y\}' configure; then
|
||||
echo "WARNING: configure still contains single-dollar \${ac_cv_func_\$ac_func+y}" >&2
|
||||
WARN=1
|
||||
fi
|
||||
|
||||
# Parse-check in the shells CI cares about
|
||||
echo "Parse-checking configure in: bash $(bash --version | head -1 | awk '{print $4}'), dash, /tmp/bash44 (if present)..."
|
||||
for sh in bash dash; do
|
||||
if command -v "$sh" >/dev/null 2>&1; then
|
||||
if ! "$sh" -n ./configure 2>/dev/null; then
|
||||
echo "ERROR: configure fails to parse in $sh" >&2
|
||||
"$sh" -n ./configure 2>&1 | head -5 >&2
|
||||
exit 1
|
||||
else
|
||||
echo " $sh: OK"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [[ -x /tmp/bash44/bin/bash ]]; then
|
||||
if ! /tmp/bash44/bin/bash -n ./configure 2>/dev/null; then
|
||||
echo "ERROR: configure fails to parse in bash 4.4 (MSYS2 version)" >&2
|
||||
exit 1
|
||||
else
|
||||
echo " bash 4.4: OK"
|
||||
fi
|
||||
fi
|
||||
|
||||
OUT="$ROOT_DIR/configure.vendored"
|
||||
AUX_DIR="$ROOT_DIR/configure-aux"
|
||||
cp -f ./configure "$OUT"
|
||||
chmod +x "$OUT"
|
||||
|
||||
# Vendor the auxiliary files alongside configure. autoreconf -i
|
||||
# normally generates these in the source dir; we need them in the
|
||||
# submodule checkout too because build-libtor.sh skips autoreconf.
|
||||
mkdir -p "$AUX_DIR"
|
||||
AUX_FILES=(ar-lib compile config.guess config.sub depcomp install-sh missing test-driver)
|
||||
MISSING_AUX=0
|
||||
for f in "${AUX_FILES[@]}"; do
|
||||
if [[ -f "$f" ]]; then
|
||||
cp -f "$f" "$AUX_DIR/$f"
|
||||
chmod +x "$AUX_DIR/$f"
|
||||
else
|
||||
echo "WARNING: auxiliary file $f not found after autoreconf" >&2
|
||||
MISSING_AUX=1
|
||||
fi
|
||||
done
|
||||
|
||||
# Vendor AC_CONFIG_FILES inputs (Makefile.in, *.in). automake
|
||||
# generates these from Makefile.am / *.am sources.
|
||||
INPUT_DIR="$ROOT_DIR/configure-input"
|
||||
mkdir -p "$INPUT_DIR"
|
||||
INPUT_FILES=(
|
||||
Makefile.in
|
||||
Doxyfile.in
|
||||
orconfig.h.in
|
||||
contrib/operator-tools/tor.logrotate.in
|
||||
src/config/torrc.sample.in
|
||||
src/config/torrc.minimal.in
|
||||
scripts/maint/checkOptionDocs.pl.in
|
||||
warning_flags.in
|
||||
contrib/win32build/tor.nsi.in
|
||||
contrib/win32build/tor-mingw.nsi.in
|
||||
aclocal.m4
|
||||
)
|
||||
MISSING_INPUT=0
|
||||
for f in "${INPUT_FILES[@]}"; do
|
||||
if [[ -f "$f" ]]; then
|
||||
dest="$INPUT_DIR/$f"
|
||||
mkdir -p "$(dirname "$dest")"
|
||||
cp -f "$f" "$dest"
|
||||
else
|
||||
echo "WARNING: configure input file $f not found after autoreconf" >&2
|
||||
MISSING_INPUT=1
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Wrote $OUT ($(wc -c < "$OUT") bytes)"
|
||||
echo "Vendored ${#AUX_FILES[@]} auxiliary files to $AUX_DIR"
|
||||
echo "Vendored ${#INPUT_FILES[@]} configure input files to $INPUT_DIR"
|
||||
if [[ $WARN -ne 0 ]]; then
|
||||
echo
|
||||
echo "DO NOT COMMIT this file — it has parse hazards. See warnings above." >&2
|
||||
exit 2
|
||||
fi
|
||||
echo "Safe to commit."
|
||||
Reference in New Issue
Block a user