⛅ Sync 2026-08-05 21:58:21

This commit is contained in:
github-actions[bot] committed 2026-08-05 21:58:21 +08:00
1 parent ca3fdb1643
commit 66ea3b0c46
734 files changed
+225296 -28

No files matched your search

+3 -10
View File
@@ -8,20 +8,14 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=shadowsocksr-libev
PKG_VERSION:=2.5.6
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev
PKG_SOURCE_DATE:=2018-03-07
PKG_SOURCE_VERSION:=d63ff863800a5645aca4309d5dd5962bd1e95543
PKG_MIRROR_HASH:=skip
PKG_RELEASE:=4
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_BUILD_FLAGS:=no-mips16
PKG_BUILD_FLAGS:=no-mips16 gc-sections lto
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
@@ -57,8 +51,7 @@ CONFIGURE_ARGS += \
--disable-assert \
--enable-system-shared-lib
TARGET_CFLAGS += -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
TARGET_LDFLAGS += -Wl,--as-needed
$(foreach component,$(SHADOWSOCKSR_COMPONENTS), \
$(eval $(call BuildPackage,shadowsocksr-libev-ssr-$(component))) \
@@ -1,13 +1,3 @@
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ build/
.deps/
/Makefile
src/Makefile
+server/Makefile
libev/Makefile
libudns/Makefile
libcork/Makefile
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
@@ -1,11 +1,11 @@
--- a/src/local.c
+++ b/src/local.c
@@ -718,7 +718,7 @@ server_recv_cb(EV_P_ ev_io *w, int reven
ss_free(hostname);
} else {
- strncpy(host, ip, sizeof(ip));
+ strncpy(host, ip, INET6_ADDRSTRLEN);
}
}
ss_free(hostname);
} else {
- strncpy(host, ip, sizeof(ip));
+ strncpy(host, ip, INET6_ADDRSTRLEN);
}
}
@@ -0,0 +1,21 @@
--- a/libev/ev.c
+++ b/libev/ev.c
@@ -1946,7 +1946,7 @@ static void * noinline ecb_cold
array_realloc (int elem, void *base, int *cur, int cnt)
{
*cur = array_nextsize (elem, *cur, cnt);
- return ev_realloc (base, elem * *cur);
+ return ev_realloc (base, (size_t)elem * (size_t)*cur);
}
#define array_init_zero(base,count) \
@@ -4252,7 +4252,8 @@ infy_add (EV_P_ ev_stat *w)
if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096)
{
char path [4096];
- strcpy (path, w->path);
+ strncpy (path, w->path, sizeof (path) - 1);
+ path [sizeof (path) - 1] = 0;
do
{
+9
View File
@@ -0,0 +1,9 @@
Shadowsocks-libev was originally created in late 2013, by
Clowwindy <clowwindy@gmail.com>, then rewritten and maintained by
Max Lv <max.c.lv@gmail.com>.
Here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
people who have submitted patches, fixed bugs, added translations, and
generally made shadowsocks-libev that much better:
https://github.com/shadowsocks/shadowsocks-libev/graphs/contributors
+37
View File
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright © 2011-2015, RedJack, LLC.
# All rights reserved.
#
# Please see the COPYING file in this distribution for license details.
# ----------------------------------------------------------------------
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
cmake_minimum_required(VERSION 2.6)
set(PROJECT_NAME shadowsocks-libev)
set(RELEASE_DATE 2015-09-03)
project(${PROJECT_NAME})
set(VERSION 2.5.6)
set(with_crypto_library "openssl" CACHE STRING "build with the given crypto library, TYPE=openssl|polarssl|mbedtls default=openssl")
include ( cmake/dist.cmake )
include ( configure )
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
add_subdirectory(libsodium)
add_subdirectory(libcork)
add_subdirectory(libipset)
add_subdirectory(libev)
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
add_subdirectory(libudns)
add_subdirectory(src)
+12
View File
@@ -0,0 +1,12 @@
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
+399
View File
@@ -0,0 +1,399 @@
shadowsocks-libev (2.5.6-1) unstable; urgency=medium
* Add outbound ACL for server.
* Refine log format.
-- Max Lv <max.c.lv@gmail.com> Tue, 01 Nov 2016 09:51:52 +0800
shadowsocks-libev (2.5.5-1) unstable; urgency=medium
* Refine attack detection.
-- Max Lv <max.c.lv@gmail.com> Tue, 11 Oct 2016 15:45:09 +0800
shadowsocks-libev (2.5.4-1) unstable; urgency=medium
* Fix a bug of auto blocking mechanism.
-- Max Lv <max.c.lv@gmail.com> Sun, 09 Oct 2016 19:36:37 +0800
shadowsocks-libev (2.5.3-1) unstable; urgency=medium
* Fix TCP Fast Open on macOS.
-- Max Lv <max.c.lv@gmail.com> Wed, 21 Sep 2016 19:31:57 +0800
shadowsocks-libev (2.5.2-1) unstable; urgency=medium
* Fix a bug of UDP relay mode of ss-local.
-- Max Lv <max.c.lv@gmail.com> Mon, 12 Sep 2016 12:54:33 +0800
shadowsocks-libev (2.5.1-1) unstable; urgency=medium
* Refine ACL feature with hostname support.
* Add HTTP/SNI parser for ss-local/ss-redir.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Sep 2016 17:06:49 +0800
shadowsocks-libev (2.5.0-1) unstable; urgency=medium
* Fix several bugs of the command line interface.
* Add aes-128/192/256-ctr ciphers.
* Add option MTU for UDP relay.
* Add MultiPath TCP support.
-- Max Lv <max.c.lv@gmail.com> Mon, 29 Aug 2016 13:07:51 +0800
shadowsocks-libev (2.4.8-1) unstable; urgency=low
* Update manual pages with asciidoc.
* Fix issues of bind_address option.
-- Max Lv <max.c.lv@gmail.com> Wed, 20 Jul 2016 09:25:50 +0800
shadowsocks-libev (2.4.7-1) unstable; urgency=low
* Add ss-nat, a helper script to set up NAT rules for ss-redir.
* Fix several issues for debian package.
-- Max Lv <max.c.lv@gmail.com> Wed, 1 Jun 2016 18:21:45 +0800
shadowsocks-libev (2.4.6-1) unstable; urgency=low
* Update manual pages.
-- Max Lv <max.c.lv@gmail.com> Thu, 21 Apr 2016 17:33:34 +0800
shadowsocks-libev (2.4.5-1) unstable; urgency=low
* Fix build issues on OpenWRT.
* Reduce the latency of redir mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 01 Feb 2016 13:22:50 +0800
shadowsocks-libev (2.4.4-1) unstable; urgency=low
* Fix a potential memory leak.
* Fix some compiler related issues.
-- Max Lv <max.c.lv@gmail.com> Wed, 13 Jan 2016 11:50:12 +0800
shadowsocks-libev (2.4.3-1) unstable; urgency=high
* Refine the buffer allocation.
-- Max Lv <max.c.lv@gmail.com> Sat, 19 Dec 2015 12:30:21 +0900
shadowsocks-libev (2.4.1-1) unstable; urgency=high
* Fix a security bug.
-- Max Lv <max.c.lv@gmail.com> Thu, 29 Oct 2015 15:42:47 +0900
shadowsocks-libev (2.4.0-1) unstable; urgency=low
* Update the one-time authentication
-- Max Lv <max.c.lv@gmail.com> Thu, 24 Sep 2015 14:11:05 +0900
shadowsocks-libev (2.3.3-1) unstable; urgency=low
* Refine the onetime authentication of header.
* Enforce CRC16 on the payload.
-- Max Lv <max.c.lv@gmail.com> Fri, 18 Sep 2015 10:38:21 +0900
shadowsocks-libev (2.3.2-1) unstable; urgency=low
* Fix minor issues of build scripts.
-- Max Lv <max.c.lv@gmail.com> Sun, 13 Sep 2015 15:22:28 +0900
shadowsocks-libev (2.3.1-1) unstable; urgency=low
* Fix an issue of connection cache of UDP relay.
* Add support of onetime authentication for header verification.
-- Max Lv <max.c.lv@gmail.com> Fri, 04 Sep 2015 07:54:02 +0900
shadowsocks-libev (2.3.0-1) unstable; urgency=low
* Add manager mode to support multi-user and traffic stat.
* Fix a build issue on OS X El Capitan.
-- Max Lv <max.c.lv@gmail.com> Thu, 30 Jul 2015 17:30:43 +0900
shadowsocks-libev (2.2.3-1) unstable; urgency=high
* Fix the multiple UDP source port issue.
* Allow working in UDP only mode.
-- Max Lv <max.c.lv@gmail.com> Sat, 11 Jul 2015 08:31:02 +0900
shadowsocks-libev (2.2.2-1) unstable; urgency=low
* Fix the timer of UDP relay.
* Check name_len in the header.
-- Max Lv <max.c.lv@gmail.com> Mon, 15 Jun 2015 10:26:40 +0900
shadowsocks-libev (2.2.1-1) unstable; urgency=low
* Fix an issue of UDP relay.
-- Max Lv <max.c.lv@gmail.com> Sun, 10 May 2015 21:23:44 +0900
shadowsocks-libev (2.2.0-1) unstable; urgency=low
* Add TPROXY support in redir mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 04 May 2015 02:44:17 -0300
shadowsocks-libev (2.1.4-1) unstable; urgency=low
* Fix a bug of server mode ACL.
-- Max Lv <max.c.lv@gmail.com> Sun, 08 Feb 2015 20:24:43 +0900
shadowsocks-libev (2.1.3-1) unstable; urgency=low
* Add ACL support to remote server.
-- Max Lv <max.c.lv@gmail.com> Sun, 08 Feb 2015 10:59:44 +0900
shadowsocks-libev (2.1.2-1) unstable; urgency=low
* Refine multiple port binding.
-- Max Lv <max.c.lv@gmail.com> Sat, 31 Jan 2015 18:56:25 +0900
shadowsocks-libev (2.1.1-1) unstable; urgency=low
* Fix a memory leak.
-- Max Lv <max.c.lv@gmail.com> Wed, 21 Jan 2015 21:40:58 +0900
shadowsocks-libev (2.1.0-1) unstable; urgency=low
* Fix a bug of tunnel mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 19 Jan 2015 09:59:52 +0900
shadowsocks-libev (2.0.8-1) unstable; urgency=low
* Fix a bug of IPv6.
-- Max Lv <max.c.lv@gmail.com> Fri, 16 Jan 2015 10:58:12 +0900
shadowsocks-libev (2.0.7-1) unstable; urgency=low
* Fix some performance issue.
-- Max Lv <max.c.lv@gmail.com> Tue, 13 Jan 2015 13:17:58 +0900
shadowsocks-libev (2.0.6-1) unstable; urgency=high
* Fix a critical issue in redir mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 12 Jan 2015 21:51:19 +0900
shadowsocks-libev (2.0.5-1) unstable; urgency=low
* Refine local, tunnel, and redir modes.
-- Max Lv <max.c.lv@gmail.com> Mon, 12 Jan 2015 12:39:05 +0800
shadowsocks-libev (2.0.4-1) unstable; urgency=low
* Fix building issues with MinGW32.
-- Max Lv <max.c.lv@gmail.com> Sun, 11 Jan 2015 13:33:31 +0900
shadowsocks-libev (2.0.3-1) unstable; urgency=high
* Fix some issues.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Jan 2015 16:27:54 +0800
shadowsocks-libev (2.0.2-1) unstable; urgency=low
* Fix issues with MinGW.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Jan 2015 15:17:10 +0800
shadowsocks-libev (2.0.1-1) unstable; urgency=low
* Implement a real asynchronous DNS resolver.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Jan 2015 10:04:28 +0800
shadowsocks-libev (1.6.4-1) unstable; urgency=low
* Update documents.
-- Max Lv <max.c.lv@gmail.com> Wed, 07 Jan 2015 21:48:58 +0900
shadowsocks-libev (1.6.3-1) unstable; urgency=low
* Refine ss-redir.
-- Max Lv <max.c.lv@gmail.com> Sun, 04 Jan 2015 19:23:52 +0900
shadowsocks-libev (1.6.2-1) unstable; urgency=low
* Fix some build issues.
-- Max Lv <max.c.lv@gmail.com> Tue, 30 Dec 2014 10:30:28 +0800
shadowsocks-libev (1.6.1-1) unstable; urgency=high
* Add salsa20 and chacha20 support.
-- Max Lv <max.c.lv@gmail.com> Sat, 13 Dec 2014 15:11:34 +0800
shadowsocks-libev (1.6.0-1) unstable; urgency=low
* Solve conflicts with other shadowsocks portings.
-- Max Lv <max.c.lv@gmail.com> Mon, 17 Nov 2014 14:10:21 +0800
shadowsocks-libev (1.5.3-2) unstable; urgency=low
* rename as shadowsocks-libev.
-- Symeon Huang <hzwhuang@gmail.com> Sat, 15 Nov 2014 14:55:28 +0000
shadowsocks (1.5.3-1) unstable; urgency=low
* Fix log on Win32.
-- Max Lv <max.c.lv@gmail.com> Fri, 14 Nov 2014 09:10:06 +0800
shadowsocks (1.5.2-1) unstable; urgency=low
* Handle SIGTERM and SIGKILL nicely.
-- Max Lv <max.c.lv@gmail.com> Tue, 12 Nov 2014 13:11:29 +0800
shadowsocks (1.5.1-1) unstable; urgency=low
* Fix a bug of tcp fast open.
-- Max Lv <max.c.lv@gmail.com> Sat, 08 Nov 2014 19:45:37 +0900
shadowsocks (1.5.0-1) unstable; urgency=low
* Support to build static or shared library.
* Supprot IPv6 NAT in redirect mode.
* Refine the cache size of UDPRelay.
-- Max Lv <max.c.lv@gmail.com> Fri, 07 Nov 2014 09:33:19 +0800
shadowsocks (1.4.8-1) unstable; urgency=low
* Fix a bug of tcp fast open.
-- Max Lv <max.c.lv@gmail.com> Wed, 08 Oct 2014 18:02:02 +0800
shadowsocks (1.4.7-1) unstable; urgency=low
* Add a new encryptor rc4-md5.
-- Max Lv <max.c.lv@gmail.com> Tue, 09 Sep 2014 07:50:10 +0800
shadowsocks (1.4.6-1) unstable; urgency=low
* Add ACL support.
-- Max Lv <max.c.lv@gmail.com> Sat, 03 May 2014 04:37:10 -0400
shadowsocks (1.4.5-1) unstable; urgency=high
* Fix the compatibility issue of udprelay.
* Enhance asyncns to reduce the latency.
* Add TCP_FASTOPEN support.
-- Max Lv <max.c.lv@gmail.com> Sun, 20 Apr 2014 08:12:45 +0800
shadowsocks (1.4.4-1) unstable; urgency=low
* Add CommonCrypto support for darwin.
* Fix some config related issues.
-- Max Lv <max.c.lv@gmail.com> Wed, 26 Mar 2014 13:29:03 +0800
shadowsocks (1.4.3-1) unstable; urgency=low
* Add tunnel mode with local port forwarding feature.
-- Max Lv <max.c.lv@gmail.com> Fri, 21 Feb 2014 11:52:13 +0900
shadowsocks (1.4.2-1) unstable; urgency=high
* Fix the UDP relay issues.
* Add syslog support.
-- Max Lv <max.c.lv@gmail.com> Sun, 05 Jan 2014 10:05:29 +0900
shadowsocks (1.4.1-1) unstable; urgency=low
* Add multi-port support.
* Add PolarSSL support by @linusyang.
-- Max Lv <max.c.lv@gmail.com> Tue, 12 Nov 2013 03:57:21 +0000
shadowsocks (1.4.0-1) unstable; urgency=low
* Add standard socks5 udp support.
-- Max Lv <max.c.lv@gmail.com> Sun, 08 Sep 2013 02:20:40 +0000
shadowsocks (1.3.3-1) unstable; urgency=high
* Provide more info in verbose mode.
-- Max Lv <max.c.lv@gmail.com> Fri, 21 Jun 2013 09:59:20 +0800
shadowsocks (1.3.2-1) unstable; urgency=high
* Fix some ciphers by @linusyang.
-- Max Lv <max.c.lv@gmail.com> Sun, 09 Jun 2013 09:52:31 +0000
shadowsocks (1.3.1-1) unstable; urgency=low
* Support more cihpers: camellia, idea, rc2 and seed.
-- Max Lv <max.c.lv@gmail.com> Tue, 04 Jun 2013 00:56:17 +0000
shadowsocks (1.3-1) unstable; urgency=low
* Able to bind connections to specific interface.
* Support more ciphers: aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, cast5-cfb, des-cfb.
-- Max Lv <max.c.lv@gmail.com> Thu, 16 May 2013 10:51:15 +0800
shadowsocks (1.2-2) unstable; urgency=low
* Close timeouted TCP connections.
-- Max Lv <max.c.lv@gmail.com> Tue, 07 May 2013 14:10:33 +0800
shadowsocks (1.2-1) unstable; urgency=low
* Fix a high load issue.
-- Max Lv <max.c.lv@gmail.com> Thu, 18 Apr 2013 10:52:34 +0800
shadowsocks (1.1-1) unstable; urgency=low
* Fix a IPV6 resolve issue.
-- Max Lv <max.c.lv@gmail.com> Wed, 10 Apr 2013 12:11:36 +0800
shadowsocks (1.0-2) unstable; urgency=low
* Initial release.
-- Max Lv <max.c.lv@gmail.com> Sat, 06 Apr 2013 16:59:15 +0800
+365
View File
@@ -0,0 +1,365 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
+675
View File
@@ -0,0 +1,675 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+14
View File
@@ -0,0 +1,14 @@
if USE_SYSTEM_SHARED_LIB
SUBDIRS = libcork libipset src
else
SUBDIRS = libsodium libcork libipset libudns libev src
endif
if ENABLE_DOCUMENTATION
SUBDIRS += doc
endif
ACLOCAL_AMFLAGS = -I m4
pkgconfiglibdir = $(libdir)/pkgconfig
pkgconfiglib_DATA = shadowsocks-libev.pc
+898
View File
@@ -0,0 +1,898 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_DOCUMENTATION_TRUE@am__append_1 = doc
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/ax_tls.m4 $(top_srcdir)/m4/inet_ntop.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/pcre.m4 \
$(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/m4/stack-protector.m4 $(top_srcdir)/m4/zlib.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = shadowsocks-libev.pc
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(pkgconfiglibdir)"
DATA = $(pkgconfiglib_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = libsodium libcork libipset libudns libev src doc
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/shadowsocks-libev.pc.in $(top_srcdir)/auto/ar-lib \
$(top_srcdir)/auto/compile $(top_srcdir)/auto/config.guess \
$(top_srcdir)/auto/config.sub $(top_srcdir)/auto/install-sh \
$(top_srcdir)/auto/ltmain.sh $(top_srcdir)/auto/missing \
AUTHORS COPYING INSTALL auto/ar-lib auto/compile \
auto/config.guess auto/config.rpath auto/config.sub \
auto/depcomp auto/install-sh auto/ltmain.sh auto/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
GZIP = @GZIP@
INET_NTOP_LIB = @INET_NTOP_LIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBPCRE = @LIBPCRE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCRE_CONFIG = @PCRE_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pcre_pcreh = @pcre_pcreh@
pcreh = @pcreh@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@USE_SYSTEM_SHARED_LIB_FALSE@SUBDIRS = libsodium libcork libipset \
@USE_SYSTEM_SHARED_LIB_FALSE@ libudns libev src $(am__append_1)
@USE_SYSTEM_SHARED_LIB_TRUE@SUBDIRS = libcork libipset src \
@USE_SYSTEM_SHARED_LIB_TRUE@ $(am__append_1)
ACLOCAL_AMFLAGS = -I m4
pkgconfiglibdir = $(libdir)/pkgconfig
pkgconfiglib_DATA = shadowsocks-libev.pc
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
shadowsocks-libev.pc: $(top_builddir)/config.status $(srcdir)/shadowsocks-libev.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
install-pkgconfiglibDATA: $(pkgconfiglib_DATA)
@$(NORMAL_INSTALL)
@list='$(pkgconfiglib_DATA)'; test -n "$(pkgconfiglibdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfiglibdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgconfiglibdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfiglibdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfiglibdir)" || exit $$?; \
done
uninstall-pkgconfiglibDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfiglib_DATA)'; test -n "$(pkgconfiglibdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfiglibdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfiglibdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-pkgconfiglibDATA
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-pkgconfiglibDATA
.MAKE: $(am__recursive_targets) all install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-generic \
distclean-hdr distclean-libtool distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am \
install-pkgconfiglibDATA install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-am uninstall uninstall-am \
uninstall-pkgconfiglibDATA
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+486
View File
@@ -0,0 +1,486 @@
# shadowsocks-libev
## Intro
[Shadowsocks-libev](http://shadowsocks.org) is a lightweight secured SOCKS5
proxy for embedded devices and low-end boxes.
It is a port of [Shadowsocks](https://github.com/shadowsocks/shadowsocks)
created by [@clowwindy](https://github.com/clowwindy), which is maintained by
[@madeye](https://github.com/madeye) and [@linusyang](https://github.com/linusyang).
Current version: 2.5.6 | [Changelog](debian/changelog)
Travis CI: [![Travis CI](https://travis-ci.org/shadowsocks/shadowsocks-libev.svg?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-libev)
## Features
Shadowsocks-libev is written in pure C and only depends on
[libev](http://software.schmorp.de/pkg/libev.html) and
[OpenSSL](http://www.openssl.org/) or [mbedTLS](https://tls.mbed.org/) or [PolarSSL](https://polarssl.org/).
In normal usage, the memory footprint is about 600KB and the CPU utilization is
no more than 5% on a low-end router (Buffalo WHR-G300N V2 with a 400MHz MIPS CPU,
32MB memory and 4MB flash).
For a full list of feature comparison between different versions of shadowsocks,
refer to the [Wiki page](https://github.com/shadowsocks/shadowsocks/wiki/Feature-Comparison-across-Different-Versions).
## Installation
### Distribution-specific guide
- [Debian & Ubuntu](#debian--ubuntu)
+ [Install from repository](#install-from-repository)
+ [Build deb package from source](#build-deb-package-from-source)
+ [Configure and start the service](#configure-and-start-the-service)
- [Fedora & RHEL](#fedora--rhel)
+ [Install from repository](#install-from-repository-1)
- [OpenSUSE](#opensuse)
+ [Install from repository](#install-from-repository-2)
+ [Build from source](#build-from-source)
- [Archlinux](#archlinux)
- [NixOS](#nixos)
- [Nix](#nix)
- [Directly build and install on UNIX-like system](#linux)
- [FreeBSD](#freebsd)
- [OpenWRT](#openwrt)
- [OS X](#os-x)
- [Windows](#windows)
* * *
### Pre-build configure guide
For a complete list of avaliable configure-time option,
try `configure --help`.
#### Using alternative crypto library
There are three crypto libraries available:
- OpenSSL (**default**)
- mbedTLS
- PolarSSL (Deprecated)
##### mbedTLS
To build against mbedTLS, specify `--with-crypto-library=mbedtls`
and `--with-mbedtls=/path/to/mbedtls` when running `./configure`.
Windows users will need extra work when compiling mbedTLS library,
see [this issue](https://github.com/shadowsocks/shadowsocks-libev/issues/422) for detail info.
##### PolarSSL (Deprecated)
To build against PolarSSL, specify `--with-crypto-library=polarssl`
and `--with-polarssl=/path/to/polarssl` when running `./configure`.
* PolarSSL __1.2.5 or newer__ is required. Currently, PolarSSL does __NOT__ support
CAST5-CFB, DES-CFB, IDEA-CFB, RC2-CFB and SEED-CFB.
* RC4 is only support by PolarSSL __1.3.0 or above__.
#### Using shared library from system
Please specify `--enable-system-shared-lib`. This will replace the bundled
`libev`, `libsodium` and `libudns` with the corresponding libraries installed
in the system during compilation and linking.
### Debian & Ubuntu
#### Install from repository
**Note: The repositories doesn't always contain the latest version. Please build from source if you want the latest version (see below)**
Shadowsocks-libev is available in the official repository for Debian 9("Stretch"), unstable, Ubuntu 16.10 and later derivatives:
```bash
sudo apt update
sudo apt install shadowsocks-libev
```
For Debian Jessie users, please install it from `jessie-backports`:
```bash
sudo sh -c 'printf "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list'
sudo apt update
sudo apt -t jessie-backports install shadowsocks-libev
```
#### Build deb package from source
Supported Platforms:
* Debian 7 (see below), 8, 9, unstable
* Ubuntu 14.04 (see below), Ubuntu 14.10, 15.04, 15.10 or higher
**Note for Ubuntu 14.04 users**:
Packages built on Ubuntu 14.04 may be used in later Ubuntu versions. However,
packages built on Debian 7/8/9 or Ubuntu 14.10+ **cannot** be installed on
Ubuntu 14.04.
**Note for Debian 7.x users**:
To build packages on Debian 7 (Wheezy), you need to enable `debian-backports`
to install systemd-compatibility packages like `dh-systemd` or `init-system-helpers`.
Please follow the instructions on [Debian Backports](http://backports.debian.org).
This also means that you can only install those built packages on systems that have
`init-system-helpers` installed.
Otherwise, try to build and install directly from source. See the [Linux](#linux)
section below.
``` bash
cd shadowsocks-libev
sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev \
gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev
dpkg-buildpackage -b -us -uc -i
cd ..
sudo dpkg -i shadowsocks-libev*.deb
```
#### Configure and start the service
```
# Edit the configuration file
sudo vim /etc/shadowsocks-libev/config.json
# Edit the default configuration for debian
sudo vim /etc/default/shadowsocks-libev
# Start the service
sudo /etc/init.d/shadowsocks-libev start # for sysvinit, or
sudo systemctl start shadowsocks-libev # for systemd
```
### Fedora & RHEL
Supported distributions include
- Fedora 22, 23, 24
- RHEL 6, 7 and derivatives (including CentOS, Scientific Linux)
#### Install from repository
Enable repo via `dnf`:
```
su -c 'dnf copr enable librehat/shadowsocks'
```
Or download yum repo on [Fedora Copr](https://copr.fedoraproject.org/coprs/librehat/shadowsocks/) and put it inside `/etc/yum.repos.d/`. The release `Epel` is for RHEL and its derivatives.
Then, install `shadowsocks-libev` via `dnf`:
```bash
su -c 'dnf update'
su -c 'dnf install shadowsocks-libev'
```
or `yum`:
```bash
su -c 'yum update'
su -c 'yum install shadowsocks-libev'
```
### OpenSUSE
#### Install from repository
Use the following command to install from repository.
```bash
sudo zypper install shadowsocks-libev
```
#### Build from source
You should install `zlib-devel` and `libopenssl-devel` first.
```bash
sudo zypper update
sudo zypper install zlib-devel libopenssl-devel
```
Then download the source package and compile.
```bash
git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
./configure && make
sudo make install
```
### Archlinux
```bash
sudo pacman -S shadowsocks-libev
```
Please refer to downstream [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/shadowsocks-libev)
script for extra modifications and distribution-specific bugs.
### NixOS
```bash
nix-env -iA nixos.shadowsocks-libev
```
### Nix
```bash
nix-env -iA nixpkgs.shadowsocks-libev
```
### Linux
For Unix-like systems, especially Debian-based systems,
e.g. Ubuntu, Debian or Linux Mint, you can build the binary like this:
```bash
# Debian / Ubuntu
sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto
# CentOS / Fedora / RHEL
sudo yum install gcc autoconf libtool automake make zlib-devel openssl-devel asciidoc xmlto
./configure && make
sudo make install
```
### FreeBSD
```bash
su
cd /usr/ports/net/shadowsocks-libev
make install
```
Edit your config.json file. By default, it's located in /usr/local/etc/shadowsocks-libev.
To enable shadowsocks-libev, add the following rc variable to your /etc/rc.conf file:
```
shadowsocks_libev_enable="YES"
```
Start the Shadowsocks server:
```bash
service shadowsocks_libev start
```
### OpenWRT
The OpenWRT project is maintained here:
[openwrt-shadowsocks](https://github.com/shadowsocks/openwrt-shadowsocks).
### OS X
For OS X, use [Homebrew](http://brew.sh) to install or build.
Install Homebrew:
```bash
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
Install shadowsocks-libev:
```bash
brew install shadowsocks-libev
```
### Windows
For Windows, use either MinGW (msys) or Cygwin to build.
At the moment, only `ss-local` is supported to build against MinGW (msys).
If you are using MinGW (msys), please download OpenSSL or PolarSSL source tarball
to the home directory of msys, and build it like this (may take a few minutes):
#### OpenSSL
```bash
tar zxf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config --prefix="$HOME/prebuilt" --openssldir="$HOME/prebuilt/openssl"
make && make install
```
#### PolarSSL
```bash
tar zxf polarssl-1.3.2-gpl.tgz
cd polarssl-1.3.2
make lib WINDOWS=1
make install DESTDIR="$HOME/prebuilt"
```
Then, build the binary using the commands below, and all `.exe` files
will be built at `$HOME/ss/bin`:
#### OpenSSL
```bash
./configure --prefix="$HOME/ss" --with-openssl="$HOME/prebuilt"
make && make install
```
#### PolarSSL
```bash
./configure --prefix="$HOME/ss" --with-crypto-library=polarssl --with-polarssl=$HOME/prebuilt
make && make install
```
## Usage
For a detailed and complete list of all supported arguments, you may refer to the
man pages of the applications, respectively.
```
ss-[local|redir|server|tunnel]
-s <server_host> host name or ip address of your remote server
-p <server_port> port number of your remote server
-l <local_port> port number of your local server
-k <password> password of your remote server
[-m <encrypt_method>] encrypt method: table, rc4, rc4-md5,
aes-128-cfb, aes-192-cfb, aes-256-cfb,
bf-cfb, camellia-128-cfb, camellia-192-cfb,
camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb,
rc2-cfb, seed-cfb, salsa20 ,chacha20 and
chacha20-ietf
[-f <pid_file>] the file path to store pid
[-t <timeout>] socket timeout in seconds
[-c <config_file>] the path to config file
[-i <interface>] network interface to bind,
not available in redir mode
[-b <local_address>] local address to bind,
not available in server mode
[-u] enable udprelay mode,
TPROXY is required in redir mode
[-U] enable UDP relay and disable TCP relay,
not available in local mode
[-A] enable onetime authentication
[-L <addr>:<port>] specify destination server address and port
for local port forwarding,
only available in tunnel mode
[-d <addr>] setup name servers for internal DNS resolver,
only available in server mode
[--fast-open] enable TCP fast open,
only available in local and server mode,
with Linux kernel > 3.7.0
[--acl <acl_file>] config file of ACL (Access Control List)
only available in local and server mode
[--manager-address <addr>] UNIX domain socket address
only available in server and manager mode
[--executable <path>] path to the executable of ss-server
only available in manager mode
[-v] verbose mode
notes:
ss-redir provides a transparent proxy function and only works on the
Linux platform with iptables.
```
## Advanced usage
The latest shadowsocks-libev has provided a *redir* mode. You can configure your Linux-based box or router to proxy all TCP traffic transparently.
# Create new chain
root@Wrt:~# iptables -t nat -N SHADOWSOCKS
root@Wrt:~# iptables -t mangle -N SHADOWSOCKS
# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
# Ignore LANs and any other addresses you'd like to bypass the proxy
# See Wikipedia and RFC5735 for full list of reserved networks.
# See ashi009/bestroutetb for a highly optimized CHN route list.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
# Anything else should be redirected to shadowsocks's local port
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
# Add any UDP rules
root@Wrt:~# ip route add local default dev lo table 100
root@Wrt:~# ip rule add fwmark 1 lookup 100
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS_MARK -p udp --dport 53 -j MARK --set-mark 1
# Apply the rules
root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A PREROUTING -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A OUTPUT -j SHADOWSOCKS_MARK
# Start the shadowsocks-redir
root@Wrt:~# ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
## Shadowsocks over KCP
It's quite easy to use shadowsocks and [KCP](https://github.com/skywind3000/kcp) together with [kcptun](https://github.com/xtaci/kcptun).
The goal of shadowsocks over KCP is to provide a fully configurable, UDP based protocol to improve poor connections, e.g. a high packet loss 3G network.
### Setup your server
```bash
server_linux_amd64 -l :21 -t 127.0.0.1:443 --crypt none --mtu 1200 --nocomp --mode normal --dscp 46 &
ss-server -s 0.0.0.0 -p 443 -k passwd -m chacha20 -u
```
### Setup your client
```bash
client_linux_amd64 -l 127.0.0.1:1090 -r <server_ip>:21 --crypt none --mtu 1200 --nocomp --mode normal --dscp 46 &
ss-local -s 127.0.0.1 -p 1090 -k passwd -m chacha20 -l 1080 -b 0.0.0.0 &
ss-local -s <server_ip> -p 443 -k passwd -m chacha20 -l 1080 -U -b 0.0.0.0
```
## Security Tips
Although shadowsocks-libev can handle thousands of concurrent connections nicely, we still recommend
setting up your server's firewall rules to limit connections from each user:
# Up to 32 connections are enough for normal usage
iptables -A INPUT -p tcp --syn --dport ${SHADOWSOCKS_PORT} -m connlimit --connlimit-above 32 -j REJECT --reject-with tcp-reset
## License
Copyright (C) 2016 Max Lv <max.c.lv@gmail.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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+9
View File
@@ -0,0 +1,9 @@
[reject_all]
[white_list]
127.0.0.1
::1
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
fc00::/7
File diff suppressed because it is too large. Load diff
+1299
View File
File diff suppressed because it is too large. Load diff
+270
View File
@@ -0,0 +1,270 @@
#! /bin/sh
# Wrapper for Microsoft lib.exe
me=ar-lib
scriptversion=2012-03-01.08; # UTC
# Copyright (C) 2010-2013 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 <http://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*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv in
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin)
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" | 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
+347
View File
@@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 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 <http://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*)
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/*)
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 )
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 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
File diff suppressed because it is too large. Load diff
Whitespace-only changes.
File diff suppressed because it is too large. Load diff
+791
View File
@@ -0,0 +1,791 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2013 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 <http://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 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
+527
View File
@@ -0,0 +1,527 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# 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
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=$?
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; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test 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=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
File diff suppressed because it is too large. Load diff
+215
View File
@@ -0,0 +1,215 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 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 <http://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=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://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 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
autoreconf --install --force
@@ -0,0 +1,75 @@
# - Check if the DIR symbol exists like in AC_HEADER_DIRENT.
# CHECK_DIRSYMBOL_EXISTS(FILES VARIABLE)
#
# FILES - include files to check
# VARIABLE - variable to return result
#
# This module is a small but important variation on CheckSymbolExists.cmake.
# The symbol always searched for is DIR, and the test programme follows
# the AC_HEADER_DIRENT test programme rather than the CheckSymbolExists.cmake
# test programme which always fails since DIR tends to be typedef'd
# rather than #define'd.
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
IF(NOT DEFINED ${VARIABLE})
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
SET(MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_DIRSYMBOL_EXISTS_LIBS
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ELSE(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_DIRSYMBOL_EXISTS_LIBS)
ENDIF(CMAKE_REQUIRED_LIBRARIES)
IF(CMAKE_REQUIRED_INCLUDES)
SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
ELSE(CMAKE_REQUIRED_INCLUDES)
SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES)
ENDIF(CMAKE_REQUIRED_INCLUDES)
FOREACH(FILE ${FILES})
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
ENDFOREACH(FILE)
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main()\n{if ((DIR *) 0) return 0;}\n")
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c" @ONLY)
MESSAGE(STATUS "Looking for DIR in ${FILES}")
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS}
"${CHECK_DIRSYMBOL_EXISTS_LIBS}"
"${CMAKE_DIRSYMBOL_EXISTS_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for DIR in ${FILES} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol DIR")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
"passed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for DIR in ${FILES} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have symbol DIR")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
"failed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
ENDIF(${VARIABLE})
ENDIF(NOT DEFINED ${VARIABLE})
ENDMACRO(CHECK_DIRSYMBOL_EXISTS)
@@ -0,0 +1,41 @@
# - Check if the prototype for a function exists.
# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE)
#
# FUNCTION - the name of the function you are looking for
# HEADER - the header(s) where the prototype should be declared
# VARIABLE - variable to store the result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
INCLUDE(CheckCSourceCompiles)
MACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
SET(_INCLUDE_FILES)
FOREACH (it ${_HEADER})
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
ENDFOREACH (it)
SET(_CHECK_PROTO_EXISTS_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
#ifndef ${_SYMBOL}
int i = sizeof(&${_SYMBOL});
#endif
return 0;
}
")
CHECK_C_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
ENDMACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
@@ -0,0 +1,37 @@
message(STATUS "Checking whether system has ANSI C header files")
include(CheckPrototypeExists)
include(CheckIncludeFiles)
check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" StandardHeadersExist)
if(StandardHeadersExist)
check_prototype_exists(memchr string.h memchrExists)
if(memchrExists)
check_prototype_exists(free stdlib.h freeExists)
if(freeExists)
message(STATUS "ANSI C header files - found")
set(STDC_HEADERS 1 CACHE INTERNAL "System has ANSI C header files")
set(HAVE_STRINGS_H 1)
set(HAVE_STRING_H 1)
set(HAVE_FLOAT_H 1)
set(HAVE_STDLIB_H 1)
set(HAVE_STDDEF_H 1)
set(HAVE_STDINT_H 1)
set(HAVE_INTTYPES_H 1)
set(HAVE_DLFCN_H 1)
endif(freeExists)
endif(memchrExists)
endif(StandardHeadersExist)
if(NOT STDC_HEADERS)
message(STATUS "ANSI C header files - not found")
set(STDC_HEADERS 0 CACHE INTERNAL "System has ANSI C header files")
endif(NOT STDC_HEADERS)
check_include_files(unistd.h HAVE_UNISTD_H)
include(CheckDIRSymbolExists)
check_dirsymbol_exists("sys/stat.h;sys/types.h;dirent.h" HAVE_DIRENT_H)
if (HAVE_DIRENT_H)
set(HAVE_SYS_STAT_H 1)
set(HAVE_SYS_TYPES_H 1)
endif (HAVE_DIRENT_H)
+158
View File
@@ -0,0 +1,158 @@
#.rst:
# FindPCRE
# --------
#
# Find the native PCRE includes and library.
#
# IMPORTED Targets
# ^^^^^^^^^^^^^^^^
#
# This module defines :prop_tgt:`IMPORTED` target ``PCRE::PCRE``, if
# PCRE has been found.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module defines the following variables:
#
# ::
#
# PCRE_INCLUDE_DIRS - where to find pcre.h, etc.
# PCRE_LIBRARIES - List of libraries when using pcre.
# PCRE_FOUND - True if pcre found.
#
# ::
#
# PCRE_VERSION_STRING - The version of pcre found (x.y.z)
# PCRE_VERSION_MAJOR - The major version of zlib
# PCRE_VERSION_MINOR - The minor version of zlib
# PCRE_VERSION_PATCH - The patch version of zlib
# PCRE_VERSION_TWEAK - The tweak version of zlib
#
# Backward Compatibility
# ^^^^^^^^^^^^^^^^^^^^^^
#
# The following variable are provided for backward compatibility
#
# ::
#
# PCRE_MAJOR_VERSION - The major version of zlib
# PCRE_MINOR_VERSION - The minor version of zlib
# PCRE_PATCH_VERSION - The patch version of zlib
#
# Hints
# ^^^^^
#
# A user may set ``PCRE_ROOT`` to a zlib installation root to tell this
# module where to look.
#=============================================================================
# Copyright 2001-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
set(_PCRE_SEARCHES)
# Search PCRE_ROOT first if it is set.
if(PCRE_ROOT)
set(_PCRE_SEARCH_ROOT PATHS ${PCRE_ROOT} NO_DEFAULT_PATH)
list(APPEND _PCRE_SEARCHES _PCRE_SEARCH_ROOT)
endif()
# Normal search.
set(_PCRE_SEARCH_NORMAL
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Pcre;InstallPath]"
"$ENV{PROGRAMFILES}/pcre"
)
list(APPEND _PCRE_SEARCHES _PCRE_SEARCH_NORMAL)
set(PCRE_NAMES pcre pcredll)
set(PCRE_NAMES_DEBUG pcred)
# Try each search configuration.
foreach(search ${_PCRE_SEARCHES})
find_path(PCRE_INCLUDE_DIR NAMES pcre.h ${${search}} PATH_SUFFIXES include)
endforeach()
# Allow PCRE_LIBRARY to be set manually, as the location of the pcre library
if(NOT PCRE_LIBRARY)
foreach(search ${_PCRE_SEARCHES})
find_library(PCRE_LIBRARY_RELEASE NAMES ${PCRE_NAMES} ${${search}} PATH_SUFFIXES lib)
find_library(PCRE_LIBRARY_DEBUG NAMES ${PCRE_NAMES_DEBUG} ${${search}} PATH_SUFFIXES lib)
endforeach()
include(SelectLibraryConfigurations)
select_library_configurations(PCRE)
endif()
unset(PCRE_NAMES)
unset(PCRE_NAMES_DEBUG)
mark_as_advanced(PCRE_LIBRARY PCRE_INCLUDE_DIR)
if(PCRE_INCLUDE_DIR AND EXISTS "${PCRE_INCLUDE_DIR}/pcre.h")
file(STRINGS "${PCRE_INCLUDE_DIR}/pcre.h" PCRE_H REGEX "^#define PCRE_VERSION \"[^\"]*\"$")
string(REGEX REPLACE "^.*PCRE_VERSION \"([0-9]+).*$" "\\1" PCRE_VERSION_MAJOR "${PCRE_H}")
string(REGEX REPLACE "^.*PCRE_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" PCRE_VERSION_MINOR "${PCRE_H}")
string(REGEX REPLACE "^.*PCRE_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" PCRE_VERSION_PATCH "${PCRE_H}")
set(PCRE_VERSION_STRING "${PCRE_VERSION_MAJOR}.${PCRE_VERSION_MINOR}.${PCRE_VERSION_PATCH}")
# only append a TWEAK version if it exists:
set(PCRE_VERSION_TWEAK "")
if( "${PCRE_H}" MATCHES "PCRE_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
set(PCRE_VERSION_TWEAK "${CMAKE_MATCH_1}")
set(PCRE_VERSION_STRING "${PCRE_VERSION_STRING}.${PCRE_VERSION_TWEAK}")
endif()
set(PCRE_MAJOR_VERSION "${PCRE_VERSION_MAJOR}")
set(PCRE_MINOR_VERSION "${PCRE_VERSION_MINOR}")
set(PCRE_PATCH_VERSION "${PCRE_VERSION_PATCH}")
endif()
# handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE REQUIRED_VARS PCRE_LIBRARY PCRE_INCLUDE_DIR
VERSION_VAR PCRE_VERSION_STRING)
if(PCRE_FOUND)
set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
if(NOT PCRE_LIBRARIES)
set(PCRE_LIBRARIES ${PCRE_LIBRARY})
endif()
if(NOT TARGET PCRE::PCRE)
add_library(PCRE::PCRE UNKNOWN IMPORTED)
set_target_properties(PCRE::PCRE PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PCRE_INCLUDE_DIRS}")
if(PCRE_LIBRARY_RELEASE)
set_property(TARGET PCRE::PCRE APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(PCRE::PCRE PROPERTIES
IMPORTED_LOCATION_RELEASE "${PCRE_LIBRARY_RELEASE}")
endif()
if(PCRE_LIBRARY_DEBUG)
set_property(TARGET PCRE::PCRE APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(PCRE::PCRE PROPERTIES
IMPORTED_LOCATION_DEBUG "${PCRE_LIBRARY_DEBUG}")
endif()
if(NOT PCRE_LIBRARY_RELEASE AND NOT PCRE_LIBRARY_DEBUG)
set_property(TARGET PCRE::PCRE APPEND PROPERTY
IMPORTED_LOCATION "${PCRE_LIBRARY}")
endif()
endif()
endif()
@@ -0,0 +1,197 @@
# Build args
if (${with_crypto_library} STREQUAL "openssl")
find_package(ZLIB REQUIRED)
find_package(OpenSSL REQUIRED)
set(USE_CRYPTO_OPENSSL 1)
set(LIBCRYPTO
${ZLIB_LIBRARIES}
${OPENSSL_CRYPTO_LIBRARY})
include_directories(${ZLIB_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIR})
list ( APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR})
elseif(${with_crypto_library} STREQUAL "polarssl")
find_package(polarssl REQUIRED)
set(USE_CRYPTO_POLARSSL 1)
elseif(${with_crypto_library} STREQUAL "mbedtls")
find_package(mbedtls REQUIRED)
set(USE_CRYPTO_MBEDTLS 1)
endif()
find_package(PCRE REQUIRED)
include_directories(${PCRE_INCLUDE_DIR})
list ( APPEND CMAKE_REQUIRED_INCLUDES ${PCRE_INCLUDE_DIR})
# Platform checks
include ( CheckFunctionExists )
include ( CheckIncludeFiles )
include ( CheckSymbolExists )
include ( CheckCSourceCompiles )
include ( CheckTypeSize )
include ( CheckSTDC )
check_include_files ( "arpa/inet.h" HAVE_ARPA_INET_H )
check_include_files ( "CommonCrypto/CommonCrypto.h" HAVE_COMMONCRYPTO_COMMONCRYPTO_H )
check_include_files ( dlfcn.h HAVE_DLFCN_H )
check_include_files ( fcntl.h HAVE_FCNTL_H )
check_include_files ( inttypes.h HAVE_INTTYPES_H )
check_include_files ( langinfo.h HAVE_LANGINFO_H )
check_include_files ( limits.h HAVE_LIMITS_H )
check_include_files ( "linux/if.h" HAVE_LINUX_IF_H )
check_include_files ( "linux/netfilter_ipv4.h" HAVE_LINUX_NETFILTER_IPV4_H )
check_include_files ( "linux/netfilter_ipv6/ip6_tables.h" HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H )
check_include_files ( locale.h HAVE_LOCALE_H )
check_include_files ( memory.h HAVE_MEMORY_H )
check_include_files ( netdb.h HAVE_NETDB_H )
check_include_files ( "net/if.h" HAVE_NET_IF_H )
check_include_files ( "openssl/engine.h" HAVE_OPENSSL_ENGINE_H )
check_include_files ( "openssl/err.h" HAVE_OPENSSL_ERR_H )
check_include_files ( "openssl/evp.h" HAVE_OPENSSL_EVP_H )
check_include_files ( "openssl/pem.h" HAVE_OPENSSL_PEM_H )
check_include_files ( "openssl/rand.h" HAVE_OPENSSL_RAND_H )
check_include_files ( "openssl/rsa.h" HAVE_OPENSSL_RSA_H )
check_include_files ( "openssl/sha.h" HAVE_OPENSSL_SHA_H )
check_include_files ( pcre.h HAVE_PCRE_H )
check_include_files ( "pcre/pcre.h" HAVE_PCRE_PCRE_H )
check_include_files ( poll.h HAVE_POLL_H )
check_include_files ( port.h HAVE_PORT_H )
check_include_files ( stdint.h HAVE_STDINT_H )
check_include_files ( stdlib.h HAVE_STDLIB_H )
check_include_files ( strings.h HAVE_STRINGS_H )
check_include_files ( string.h HAVE_STRING_H )
check_include_files ( "sys/epoll.h" HAVE_SYS_EPOLL_H )
check_include_files ( "sys/eventfd.h" HAVE_SYS_EVENTFD_H )
check_include_files ( "sys/event.h" HAVE_SYS_EVENT_H )
check_include_files ( "sys/inotify.h" HAVE_SYS_INOTIFY_H )
check_include_files ( "sys/ioctl.h" HAVE_SYS_IOCTL_H )
check_include_files ( "sys/select.h" HAVE_SYS_SELECT_H )
check_include_files ( "sys/signalfd.h" HAVE_SYS_SIGNALFD_H )
check_include_files ( "sys/socket.h" HAVE_SYS_SOCKET_H )
check_include_files ( "sys/stat.h" HAVE_SYS_STAT_H )
check_include_files ( "sys/types.h" HAVE_SYS_TYPES_H )
check_include_files ( "sys/wait.h" HAVE_SYS_WAIT_H )
check_include_files ( unistd.h HAVE_UNISTD_H )
check_include_files ( vfork.h HAVE_VFORK_H )
check_include_files ( windows.h HAVE_WINDOWS_H )
check_include_files ( winsock2.h HAVE_WINSOCK2_H )
check_include_files ( ws2tcpip.h HAVE_WS2TCPIP_H )
check_include_files ( zlib.h HAVE_ZLIB_H )
check_include_files ( "sys/syscall.h" HAVE_SYS_CALL_H )
check_include_files ( "minix/config.h" _MINIX)
check_function_exists ( CCCryptorCreateWithMode HAVE_CCCRYPTORCREATEWITHMODE )
check_function_exists ( clock_gettime HAVE_CLOCK_GETTIME )
check_function_exists ( epoll_ctl HAVE_EPOLL_CTL )
check_function_exists ( eventfd HAVE_EVENTFD )
check_function_exists ( EVP_EncryptInit_ex HAVE_EVP_ENCRYPTINIT_EX )
check_function_exists ( floor HAVE_FLOOR )
check_function_exists ( fork HAVE_FORK )
check_function_exists ( getpwnam_r HAVE_GETPWNAM_R )
check_function_exists ( inet_ntop HAVE_INET_NTOP )
check_function_exists ( inotify_init HAVE_INOTIFY_INIT )
check_function_exists ( kqueue HAVE_KQUEUE )
check_function_exists ( malloc HAVE_MALLOC )
check_function_exists ( memset HAVE_MEMSET )
check_function_exists ( nanosleep HAVE_NANOSLEEP )
check_function_exists ( poll HAVE_POLL )
check_function_exists ( port_create HAVE_PORT_CREATE )
check_function_exists ( RAND_pseudo_bytes HAVE_RAND_PSEUDO_BYTES )
check_function_exists ( select HAVE_SELECT )
check_function_exists ( setresuid HAVE_SETRESUID )
check_function_exists ( setreuid HAVE_SETREUID )
check_function_exists ( setrlimit HAVE_SETRLIMIT )
check_function_exists ( signalfd HAVE_SIGNALFD )
check_function_exists ( socket HAVE_SOCKET )
check_function_exists ( strerror HAVE_STRERROR )
check_function_exists ( vfork HAVE_VFORK )
check_function_exists ( inet_ntop HAVE_DECL_INET_NTOP )
check_symbol_exists ( PTHREAD_PRIO_INHERIT "pthread.h" HAVE_PTHREAD_PRIO_INHERIT )
check_symbol_exists ( PTHREAD_CREATE_JOINABLE "pthread.h" HAVE_PTHREAD_CREATE_JOINABLE )
check_symbol_exists ( EINPROGRESS "sys/errno.h" HAVE_EINPROGRESS )
check_symbol_exists ( WSAEWOULDBLOCK "winerror.h" HAVE_WSAEWOULDBLOCK )
# winsock2.h and ws2_32 should provide these
if(HAVE_WINSOCK2_H)
set(HAVE_GETHOSTNAME ON)
set(HAVE_SELECT ON)
set(HAVE_SOCKET ON)
set(HAVE_INET_NTOA ON)
set(HAVE_RECV ON)
set(HAVE_SEND ON)
set(HAVE_RECVFROM ON)
set(HAVE_SENDTO ON)
set(HAVE_GETHOSTBYNAME ON)
set(HAVE_GETSERVBYNAME ON)
else(HAVE_WINSOCK2_H)
check_function_exists(gethostname HAVE_GETHOSTNAME)
check_function_exists(select HAVE_SELECT)
check_function_exists(socket HAVE_SOCKET)
check_function_exists(inet_ntoa HAVE_INET_NTOA)
check_function_exists(recv HAVE_RECV)
check_function_exists(send HAVE_SEND)
check_function_exists(recvfrom HAVE_RECVFROM)
check_function_exists(sendto HAVE_SENDTO)
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
check_function_exists(getservbyname HAVE_GETSERVBYNAME)
endif(HAVE_WINSOCK2_H)
find_library ( HAVE_LIBPCRE pcre )
find_library ( HAVE_LIBRT rt )
find_library ( HAVE_LIBSOCKET socket )
check_c_source_compiles(
"
#include <sys/time.h>
#include <time.h>
int main(int argc, char** argv) {return 0;}
"
TIME_WITH_SYS_TIME
)
check_c_source_compiles("
__thread int tls;
int main(void) {
return 0;
}" TLS)
check_type_size(pid_t PID_T)
# Tweaks
if (${HAVE_SYS_CALL_H})
set(HAVE_CLOCK_SYSCALL ${HAVE_CLOCK_GETTIME})
endif ()
if (ZLIB_FOUND)
set (HAVE_ZLIB 1)
endif()
if (NOT HAVE_DECL_INET_NTOP)
set(HAVE_DECL_INET_NTOP 0)
endif()
if (NOT HAVE_PTHREAD_CREATE_JOINABLE)
set (PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED)
endif()
if (${_MINIX})
set (_POSIX_1_SOURCE 2)
set (_POSIX_SOURCE 1)
endif()
if (${HAVE_EINPROGRESS})
set (CONNECT_IN_PROGRESS EINPROGRESS)
elseif(${HAVE_WSAEWOULDBLOCK})
set (CONNECT_IN_PROGRESS WSAEWOULDBLOCK)
endif()
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
set (HAVE_IPv6 1)
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
ADD_DEFINITIONS(-D__USE_MINGW_ANSI_STDIO=1)
+20
View File
@@ -0,0 +1,20 @@
# LuaDist CMake utility library.
# Provides sane project defaults and macros common to LuaDist CMake builds.
#
# Copyright (C) 2007-2012 LuaDist.
# by David Manura, Peter Drahoš
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the COPYRIGHT file distributed with LuaDist.
# Please note that the package source code is licensed under its own license.
# Tweaks and other defaults
# Setting CMAKE to use loose block and search for find modules in source directory
set ( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} )
# In MSVC, prevent warnings that can occur when using standard libraries.
if ( MSVC )
add_definitions ( -D_CRT_SECURE_NO_WARNINGS )
endif ()
@@ -0,0 +1,33 @@
_ss_local()
{
local cur prev opts ciphers
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --fast-open --mtu --help --mptcp -i --acl -l'
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
cur=${COMP_WORDS[COMP_CWORD]}
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "$prev" in
-c|-f|--acl)
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
;;
-s|-b)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
;;
-m)
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
;;
-a)
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
;;
-p|-k|-t|-n|--mtu|-l)
;;
-i)
_available_interfaces -a || true
;;
*)
COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) )
;;
esac
return 0
}
complete -F _ss_local ss-local
@@ -0,0 +1,41 @@
_ss_manager()
{
local cur prev opts ciphers
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --mtu --help --mptcp -i -l --manager-address --executable'
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
cur=${COMP_WORDS[COMP_CWORD]}
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "$prev" in
-c|-f|--executable)
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
;;
-s|-b)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
;;
-L)
compopt -o nospace
_known_hosts_real -c -- "${cur}" || OMPREPLY=( $(compgen -A hostname -S : -- ${cur}) )
;;
-m)
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
;;
-a)
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
;;
-p|-k|-t|-n|--mtu|-l)
;;
-i)
_available_interfaces -a || true
;;
--manager-address)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
_filedir || COMPREPLY+=( $(compgen -o plusdirs -f ${cur}) )
;;
*)
COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) )
;;
esac
return 0
}
complete -F _ss_manager ss-manager
@@ -0,0 +1,30 @@
_ss_redir()
{
local cur prev opts ciphers
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --mtu --help --mptcp -l'
cur=${COMP_WORDS[COMP_CWORD]}
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "$prev" in
-c|-f)
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
;;
-s|-b)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
;;
-m)
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
;;
-a)
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
;;
-p|-k|-t|-n|--mtu|-l)
;;
*)
COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) )
;;
esac
return 0
}
complete -F _ss_redir ss-redir
@@ -0,0 +1,37 @@
_ss_server()
{
local cur prev opts ciphers
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --fast-open --mtu --help --mptcp -i -6 -d --manager-address --firewall --acl'
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "$prev" in
-c|-f|--acl)
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
;;
-s|-b)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
;;
-m)
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
;;
-a)
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
;;
-p|-k|-t|-n|--mtu|-d)
;;
--manager-address)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
_filedir || COMPREPLY+=( $(compgen -o plusdirs -f ${cur}) )
;;
-i)
_available_interfaces -a || true
;;
*)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
;;
esac
}
complete -F _ss_server ss-server
@@ -0,0 +1,38 @@
_ss_tunnel()
{
local cur prev opts ciphers
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --mtu --help --mptcp -i -l -L'
cur=${COMP_WORDS[COMP_CWORD]}
prev="${COMP_WORDS[COMP_CWORD-1]}"
compopt +o nospace
case "$prev" in
-c|-f)
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
;;
-s|-b)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
;;
-L)
compopt -o nospace
_known_hosts_real -c -- "${cur}" || OMPREPLY=( $(compgen -A hostname -S : -- ${cur}) )
;;
-m)
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
;;
-a)
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
;;
-p|-k|-t|-n|--mtu|-l)
;;
-i)
_available_interfaces -a || true
;;
*)
COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) )
;;
esac
return 0
}
complete -F _ss_tunnel ss-tunnel
+434
View File
@@ -0,0 +1,434 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* errno for incomplete non-blocking connect(2) */
#define CONNECT_IN_PROGRESS @CONNECT_IN_PROGRESS@
#ifdef _WIN32
/* Override libev default fd conversion macro. */
#define EV_FD_TO_WIN32_HANDLE(fd) (fd)
/* Override libev default fd close macro. */
#define EV_WIN32_CLOSE_FD(fd) closesocket(fd)
/* Override libev default handle conversion macro. */
#define EV_WIN32_HANDLE_TO_FD(handle) (handle)
/* Reset max file descriptor size. */
#define FD_SETSIZE 2048
#endif
/* Define to 1 if you have the <arpa/inet.h> header file. */
#cmakedefine HAVE_ARPA_INET_H 1
/* Define to 1 if you have the `CCCryptorCreateWithMode' function. */
#cmakedefine HAVE_CCCRYPTORCREATEWITHMODE 1
/* Define to 1 if you have the `clock_gettime' function. */
#cmakedefine HAVE_CLOCK_GETTIME 1
/* Define to 1 to use the syscall interface for clock_gettime */
#cmakedefine HAVE_CLOCK_SYSCALL 1
/* Define to 1 if you have the <CommonCrypto/CommonCrypto.h> header file. */
#cmakedefine HAVE_COMMONCRYPTO_COMMONCRYPTO_H 1
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
don't. */
#define HAVE_DECL_INET_NTOP @HAVE_DECL_INET_NTOP@
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H 1
/* Define to 1 if you have the `epoll_ctl' function. */
#cmakedefine HAVE_EPOLL_CTL 1
/* Define to 1 if you have the `eventfd' function. */
#cmakedefine HAVE_EVENTFD 1
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
#cmakedefine HAVE_EVP_ENCRYPTINIT_EX 1
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H 1
/* Define to 1 if the floor function is available */
#cmakedefine HAVE_FLOOR 1
/* Define to 1 if you have the `fork' function. */
#cmakedefine HAVE_FORK 1
/* Define to 1 if you have the `getpwnam_r' function. */
#cmakedefine HAVE_GETPWNAM_R 1
/* Define to 1 if you have the `inet_ntop' function. */
#cmakedefine HAVE_INET_NTOP 1
/* Define to 1 if you have the `inotify_init' function. */
#cmakedefine HAVE_INOTIFY_INIT 1
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Enable IPv6 support in libudns */
#cmakedefine HAVE_IPv6 1
/* Define to 1 if you have the `kqueue' function. */
#cmakedefine HAVE_KQUEUE 1
/* Define to 1 if you have the <langinfo.h> header file. */
#cmakedefine HAVE_LANGINFO_H 1
/* Compiling with pcre support */
#cmakedefine HAVE_LIBPCRE 1
/* Define to 1 if you have the `rt' library (-lrt). */
#cmakedefine HAVE_LIBRT 1
/* Define to 1 if you have the `socket' library (-lsocket). */
#cmakedefine HAVE_LIBSOCKET 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/if.h> header file. */
#cmakedefine HAVE_LINUX_IF_H 1
/* Define to 1 if you have the <linux/netfilter_ipv4.h> header file. */
#cmakedefine HAVE_LINUX_NETFILTER_IPV4_H 1
/* Define to 1 if you have the <linux/netfilter_ipv6/ip6_tables.h> header
file. */
#cmakedefine HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H 1
/* Define to 1 if you have the <locale.h> header file. */
#cmakedefine HAVE_LOCALE_H 1
/* Define to 1 if you have the `malloc' function. */
#cmakedefine HAVE_MALLOC 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#cmakedefine HAVE_MEMSET 1
/* Define to 1 if you have the `nanosleep' function. */
#cmakedefine HAVE_NANOSLEEP 1
/* Define to 1 if you have the <netdb.h> header file. */
#cmakedefine HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#cmakedefine HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <net/if.h> header file. */
#cmakedefine HAVE_NET_IF_H 1
/* Define to 1 if you have the <openssl/engine.h> header file. */
#cmakedefine HAVE_OPENSSL_ENGINE_H 1
/* Define to 1 if you have the <openssl/err.h> header file. */
#cmakedefine HAVE_OPENSSL_ERR_H 1
/* Define to 1 if you have the <openssl/evp.h> header file. */
#cmakedefine HAVE_OPENSSL_EVP_H 1
/* Define to 1 if you have the <openssl/pem.h> header file. */
#cmakedefine HAVE_OPENSSL_PEM_H 1
/* Define to 1 if you have the <openssl/rand.h> header file. */
#cmakedefine HAVE_OPENSSL_RAND_H 1
/* Define to 1 if you have the <openssl/rsa.h> header file. */
#cmakedefine HAVE_OPENSSL_RSA_H 1
/* Define to 1 if you have the <openssl/sha.h> header file. */
#cmakedefine HAVE_OPENSSL_SHA_H 1
/* Define to 1 if you have the <pcre.h> header file. */
#cmakedefine HAVE_PCRE_H 1
/* Define to 1 if you have the <pcre/pcre.h> header file. */
#cmakedefine HAVE_PCRE_PCRE_H 1
/* Define to 1 if you have the `poll' function. */
#cmakedefine HAVE_POLL 1
/* Define to 1 if you have the <poll.h> header file. */
#cmakedefine HAVE_POLL_H 1
/* Define to 1 if you have the `port_create' function. */
#cmakedefine HAVE_PORT_CREATE 1
/* Define to 1 if you have the <port.h> header file. */
#cmakedefine HAVE_PORT_H 1
/* Have PTHREAD_PRIO_INHERIT. */
#cmakedefine HAVE_PTHREAD_PRIO_INHERIT 1
/* Define to 1 if you have the `RAND_pseudo_bytes' function. */
#cmakedefine HAVE_RAND_PSEUDO_BYTES 1
/* Define to 1 if you have the 'select' function. */
#cmakedefine HAVE_SELECT 1
/* Define to 1 if you have the `setresuid' function. */
#cmakedefine HAVE_SETRESUID 1
/* Define to 1 if you have the `setreuid' function. */
#cmakedefine HAVE_SETREUID 1
/* Define to 1 if you have the `setrlimit' function. */
#cmakedefine HAVE_SETRLIMIT 1
/* Define to 1 if you have the `signalfd' function. */
#cmakedefine HAVE_SIGNALFD 1
/* Define to 1 if you have the `socket' function. */
#cmakedefine HAVE_SOCKET 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1
/* Define to 1 if you have the `strerror' function. */
#cmakedefine HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the <sys/epoll.h> header file. */
#cmakedefine HAVE_SYS_EPOLL_H 1
/* Define to 1 if you have the <sys/eventfd.h> header file. */
#cmakedefine HAVE_SYS_EVENTFD_H 1
/* Define to 1 if you have the <sys/event.h> header file. */
#cmakedefine HAVE_SYS_EVENT_H 1
/* Define to 1 if you have the <sys/inotify.h> header file. */
#cmakedefine HAVE_SYS_INOTIFY_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#cmakedefine HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#cmakedefine HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/signalfd.h> header file. */
#cmakedefine HAVE_SYS_SIGNALFD_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#cmakedefine HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the `vfork' function. */
#cmakedefine HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
#cmakedefine HAVE_VFORK_H 1
/* Define to 1 if you have the <windows.h> header file. */
#cmakedefine HAVE_WINDOWS_H 1
/* Define to 1 if you have the <winsock2.h> header file. */
#cmakedefine HAVE_WINSOCK2_H 1
/* Define to 1 if `fork' works. */
#undef HAVE_WORKING_FORK
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#cmakedefine HAVE_WS2TCPIP_H 1
/* have zlib compression support */
#cmakedefine HAVE_ZLIB 1
/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine HAVE_ZLIB_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to 1 if assertions should be disabled. */
#undef NDEBUG
/* 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. */
#define PACKAGE_VERSION @VERSION@
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#cmakedefine PTHREAD_CREATE_JOINABLE @PTHREAD_CREATE_JOINABLE@
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
/* Define to the type of arg 1 for `select'. */
#undef SELECT_TYPE_ARG1
/* Define to the type of args 2, 3 and 4 for `select'. */
#undef SELECT_TYPE_ARG234
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine TIME_WITH_SYS_TIME 1
/* If the compiler supports a TLS storage class define it to that here */
#cmakedefine TLS 1
/* Use Apple CommonCrypto library */
#cmakedefine USE_CRYPTO_APPLECC 1
/* Use mbed TLS library */
#cmakedefine USE_CRYPTO_MBEDTLS 1
/* Use OpenSSL library */
#cmakedefine USE_CRYPTO_OPENSSL 1
/* Use PolarSSL library */
#cmakedefine USE_CRYPTO_POLARSSL 1
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */
#define VERSION "@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
/* Define to 1 if on MINIX. */
#cmakedefine _MINIX 1
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#cmakedefine _POSIX_1_SOURCE 2
/* Define to 1 if you need to in order for `stat' and other things to work. */
#cmakedefine _POSIX_SOURCE 1
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
#undef _UINT8_T
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine HAVE_PID_T 1
#ifndef HAVE_PID_T
#define pid_t int
#endif
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
/* Define to the type of an unsigned integer type of width exactly 16 bits if
such a type exists and the standard includes do not define it. */
#undef uint16_t
/* Define to the type of an unsigned integer type of width exactly 8 bits if
such a type exists and the standard includes do not define it. */
#undef uint8_t
/* Define as `fork' if `vfork' does not work. */
#undef vfork
+427
View File
@@ -0,0 +1,427 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* errno for incomplete non-blocking connect(2) */
#undef CONNECT_IN_PROGRESS
/* Override libev default fd conversion macro. */
#undef EV_FD_TO_WIN32_HANDLE
/* Override libev default fd close macro. */
#undef EV_WIN32_CLOSE_FD
/* Override libev default handle conversion macro. */
#undef EV_WIN32_HANDLE_TO_FD
/* Reset max file descriptor size. */
#undef FD_SETSIZE
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `CCCryptorCreateWithMode' function. */
#undef HAVE_CCCRYPTORCREATEWITHMODE
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
/* Define to 1 to use the syscall interface for clock_gettime */
#undef HAVE_CLOCK_SYSCALL
/* Define to 1 if you have the <CommonCrypto/CommonCrypto.h> header file. */
#undef HAVE_COMMONCRYPTO_COMMONCRYPTO_H
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
don't. */
#undef HAVE_DECL_INET_NTOP
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `epoll_ctl' function. */
#undef HAVE_EPOLL_CTL
/* Define to 1 if you have the `eventfd' function. */
#undef HAVE_EVENTFD
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
#undef HAVE_EVP_ENCRYPTINIT_EX
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if the floor function is available */
#undef HAVE_FLOOR
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define to 1 if you have the `getpwnam_r' function. */
#undef HAVE_GETPWNAM_R
/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP
/* Define to 1 if you have the `inotify_init' function. */
#undef HAVE_INOTIFY_INIT
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Enable IPv6 support in libudns */
#undef HAVE_IPv6
/* Define to 1 if you have the `kqueue' function. */
#undef HAVE_KQUEUE
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Compiling with pcre support */
#undef HAVE_LIBPCRE
/* Define to 1 if you have the `rt' library (-lrt). */
#undef HAVE_LIBRT
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* 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 <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the `malloc' function. */
#undef HAVE_MALLOC
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_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 <openssl/engine.h> header file. */
#undef HAVE_OPENSSL_ENGINE_H
/* Define to 1 if you have the <openssl/err.h> header file. */
#undef HAVE_OPENSSL_ERR_H
/* Define to 1 if you have the <openssl/evp.h> header file. */
#undef HAVE_OPENSSL_EVP_H
/* Define to 1 if you have the <openssl/pem.h> header file. */
#undef HAVE_OPENSSL_PEM_H
/* Define to 1 if you have the <openssl/rand.h> header file. */
#undef HAVE_OPENSSL_RAND_H
/* Define to 1 if you have the <openssl/rsa.h> header file. */
#undef HAVE_OPENSSL_RSA_H
/* Define to 1 if you have the <openssl/sha.h> header file. */
#undef HAVE_OPENSSL_SHA_H
/* Define to 1 if you have the <pcre.h> header file. */
#undef HAVE_PCRE_H
/* Define to 1 if you have the <pcre/pcre.h> header file. */
#undef HAVE_PCRE_PCRE_H
/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
/* Define to 1 if you have the `port_create' function. */
#undef HAVE_PORT_CREATE
/* Define to 1 if you have the <port.h> header file. */
#undef HAVE_PORT_H
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
/* Define to 1 if you have the `RAND_pseudo_bytes' function. */
#undef HAVE_RAND_PSEUDO_BYTES
/* Define to 1 if you have the 'select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `setresuid' function. */
#undef HAVE_SETRESUID
/* Define to 1 if you have the `setreuid' function. */
#undef HAVE_SETREUID
/* Define to 1 if you have the `setrlimit' function. */
#undef HAVE_SETRLIMIT
/* Define to 1 if you have the `signalfd' function. */
#undef HAVE_SIGNALFD
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* 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 <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_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/event.h> header file. */
#undef HAVE_SYS_EVENT_H
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_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/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/signalfd.h> header file. */
#undef HAVE_SYS_SIGNALFD_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/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vfork' function. */
#undef HAVE_VFORK
/* Define to 1 if you have the <vfork.h> header file. */
#undef HAVE_VFORK_H
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
/* Define to 1 if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
/* Define to 1 if `fork' works. */
#undef HAVE_WORKING_FORK
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#undef HAVE_WS2TCPIP_H
/* have zlib compression support */
#undef HAVE_ZLIB
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to 1 if assertions should be disabled. */
#undef NDEBUG
/* 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
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
/* Define to the type of arg 1 for `select'. */
#undef SELECT_TYPE_ARG1
/* Define to the type of args 2, 3 and 4 for `select'. */
#undef SELECT_TYPE_ARG234
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* If the compiler supports a TLS storage class define it to that here */
#undef TLS
/* Use Apple CommonCrypto library */
#undef USE_CRYPTO_APPLECC
/* Use mbed TLS library */
#undef USE_CRYPTO_MBEDTLS
/* Use OpenSSL library */
#undef USE_CRYPTO_OPENSSL
/* Use PolarSSL library */
#undef USE_CRYPTO_POLARSSL
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* 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
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
#undef _UINT8_T
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
/* Define to the type of an unsigned integer type of width exactly 16 bits if
such a type exists and the standard includes do not define it. */
#undef uint16_t
/* Define to the type of an unsigned integer type of width exactly 8 bits if
such a type exists and the standard includes do not define it. */
#undef uint8_t
/* Define as `fork' if `vfork' does not work. */
#undef vfork
+18764
View File
File diff suppressed because it is too large. Load diff
+330
View File
@@ -0,0 +1,330 @@
dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67])
AC_INIT([shadowsocks-libev], [2.5.6], [max.c.lv@gmail.com])
AC_CONFIG_SRCDIR([src/encrypt.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(auto)
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([subdir-objects foreign -Wno-gnu -Werror])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AM_DEP_TRACK
dnl Checks for lib
AC_DISABLE_STATIC
AC_DISABLE_SHARED
LT_INIT([dlopen])
dnl Check for pcre library
TS_CHECK_PCRE
if test "x${enable_pcre}" != "xyes"; then
AC_MSG_ERROR([Cannot find pcre library. Configure --with-pcre=DIR])
fi
dnl Checks for using shared libraries from system
AC_ARG_ENABLE(
[system-shared-lib],
AS_HELP_STRING([--enable-system-shared-lib], [build against shared libraries when possible]),
[
case "${enableval}" in
yes) enable_system_shared_lib=true ;;
no) enable_system_shared_lib=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-system-shared-lib]) ;;
esac], [enable_system_shared_lib=false])
AM_CONDITIONAL([USE_SYSTEM_SHARED_LIB], [test x$enable_system_shared_lib = xtrue])
dnl Checks for crypto library
AC_ARG_WITH(
[crypto-library],
[AS_HELP_STRING([--with-crypto-library=library], [build with the given crypto library, TYPE=openssl|polarssl|mbedtls @<:@default=openssl@:>@])],
[
case "${withval}" in
openssl|polarssl|mbedtls) ;;
*) AC_MSG_ERROR([bad value ${withval} for --with-crypto-library]) ;;
esac
],
[with_crypto_library="openssl"]
)
AC_ARG_ENABLE([documentation],
AS_HELP_STRING([--disable-documentation], [do not build documentation]),
[disable_documentation=true],
[disable_documentation=false])
AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test x$disable_documentation = xfalse])
AM_COND_IF([ENABLE_DOCUMENTATION], [
AC_PATH_PROG([ASCIIDOC], [asciidoc])
test x"${ASCIIDOC}" != x || AC_MSG_ERROR([Cannot find `asciidoc` in PATH.])
AC_PATH_PROG([XMLTO], [xmlto])
test x"$XMLTO" != x || AC_MSG_ERROR([Cannot find `xmlto` in PATH.])
AC_PATH_PROG([GZIP], [gzip], [gzip])
AC_PATH_PROG([MV], [mv], [mv])
AC_PROG_SED
])
dnl Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_LANG_SOURCE
dnl Checks for libev
AM_COND_IF([USE_SYSTEM_SHARED_LIB],
[],
[m4_include([libev/libev.m4])])
dnl Add library for mingw
case $host in
*-mingw*)
LIBS="$LIBS -ladvapi32 -lgdi32 -lws2_32 -lcrypt32"
;;
*)
;;
esac
dnl Checks for TLS
AX_TLS([:], [:])
dnl Checks for crypto library
case "${with_crypto_library}" in
openssl)
ss_ZLIB
ss_OPENSSL
AC_DEFINE([USE_CRYPTO_OPENSSL], [1], [Use OpenSSL library])
;;
polarssl)
ss_POLARSSL
AC_DEFINE([USE_CRYPTO_POLARSSL], [1], [Use PolarSSL library])
;;
mbedtls)
ss_MBEDTLS
AC_DEFINE([USE_CRYPTO_MBEDTLS], [1], [Use mbed TLS library])
;;
esac
dnl Checks for Apple CommonCrypto API
AC_ARG_ENABLE(applecc,
AS_HELP_STRING([--enable-applecc], [enable Apple CommonCrypto API support]),
[
AC_CHECK_HEADERS(CommonCrypto/CommonCrypto.h,
[],
[AC_MSG_ERROR([CommonCrypto header files not found.]); break]
)
AC_CHECK_FUNCS([CCCryptorCreateWithMode], ,
[AC_MSG_ERROR([CommonCrypto API needs OS X (>= 10.7) and iOS (>= 5.0).]); break]
)
AC_DEFINE([USE_CRYPTO_APPLECC], [1], [Use Apple CommonCrypto library])
]
)
dnl Checks for inet_ntop
ss_FUNC_INET_NTOP
dnl Checks for host.
AC_MSG_CHECKING(for what kind of host)
case $host in
*-linux*)
os_support=linux
AC_MSG_RESULT(Linux)
;;
*-mingw*)
dnl Add custom macros for libev
AC_DEFINE([FD_SETSIZE], [2048], [Reset max file descriptor size.])
AC_DEFINE([EV_FD_TO_WIN32_HANDLE(fd)], [(fd)], [Override libev default fd conversion macro.])
AC_DEFINE([EV_WIN32_HANDLE_TO_FD(handle)], [(handle)], [Override libev default handle conversion macro.])
AC_DEFINE([EV_WIN32_CLOSE_FD(fd)], [closesocket(fd)], [Override libev default fd close macro.])
os_support=mingw
AC_MSG_RESULT(MinGW)
;;
*)
AC_MSG_RESULT(transparent proxy does not support for $host)
;;
esac
dnl Checks for pthread
AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"], AC_MSG_ERROR(Can not find pthreads. This is required.))
dnl Checks for stack protector
GGL_CHECK_STACK_PROTECTOR([has_stack_protector=yes], [has_stack_protector=no])
# XXX - disable -fstack-protector due to missing libssp_nonshared
case "$host_os" in
*aix*)
AC_MSG_NOTICE([-fstack-protector disabled on AIX])
has_stack_protector=no
;;
*sunos*)
AC_MSG_NOTICE([-fstack-protector disabled on SunOS])
has_stack_protector=no
;;
*solaris*)
AC_MSG_NOTICE([-fstack-protector disabled on Solaris])
has_stack_protector=no
;;
esac
AC_ARG_ENABLE(ssp,
[AS_HELP_STRING(--disable-ssp,Do not compile with -fstack-protector)],
[
enable_ssp="no"
],
[
enable_ssp="yes"
])
if test x$has_stack_protector = xyes && test x$enable_ssp = xyes; then
CFLAGS="$CFLAGS -fstack-protector"
AC_MSG_NOTICE([-fstack-protector enabled in CFLAGS])
fi
AM_CONDITIONAL(BUILD_REDIRECTOR, test "$os_support" = "linux")
AM_CONDITIONAL(BUILD_WINCOMPAT, test "$os_support" = "mingw")
dnl Checks for header files.
AC_CHECK_HEADERS([limits.h stdint.h inttypes.h arpa/inet.h fcntl.h langinfo.h locale.h netdb.h netinet/in.h stdlib.h string.h strings.h unistd.h sys/ioctl.h])
dnl A special check required for <net/if.h> on Darwin. See
dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html.
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([net/if.h], [], [],
[
#include <stdio.h>
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
case $host in
*-mingw*)
AC_DEFINE([CONNECT_IN_PROGRESS], [WSAEWOULDBLOCK], [errno for incomplete non-blocking connect(2)])
AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h], [], [AC_MSG_ERROR([Missing MinGW headers])], [])
;;
*-linux*)
AC_DEFINE([CONNECT_IN_PROGRESS], [EINPROGRESS], [errno for incomplete non-blocking connect(2)])
dnl Checks for netfilter headers
AC_CHECK_HEADERS([linux/if.h linux/netfilter_ipv4.h linux/netfilter_ipv6/ip6_tables.h],
[], [AC_MSG_ERROR([Missing netfilter headers])],
[[
#if HAVE_LIMITS_H
#include <limits.h>
#endif
/* Netfilter ip(6)tables v1.4.0 has broken headers */
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#if HAVE_LINUX_IF_H
#include <linux/if.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
]])
;;
*)
# These are POSIX-like systems using BSD-like sockets API.
AC_DEFINE([CONNECT_IN_PROGRESS], [EINPROGRESS], [errno for incomplete non-blocking connect(2)])
;;
esac
AC_C_BIGENDIAN
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SSIZE_T
dnl Checks for header files.
AC_HEADER_ASSERT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT8_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_FUNC_FORK
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([memset select setresuid setreuid strerror getpwnam_r setrlimit])
dnl Check for select() into ws2_32 for Msys/Mingw
if test "$ac_cv_func_select" != "yes"; then
AC_MSG_CHECKING([for select in ws2_32])
AC_TRY_LINK([
#ifdef HAVE_WINSOCK2_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <winsock2.h>
#endif
],[
select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);
],[
AC_MSG_RESULT([yes])
HAVE_SELECT="1"
AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
[Define to 1 if you have the 'select' function.])
HAVE_SYS_SELECT_H="1"
AC_DEFINE_UNQUOTED(HAVE_SYS_SELECT_H, 1,
[Define to 1 if you have the <sys/select.h> header file.])
],[
AC_MSG_ERROR([no])
])
fi
AC_CHECK_LIB(socket, connect)
dnl Checks for library functions.
AC_CHECK_FUNCS([malloc memset socket])
dnl Add define for libudns to enable IPv6 support
dnl This is an option defined in the origin configure script
AC_DEFINE([HAVE_IPv6], [1], [Enable IPv6 support in libudns])
AM_COND_IF([USE_SYSTEM_SHARED_LIB],[
AC_CHECK_LIB([sodium], [sodium_init], ,[
AC_MSG_ERROR([Couldn't find libsodium. Try installing libsodium-dev@<:@el@:>@.])
])
],
[AC_CONFIG_SUBDIRS([libsodium])])
AC_CONFIG_FILES([ shadowsocks-libev.pc
Makefile
libcork/Makefile
libipset/Makefile
src/Makefile])
AM_COND_IF([USE_SYSTEM_SHARED_LIB],[
AC_CHECK_LIB([udns], [dns_dnlen], ,[AC_MSG_ERROR([Couldn't find libudns. Try installing libudns-dev or udns-devel.])])
AC_CHECK_LIB([ev], [ev_loop_destroy], ,[AC_MSG_ERROR([Couldn't find libev. Try installing libev-dev@<:@el@:>@.])])
],
[AC_CONFIG_FILES([libudns/Makefile
libev/Makefile])])
AM_COND_IF([ENABLE_DOCUMENTATION],
[AC_CONFIG_FILES([doc/Makefile])
])
AC_OUTPUT
+5
View File
@@ -0,0 +1,5 @@
*.substvars
debhelper-build-stamp
libshadowsocks-libev*/
libshadowsocks-libev-dev/
tmp/
@@ -0,0 +1,17 @@
shadowsocks-libev for Debian
----------------------
The Debian package has added systemd support. A default server service which
reads the default configuration in /etc/default/shadowsocks-libev is installed
and enabled by default, plus some other service templates placed in
/lib/systemd/system, which can be used by users later.
Another problem is that shadowsocks-libev is licensed under GPLv3+. This will
conflict with OpenSSL License when linked against OpenSSL library. As a
result, this package faces licensing problem. Use it at your own risk.
-- Boyuan Yang <073plan@gmail.com> Wed, 14 Oct 2015 09:18:50 +0800
(No special notes.)
-- Max Lv <max.c.lv@gmail.com> Sat, 06 Apr 2013 16:59:15 +0800
+399
View File
@@ -0,0 +1,399 @@
shadowsocks-libev (2.5.6-1) unstable; urgency=medium
* Add outbound ACL for server.
* Refine log format.
-- Max Lv <max.c.lv@gmail.com> Tue, 01 Nov 2016 09:51:52 +0800
shadowsocks-libev (2.5.5-1) unstable; urgency=medium
* Refine attack detection.
-- Max Lv <max.c.lv@gmail.com> Tue, 11 Oct 2016 15:45:09 +0800
shadowsocks-libev (2.5.4-1) unstable; urgency=medium
* Fix a bug of auto blocking mechanism.
-- Max Lv <max.c.lv@gmail.com> Sun, 09 Oct 2016 19:36:37 +0800
shadowsocks-libev (2.5.3-1) unstable; urgency=medium
* Fix TCP Fast Open on macOS.
-- Max Lv <max.c.lv@gmail.com> Wed, 21 Sep 2016 19:31:57 +0800
shadowsocks-libev (2.5.2-1) unstable; urgency=medium
* Fix a bug of UDP relay mode of ss-local.
-- Max Lv <max.c.lv@gmail.com> Mon, 12 Sep 2016 12:54:33 +0800
shadowsocks-libev (2.5.1-1) unstable; urgency=medium
* Refine ACL feature with hostname support.
* Add HTTP/SNI parser for ss-local/ss-redir.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Sep 2016 17:06:49 +0800
shadowsocks-libev (2.5.0-1) unstable; urgency=medium
* Fix several bugs of the command line interface.
* Add aes-128/192/256-ctr ciphers.
* Add option MTU for UDP relay.
* Add MultiPath TCP support.
-- Max Lv <max.c.lv@gmail.com> Mon, 29 Aug 2016 13:07:51 +0800
shadowsocks-libev (2.4.8-1) unstable; urgency=low
* Update manual pages with asciidoc.
* Fix issues of bind_address option.
-- Max Lv <max.c.lv@gmail.com> Wed, 20 Jul 2016 09:25:50 +0800
shadowsocks-libev (2.4.7-1) unstable; urgency=low
* Add ss-nat, a helper script to set up NAT rules for ss-redir.
* Fix several issues for debian package.
-- Max Lv <max.c.lv@gmail.com> Wed, 1 Jun 2016 18:21:45 +0800
shadowsocks-libev (2.4.6-1) unstable; urgency=low
* Update manual pages.
-- Max Lv <max.c.lv@gmail.com> Thu, 21 Apr 2016 17:33:34 +0800
shadowsocks-libev (2.4.5-1) unstable; urgency=low
* Fix build issues on OpenWRT.
* Reduce the latency of redir mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 01 Feb 2016 13:22:50 +0800
shadowsocks-libev (2.4.4-1) unstable; urgency=low
* Fix a potential memory leak.
* Fix some compiler related issues.
-- Max Lv <max.c.lv@gmail.com> Wed, 13 Jan 2016 11:50:12 +0800
shadowsocks-libev (2.4.3-1) unstable; urgency=high
* Refine the buffer allocation.
-- Max Lv <max.c.lv@gmail.com> Sat, 19 Dec 2015 12:30:21 +0900
shadowsocks-libev (2.4.1-1) unstable; urgency=high
* Fix a security bug.
-- Max Lv <max.c.lv@gmail.com> Thu, 29 Oct 2015 15:42:47 +0900
shadowsocks-libev (2.4.0-1) unstable; urgency=low
* Update the one-time authentication
-- Max Lv <max.c.lv@gmail.com> Thu, 24 Sep 2015 14:11:05 +0900
shadowsocks-libev (2.3.3-1) unstable; urgency=low
* Refine the onetime authentication of header.
* Enforce CRC16 on the payload.
-- Max Lv <max.c.lv@gmail.com> Fri, 18 Sep 2015 10:38:21 +0900
shadowsocks-libev (2.3.2-1) unstable; urgency=low
* Fix minor issues of build scripts.
-- Max Lv <max.c.lv@gmail.com> Sun, 13 Sep 2015 15:22:28 +0900
shadowsocks-libev (2.3.1-1) unstable; urgency=low
* Fix an issue of connection cache of UDP relay.
* Add support of onetime authentication for header verification.
-- Max Lv <max.c.lv@gmail.com> Fri, 04 Sep 2015 07:54:02 +0900
shadowsocks-libev (2.3.0-1) unstable; urgency=low
* Add manager mode to support multi-user and traffic stat.
* Fix a build issue on OS X El Capitan.
-- Max Lv <max.c.lv@gmail.com> Thu, 30 Jul 2015 17:30:43 +0900
shadowsocks-libev (2.2.3-1) unstable; urgency=high
* Fix the multiple UDP source port issue.
* Allow working in UDP only mode.
-- Max Lv <max.c.lv@gmail.com> Sat, 11 Jul 2015 08:31:02 +0900
shadowsocks-libev (2.2.2-1) unstable; urgency=low
* Fix the timer of UDP relay.
* Check name_len in the header.
-- Max Lv <max.c.lv@gmail.com> Mon, 15 Jun 2015 10:26:40 +0900
shadowsocks-libev (2.2.1-1) unstable; urgency=low
* Fix an issue of UDP relay.
-- Max Lv <max.c.lv@gmail.com> Sun, 10 May 2015 21:23:44 +0900
shadowsocks-libev (2.2.0-1) unstable; urgency=low
* Add TPROXY support in redir mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 04 May 2015 02:44:17 -0300
shadowsocks-libev (2.1.4-1) unstable; urgency=low
* Fix a bug of server mode ACL.
-- Max Lv <max.c.lv@gmail.com> Sun, 08 Feb 2015 20:24:43 +0900
shadowsocks-libev (2.1.3-1) unstable; urgency=low
* Add ACL support to remote server.
-- Max Lv <max.c.lv@gmail.com> Sun, 08 Feb 2015 10:59:44 +0900
shadowsocks-libev (2.1.2-1) unstable; urgency=low
* Refine multiple port binding.
-- Max Lv <max.c.lv@gmail.com> Sat, 31 Jan 2015 18:56:25 +0900
shadowsocks-libev (2.1.1-1) unstable; urgency=low
* Fix a memory leak.
-- Max Lv <max.c.lv@gmail.com> Wed, 21 Jan 2015 21:40:58 +0900
shadowsocks-libev (2.1.0-1) unstable; urgency=low
* Fix a bug of tunnel mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 19 Jan 2015 09:59:52 +0900
shadowsocks-libev (2.0.8-1) unstable; urgency=low
* Fix a bug of IPv6.
-- Max Lv <max.c.lv@gmail.com> Fri, 16 Jan 2015 10:58:12 +0900
shadowsocks-libev (2.0.7-1) unstable; urgency=low
* Fix some performance issue.
-- Max Lv <max.c.lv@gmail.com> Tue, 13 Jan 2015 13:17:58 +0900
shadowsocks-libev (2.0.6-1) unstable; urgency=high
* Fix a critical issue in redir mode.
-- Max Lv <max.c.lv@gmail.com> Mon, 12 Jan 2015 21:51:19 +0900
shadowsocks-libev (2.0.5-1) unstable; urgency=low
* Refine local, tunnel, and redir modes.
-- Max Lv <max.c.lv@gmail.com> Mon, 12 Jan 2015 12:39:05 +0800
shadowsocks-libev (2.0.4-1) unstable; urgency=low
* Fix building issues with MinGW32.
-- Max Lv <max.c.lv@gmail.com> Sun, 11 Jan 2015 13:33:31 +0900
shadowsocks-libev (2.0.3-1) unstable; urgency=high
* Fix some issues.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Jan 2015 16:27:54 +0800
shadowsocks-libev (2.0.2-1) unstable; urgency=low
* Fix issues with MinGW.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Jan 2015 15:17:10 +0800
shadowsocks-libev (2.0.1-1) unstable; urgency=low
* Implement a real asynchronous DNS resolver.
-- Max Lv <max.c.lv@gmail.com> Sat, 10 Jan 2015 10:04:28 +0800
shadowsocks-libev (1.6.4-1) unstable; urgency=low
* Update documents.
-- Max Lv <max.c.lv@gmail.com> Wed, 07 Jan 2015 21:48:58 +0900
shadowsocks-libev (1.6.3-1) unstable; urgency=low
* Refine ss-redir.
-- Max Lv <max.c.lv@gmail.com> Sun, 04 Jan 2015 19:23:52 +0900
shadowsocks-libev (1.6.2-1) unstable; urgency=low
* Fix some build issues.
-- Max Lv <max.c.lv@gmail.com> Tue, 30 Dec 2014 10:30:28 +0800
shadowsocks-libev (1.6.1-1) unstable; urgency=high
* Add salsa20 and chacha20 support.
-- Max Lv <max.c.lv@gmail.com> Sat, 13 Dec 2014 15:11:34 +0800
shadowsocks-libev (1.6.0-1) unstable; urgency=low
* Solve conflicts with other shadowsocks portings.
-- Max Lv <max.c.lv@gmail.com> Mon, 17 Nov 2014 14:10:21 +0800
shadowsocks-libev (1.5.3-2) unstable; urgency=low
* rename as shadowsocks-libev.
-- Symeon Huang <hzwhuang@gmail.com> Sat, 15 Nov 2014 14:55:28 +0000
shadowsocks (1.5.3-1) unstable; urgency=low
* Fix log on Win32.
-- Max Lv <max.c.lv@gmail.com> Fri, 14 Nov 2014 09:10:06 +0800
shadowsocks (1.5.2-1) unstable; urgency=low
* Handle SIGTERM and SIGKILL nicely.
-- Max Lv <max.c.lv@gmail.com> Tue, 12 Nov 2014 13:11:29 +0800
shadowsocks (1.5.1-1) unstable; urgency=low
* Fix a bug of tcp fast open.
-- Max Lv <max.c.lv@gmail.com> Sat, 08 Nov 2014 19:45:37 +0900
shadowsocks (1.5.0-1) unstable; urgency=low
* Support to build static or shared library.
* Supprot IPv6 NAT in redirect mode.
* Refine the cache size of UDPRelay.
-- Max Lv <max.c.lv@gmail.com> Fri, 07 Nov 2014 09:33:19 +0800
shadowsocks (1.4.8-1) unstable; urgency=low
* Fix a bug of tcp fast open.
-- Max Lv <max.c.lv@gmail.com> Wed, 08 Oct 2014 18:02:02 +0800
shadowsocks (1.4.7-1) unstable; urgency=low
* Add a new encryptor rc4-md5.
-- Max Lv <max.c.lv@gmail.com> Tue, 09 Sep 2014 07:50:10 +0800
shadowsocks (1.4.6-1) unstable; urgency=low
* Add ACL support.
-- Max Lv <max.c.lv@gmail.com> Sat, 03 May 2014 04:37:10 -0400
shadowsocks (1.4.5-1) unstable; urgency=high
* Fix the compatibility issue of udprelay.
* Enhance asyncns to reduce the latency.
* Add TCP_FASTOPEN support.
-- Max Lv <max.c.lv@gmail.com> Sun, 20 Apr 2014 08:12:45 +0800
shadowsocks (1.4.4-1) unstable; urgency=low
* Add CommonCrypto support for darwin.
* Fix some config related issues.
-- Max Lv <max.c.lv@gmail.com> Wed, 26 Mar 2014 13:29:03 +0800
shadowsocks (1.4.3-1) unstable; urgency=low
* Add tunnel mode with local port forwarding feature.
-- Max Lv <max.c.lv@gmail.com> Fri, 21 Feb 2014 11:52:13 +0900
shadowsocks (1.4.2-1) unstable; urgency=high
* Fix the UDP relay issues.
* Add syslog support.
-- Max Lv <max.c.lv@gmail.com> Sun, 05 Jan 2014 10:05:29 +0900
shadowsocks (1.4.1-1) unstable; urgency=low
* Add multi-port support.
* Add PolarSSL support by @linusyang.
-- Max Lv <max.c.lv@gmail.com> Tue, 12 Nov 2013 03:57:21 +0000
shadowsocks (1.4.0-1) unstable; urgency=low
* Add standard socks5 udp support.
-- Max Lv <max.c.lv@gmail.com> Sun, 08 Sep 2013 02:20:40 +0000
shadowsocks (1.3.3-1) unstable; urgency=high
* Provide more info in verbose mode.
-- Max Lv <max.c.lv@gmail.com> Fri, 21 Jun 2013 09:59:20 +0800
shadowsocks (1.3.2-1) unstable; urgency=high
* Fix some ciphers by @linusyang.
-- Max Lv <max.c.lv@gmail.com> Sun, 09 Jun 2013 09:52:31 +0000
shadowsocks (1.3.1-1) unstable; urgency=low
* Support more cihpers: camellia, idea, rc2 and seed.
-- Max Lv <max.c.lv@gmail.com> Tue, 04 Jun 2013 00:56:17 +0000
shadowsocks (1.3-1) unstable; urgency=low
* Able to bind connections to specific interface.
* Support more ciphers: aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, cast5-cfb, des-cfb.
-- Max Lv <max.c.lv@gmail.com> Thu, 16 May 2013 10:51:15 +0800
shadowsocks (1.2-2) unstable; urgency=low
* Close timeouted TCP connections.
-- Max Lv <max.c.lv@gmail.com> Tue, 07 May 2013 14:10:33 +0800
shadowsocks (1.2-1) unstable; urgency=low
* Fix a high load issue.
-- Max Lv <max.c.lv@gmail.com> Thu, 18 Apr 2013 10:52:34 +0800
shadowsocks (1.1-1) unstable; urgency=low
* Fix a IPV6 resolve issue.
-- Max Lv <max.c.lv@gmail.com> Wed, 10 Apr 2013 12:11:36 +0800
shadowsocks (1.0-2) unstable; urgency=low
* Initial release.
-- Max Lv <max.c.lv@gmail.com> Sat, 06 Apr 2013 16:59:15 +0800
+1
View File
@@ -0,0 +1 @@
9
@@ -0,0 +1,8 @@
{
"server":"127.0.0.1",
"server_port":8388,
"local_port":1080,
"password":"barfoo!",
"timeout":60,
"method":null
}
+78
View File
@@ -0,0 +1,78 @@
Source: shadowsocks-libev
Section: net
Priority: extra
Maintainer: Max Lv <max.c.lv@gmail.com>
Build-Depends:
asciidoc,
autotools-dev,
debhelper (>= 9),
dh-systemd (>= 1.5),
gawk,
libpcre3-dev,
libssl-dev (>= 0.9.8),
mime-support,
pkg-config,
xmlto,
Standards-Version: 3.9.8
Homepage: https://www.shadowsocks.org
Vcs-Git: https://github.com/shadowsocks/shadowsocks-libev.git
Vcs-Browser: https://github.com/shadowsocks/shadowsocks-libev
Package: libshadowsocks-libev-dev
Architecture: any
Section: libdevel
Breaks:
shadowsocks-libev (<< 2.4.0),
Depends:
libshadowsocks-libev2 (= ${binary:Version}),
${misc:Depends},
Description: lightweight and secure socks5 proxy (development files)
Shadowsocks-libev is a lightweight and secure socks5 proxy for
embedded devices and low end boxes.
.
Shadowsocks-libev was inspired by Shadowsock (in Python). It's rewritten
in pure C and only depends on libev, mbedTLS and a few other tiny
libraries.
.
This package provides C header files for the libraries.
Package: libshadowsocks-libev2
Architecture: any
Multi-Arch: same
Section: libs
Replaces: libshadowsocks-libev1
Breaks:
libshadowsocks-libev1,
shadowsocks-libev (<< 2.4.0),
Pre-Depends:
${misc:Pre-Depends},
Depends:
${misc:Depends},
${shlibs:Depends},
Description: lightweight and secure socks5 proxy (shared library)
Shadowsocks-libev is a lightweight and secure socks5 proxy for
embedded devices and low end boxes.
.
Shadowsocks-libev was inspired by Shadowsock (in Python). It's rewritten
in pure C and only depends on libev, mbedTLS and a few other tiny
libraries.
.
This package provides shared libraries.
Package: shadowsocks-libev
Replaces:
shadowsocks (<< 1.5.3-2),
Breaks:
shadowsocks (<< 1.5.3-2),
Architecture: any
Depends:
apg,
${misc:Depends},
${shlibs:Depends},
Description: lightweight and secure socks5 proxy
Shadowsocks-libev is a lightweight and secure socks5 proxy for
embedded devices and low end boxes.
.
Shadowsocks-libev was inspired by Shadowsock (in Python). It's rewritten
in pure C and only depends on libev, mbedTLS and a few other tiny
libraries.
+204
View File
@@ -0,0 +1,204 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: shadowsocks-libev
Upstream-Contact: Max Lv <max.c.lv@gmail.com>
Source: https://github.com/shadowsocks/shadowsocks-libev
Files: *
Copyright: 2013-2015, Clow Windy <clowwindy42@gmail.com>
2013-2016, Max Lv <max.c.lv@gmail.com>
2014, Linus Yang <linusyang@gmail.com>
License: GPL-3+
Files: debian/*
Copyright: 2013-2015, Max Lv <max.c.lv@gmail.com>
2015, Boyuan Yang <073plan@gmail.com>
2016, Roger Shimizu <rogershimizu@gmail.com>
License: GPL-3+
Files: libcork/* libipset/*
Copyright: 2011-2013, RedJack, LLC.
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
.
Neither the name of RedJack Software, LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: doc/*
Copyright: 2012-2016, Max Lv <max.c.lv@gmail.com>
License: GFDL-1.1+
Files: m4/ax_pthread.m4
Copyright: 2008 Steven G. Johnson <stevenj@alum.mit.edu>
2011 Daniel Richard G. <skunk@iSKUNK.ORG>
License: GPL-3+ with Autoconf exception
Files: m4/ax_tls.m4
Copyright: 2008 Alan Woodland <ajw05@aber.ac.uk>
2010 Diego Elio Petteno` <flameeyes@gmail.com>
License: GPL-3+ with Autoconf exception
Files: m4/pcre.m4
Copyright: 2015 Syrone Wong <wong.syrone@gmail.com>
License: Apache-2.0
Files: m4/stack-protector.m4
Copyright: 2007 Google Inc.
License: Apache-2.0
Files: src/json.c src/json.h
Copyright: 2012-2014, James McLaughlin et al.
License: BSD-2-clause
Files: src/http.c src/http.h src/protocol.h src/resolv.c src/resolv.h src/tls.c src/tls.h
Copyright: 2011-2014, Dustin Lundquist <dustin@null-ptr.net>
License: BSD-2-clause
Files: src/rule.c src/rule.h
Copyright: 2011-2012, Dustin Lundquist <dustin@null-ptr.net>
2011, Manuel Kasper <mk@neon1.net>
License: BSD-2-clause
Files: src/ss-nat
Copyright: 2015, OpenWrt-dist
2015, Jian Chang <aa65535@live.com>
License: GPL-3+
Files: src/uthash.h
Copyright: 2003-2013, Troy D. Hanson
License: BSD-1-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: Apache-2.0
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
License: GFDL-1.1+
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
.
A copy of the license is included in the section entitled
"GNU Free Documentation License".
License: GPL-3+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This package 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 <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
License: GPL-3+ with Autoconf exception
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
.
As a special exception, the respective Autoconf Macro's copyright owner
gives unlimited permission to copy, distribute and modify the configure
scripts that are the output of Autoconf when processing the Macro. You
need not follow the terms of the GNU General Public License when using
or distributing such scripts, even though portions of the text of the
Macro appear in them. The GNU General Public License (GPL) does govern
all other use of the material that constitutes the Autoconf Macro.
.
This special exception to the GPL applies to versions of the Autoconf
Macro released by the Autoconf Archive. When you make and distribute a
modified version of the Autoconf Macro, you may extend this special
exception to the GPL to apply to your modified version as well.
@@ -0,0 +1,23 @@
This work was packaged for Debian by:
Max Lv <max.c.lv@gmail.com> on Sat, 06 Apr 2013 16:59:15 +0800
It was downloaded from:
https://github.com/madeye/shadowsocks-libev
Upstream Author(s):
clowwindy <clowwindy42@gmail.com>
Copyright:
Copyright (C) 2013 Max Lv
License:
GPLv3
The Debian packaging is:
Copyright (C) 2013 Max Lv <max.c.lv@gmail.com>
@@ -0,0 +1,3 @@
usr/include/
usr/lib/*/libshadowsocks-libev.so
usr/lib/*/pkgconfig/
@@ -0,0 +1 @@
usr/lib/*/libshadowsocks-libev.so.*
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# Security Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
override_dh_auto_install:
find src/ -name '*.la' -delete
dh_auto_install
override_dh_auto_configure:
dh_auto_configure -- \
--enable-shared \
--disable-ssp
override_dh_installchangelogs:
dh_installchangelogs -XChanges
%:
dh $@ --with systemd
@@ -0,0 +1,24 @@
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This is a template unit file. Users may copy and rename the file into
# config directories to make new service instances. See systemd.unit(5)
# for details.
[Unit]
Description=Shadowsocks-Libev Custom Client Service for %I
Documentation=man:ss-local(1)
After=network.target
[Service]
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,24 @@
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This is a template unit file. Users may copy and rename the file into
# config directories to make new service instances. See systemd.unit(5)
# for details.
[Unit]
Description=Shadowsocks-Libev Custom Client Service Redir Mode for %I
Documentation=man:ss-redir(1)
After=network.target
[Service]
Type=simple
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,24 @@
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This is a template unit file. Users may copy and rename the file into
# config directories to make new service instances. See systemd.unit(5)
# for details.
[Unit]
Description=Shadowsocks-Libev Custom Server Service for %I
Documentation=man:ss-server(1)
After=network.target
[Service]
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,24 @@
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This is a template unit file. Users may copy and rename the file into
# config directories to make new service instances. See systemd.unit(5)
# for details.
[Unit]
Description=Shadowsocks-Libev Custom Client Service Tunnel Mode for %I
Documentation=man:ss-tunnel(1)
After=network.target
[Service]
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,25 @@
# Defaults for shadowsocks initscript
# sourced by /etc/init.d/shadowsocks-libev
# installed at /etc/default/shadowsocks-libev by the maintainer scripts
#
# This is a POSIX shell fragment
#
# Note: `START', `GROUP' and `MAXFD' options are not recognized by systemd.
# Please change those settings in the corresponding systemd unit file.
# Enable during startup?
START=yes
# Configuration file
CONFFILE="/etc/shadowsocks-libev/config.json"
# Extra command line arguments
DAEMON_ARGS="-u"
# User and group to run the server as
USER=root
GROUP=root
# Number of maximum file descriptors
MAXFD=32768
@@ -0,0 +1,3 @@
AUTHORS
README.md
debian/copyright.original
@@ -0,0 +1,136 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: shadowsocks-libev
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: lightweight secured socks5 proxy
# Description: Shadowsocks-libev is a lightweight secured
# socks5 proxy for embedded devices and low end boxes.
### END INIT INFO
# Author: Max Lv <max.c.lv@gmail.com>
# PATH should only include /usr/ if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC=shadowsocks-libev # Introduce a short description here
NAME=shadowsocks-libev # Introduce the short server's name here
DAEMON=/usr/bin/ss-server # Introduce the server's location here
DAEMON_ARGS="" # Arguments to run the daemon with
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
[ "$START" = "yes" ] || exit 0
: ${USER:="root"}
: ${GROUP:="root"}
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Modify the file descriptor limit
ulimit -n ${MAXFD}
# Take care of pidfile permissions
mkdir /var/run/$NAME 2>/dev/null || true
chown "$USER:$GROUP" /var/run/$NAME
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid root:$GROUP --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid root:$GROUP --exec $DAEMON -- \
-c "$CONFFILE" -a "$USER" -u -f $PIDFILE $DAEMON_ARGS \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=KILL/5 --pidfile $PIDFILE --exec $DAEMON
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:
@@ -0,0 +1,5 @@
debian/config.json usr/share/shadowsocks-libev
debian/shadowsocks-libev-*.service lib/systemd/system
usr/bin/
usr/share/man/
completions/bash/* usr/share/bash-completion/completions/
@@ -0,0 +1,25 @@
#!/bin/sh
set -e
case "$1" in
configure|reconfigure)
if [ ! -f /etc/shadowsocks-libev/config.json ]; then
passwd=$(apg -n 1 -M ncl)
mkdir -p /etc/shadowsocks-libev
sed "s/barfoo!/$passwd/" /usr/share/shadowsocks-libev/config.json \
> /etc/shadowsocks-libev/config.json
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0
@@ -0,0 +1,22 @@
#!/bin/sh
set -e
case "$1" in
purge)
rm -f /etc/shadowsocks-libev/config.json
test -f /etc/shadowsocks-libev/* \
|| rm -r /etc/shadowsocks-libev/
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
exit 0
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0
@@ -0,0 +1,25 @@
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This file is default for Debian packaging. See also
# /etc/default/shadowsocks-libev for environment variables.
[Unit]
Description=Shadowsocks-libev Default Server Service
Documentation=man:shadowsocks-libev(8)
After=network.target
[Service]
Type=simple
EnvironmentFile=/etc/default/shadowsocks-libev
User=root
LimitNOFILE=32768
ExecStart=/usr/bin/ss-server -a $USER -c $CONFFILE $DAEMON_ARGS
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,4 @@
# false positive: #505857
shadowsocks-libev source: debian-watch-file-should-mangle-version
# false positive: #765166
shadowsocks-libev source: license-problem-gfdl-invariants
@@ -0,0 +1 @@
3.0 (quilt)
+6
View File
@@ -0,0 +1,6 @@
version=4
opts=" \
filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%shadowsocks-libev-$1.tar.gz%" \
https://github.com/shadowsocks/shadowsocks-libev/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
+62
View File
@@ -0,0 +1,62 @@
ASCIIDOC = @ASCIIDOC@
ASCIIDOC_EXTRA =
MANPAGE_XSL = manpage-normal.xsl
XMLTO = @XMLTO@
XMLTO_EXTRA = -m manpage-bold-literal.xsl
GZIPCMD = @GZIP@
INSTALL = @INSTALL@
RM = @RM@
MV = @MV@
SED = @SED@
VERSION = `$(SED) -n 's/.*PACKAGE_VERSION "\(.*\)"/\1/p'\
../config.h`
# Guard against environment variables
if ENABLE_DOCUMENTATION
MAN1_DOC =
MAN1_DOC += ss-local.1
MAN1_DOC += ss-manager.1
MAN1_DOC += ss-nat.1
MAN1_DOC += ss-redir.1
MAN1_DOC += ss-server.1
MAN1_DOC += ss-tunnel.1
MAN8_DOC =
MAN8_DOC += shadowsocks-libev.8
else
MAN1_DOC =
MAN8_DOC =
endif
MAN8_XML = $(MAN8_DOC:%.8=%.xml)
MAN1_XML = $(MAN1_DOC:%.1=%.xml)
MAN_XML = $(MAN8_XML) $(MAN1_XML)
MAN8_HTML = $(MAN8_DOC:%.8=%.html)
MAN1_HTML = $(MAN1_DOC:%.1=%.html)
MAN_HTML = $(MAN8_HTML) $(MAN1_HTML)
MAN8_TXT = $(MAN8_DOC:%.8=%.asciidoc)
MAN1_TXT = $(MAN1_DOC:%.1=%.asciidoc)
MAN_TXT = $(MAN8_TXT) $(MAN1_TXT)
man_MANS = $(MAN8_DOC) $(MAN1_DOC)
html-local: $(MAN_HTML)
%.1: %.xml
$(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.8: %.xml
$(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.xml: %.asciidoc
$(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
-aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
%.html: %.asciidoc
$(AM_V_GEN)$(ASCIIDOC) -b html4 -d article -f asciidoc.conf \
-aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
doc_DATA = $(MAN_HTML)
CLEANFILES = $(MAN_XML) $(man_MANS) $(MAN_HTML)
+646
View File
@@ -0,0 +1,646 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/ax_tls.m4 $(top_srcdir)/m4/inet_ntop.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/pcre.m4 \
$(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/m4/stack-protector.m4 $(top_srcdir)/m4/zlib.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" \
"$(DESTDIR)$(docdir)"
man8dir = $(mandir)/man8
NROFF = nroff
MANS = $(man_MANS)
DATA = $(doc_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
GZIP = @GZIP@
INET_NTOP_LIB = @INET_NTOP_LIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBPCRE = @LIBPCRE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCRE_CONFIG = @PCRE_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = `$(SED) -n 's/.*PACKAGE_VERSION "\(.*\)"/\1/p'\
../config.h`
XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pcre_pcreh = @pcre_pcreh@
pcreh = @pcreh@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ASCIIDOC_EXTRA =
MANPAGE_XSL = manpage-normal.xsl
XMLTO_EXTRA = -m manpage-bold-literal.xsl
GZIPCMD = @GZIP@
RM = @RM@
@ENABLE_DOCUMENTATION_FALSE@MAN1_DOC =
# Guard against environment variables
@ENABLE_DOCUMENTATION_TRUE@MAN1_DOC = ss-local.1 ss-manager.1 ss-nat.1 \
@ENABLE_DOCUMENTATION_TRUE@ ss-redir.1 ss-server.1 ss-tunnel.1
@ENABLE_DOCUMENTATION_FALSE@MAN8_DOC =
@ENABLE_DOCUMENTATION_TRUE@MAN8_DOC = shadowsocks-libev.8
MAN8_XML = $(MAN8_DOC:%.8=%.xml)
MAN1_XML = $(MAN1_DOC:%.1=%.xml)
MAN_XML = $(MAN8_XML) $(MAN1_XML)
MAN8_HTML = $(MAN8_DOC:%.8=%.html)
MAN1_HTML = $(MAN1_DOC:%.1=%.html)
MAN_HTML = $(MAN8_HTML) $(MAN1_HTML)
MAN8_TXT = $(MAN8_DOC:%.8=%.asciidoc)
MAN1_TXT = $(MAN1_DOC:%.1=%.asciidoc)
MAN_TXT = $(MAN8_TXT) $(MAN1_TXT)
man_MANS = $(MAN8_DOC) $(MAN1_DOC)
doc_DATA = $(MAN_HTML)
CLEANFILES = $(MAN_XML) $(man_MANS) $(MAN_HTML)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man1dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.1[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
done; }
uninstall-man1:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.8[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
done; }
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
install-docDATA: $(doc_DATA)
@$(NORMAL_INSTALL)
@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
done
uninstall-docDATA:
@$(NORMAL_UNINSTALL)
@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am: html-local
info: info-am
info-am:
install-data-am: install-docDATA install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man1 install-man8
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-docDATA uninstall-man
uninstall-man: uninstall-man1 uninstall-man8
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am html-local \
info info-am install install-am install-data install-data-am \
install-docDATA install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-man1 install-man8 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am uninstall-docDATA uninstall-man \
uninstall-man1 uninstall-man8
.PRECIOUS: Makefile
html-local: $(MAN_HTML)
%.1: %.xml
$(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.8: %.xml
$(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.xml: %.asciidoc
$(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
-aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
%.html: %.asciidoc
$(AM_V_GEN)$(ASCIIDOC) -b html4 -d article -f asciidoc.conf \
-aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+36
View File
@@ -0,0 +1,36 @@
[tags]
bracket-emphasis={1?[{1}]}<emphasis>&lt;|&gt;</emphasis>
[quotes]
&lt;|&gt;=#bracket-emphasis
[attributes]
asterisk=&#42;
plus=&#43;
caret=&#94;
startsb=&#91;
endsb=&#93;
backslash=&#92;
tilde=&#126;
apostrophe=&#39;
backtick=&#96;
litdd=&#45;&#45;
ifdef::doctype-manpage[]
ifdef::backend-docbook[]
[header]
template::[header-declarations]
<refentry>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
<refmiscinfo class="source">Shadowsocks-libev</refmiscinfo>
<refmiscinfo class="version">{version}</refmiscinfo>
<refmiscinfo class="manual">Shadowsocks-libev Manual</refmiscinfo>
</refmeta>
<refnamediv>
<refname>{manname}</refname>
<refpurpose>{manpurpose}</refpurpose>
</refnamediv>
endif::backend-docbook[]
endif::doctype-manpage[]
@@ -0,0 +1,35 @@
<!-- manpage-base.xsl:
special formatting for manpages rendered from asciidoc+docbook -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- these params silence some output from xmlto -->
<xsl:param name="man.output.quietly" select="1"/>
<xsl:param name="refentry.meta.get.quietly" select="1"/>
<!-- convert asciidoc callouts to man page format;
git.docbook.backslash and git.docbook.dot params
must be supplied by another XSL file or other means -->
<xsl:template match="co">
<xsl:value-of select="concat(
$git.docbook.backslash,'fB(',
substring-after(@id,'-'),')',
$git.docbook.backslash,'fR')"/>
</xsl:template>
<xsl:template match="calloutlist">
<xsl:value-of select="$git.docbook.dot"/>
<xsl:text>sp&#10;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="callout">
<xsl:value-of select="concat(
$git.docbook.backslash,'fB',
substring-after(@arearefs,'-'),
'. ',$git.docbook.backslash,'fR')"/>
<xsl:apply-templates/>
<xsl:value-of select="$git.docbook.dot"/>
<xsl:text>br&#10;</xsl:text>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,17 @@
<!-- manpage-bold-literal.xsl:
special formatting for manpages rendered from asciidoc+docbook -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- render literal text as bold (instead of plain or monospace);
this makes literal text easier to distinguish in manpages
viewed on a tty -->
<xsl:template match="literal">
<xsl:value-of select="$git.docbook.backslash"/>
<xsl:text>fB</xsl:text>
<xsl:apply-templates/>
<xsl:value-of select="$git.docbook.backslash"/>
<xsl:text>fR</xsl:text>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,13 @@
<!-- manpage-normal.xsl:
special settings for manpages rendered from asciidoc+docbook
handles anything we want to keep away from docbook-xsl 1.72.0 -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="manpage-base.xsl"/>
<!-- these are the normal values for the roff control characters -->
<xsl:param name="git.docbook.backslash">\</xsl:param>
<xsl:param name="git.docbook.dot" >.</xsl:param>
</xsl:stylesheet>
@@ -0,0 +1,248 @@
shadowsocks-libev(8)
====================
NAME
----
shadowsocks-libev - a lightweight and secure socks5 proxy
SYNOPSIS
--------
*ss-local*|*ss-redir*|*ss-server*|*ss-tunnel*|*ss-manager*
[-s <server_host>] [-p <server_port>] [-l <local_port>] [-k <password>]
[-m <encrypt_method>] [-f <pid_file>] [-t <timeout>] [-c <config_file>]
DESCRIPTION
-----------
*Shadowsocks-libev* is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
*Shadowsocks-libev* is written in pure C and takes advantage of *libev*
to achieve both high performance and low resource consumption.
*Shadowsocks-libev* consists of five components. One is `ss-server`(1)
that runs on a remote server to provide secured tunnel service.
`ss-local`(1) and `ss-redir`(1) are clients on your local machines to proxy
traffic(TCP/UDP or both).
`ss-tunnel`(1) is a tool for local port forwarding.
While `ss-local`(1) works as a standard socks5 proxy, `ss-redir`(1) works
as a transparent proxy and requires netfilter's NAT module. For more
information, check out the 'EXAMPLE' section.
`ss-manager`(1) is a controller for multi-user management and traffic
statistics, using UNIX domain socket to talk with `ss-server`(1).
Also, it provides a UNIX domain socket or IP based API for other software.
About the details of this API, please refer to the 'PROTOCOL' section.
OPTIONS
-------
-s <server_host>::
Set the server's hostname or IP.
-l <local_port>::
Set the local port number.
+
Not available in server nor manager mode.
-k <password>::
Set the password. The server and the client should use the same password.
-m <encrypt_method>::
Set the cipher.
+
*Shadowsocks-libev* accepts 21 different ciphers:
+
table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
-a <user_name>::
Run as a specific user.
-f <pid_file>::
Start shadowsocks as a daemon with specific pid file.
-t <timeout>::
Set the socket timeout in seconds. The default value is 60.
-c <config_file>::
Use a configuration file.
-n <number>::
Specify max number of open files.
+
Not available in manager mode.
+
Only available on Linux.
-i <interface>::
Send traffic through specific network interface.
+
For example, there are three interfaces in your device, which is
lo (127.0.0.1), eth0 (192.168.0.1) and eth1 (192.168.0.2).
Meanwhile, you configure *shadowsocks-libev* to listen on 0.0.0.0:8388
and bind to eth1. That results the traffic go out through eth1,
but not lo nor eth0. This option is useful to control traffic in
multi-interface environment.
+
Not available in redir mode.
-b <local_address>::
Specify local address to bind.
+
Not available in server nor manager mode.
-u::
Enable UDP relay.
+
TPROXY is required in redir mode. You may need root permission.
-U::
Enable UDP relay and disable TCP relay.
+
Not available in local mode.
-A::
Enable onetime authentication.
-L <addr:port>::
Specify destination server address and port for local port forwarding.
+
Only available in tunnel mode.
-d <addr>::
Setup name servers for internal DNS resolver (libudns).
The default server is fetched from /etc/resolv.conf.
+
Only available in server and manager mode.
--fast-open::
Enable TCP fast open.
+
Not available in redir nor tunnel mode, with Linux kernel > 3.7.0.
--acl <acl_config>::
Enable ACL (Access Control List) and specify config file.
+
Not available in redir nor tunnel mode.
--manager-address <path_to_unix_domain>::
Specify UNIX domain socket address.
+
Only available in server and manager mode.
--executable <path_to_server_executable>::
Specify the executable path of `ss-server`.
+
Only available in manager mode.
-v::
Enable verbose mode.
-h|--help::
Print help message.
CONFIG FILE
-----------
The config file is written in JSON and easy to edit.
The config file equivalent of command line options is listed as example below.
[frame="topbot",options="header"]
|==========================================================================
| Command line | JSON
| -s some.server.net | "server": "some.server.net"
| -s some.server.net -p 1234 (client) | "server": "some.server.net:1234"
| -p 1234 -k "PasSworD" (server) | "port_password": {"1234":"PasSworD"}
| -p 1234 | "server_port": "1234"
| -b 0.0.0.0 | "local_address": "0.0.0.0"
| -l 4321 | "local_port": "4321"
| -k "PasSworD" | "password": "PasSworD"
| -m "aes-256-cfb" | "method": "aes-256-cfb"
| -t 60 | "timeout": 60
| -a nobody | "user": "nobody"
| --fast-open | "fast_open": true
| -6 | "ipv6_first": true
| -A | "auth": true
| -n "/etc/nofile" | "nofile": "/etc/nofile"
| -d "8.8.8.8" | "nameserver": "8.8.8.8"
| -L "somedns.net:53" | "tunnel_address": "somedns.net:53"
| -u | "mode": "tcp_and_udp"
| -U | "mode": "udp_only"
| no "-u" nor "-U" options (default) | "mode": "tcp_only"
|============================================================================
EXAMPLE
-------
`ss-redir` requires netfilter's NAT function. Here is an example:
....
# Create new chain
root@Wrt:~# iptables -t nat -N SHADOWSOCKS
root@Wrt:~# iptables -t mangle -N SHADOWSOCKS
# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
# Ignore LANs and any other addresses you'd like to bypass the proxy
# See Wikipedia and RFC5735 for full list of reserved networks.
# See ashi009/bestroutetb for a highly optimized CHN route list.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
# Anything else should be redirected to shadowsocks's local port
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
# Add any UDP rules
root@Wrt:~# ip rule add fwmark 0x01/0x01 table 100
root@Wrt:~# ip route add local 0.0.0.0/0 dev lo table 100
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01
# Apply the rules
root@Wrt:~# iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A PREROUTING -j SHADOWSOCKS
# Start the shadowsocks-redir
root@Wrt:~# ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
....
PROTOCOL
--------
`ss-manager`(1) provides several APIs through UDP protocol::
Send UDP commands in the following format to the manager-address provided to ss-manager(1): ::::
command: [JSON data]
To add a port: ::::
add: {"server_port": 8001, "password":"7cd308cc059"}
To remove a port: ::::
remove: {"server_port": 8001}
To receive a pong: ::::
ping
Then `ss-manager`(1) will send back the traffic statistics: ::::
stat: {"8001":11370}
SEE ALSO
--------
`ss-local`(1),
`ss-server`(1),
`ss-tunnel`(1),
`ss-redir`(1),
`ss-manager`(1),
`iptables`(8),
/etc/shadowsocks-libev/config.json
@@ -0,0 +1,142 @@
ss-local(1)
===========
NAME
----
ss-local - shadowsocks client as socks5 proxy, libev port
SYNOPSIS
--------
*ss-local*
[-Auv6] [-h|--help]
[-s <server_host>] [-p <server_port>] [-l <local_port>]
[-k <password>] [-m <encrypt_method>] [-f <pid_file>]
[-t <timeout>] [-c <config_file>] [-i <interface>]
[-a <user_name>] [-b <local_address] [-n <nofile>]
[--fast-open] [--acl <acl_config>] [--mtu <MTU>]
DESCRIPTION
-----------
*Shadowsocks-libev* is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
*Shadowsocks-libev* is written in pure C and takes advantage of libev to
achieve both high performance and low resource consumption.
*Shadowsocks-libev* consists of five components. `ss-local`(1) works as a standard
socks5 proxy on local machines to proxy TCP traffic.
For more information, check out `shadowsocks-libev`(8).
OPTIONS
-------
-s <server_host>::
Set the server's hostname or IP.
-p <server_port>::
Set the server's port number.
-l <local_port>::
Set the local port number.
-k <password>::
Set the password. The server and the client should use the same password.
-m <encrypt_method>::
Set the cipher.
+
*Shadowsocks-libev* accepts 21 different ciphers:
+
table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
-a <user_name>::
Run as a specific user.
-f <pid_file>::
Start shadowsocks as a daemon with specific pid file.
-t <timeout>::
Set the socket timeout in seconds. The default value is 60.
-c <config_file>::
Use a configuration file.
+
Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details.
-n <number>::
Specify max number of open files.
+
Only available on Linux.
-i <interface>::
Send traffic through specific network interface.
+
For example, there are three interfaces in your device,
which is lo (127.0.0.1), eth0 (192.168.0.1) and eth1 (192.168.0.2).
Meanwhile, you configure `ss-local` to listen on 0.0.0.0:8388 and bind to eth1.
That results the traffic go out through eth1, but not lo nor eth0.
This option is useful to control traffic in multi-interface environment.
-b <local_address>::
Specify local address to bind.
-u::
Enable UDP relay.
-U::
Enable UDP relay and disable TCP relay.
-A::
Enable onetime authentication.
-6::
Resovle hostname to IPv6 address first.
--fast-open::
Enable TCP fast open.
+
Only available with Linux kernel > 3.7.0.
--acl <acl_config>::
Enable ACL (Access Control List) and specify config file.
--mtu <MTU>::
Specify the MTU of your network interface.
--mptcp::
Enable Multipath TCP.
+
Only available with MPTCP enabled Linux kernel.
-v::
Enable verbose mode.
-h|--help::
Print help message.
EXAMPLE
-------
`ss-local`(1) can be started from command line and run in foreground.
Here is an example:
....
# Start ss-local with given parameters
ss-local -s example.com -p 12345 -l 1080 -k foobar -m aes-256-cfb
....
SEE ALSO
--------
`ss-server`(1),
`ss-tunnel`(1),
`ss-redir`(1),
`ss-manager`(1),
`shadowsocks-libev`(8),
`iptables`(8),
/etc/shadowsocks-libev/config.json
@@ -0,0 +1,162 @@
ss-manager(1)
=============
NAME
----
ss-manager - ss-server controller for multi-user management and traffic statistics
SYNOPSIS
--------
*ss-manager*
[-AuUv] [-h|--help]
[-s <server_host>] [-p <server_port>] [-l <local_port>]
[-k <password>] [-m <encrypt_method>] [-f <pid_file>]
[-t <timeout>] [-c <config_file>] [-i <interface>]
[-b <local_addr>] [-a <user_name>]
[--manager-address <path_to_unix_domain>]
[--executable <path_to_server_executable>]
DESCRIPTION
-----------
*Shadowsocks-libev* is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
*Shadowsocks-libev* is written in pure C and takes advantage of libev to
achieve both high performance and low resource consumption.
*Shadowsocks-libev* consists of five components.
`ss-manager`(1) is a controller for multi-user management and
traffic statistics, using UNIX domain socket to talk with `ss-server`(1).
Also, it provides a UNIX domain socket or IP based API for other software.
About the details of this API, please refer to the following 'PROTOCOL'
section.
OPTIONS
-------
-s <server_host>::
Set the server's hostname or IP.
-k <password>::
Set the password. The server and the client should use the same password.
-m <encrypt_method>::
Set the cipher.
+
*Shadowsocks-libev* accepts 21 different ciphers:
+
table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
-a <user_name>::
Run as a specific user.
-f <pid_file>::
Start shadowsocks as a daemon with specific pid file.
-t <timeout>::
Set the socket timeout in seconds. The default value is 60.
-c <config_file>::
Use a configuration file.
-i <interface>::
Send traffic through specific network interface.
+
For example, there are three interfaces in your device,
which is lo (127.0.0.1), eth0 (192.168.0.1) and eth1 (192.168.0.2).
Meanwhile, you configure `ss-local` to listen on 0.0.0.0:8388 and bind to eth1.
That results the traffic go out through eth1, but not lo nor eth0.
This option is useful to control traffic in multi-interface environment.
-u::
Enable UDP relay.
-U::
Enable UDP relay and disable TCP relay.
-A::
Enable onetime authentication.
-d <addr>::
Setup name servers for internal DNS resolver (libudns).
The default server is fetched from `/etc/resolv.conf`.
--fast-open::
Enable TCP fast open.
+
Only available with Linux kernel > 3.7.0.
--acl <acl_config>::
Enable ACL (Access Control List) and specify config file.
--manager-address <path_to_unix_domain>::
Specify UNIX domain socket address for the communication between ss-manager(1) and ss-server(1).
+
Only available in server and manager mode.
--executable <path_to_server_executable>::
Specify the executable path of ss-server.
+
Only available in manager mode.
-v::
Enable verbose mode.
-h|--help::
Print help message.
PROTOCOL
--------
`ss-manager`(1) provides several APIs through UDP protocol:
Send UDP commands in the following format to the manager-address provided to ss-manager(1): ::::
command: [JSON data]
To add a port: ::::
add: {"server_port": 8001, "password":"7cd308cc059"}
To remove a port: ::::
remove: {"server_port": 8001}
To receive a pong: ::::
ping
Then `ss-manager`(1) will send back the traffic statistics: ::::
stat: {"8001":11370}
EXAMPLE
-------
To use `ss-manager`(1), First start it and specify necessary information.
Then communicate with `ss-manager`(1) through UNIX Domain Socket using UDP
protocol:
....
# Start the manager. Arguments for ss-server will be passed to generated
# ss-server process(es) respectively.
ss-manager --manager-address /tmp/manager.sock --executable $(which ss-server) -s example.com -m aes-256-cfb -c /path/to/config.json
# Connect to the socket. Using netcat-openbsd as an example.
# You should use scripts or other programs for further management.
nc -Uu /tmp/manager.sock
....
After that, you may communicate with `ss-manager`(1) as described above in the
'PROTOCOL' section.
SEE ALSO
--------
`ss-local`(1),
`ss-server`(1),
`ss-tunnel`(1),
`ss-redir`(1),
`shadowsocks-libev`(8),
`iptables`(8),
/etc/shadowsocks-libev/config.json
@@ -0,0 +1,95 @@
ss-nat(1)
=========
NAME
----
ss-nat - helper script to setup NAT rules for transparent proxy
SYNOPSIS
--------
*ss-nat*
[-ouUfh]
[-s <server_ip>] [-S <server_ip>] [-l <local_port>]
[-L <local_port>] [-i <ip_list_file>] [-a <lan_ips>]
[-b <wan_ips>] [-w <wan_ips>] [-e <extra_options>]
DESCRIPTION
-----------
*Shadowsocks-libev* is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
*Shadowsocks-libev* is written in pure C and takes advantage of libev to
achieve both high performance and low resource consumption.
`ss-nat`(1) sets up NAT rules for `ss-redir`(1) to provide traffic redirection.
It requires netfilter's NAT module and `iptables`(8).
For more information, check out `shadowsocks-libev`(8) and the following
'EXAMPLE' section.
OPTIONS
-------
-s <server_ip>::
IP address of shadowsocks remote server
-l <local_port>::
Port number of shadowsocks local server
-S <server_ip>::
IP address of shadowsocks remote UDP server
-L <local_port>::
Port number of shadowsocks local UDP server
-i <ip_list_file>::
a file whose content is bypassed ip list
-a <lan_ips>::
LAN IP of access control, need a prefix to define access control mode
-b <wan_ips>::
WAN IP of will be bypassed
-w <wan_ips>::
WAN IP of will be forwarded
-e <extra_options>::
Extra options for iptables
-o::
Apply the rules to the OUTPUT chain
-u::
Enable udprelay mode, TPROXY is required
-U::
Enable udprelay mode, using different IP and ports for TCP and UDP
-f::
Flush the rules
-h::
Show this help message and exit
EXAMPLE
-------
`ss-nat` requires `iptables`(8). Here is an example:
....
# Enable NAT rules for shadowsocks,
# with both TCP and UDP redirection enabled,
# and applied for both PREROUTING and OUTPUT chains
root@Wrt:~# ss-nat -s 192.168.1.100 -l 1080 -u -o
# Disable and flush all NAT rules for shadowsocks
root@Wrt:~# ss-nat -f
....
SEE ALSO
--------
`ss-local`(1),
`ss-server`(1),
`ss-tunnel`(1),
`ss-manager`(1),
`shadowsocks-libev`(8),
`iptables`(8),
/etc/shadowsocks-libev/config.json
@@ -0,0 +1,158 @@
ss-redir(1)
===========
NAME
----
ss-redir - shadowsocks client as transparent proxy, libev port
SYNOPSIS
--------
*ss-redir*
[-AuUv6] [-h|--help]
[-s <server_host>] [-p <server_port>] [-l <local_port>]
[-k <password>] [-m <encrypt_method>] [-f <pid_file>]
[-t <timeout>] [-c <config_file>] [-b <local_address>]
[-a <user_name>] [-n <nofile>] [--mtu <MTU>]
DESCRIPTION
-----------
*Shadowsocks-libev* is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
*Shadowsocks-libev* is written in pure C and takes advantage of libev to
achieve both high performance and low resource consumption.
*Shadowsocks-libev* consists of five components.
`ss-redir`(1) works as a transparent proxy on local machines to proxy TCP
traffic and requires netfilter's NAT module.
For more information, check out `shadowsocks-libev`(8) and the following
'EXAMPLE' section.
OPTIONS
-------
-s <server_host>::
Set the server's hostname or IP.
-p <server_port>::
Set the server's port number.
-l <local_port>::
Set the local port number.
-k <password>::
Set the password. The server and the client should use the same
password.
-m <encrypt_method>::
Set the cipher.
+
*Shadowsocks-libev* accepts 21 different ciphers:
+
table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
-a <user_name>::
Run as a specific user.
-f <pid_file>::
Start shadowsocks as a daemon with specific pid file.
-t <timeout>::
Set the socket timeout in seconds. The default value is 60.
-c <config_file>::
Use a configuration file.
+
Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details.
-n <number>::
Specify max number of open files.
+
Only available on Linux.
-b <local_address>::
Specify local address to bind.
-u::
Enable UDP relay.
+
TPROXY is required in redir mode. You may need root permission.
-U::
Enable UDP relay and disable TCP relay.
-A::
Enable onetime authentication.
-6::
Resovle hostname to IPv6 address first.
--mtu <MTU>::
Specify the MTU of your network interface.
--mptcp::
Enable Multipath TCP.
+
Only available with MPTCP enabled Linux kernel.
-v::
Enable verbose mode.
-h|--help::
Print help message.
EXAMPLE
-------
ss-redir requires netfilter's NAT function. Here is an example:
....
# Create new chain
root@Wrt:~# iptables -t nat -N SHADOWSOCKS
# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
# Ignore LANs and any other addresses you'd like to bypass the proxy
# See Wikipedia and RFC5735 for full list of reserved networks.
# See ashi009/bestroutetb for a highly optimized CHN route list.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
# Anything else should be redirected to shadowsocks's local port
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
# Add any UDP rules
root@Wrt:~# ip rule add fwmark 0x01/0x01 table 100
root@Wrt:~# ip route add local 0.0.0.0/0 dev lo table 100
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01
# Apply the rules
root@Wrt:~# iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A PREROUTING -j SHADOWSOCKS
# Start the shadowsocks-redir
root@Wrt:~# ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
....
SEE ALSO
--------
`ss-local`(1),
`ss-server`(1),
`ss-tunnel`(1),
`ss-manager`(1),
`shadowsocks-libev`(8),
`iptables`(8),
/etc/shadowsocks-libev/config.json
@@ -0,0 +1,172 @@
ss-server(1)
============
NAME
----
ss-server - shadowsocks server, libev port
SYNOPSIS
--------
*ss-server*
[-AuUv] [-h|--help]
[-s <server_host>] [-p <server_port>] [-l <local_port>]
[-k <password>] [-m <encrypt_method>] [-f <pid_file>]
[-t <timeout>] [-c <config_file>] [-i <interface>]
[-a <user_name>] [-d <addr>] [-n <nofile>]
[-b <local_address] [--fast-open] [--mptcp]
[--firewall] [--acl <acl_config>] [--mtu <MTU>]
[--manager-address <path_to_unix_domain>]
DESCRIPTION
-----------
*Shadowsocks-libev* is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
*Shadowsocks-libev* is written in pure C and takes advantage of libev to
achieve both high performance and low resource consumption.
*Shadowsocks-libev* consists of five components.
`ss-server`(1) runs on a remote server to provide secured tunnel service.
For more information, check out `shadowsocks-libev`(8).
OPTIONS
-------
-s <server_host>::
Set the server's hostname or IP.
-p <server_port>::
Set the server's port number.
-k <password>::
Set the password. The server and the client should use the same password.
-m <encrypt_method>::
Set the cipher.
+
*Shadowsocks-libev* accepts 21 different ciphers:
+
table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
-a <user_name>::
Run as a specific user.
-f <pid_file>::
Start shadowsocks as a daemon with specific pid file.
-t <timeout>::
Set the socket timeout in seconds. The default value is 60.
-c <config_file>::
Use a configuration file.
+
Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details.
-n <number>::
Specify max number of open files.
+
Only available on Linux.
-i <interface>::
Send traffic through specific network interface.
+
For example, there are three interfaces in your device,
which is lo (127.0.0.1), eth0 (192.168.0.1) and eth1 (192.168.0.2).
Meanwhile, you configure `ss-server` to listen on 0.0.0.0:8388 and bind to eth1.
That results the traffic go out through eth1, but not lo nor eth0.
This option is useful to control traffic in multi-interface environment.
-b <local_address>::
Specify local address to bind.
-u::
Enable UDP relay.
-U::
Enable UDP relay and disable TCP relay.
-A::
Enable onetime authentication.
-6::
Resovle hostname to IPv6 address first.
-d <addr>::
Setup name servers for internal DNS resolver (libudns).
The default server is fetched from '/etc/resolv.conf'.
--fast-open::
Enable TCP fast open.
+
Only available with Linux kernel > 3.7.0.
--mptcp::
Enable Multipath TCP.
+
Only available with MPTCP enabled Linux kernel.
--firewall::
Setup firewall rules for auto blocking.
--acl <acl_config>::
Enable ACL (Access Control List) and specify config file.
--manager-address <path_to_unix_domain>::
Specify UNIX domain socket address for the communication between ss-manager(1) and ss-server(1).
+
Only available in server and manager mode.
--mtu <MTU>::
Specify the MTU of your network interface.
--mptcp::
Enable Multipath TCP.
+
Only available with MPTCP enabled Linux kernel.
-v::
Enable verbose mode.
-h|--help::
Print help message.
EXAMPLE
-------
It is recommended to use a config file when starting `ss-server`(1).
The config file is written in JSON and is easy to edit.
Check out the 'SEE ALSO' section for the default path of config file.
....
# Start the ss-server
ss-server -c /etc/shadowsocks-libev/config.json
....
INCOMPATIBILITY
---------------
The config file of `shadowsocks-libev`(8) is slightly different from original
shadowsocks.
In order to listen to both IPv4/IPv6 address, use the following grammar in
your config json file:
....
{
"server":["::0","0.0.0.0"],
...
}
....
SEE ALSO
--------
`ss-local`(1),
`ss-tunnel`(1),
`ss-redir`(1),
`ss-manager`(1),
`shadowsocks-libev`(8),
`iptables`(8),
/etc/shadowsocks-libev/config.json
@@ -0,0 +1,129 @@
ss-tunnel(1)
============
NAME
----
ss-tunnel - shadowsocks tools for local port forwarding, libev port
SYNOPSIS
--------
*ss-tunnel*
[-AuUv6] [-h|--help]
[-s <server_host>] [-p <server_port>] [-l <local_port>]
[-k <password>] [-m <encrypt_method>] [-f <pid_file>]
[-t <timeout>] [-c <config_file>] [-i <interface>]
[-b <local_addr>] [-a <user_name>] [-n <nofile>]
[-L addr:port] [--mtu <MTU>]
DESCRIPTION
-----------
*Shadowsocks-libev* is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
*Shadowsocks-libev* is written in pure C and takes advantage of libev to
achieve both high performance and low resource consumption.
*Shadowsocks-libev* consists of five components.
`ss-tunnel`(1) is a tool for local port forwarding.
See 'OPTIONS' section for special option needed by `ss-tunnel`(1).
For more information, check out `shadowsocks-libev`(8).
OPTIONS
-------
-s <server_host>::
Set the server's hostname or IP.
-p <server_port>::
Set the server's port number.
-l <local_port>::
Set the local port number.
-k <password>::
Set the password. The server and the client should use the same password.
-m <encrypt_method>::
Set the cipher.
+
*Shadowsocks-libev* accepts 21 different ciphers:
+
table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
-a <user_name>::
Run as a specific user.
-f <pid_file>::
Start shadowsocks as a daemon with specific pid file.
-t <timeout>::
Set the socket timeout in seconds. The default value is 60.
-c <config_file>::
Use a configuration file.
+
Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details.
-n <number>::
Specify max number of open files.
+
Only available on Linux.
-i <interface>::
Send traffic through specific network interface.
+
For example, there are three interfaces in your device,
which is lo (127.0.0.1), eth0 (192.168.0.1) and eth1 (192.168.0.2).
Meanwhile, you configure `ss-tunnel` to listen on 0.0.0.0:8388 and bind to eth1.
That results the traffic go out through eth1, but not lo nor eth0.
This option is useful to control traffic in multi-interface environment.
-b <local_address>::
Specify local address to bind.
-u::
Enable UDP relay.
-U::
Enable UDP relay and disable TCP relay.
-A::
Enable onetime authentication.
-6::
Resovle hostname to IPv6 address first.
-L <addr:port>::
Specify destination server address and port for local port forwarding.
+
Only used and available in tunnel mode.
--mtu <MTU>::
Specify the MTU of your network interface.
--mptcp::
Enable Multipath TCP.
+
Only available with MPTCP enabled Linux kernel.
-v::
Enable verbose mode.
-h|--help::
Print help message.
SEE ALSO
--------
`ss-local`(1),
`ss-server`(1),
`ss-redir`(1),
`ss-manager`(1),
`shadowsocks-libev`(8),
`iptables`(8),
/etc/shadowsocks-libev/config.json
@@ -0,0 +1,59 @@
#
# Dockerfile for shadowsocks-libev
#
FROM alpine
MAINTAINER kev <noreply@datageek.info>
ARG SS_VER=2.5.6
ARG SS_URL=https://github.com/shadowsocks/shadowsocks-libev/archive/v$SS_VER.tar.gz
ENV SERVER_ADDR 0.0.0.0
ENV SERVER_PORT 8388
ENV PASSWORD=
ENV METHOD aes-256-cfb
ENV TIMEOUT 300
ENV DNS_ADDR 8.8.8.8
ENV DNS_ADDR_2 8.8.4.4
RUN set -ex && \
apk add --no-cache --virtual .build-deps \
asciidoc \
autoconf \
build-base \
curl \
libtool \
linux-headers \
openssl-dev \
pcre-dev \
tar \
xmlto && \
cd /tmp && \
curl -sSL $SS_URL | tar xz --strip 1 && \
./configure --prefix=/usr --disable-documentation && \
make install && \
cd .. && \
runDeps="$( \
scanelf --needed --nobanner /usr/bin/ss-* \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| xargs -r apk info --installed \
| sort -u \
)" && \
apk add --no-cache --virtual .run-deps $runDeps && \
apk del .build-deps && \
rm -rf /tmp/*
USER nobody
EXPOSE $SERVER_PORT/tcp $SERVER_PORT/udp
CMD ss-server -s $SERVER_ADDR \
-p $SERVER_PORT \
-k ${PASSWORD:-$(hostname)} \
-m $METHOD \
-t $TIMEOUT \
--fast-open \
-d $DNS_ADDR \
-d $DNS_ADDR_2 \
-u
@@ -0,0 +1,88 @@
shadowsocks-libev
=================
[shadowsocks-libev][1] is a lightweight secured socks5 proxy for embedded
devices and low end boxes. It is a port of [shadowsocks][2] created by
@clowwindy maintained by @madeye and @linusyang.
Suppose we have a VPS running Debian or Ubuntu.
To deploy the service quickly, we can use [docker][3].
## Install docker
```
$ curl -sSL https://get.docker.com/ | sh
$ docker --version
```
## Build docker image
```bash
$ curl -sSL https://github.com/shadowsocks/shadowsocks-libev/raw/master/docker/alpine/Dockerfile | docker build -t shadowsocks-libev .
$ docker images
```
> You can also use a pre-built docker image: [vimagick/shadowsocks-libev][4] ![][5].
## Run docker container
```bash
$ docker run -d -e METHOD=aes-256-cfb -e PASSWORD=9MLSpPmNt -p 8388:8388 --restart always shadowsocks-libev
$ docker ps
```
> :warning: Click [here][6] to generate a strong password to protect your server.
## Use docker-compose to manage (optional)
It is very handy to use [docker-compose][7] to manage docker containers.
You can download the binary at <https://github.com/docker/compose/releases>.
This is a sample `docker-compose.yml` file.
```yaml
shadowsocks:
image: shadowsocks-libev
ports:
- "8388:8388"
environment:
- METHOD=aes-256-cfb
- PASSWORD=9MLSpPmNt
restart: always
```
It is highly recommended that you setup a directory tree to make things easy to manage.
```bash
$ mkdir -p ~/fig/shadowsocks/
$ cd ~/fig/shadowsocks/
$ curl -sSLO https://github.com/shadowsocks/shadowsocks-libev/raw/master/docker/alpine/docker-compose.yml
$ docker-compose up -d
$ docker-compose ps
```
## Finish
At last, download shadowsocks client [here][8].
Don't forget to share internet with your friends.
```yaml
{
"server": "your-vps-ip",
"server_port": 8388,
"local_address": "0.0.0.0",
"local_port": 1080,
"password": "9MLSpPmNt",
"timeout": 600,
"method": "aes-256-cfb"
}
```
[1]: https://github.com/shadowsocks/shadowsocks-libev
[2]: https://shadowsocks.org/en/index.html
[3]: https://github.com/docker/docker
[4]: https://hub.docker.com/r/vimagick/shadowsocks-libev/
[5]: https://badge.imagelayers.io/vimagick/shadowsocks-libev:latest.svg
[6]: https://duckduckgo.com/?q=password+12&t=ffsb&ia=answer
[7]: https://github.com/docker/compose
[8]: https://shadowsocks.org/en/download/clients.html
@@ -0,0 +1,9 @@
shadowsocks:
image: shadowsocks-libev
ports:
- "8388:8388/tcp"
- "8388:8388/udp"
environment:
- METHOD=aes-256-cfb
- PASSWORD=9MLSpPmNt
restart: always
@@ -0,0 +1,32 @@
FROM ubuntu:latest
MAINTAINER Sah Lee <contact@leesah.name>
ENV DEPENDENCIES git-core build-essential autoconf libtool libssl-dev asciidoc xmlto
ENV BASEDIR /tmp/shadowsocks-libev
ENV SERVER_PORT 8338
# Set up building environment
RUN apt-get update \
&& apt-get install -y $DEPENDENCIES
# Get the latest code, build and install
RUN git clone https://github.com/shadowsocks/shadowsocks-libev.git $BASEDIR
WORKDIR $BASEDIR
RUN ./configure \
&& make \
&& make install
# Tear down building environment and delete git repository
WORKDIR /
RUN rm -rf $BASEDIR/shadowsocks-libev\
&& apt-get --purge autoremove -y $DEPENDENCIES
# Port in the config file won't take affect. Instead we'll use 8388.
EXPOSE $SERVER_PORT
EXPOSE $SERVER_PORT/udp
# Override the host and port in the config file.
ADD entrypoint /
ENTRYPOINT ["/entrypoint"]
CMD ["-h"]
@@ -0,0 +1,90 @@
# Shadowsocks Dockerized
## About this image
This image is built to ease the deployment of the Shadowsocks server daemon with Docker.
For Shadowsocks clients, you want to visit http://shadowsocks.org/en/download/clients.html
### What is Shadowsocks
A secure socks5 proxy designed to protect your Internet traffic.
See http://shadowsocks.org/
### What is Docker
An open platform for distributed applications for developers and sysadmins.
See https://www.docker.com/
## How to use this image
### Start the daemon for the first time
```bash
$ docker run --name shadowsocks-app --detach --publish 58338:8338 shadowsocks/shadowsocks-libev -k "5ecret!"
```
To publish UDP port for DNS tunnelling, run
```bash
$ docker run --name shadowsocks-app --detach --publish 58338:8338 --publish 58338:8338/udp shadowsocks/shadowsocks-libev -k "5ecret!"
```
To see all supported arguments, run
```bash
$ docker run --rm shadowsocks/shadowsocks-libev --help
```
To try the bleeding edge version of Shadowsocks, run with an `unstable` tag
```bash
$ docker run --name shadowsocks-app --detach --publish 58338:8338 shadowsocks/shadowsocks-libev:unstable -k "5ecret!"
```
### Stop the daemon
```bash
$ docker stop shadowsocks-app
```
### Start a stopped daemon
```bash
$ docker start shadowsocks-app
```
### Upgrade
Simply run a `docker pull` to upgrade the image.
```bash
$ docker pull shadowsocks/shadowsocks-libev
```
### Use in CoreOS
COMING SOON
### Use with `fig`
COMING SOON
## Limitations
### JSON Configuration File
This image doesn't support the JSON configuration at the moment. But I do plan to add the support in the future. So please stay tuned.
### Specifying Hostname & Port
Docker containers don't have the power to specify on what hostname or port of the host should the service listen to. These have to be specified using the `--publish` argument of `docker run`.
See [Docker run reference](https://docs.docker.com/reference/run/#expose-incoming-ports) for more details.
## References
* [Shadowsocks - Servers](http://shadowsocks.org/en/download/servers.html)
* [shadowsocks-libev](https://github.com/shadowsocks/shadowsocks-libev/blob/master/README.md)
@@ -0,0 +1,99 @@
#! /bin/bash
IMAGE_NAME="leesah/shadowsocks-libev"
PORTNUMBER="8338"
SHADOWSOCKS="/usr/local/bin/ss-server"
HOST="-s 0.0.0.0"
PORT="-p $PORTNUMBER"
JSON=""
function print_usage {
echo
echo "Usage:"
echo " docker run $IMAGE_NAME [OPTIONS]"
echo
echo "OPTIONS"
echo " -k <password> password of your remote server"
echo
echo " [-m <encrypt_method>] encrypt method: table, rc4, rc4-md5"
echo " aes-128-cfb, aes-192-cfb, aes-256-cfb,"
echo " bf-cfb, camellia-128-cfb, camellia-192-cfb,"
echo " camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb,"
echo " rc2-cfb, seed-cfb, salsa20 and chacha20"
echo " [-t <timeout>] socket timeout in seconds"
echo " [-c <config_file>] config file in json"
echo " [-u] enable udprelay mode"
echo " [-v] verbose mode"
echo
echo " [--fast-open] enable TCP fast open"
echo " [--acl <acl_file>] config file of ACL \(Access Control List\)"
echo
echo " [-h] print this"
echo
}
function print_usage_configfile {
echo "Config file is currently not supported by this image."
echo
echo "See https://github.com/leesah/shadowsocks-libev/issues/1 for current progress."
echo
}
function print_usage_host {
echo "To specify the host on which ss-server should listen, please use"
echo " docker run -p $1::$PORTNUMBER ..."
echo "or"
echo " docker run -p $1:<HOST-PORT>:$PORTNUMBER ..."
echo
echo "See manpage of docker-run for more details:"
echo " man docker-run"
echo
}
function print_usage_port {
echo "To specify the port on which ss-server should listen, please use"
echo " docker run -p $1:$PORTNUMBER ..."
echo
}
OPTIONS=`getopt -o s:p:k:m:t:c:uvh --long server:,key:,password:,encrypt-method:,timeout:,acl:,server-port:,config-file:,fast-open,help -n "$IMAGE_NAME" -- "$@"`
if [ $? -ne 0 ]; then
print_usage
exit 1
fi
eval set -- "$OPTIONS"
while true; do
case "$1" in
-k|--key|--password) PASSWORD="-k $2"; shift 2;;
-m|--encrypt-method) ENCRYPTION="-m $2"; shift 2;;
-t|--timeout) TIMEOUT="-t $2"; shift 2;;
--acl) ACL="--acl $2"; shift 2;;
--fast-open) FAST_OPEN="--fast-open"; shift;;
-u) UDP_RELAY="-u"; shift;;
-v) VERBOSE="-v"; shift;;
--) shift; break;;
-c|--config-file) print_usage_configfile; exit 128;;
-s|--server) print_usage_host "$2"; exit 128;;
-p|--server-port) print_usage_port "$2"; exit 128;;
-h|--help) print_usage; exit 0;;
*)
echo "$IMAGE_NAME: unexpected argument: $1"
print_usage
exit 1;;
esac
done
if [ -z "$HOST" -o -z "$PORT" -o -z "$PASSWORD" ]; then
echo "$IMAGE_NAME: insufficient arguments."
print_usage
exit 1
fi
echo "Launching Shadowsocks server..."
echo "To watch the output, run"
echo " docker ps -ql | xargs docker logs -f"
$SHADOWSOCKS $HOST $PORT $PASSWORD $ENCRYPTION $TIMEOUT $UDP_RELAY $VERBOSE $FAST_OPEN $ACL $JSON
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="CidrRootsConfiguration">
<excludeRoots>
<file path="$PROJECT_DIR$/cmake-build-debug/CMakeFiles" />
</excludeRoots>
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/libcork-develop.iml" filepath="$PROJECT_DIR$/.idea/libcork-develop.iml" />
</modules>
</component>
</project>
+693
View File
@@ -0,0 +1,693 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeRunConfigurationManager" shouldGenerate="true" buildAllGenerated="true">
<generated>
<config projectName="libcork" targetName="cork-test" />
<config projectName="libcork" targetName="libcork-static" />
<config projectName="libcork" targetName="cork-hash" />
<config projectName="libcork" targetName="cork-initializer" />
</generated>
</component>
<component name="CMakeSettings">
<configurations>
<configuration CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="5cc43b05-9f40-4e8f-af93-ddec7c2cfadc" name="Default" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300" />
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>ENABLE_SHARED</find>
<find>check</find>
<find>错误:可见性属性在此配置下不受支持</find>
<find>CORK_API</find>
<find>API</find>
<find>CORK_CONFIG_GCC_VERSION</find>
<find>cygwin</find>
<find>pthread_yield_np</find>
<find>sched_yield</find>
<find>environ</find>
</findStrings>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/version.sh" />
<option value="$PROJECT_DIR$/RELEASE-VERSION" />
<option value="$PROJECT_DIR$/CMakeLists.txt" />
<option value="$PROJECT_DIR$/cmake/FindCTargets.cmake" />
<option value="$PROJECT_DIR$/include/libcork/cli/commands.h" />
<option value="$PROJECT_DIR$/include/libcork/config/gcc.h" />
<option value="$PROJECT_DIR$/include/libcork/core/attributes.h" />
<option value="$PROJECT_DIR$/src/libcork/posix/env.c" />
<option value="$PROJECT_DIR$/src/libcork/posix/subprocess.c" />
<option value="$PROJECT_DIR$/src/CMakeLists.txt" />
<option value="$PROJECT_DIR$/.gitignore" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="OCFindUsagesOptions" text="true" ivars="false" properties="true" derivedClasses="false" />
<component name="ProjectFrameBounds">
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1936" />
<option name="height" value="1056" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="External Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="include" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libcork-develop" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="include" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libcork" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="js.eslint.eslintPackage" value="" />
<property name="settings.editor.selected.configurable" value="CPPToolchains" />
</component>
<component name="RunManager" selected="Application.libcork-static">
<configuration default="true" type="BashConfigurationType" factoryName="Bash">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<module name="" />
<envs />
<method />
</configuration>
<configuration default="true" type="CMakeGoogleTestRunConfigurationType" factoryName="Google Test" PASS_PARENT_ENVS_2="true" TEST_MODE="SUITE_TEST">
<envs />
<method />
</configuration>
<configuration default="true" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="libcork" TARGET_NAME="cork-hash" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
<config-file value="" />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="libcork-develop" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<method />
</configuration>
<configuration default="true" type="Tox" factoryName="Tox">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="libcork-develop" />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run" />
<scripts />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Attests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="libcork-develop" />
<option name="SCRIPT_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="FOLDER_NAME" value="" />
<option name="TEST_TYPE" value="TEST_SCRIPT" />
<option name="PATTERN" value="" />
<option name="USE_PATTERN" value="false" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Doctests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="libcork-develop" />
<option name="SCRIPT_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="FOLDER_NAME" value="" />
<option name="TEST_TYPE" value="TEST_SCRIPT" />
<option name="PATTERN" value="" />
<option name="USE_PATTERN" value="false" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Nosetests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="libcork-develop" />
<option name="SCRIPT_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="FOLDER_NAME" value="" />
<option name="TEST_TYPE" value="TEST_SCRIPT" />
<option name="PATTERN" value="" />
<option name="USE_PATTERN" value="false" />
<option name="PARAMS" value="" />
<option name="USE_PARAM" value="false" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Unittests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="libcork-develop" />
<option name="SCRIPT_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="FOLDER_NAME" value="" />
<option name="TEST_TYPE" value="TEST_SCRIPT" />
<option name="PATTERN" value="" />
<option name="USE_PATTERN" value="false" />
<option name="PUREUNITTEST" value="true" />
<option name="PARAMS" value="" />
<option name="USE_PARAM" value="false" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="py.test">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="libcork-develop" />
<option name="SCRIPT_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="FOLDER_NAME" value="" />
<option name="TEST_TYPE" value="TEST_SCRIPT" />
<option name="PATTERN" value="" />
<option name="USE_PATTERN" value="false" />
<option name="testToRun" value="" />
<option name="keywords" value="" />
<option name="params" value="" />
<option name="USE_PARAM" value="false" />
<option name="USE_KEYWORD" value="false" />
<method />
</configuration>
<configuration default="false" name="cork-hash" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="libcork" TARGET_NAME="cork-hash" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="libcork" RUN_TARGET_NAME="cork-hash">
<envs />
<method />
</configuration>
<configuration default="false" name="cork-initializer" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="libcork" TARGET_NAME="cork-initializer" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="libcork" RUN_TARGET_NAME="cork-initializer">
<envs />
<method />
</configuration>
<configuration default="false" name="cork-test" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="libcork" TARGET_NAME="cork-test" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="libcork" RUN_TARGET_NAME="cork-test">
<envs />
<method />
</configuration>
<configuration default="false" name="libcork-static" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="libcork" TARGET_NAME="libcork-static" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="Build All" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="libcork" RUN_TARGET_NAME="cork-test" EXPLICIT_BUILD_TARGET_NAME="all">
<envs />
<method />
</configuration>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="Application.cork-hash" />
<item index="1" class="java.lang.String" itemvalue="Application.cork-initializer" />
<item index="2" class="java.lang.String" itemvalue="Application.cork-test" />
<item index="3" class="java.lang.String" itemvalue="Application.libcork-static" />
<item index="4" class="java.lang.String" itemvalue="Application.Build All" />
</list>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="5cc43b05-9f40-4e8f-af93-ddec7c2cfadc" name="Default" comment="" />
<created>1483455364838</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1483455364838</updated>
<workItem from="1483455372045" duration="3295000" />
<workItem from="1483458687157" duration="183000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="3478000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18229716" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936078" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936078" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3347779" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/version.sh" />
<entry file="file://$PROJECT_DIR$/RELEASE-VERSION" />
<entry file="file://$PROJECT_DIR$/INSTALL" />
<entry file="file://$PROJECT_DIR$/src/libcork/core/allocator.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="201">
<caret line="241" column="0" lean-forward="false" selection-start-line="241" selection-start-column="0" selection-end-line="241" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/core/allocator.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="163">
<caret line="196" column="7" lean-forward="false" selection-start-line="196" selection-start-column="7" selection-end-line="196" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/core/gc.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="263">
<caret line="18" column="10" lean-forward="false" selection-start-line="18" selection-start-column="10" selection-end-line="18" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/libcork/core/gc.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="627">
<caret line="41" column="7" lean-forward="false" selection-start-line="41" selection-start-column="7" selection-end-line="41" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/config/version.h.in">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/src/CMakeFiles/libcork-static.dir/flags.make">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="114">
<caret line="6" column="14" lean-forward="false" selection-start-line="6" selection-start-column="14" selection-end-line="6" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/threads.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/include/libcork/config/version.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/include/CMakeFiles/progress.marks">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/include/CMakeFiles/CMakeDirectoryInformation.cmake">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-839">
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake/FindCTargets.cmake">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="68" column="11" lean-forward="false" selection-start-line="68" selection-start-column="11" selection-end-line="68" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake/FindParseArguments.cmake">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="17" column="11" lean-forward="false" selection-start-line="17" selection-start-column="11" selection-end-line="17" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake/FindPrereqs.cmake">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="40" column="19" lean-forward="false" selection-start-line="40" selection-start-column="19" selection-end-line="40" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="38">
<caret line="2" column="82" lean-forward="false" selection-start-line="2" selection-start-column="76" selection-end-line="2" selection-end-column="82" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/cli/commands.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="651">
<caret line="53" column="0" lean-forward="false" selection-start-line="53" selection-start-column="0" selection-end-line="53" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/libcork/cli/commands.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="201">
<caret line="14" column="0" lean-forward="false" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/config/mingw32.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-456">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/config/linux.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/config/arch.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/config/gcc.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="912">
<caret line="49" column="5" lean-forward="false" selection-start-line="49" selection-start-column="5" selection-end-line="49" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/config/config.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="480">
<caret line="50" column="3" lean-forward="false" selection-start-line="50" selection-start-column="3" selection-end-line="50" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/core/api.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="233">
<caret line="26" column="0" lean-forward="false" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://E:/cygwin64/usr/include/pthread.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="13" column="17" lean-forward="true" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://E:/cygwin64/usr/include/sched.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="305">
<caret line="88" column="15" lean-forward="false" selection-start-line="88" selection-start-column="4" selection-end-line="88" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/libcork/posix/subprocess.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="291">
<caret line="505" column="44" lean-forward="true" selection-start-line="505" selection-start-column="44" selection-end-line="505" selection-end-column="44" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/libcork/posix/env.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="332">
<caret line="195" column="1" lean-forward="true" selection-start-line="195" selection-start-column="1" selection-end-line="195" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/include/libcork/core/attributes.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="244">
<caret line="138" column="0" lean-forward="false" selection-start-line="138" selection-start-column="0" selection-end-line="138" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/APPNAME.pc.in" />
<entry file="file://$PROJECT_DIR$/make-dist.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="571">
<caret line="68" column="15" lean-forward="false" selection-start-line="68" selection-start-column="15" selection-end-line="68" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/libcork.pc.in">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="17" column="0" lean-forward="true" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://E:/cygwin64/usr/include/_newlib_version.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://E:/cygwin64/lib/gcc/x86_64-pc-cygwin/5.4.0/include/avx512cdintrin.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</component>
</project>
@@ -0,0 +1,142 @@
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright © 2011-2015, RedJack, LLC.
# All rights reserved.
#
# Please see the COPYING file in this distribution for license details.
# ----------------------------------------------------------------------
cmake_minimum_required(VERSION 2.6)
set(PROJECT_NAME libcork)
set(RELEASE_DATE 2015-09-03)
project(${PROJECT_NAME})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(CTargets)
#-----------------------------------------------------------------------
# Retrieve the current version number
set(VERSION_MAJOR "0")
set(VERSION_MINOR "15")
set(VERSION_PATCH "0")
set(VERSION "0.15.0")
set(GIT_SHA1 "d6ecc2cfbcdf5013038a72b4544f7d9e6eb8f92d")
#-----------------------------------------------------------------------
# Check for building on Tilera
# If the Tilera environment is installed, then $TILERA_ROOT is defined
# as the path to the active MDE.
if(DEFINED ENV{TILERA_ROOT})
set(TILERA TRUE)
set(TILERA_ROOT $ENV{TILERA_ROOT})
message("-- Configuring for Tilera MDE ${TILERA_ROOT}")
set(ENV{PKG_CONFIG_PATH}
"${TILERA_ROOT}/tile/usr/lib/pkgconfig:${TILERA_ROOT}/tile/usr/local/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}"
)
set(CMAKE_SYSTEM_NAME "Tilera")
set(CMAKE_SYSTEM_PROCESSOR "tilegx")
set(CMAKE_C_COMPILER "${TILERA_ROOT}/bin/tile-gcc")
set(CMAKE_LINKER "${TILERA_ROOT}/bin/tile-ld")
set(TILERA_MONITOR "${TILERA_ROOT}/bin/tile-monitor")
#add_definitions(-std=gnu99)
set(CMAKE_FIND_ROOT_PATH "${TILERA_ROOT}/tile")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endif()
#-----------------------------------------------------------------------
# Set some options
if(APPLE)
if (NOT CMAKE_INSTALL_NAME_DIR)
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif (NOT CMAKE_INSTALL_NAME_DIR)
endif(APPLE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_definitions(-Wall -Werror)
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_definitions(-Wall -Werror)
elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel")
add_definitions(-Wall -Werror)
endif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
include(GNUInstallDirs)
#-----------------------------------------------------------------------
# Check for prerequisite libraries
find_package(Threads)
set(THREADS_LDFLAGS "${CMAKE_THREAD_LIBS_INIT}")
if(WIN32)
if(CMAKE_THREAD_LIBS_INIT)
set(THREADS_STATIC_LDFLAGS "-static ${CMAKE_THREAD_LIBS_INIT}")
else()
set(THREADS_STATIC_LDFLAGS "-static")
endif()
else()
set(THREADS_STATIC_LDFLAGS "${CMAKE_THREAD_LIBS_INIT}")
endif()
#-----------------------------------------------------------------------
# Include our subdirectories
#add_subdirectory(include)
#add_subdirectory(src)
add_c_library(
libcork
OUTPUT_NAME cork
PKGCONFIG_NAME libcork
VERSION 16.0.1
SOURCES
cli/commands.c
core/allocator.c
core/error.c
core/gc.c
core/hash.c
core/ip-address.c
core/mempool.c
core/timestamp.c
core/u128.c
core/version.c
ds/array.c
ds/bitset.c
ds/buffer.c
ds/dllist.c
ds/file-stream.c
ds/hash-table.c
ds/managed-buffer.c
ds/ring-buffer.c
ds/slice.c
# posix/directory-walker.c
# posix/env.c
# posix/exec.c
# posix/files.c
posix/process.c
# posix/subprocess.c
pthreads/thread.c
LIBRARIES
threads
)
set_target_properties(libcork PROPERTIES
COMPILE_DEFINITIONS CORK_API=CORK_LOCAL
)
set(libcork_include_dirs
${PROJECT_SOURCE_DIR}/include
${PROJECT_BINARY_DIR}/include
CACHE INTERNAL "libcork library" FORCE
)
+30
View File
@@ -0,0 +1,30 @@
Copyright © 2011-2012, RedJack, LLC.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
• Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
• Neither the name of RedJack Software, LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,18 @@
noinst_LTLIBRARIES = libcork.la
cli_src = cli/commands.c
core_src = core/allocator.c core/error.c core/gc.c \
core/hash.c core/ip-address.c core/mempool.c \
core/timestamp.c core/u128.c
ds_src = ds/array.c ds/bitset.c ds/buffer.c ds/dllist.c \
ds/file-stream.c ds/hash-table.c ds/managed-buffer.c \
ds/ring-buffer.c ds/slice.c
posix_src = posix/directory-walker.c posix/env.c posix/exec.c \
posix/files.c posix/process.c posix/subprocess.c
pthreads_src = pthreads/thread.c
libcork_la_SOURCES = $(cli_src) $(core_src) $(ds_src) \
$(posix_src) $(pthreads_src)
libcork_la_CFLAGS = -I$(top_srcdir)/libcork/include -DCORK_API=CORK_LOCAL
libcork_la_LDFLAGS = -static
+947
View File
@@ -0,0 +1,947 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = libcork
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/ax_tls.m4 $(top_srcdir)/m4/inet_ntop.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/pcre.m4 \
$(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/m4/stack-protector.m4 $(top_srcdir)/m4/zlib.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libcork_la_LIBADD =
am__dirstamp = $(am__leading_dot)dirstamp
am__objects_1 = cli/libcork_la-commands.lo
am__objects_2 = core/libcork_la-allocator.lo core/libcork_la-error.lo \
core/libcork_la-gc.lo core/libcork_la-hash.lo \
core/libcork_la-ip-address.lo core/libcork_la-mempool.lo \
core/libcork_la-timestamp.lo core/libcork_la-u128.lo
am__objects_3 = ds/libcork_la-array.lo ds/libcork_la-bitset.lo \
ds/libcork_la-buffer.lo ds/libcork_la-dllist.lo \
ds/libcork_la-file-stream.lo ds/libcork_la-hash-table.lo \
ds/libcork_la-managed-buffer.lo ds/libcork_la-ring-buffer.lo \
ds/libcork_la-slice.lo
am__objects_4 = posix/libcork_la-directory-walker.lo \
posix/libcork_la-env.lo posix/libcork_la-exec.lo \
posix/libcork_la-files.lo posix/libcork_la-process.lo \
posix/libcork_la-subprocess.lo
am__objects_5 = pthreads/libcork_la-thread.lo
am_libcork_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_3) $(am__objects_4) $(am__objects_5)
libcork_la_OBJECTS = $(am_libcork_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
libcork_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcork_la_CFLAGS) \
$(CFLAGS) $(libcork_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/auto/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libcork_la_SOURCES)
DIST_SOURCES = $(libcork_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/auto/depcomp \
COPYING
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
GZIP = @GZIP@
INET_NTOP_LIB = @INET_NTOP_LIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBPCRE = @LIBPCRE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCRE_CONFIG = @PCRE_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pcre_pcreh = @pcre_pcreh@
pcreh = @pcreh@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libcork.la
cli_src = cli/commands.c
core_src = core/allocator.c core/error.c core/gc.c \
core/hash.c core/ip-address.c core/mempool.c \
core/timestamp.c core/u128.c
ds_src = ds/array.c ds/bitset.c ds/buffer.c ds/dllist.c \
ds/file-stream.c ds/hash-table.c ds/managed-buffer.c \
ds/ring-buffer.c ds/slice.c
posix_src = posix/directory-walker.c posix/env.c posix/exec.c \
posix/files.c posix/process.c posix/subprocess.c
pthreads_src = pthreads/thread.c
libcork_la_SOURCES = $(cli_src) $(core_src) $(ds_src) \
$(posix_src) $(pthreads_src)
libcork_la_CFLAGS = -I$(top_srcdir)/libcork/include -DCORK_API=CORK_LOCAL
libcork_la_LDFLAGS = -static
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libcork/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign libcork/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
cli/$(am__dirstamp):
@$(MKDIR_P) cli
@: > cli/$(am__dirstamp)
cli/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) cli/$(DEPDIR)
@: > cli/$(DEPDIR)/$(am__dirstamp)
cli/libcork_la-commands.lo: cli/$(am__dirstamp) \
cli/$(DEPDIR)/$(am__dirstamp)
core/$(am__dirstamp):
@$(MKDIR_P) core
@: > core/$(am__dirstamp)
core/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) core/$(DEPDIR)
@: > core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-allocator.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-error.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-gc.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-hash.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-ip-address.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-mempool.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-timestamp.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
core/libcork_la-u128.lo: core/$(am__dirstamp) \
core/$(DEPDIR)/$(am__dirstamp)
ds/$(am__dirstamp):
@$(MKDIR_P) ds
@: > ds/$(am__dirstamp)
ds/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) ds/$(DEPDIR)
@: > ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-array.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-bitset.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-buffer.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-dllist.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-file-stream.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-hash-table.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-managed-buffer.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-ring-buffer.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
ds/libcork_la-slice.lo: ds/$(am__dirstamp) \
ds/$(DEPDIR)/$(am__dirstamp)
posix/$(am__dirstamp):
@$(MKDIR_P) posix
@: > posix/$(am__dirstamp)
posix/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) posix/$(DEPDIR)
@: > posix/$(DEPDIR)/$(am__dirstamp)
posix/libcork_la-directory-walker.lo: posix/$(am__dirstamp) \
posix/$(DEPDIR)/$(am__dirstamp)
posix/libcork_la-env.lo: posix/$(am__dirstamp) \
posix/$(DEPDIR)/$(am__dirstamp)
posix/libcork_la-exec.lo: posix/$(am__dirstamp) \
posix/$(DEPDIR)/$(am__dirstamp)
posix/libcork_la-files.lo: posix/$(am__dirstamp) \
posix/$(DEPDIR)/$(am__dirstamp)
posix/libcork_la-process.lo: posix/$(am__dirstamp) \
posix/$(DEPDIR)/$(am__dirstamp)
posix/libcork_la-subprocess.lo: posix/$(am__dirstamp) \
posix/$(DEPDIR)/$(am__dirstamp)
pthreads/$(am__dirstamp):
@$(MKDIR_P) pthreads
@: > pthreads/$(am__dirstamp)
pthreads/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) pthreads/$(DEPDIR)
@: > pthreads/$(DEPDIR)/$(am__dirstamp)
pthreads/libcork_la-thread.lo: pthreads/$(am__dirstamp) \
pthreads/$(DEPDIR)/$(am__dirstamp)
libcork.la: $(libcork_la_OBJECTS) $(libcork_la_DEPENDENCIES) $(EXTRA_libcork_la_DEPENDENCIES)
$(AM_V_CCLD)$(libcork_la_LINK) $(libcork_la_OBJECTS) $(libcork_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f cli/*.$(OBJEXT)
-rm -f cli/*.lo
-rm -f core/*.$(OBJEXT)
-rm -f core/*.lo
-rm -f ds/*.$(OBJEXT)
-rm -f ds/*.lo
-rm -f posix/*.$(OBJEXT)
-rm -f posix/*.lo
-rm -f pthreads/*.$(OBJEXT)
-rm -f pthreads/*.lo
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@cli/$(DEPDIR)/libcork_la-commands.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-allocator.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-error.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-gc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-hash.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-ip-address.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-mempool.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-timestamp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@core/$(DEPDIR)/libcork_la-u128.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-array.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-bitset.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-buffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-dllist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-file-stream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-hash-table.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-managed-buffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-ring-buffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ds/$(DEPDIR)/libcork_la-slice.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@posix/$(DEPDIR)/libcork_la-directory-walker.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@posix/$(DEPDIR)/libcork_la-env.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@posix/$(DEPDIR)/libcork_la-exec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@posix/$(DEPDIR)/libcork_la-files.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@posix/$(DEPDIR)/libcork_la-process.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@posix/$(DEPDIR)/libcork_la-subprocess.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@pthreads/$(DEPDIR)/libcork_la-thread.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
cli/libcork_la-commands.lo: cli/commands.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT cli/libcork_la-commands.lo -MD -MP -MF cli/$(DEPDIR)/libcork_la-commands.Tpo -c -o cli/libcork_la-commands.lo `test -f 'cli/commands.c' || echo '$(srcdir)/'`cli/commands.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cli/$(DEPDIR)/libcork_la-commands.Tpo cli/$(DEPDIR)/libcork_la-commands.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cli/commands.c' object='cli/libcork_la-commands.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o cli/libcork_la-commands.lo `test -f 'cli/commands.c' || echo '$(srcdir)/'`cli/commands.c
core/libcork_la-allocator.lo: core/allocator.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-allocator.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-allocator.Tpo -c -o core/libcork_la-allocator.lo `test -f 'core/allocator.c' || echo '$(srcdir)/'`core/allocator.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-allocator.Tpo core/$(DEPDIR)/libcork_la-allocator.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/allocator.c' object='core/libcork_la-allocator.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-allocator.lo `test -f 'core/allocator.c' || echo '$(srcdir)/'`core/allocator.c
core/libcork_la-error.lo: core/error.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-error.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-error.Tpo -c -o core/libcork_la-error.lo `test -f 'core/error.c' || echo '$(srcdir)/'`core/error.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-error.Tpo core/$(DEPDIR)/libcork_la-error.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/error.c' object='core/libcork_la-error.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-error.lo `test -f 'core/error.c' || echo '$(srcdir)/'`core/error.c
core/libcork_la-gc.lo: core/gc.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-gc.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-gc.Tpo -c -o core/libcork_la-gc.lo `test -f 'core/gc.c' || echo '$(srcdir)/'`core/gc.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-gc.Tpo core/$(DEPDIR)/libcork_la-gc.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/gc.c' object='core/libcork_la-gc.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-gc.lo `test -f 'core/gc.c' || echo '$(srcdir)/'`core/gc.c
core/libcork_la-hash.lo: core/hash.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-hash.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-hash.Tpo -c -o core/libcork_la-hash.lo `test -f 'core/hash.c' || echo '$(srcdir)/'`core/hash.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-hash.Tpo core/$(DEPDIR)/libcork_la-hash.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/hash.c' object='core/libcork_la-hash.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-hash.lo `test -f 'core/hash.c' || echo '$(srcdir)/'`core/hash.c
core/libcork_la-ip-address.lo: core/ip-address.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-ip-address.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-ip-address.Tpo -c -o core/libcork_la-ip-address.lo `test -f 'core/ip-address.c' || echo '$(srcdir)/'`core/ip-address.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-ip-address.Tpo core/$(DEPDIR)/libcork_la-ip-address.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/ip-address.c' object='core/libcork_la-ip-address.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-ip-address.lo `test -f 'core/ip-address.c' || echo '$(srcdir)/'`core/ip-address.c
core/libcork_la-mempool.lo: core/mempool.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-mempool.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-mempool.Tpo -c -o core/libcork_la-mempool.lo `test -f 'core/mempool.c' || echo '$(srcdir)/'`core/mempool.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-mempool.Tpo core/$(DEPDIR)/libcork_la-mempool.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/mempool.c' object='core/libcork_la-mempool.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-mempool.lo `test -f 'core/mempool.c' || echo '$(srcdir)/'`core/mempool.c
core/libcork_la-timestamp.lo: core/timestamp.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-timestamp.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-timestamp.Tpo -c -o core/libcork_la-timestamp.lo `test -f 'core/timestamp.c' || echo '$(srcdir)/'`core/timestamp.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-timestamp.Tpo core/$(DEPDIR)/libcork_la-timestamp.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/timestamp.c' object='core/libcork_la-timestamp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-timestamp.lo `test -f 'core/timestamp.c' || echo '$(srcdir)/'`core/timestamp.c
core/libcork_la-u128.lo: core/u128.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT core/libcork_la-u128.lo -MD -MP -MF core/$(DEPDIR)/libcork_la-u128.Tpo -c -o core/libcork_la-u128.lo `test -f 'core/u128.c' || echo '$(srcdir)/'`core/u128.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) core/$(DEPDIR)/libcork_la-u128.Tpo core/$(DEPDIR)/libcork_la-u128.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core/u128.c' object='core/libcork_la-u128.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o core/libcork_la-u128.lo `test -f 'core/u128.c' || echo '$(srcdir)/'`core/u128.c
ds/libcork_la-array.lo: ds/array.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-array.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-array.Tpo -c -o ds/libcork_la-array.lo `test -f 'ds/array.c' || echo '$(srcdir)/'`ds/array.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-array.Tpo ds/$(DEPDIR)/libcork_la-array.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/array.c' object='ds/libcork_la-array.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-array.lo `test -f 'ds/array.c' || echo '$(srcdir)/'`ds/array.c
ds/libcork_la-bitset.lo: ds/bitset.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-bitset.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-bitset.Tpo -c -o ds/libcork_la-bitset.lo `test -f 'ds/bitset.c' || echo '$(srcdir)/'`ds/bitset.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-bitset.Tpo ds/$(DEPDIR)/libcork_la-bitset.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/bitset.c' object='ds/libcork_la-bitset.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-bitset.lo `test -f 'ds/bitset.c' || echo '$(srcdir)/'`ds/bitset.c
ds/libcork_la-buffer.lo: ds/buffer.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-buffer.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-buffer.Tpo -c -o ds/libcork_la-buffer.lo `test -f 'ds/buffer.c' || echo '$(srcdir)/'`ds/buffer.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-buffer.Tpo ds/$(DEPDIR)/libcork_la-buffer.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/buffer.c' object='ds/libcork_la-buffer.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-buffer.lo `test -f 'ds/buffer.c' || echo '$(srcdir)/'`ds/buffer.c
ds/libcork_la-dllist.lo: ds/dllist.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-dllist.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-dllist.Tpo -c -o ds/libcork_la-dllist.lo `test -f 'ds/dllist.c' || echo '$(srcdir)/'`ds/dllist.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-dllist.Tpo ds/$(DEPDIR)/libcork_la-dllist.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/dllist.c' object='ds/libcork_la-dllist.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-dllist.lo `test -f 'ds/dllist.c' || echo '$(srcdir)/'`ds/dllist.c
ds/libcork_la-file-stream.lo: ds/file-stream.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-file-stream.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-file-stream.Tpo -c -o ds/libcork_la-file-stream.lo `test -f 'ds/file-stream.c' || echo '$(srcdir)/'`ds/file-stream.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-file-stream.Tpo ds/$(DEPDIR)/libcork_la-file-stream.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/file-stream.c' object='ds/libcork_la-file-stream.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-file-stream.lo `test -f 'ds/file-stream.c' || echo '$(srcdir)/'`ds/file-stream.c
ds/libcork_la-hash-table.lo: ds/hash-table.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-hash-table.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-hash-table.Tpo -c -o ds/libcork_la-hash-table.lo `test -f 'ds/hash-table.c' || echo '$(srcdir)/'`ds/hash-table.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-hash-table.Tpo ds/$(DEPDIR)/libcork_la-hash-table.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/hash-table.c' object='ds/libcork_la-hash-table.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-hash-table.lo `test -f 'ds/hash-table.c' || echo '$(srcdir)/'`ds/hash-table.c
ds/libcork_la-managed-buffer.lo: ds/managed-buffer.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-managed-buffer.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-managed-buffer.Tpo -c -o ds/libcork_la-managed-buffer.lo `test -f 'ds/managed-buffer.c' || echo '$(srcdir)/'`ds/managed-buffer.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-managed-buffer.Tpo ds/$(DEPDIR)/libcork_la-managed-buffer.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/managed-buffer.c' object='ds/libcork_la-managed-buffer.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-managed-buffer.lo `test -f 'ds/managed-buffer.c' || echo '$(srcdir)/'`ds/managed-buffer.c
ds/libcork_la-ring-buffer.lo: ds/ring-buffer.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-ring-buffer.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-ring-buffer.Tpo -c -o ds/libcork_la-ring-buffer.lo `test -f 'ds/ring-buffer.c' || echo '$(srcdir)/'`ds/ring-buffer.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-ring-buffer.Tpo ds/$(DEPDIR)/libcork_la-ring-buffer.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/ring-buffer.c' object='ds/libcork_la-ring-buffer.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-ring-buffer.lo `test -f 'ds/ring-buffer.c' || echo '$(srcdir)/'`ds/ring-buffer.c
ds/libcork_la-slice.lo: ds/slice.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT ds/libcork_la-slice.lo -MD -MP -MF ds/$(DEPDIR)/libcork_la-slice.Tpo -c -o ds/libcork_la-slice.lo `test -f 'ds/slice.c' || echo '$(srcdir)/'`ds/slice.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ds/$(DEPDIR)/libcork_la-slice.Tpo ds/$(DEPDIR)/libcork_la-slice.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ds/slice.c' object='ds/libcork_la-slice.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o ds/libcork_la-slice.lo `test -f 'ds/slice.c' || echo '$(srcdir)/'`ds/slice.c
posix/libcork_la-directory-walker.lo: posix/directory-walker.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT posix/libcork_la-directory-walker.lo -MD -MP -MF posix/$(DEPDIR)/libcork_la-directory-walker.Tpo -c -o posix/libcork_la-directory-walker.lo `test -f 'posix/directory-walker.c' || echo '$(srcdir)/'`posix/directory-walker.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) posix/$(DEPDIR)/libcork_la-directory-walker.Tpo posix/$(DEPDIR)/libcork_la-directory-walker.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='posix/directory-walker.c' object='posix/libcork_la-directory-walker.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o posix/libcork_la-directory-walker.lo `test -f 'posix/directory-walker.c' || echo '$(srcdir)/'`posix/directory-walker.c
posix/libcork_la-env.lo: posix/env.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT posix/libcork_la-env.lo -MD -MP -MF posix/$(DEPDIR)/libcork_la-env.Tpo -c -o posix/libcork_la-env.lo `test -f 'posix/env.c' || echo '$(srcdir)/'`posix/env.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) posix/$(DEPDIR)/libcork_la-env.Tpo posix/$(DEPDIR)/libcork_la-env.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='posix/env.c' object='posix/libcork_la-env.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o posix/libcork_la-env.lo `test -f 'posix/env.c' || echo '$(srcdir)/'`posix/env.c
posix/libcork_la-exec.lo: posix/exec.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT posix/libcork_la-exec.lo -MD -MP -MF posix/$(DEPDIR)/libcork_la-exec.Tpo -c -o posix/libcork_la-exec.lo `test -f 'posix/exec.c' || echo '$(srcdir)/'`posix/exec.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) posix/$(DEPDIR)/libcork_la-exec.Tpo posix/$(DEPDIR)/libcork_la-exec.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='posix/exec.c' object='posix/libcork_la-exec.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o posix/libcork_la-exec.lo `test -f 'posix/exec.c' || echo '$(srcdir)/'`posix/exec.c
posix/libcork_la-files.lo: posix/files.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT posix/libcork_la-files.lo -MD -MP -MF posix/$(DEPDIR)/libcork_la-files.Tpo -c -o posix/libcork_la-files.lo `test -f 'posix/files.c' || echo '$(srcdir)/'`posix/files.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) posix/$(DEPDIR)/libcork_la-files.Tpo posix/$(DEPDIR)/libcork_la-files.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='posix/files.c' object='posix/libcork_la-files.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o posix/libcork_la-files.lo `test -f 'posix/files.c' || echo '$(srcdir)/'`posix/files.c
posix/libcork_la-process.lo: posix/process.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT posix/libcork_la-process.lo -MD -MP -MF posix/$(DEPDIR)/libcork_la-process.Tpo -c -o posix/libcork_la-process.lo `test -f 'posix/process.c' || echo '$(srcdir)/'`posix/process.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) posix/$(DEPDIR)/libcork_la-process.Tpo posix/$(DEPDIR)/libcork_la-process.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='posix/process.c' object='posix/libcork_la-process.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o posix/libcork_la-process.lo `test -f 'posix/process.c' || echo '$(srcdir)/'`posix/process.c
posix/libcork_la-subprocess.lo: posix/subprocess.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT posix/libcork_la-subprocess.lo -MD -MP -MF posix/$(DEPDIR)/libcork_la-subprocess.Tpo -c -o posix/libcork_la-subprocess.lo `test -f 'posix/subprocess.c' || echo '$(srcdir)/'`posix/subprocess.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) posix/$(DEPDIR)/libcork_la-subprocess.Tpo posix/$(DEPDIR)/libcork_la-subprocess.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='posix/subprocess.c' object='posix/libcork_la-subprocess.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o posix/libcork_la-subprocess.lo `test -f 'posix/subprocess.c' || echo '$(srcdir)/'`posix/subprocess.c
pthreads/libcork_la-thread.lo: pthreads/thread.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -MT pthreads/libcork_la-thread.lo -MD -MP -MF pthreads/$(DEPDIR)/libcork_la-thread.Tpo -c -o pthreads/libcork_la-thread.lo `test -f 'pthreads/thread.c' || echo '$(srcdir)/'`pthreads/thread.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) pthreads/$(DEPDIR)/libcork_la-thread.Tpo pthreads/$(DEPDIR)/libcork_la-thread.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pthreads/thread.c' object='pthreads/libcork_la-thread.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcork_la_CFLAGS) $(CFLAGS) -c -o pthreads/libcork_la-thread.lo `test -f 'pthreads/thread.c' || echo '$(srcdir)/'`pthreads/thread.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-rm -rf cli/.libs cli/_libs
-rm -rf core/.libs core/_libs
-rm -rf ds/.libs ds/_libs
-rm -rf posix/.libs posix/_libs
-rm -rf pthreads/.libs pthreads/_libs
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-rm -f cli/$(DEPDIR)/$(am__dirstamp)
-rm -f cli/$(am__dirstamp)
-rm -f core/$(DEPDIR)/$(am__dirstamp)
-rm -f core/$(am__dirstamp)
-rm -f ds/$(DEPDIR)/$(am__dirstamp)
-rm -f ds/$(am__dirstamp)
-rm -f posix/$(DEPDIR)/$(am__dirstamp)
-rm -f posix/$(am__dirstamp)
-rm -f pthreads/$(DEPDIR)/$(am__dirstamp)
-rm -f pthreads/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf cli/$(DEPDIR) core/$(DEPDIR) ds/$(DEPDIR) posix/$(DEPDIR) pthreads/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf cli/$(DEPDIR) core/$(DEPDIR) ds/$(DEPDIR) posix/$(DEPDIR) pthreads/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
@@ -0,0 +1,65 @@
# libcork
So what is libcork, exactly? It's a “simple, easily embeddable,
cross-platform C library”. It falls roughly into the same category as
[glib](http://library.gnome.org/devel/glib/) or
[APR](http://apr.apache.org/) in the C world; the STL,
[POCO](http://pocoproject.org/), or [QtCore](http://qt.nokia.com/)
in the C++ world; or the standard libraries of any decent dynamic
language.
So if libcork has all of these comparables, why a new library? Well,
none of the C++ options are really applicable here. And none of the C
options work, because one of the main goals is to have the library be
highly modular, and useful in resource-constrained systems. Once we
describe some of the design decisions that we've made in libcork, you'll
hopefully see how this fits into an interesting niche of its own.
## Using libcork
There are two primary ways to use libcork in your own software project:
as a _shared library_, or _embedded_.
When you use libcork as a shared library, you install it just like you
would any other C library. We happen to use CMake as our build system,
so you follow the usual CMake recipe to install the library. (See the
[INSTALL](INSTALL) file for details.) All of the libcork code is
contained within a single shared library (called libcork.so,
libcork.dylib, or cork.dll, depending on the system). We also install a
pkg-config file that makes it easy to add the appropriate compiler flags
in your own build scripts. So, you use pkg-config to find libcork's
include and library files, link with libcork, and you're good to go.
The alternative is to embed libcork into your own software project's
directory structure. In this case, your build scripts compile the
libcork source along with the rest of your code. This has some
advantages for resource-constrained systems, since (assuming your
compiler and linker are any good), you only include the libcork routines
that you actually use. And if your toolchain supports link-time
optimization, the libcork routines can be optimized into the rest of
your code.
Which should you use? That's really up to you. Linking against the
shared library adds a runtime dependency, but gives you the usual
benefits of shared libraries: the library in memory is shared across
each program that uses it; you can install a single bug-fix update and
all libcork programs automatically take advantage of the new release;
etc. The embedding option is great if you really need to make your
library as small as possible, or if you don't want to add that runtime
dependency.
## Design decisions
Note that having libcork be **easily** embeddable has some ramifications
on the library's design. In particular, we don't want to make any
assumptions about which build system you're embedding libcork into. We
happen to use CMake, but you might be using autotools, waf, scons, or
any number of others. Most cross-platform libraries follow the
autotools model of performing some checks at compile time (maybe during
a separate “configure” phase, maybe not) to choose the right API
implementation for the current platform. Since we can't assume a build
system, we have to take a different approach, and do as many checks as
we can using the C preprocessor. Any check that we can't make in the
preprocessor has to be driven by a C preprocessor macro definition,
which you (the libcork user) are responsible for checking for and
defining. So we need to have as few of those as possible.
@@ -0,0 +1,225 @@
/* -*- coding: utf-8 -*-
* ----------------------------------------------------------------------
* Copyright © 2012, RedJack, LLC.
* All rights reserved.
*
* Please see the COPYING file in this distribution for license
* details.
* ----------------------------------------------------------------------
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libcork/cli.h"
#include "libcork/core.h"
#include "libcork/ds.h"
#define streq(a,b) (strcmp((a), (b)) == 0)
static struct cork_buffer breadcrumbs_buf = CORK_BUFFER_INIT();
static void
cork_command_add_breadcrumb(struct cork_command *command)
{
cork_buffer_append_printf(&breadcrumbs_buf, " %s", command->name);
}
#define cork_command_breadcrumbs() ((char *) breadcrumbs_buf.buf)
static void
cork_command_run(struct cork_command *command, int argc, char **argv);
static struct cork_command *
cork_command_set_get_subcommand(struct cork_command *command,
const char *command_name)
{
struct cork_command **curr;
for (curr = command->set; *curr != NULL; curr++) {
if (streq(command_name, (*curr)->name)) {
return *curr;
}
}
return NULL;
}
static void
cork_command_set_show_help(struct cork_command *command)
{
size_t max_length = 0;
struct cork_command **curr;
/* Calculate the length of the longest command name. */
for (curr = command->set; *curr != NULL; curr++) {
size_t len = strlen((*curr)->name);
if (len > max_length) {
max_length = len;
}
}
/* Then print out the available commands. */
printf("Usage:%s <command> [<options>]\n"
"\nAvailable commands:\n",
cork_command_breadcrumbs());
for (curr = command->set; *curr != NULL; curr++) {
printf(" %*s", (int) -max_length, (*curr)->name);
if ((*curr)->short_desc != NULL) {
printf(" %s\n", (*curr)->short_desc);
} else {
printf("\n");
}
}
}
static void
cork_command_leaf_show_help(struct cork_command *command)
{
printf("Usage:%s", cork_command_breadcrumbs());
if (command->usage_suffix != NULL) {
printf(" %s", command->usage_suffix);
}
if (command->full_help != NULL) {
printf("\n\n%s", command->full_help);
} else {
printf("\n");
}
}
void
cork_command_show_help(struct cork_command *command, const char *message)
{
if (message != NULL) {
printf("%s\n", message);
}
if (command->type == CORK_COMMAND_SET) {
cork_command_set_show_help(command);
} else if (command->type == CORK_LEAF_COMMAND) {
cork_command_leaf_show_help(command);
}
}
static void
cork_command_set_run_help(struct cork_command *command, int argc, char **argv)
{
/* When we see the help command when processing a command set, we use any
* remaining arguments to identifity which subcommand the user wants help
* with. */
/* Skip over the name of the command set */
argc--;
argv++;
while (argc > 0 && command->type == CORK_COMMAND_SET) {
struct cork_command *subcommand =
cork_command_set_get_subcommand(command, argv[0]);
if (subcommand == NULL) {
printf("Unknown command \"%s\".\n"
"Usage:%s <command> [<options>]\n",
argv[0], cork_command_breadcrumbs());
exit(EXIT_FAILURE);
}
cork_command_add_breadcrumb(subcommand);
command = subcommand;
argc--;
argv++;
}
cork_command_show_help(command, NULL);
}
static void
cork_command_set_run(struct cork_command *command, int argc, char **argv)
{
const char *command_name;
struct cork_command *subcommand;
if (argc == 0) {
printf("No command given.\n");
cork_command_set_show_help(command);
exit(EXIT_FAILURE);
}
command_name = argv[0];
/* The "help" command is special. */
if (streq(command_name, "help")) {
cork_command_set_run_help(command, argc, argv);
return;
}
/* Otherwise look for a real subcommand with this name. */
subcommand = cork_command_set_get_subcommand(command, command_name);
if (subcommand == NULL) {
printf("Unknown command \"%s\".\n"
"Usage:%s <command> [<options>]\n",
command_name, cork_command_breadcrumbs());
exit(EXIT_FAILURE);
} else {
cork_command_run(subcommand, argc, argv);
}
}
static void
cork_command_leaf_run(struct cork_command *command, int argc, char **argv)
{
command->run(argc, argv);
}
static void
cork_command_cleanup(void)
{
cork_buffer_done(&breadcrumbs_buf);
}
static void
cork_command_run(struct cork_command *command, int argc, char **argv)
{
cork_command_add_breadcrumb(command);
/* If the gives the --help option at this point, describe the current
* command. */
if (argc >= 2 && (streq(argv[1], "--help") || streq(argv[1], "-h"))) {
cork_command_show_help(command, NULL);
return;
}
/* Otherwise let the command parse any options that occur here. */
if (command->parse_options != NULL) {
int option_count = command->parse_options(argc, argv);
argc -= option_count;
argv += option_count;
} else {
argc--;
argv++;
}
switch (command->type) {
case CORK_COMMAND_SET:
cork_command_set_run(command, argc, argv);
return;
case CORK_LEAF_COMMAND:
cork_command_leaf_run(command, argc, argv);
return;
default:
cork_unreachable();
}
}
int
cork_command_main(struct cork_command *root, int argc, char **argv)
{
/* Clean up after ourselves when the command finishes. */
atexit(cork_command_cleanup);
/* Run the root command. */
cork_command_run(root, argc, argv);
return EXIT_SUCCESS;
}
@@ -0,0 +1,72 @@
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright © 2015, RedJack, LLC.
# All rights reserved.
#
# Please see the COPYING file in this distribution for license details.
# ----------------------------------------------------------------------
#-----------------------------------------------------------------------
# Library, with options to build both shared and static versions
function(target_add_static_libraries TARGET_NAME LIBRARIES LOCAL_LIBRARIES)
foreach(lib ${LIBRARIES})
string(REPLACE "-" "_" lib ${lib})
string(TOUPPER ${lib} upperlib)
target_link_libraries(
${TARGET_NAME}
${${upperlib}_STATIC_LDFLAGS}
)
endforeach(lib)
foreach(lib ${LOCAL_LIBRARIES})
target_link_libraries(${TARGET_NAME} ${lib})
endforeach(lib)
endfunction(target_add_static_libraries)
set_property(GLOBAL PROPERTY ALL_LOCAL_LIBRARIES "")
function(add_c_library __TARGET_NAME)
set(options)
set(one_args OUTPUT_NAME PKGCONFIG_NAME VERSION)
set(multi_args LIBRARIES LOCAL_LIBRARIES SOURCES)
cmake_parse_arguments(_ "${options}" "${one_args}" "${multi_args}" ${ARGN})
if (__VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-dev)?$")
set(__VERSION_CURRENT "${CMAKE_MATCH_1}")
set(__VERSION_REVISION "${CMAKE_MATCH_2}")
set(__VERSION_AGE "${CMAKE_MATCH_3}")
else (__VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-dev)?$")
message(FATAL_ERROR "Invalid library version number: ${__VERSION}")
endif (__VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-dev)?$")
math(EXPR __SOVERSION "${__VERSION_CURRENT} - ${__VERSION_AGE}")
get_property(ALL_LOCAL_LIBRARIES GLOBAL PROPERTY ALL_LOCAL_LIBRARIES)
list(APPEND ALL_LOCAL_LIBRARIES ${__TARGET_NAME})
set_property(GLOBAL PROPERTY ALL_LOCAL_LIBRARIES "${ALL_LOCAL_LIBRARIES}")
include_directories(
${PROJECT_SOURCE_DIR}/include
${PROJECT_BINARY_DIR}/include
)
add_library(${__TARGET_NAME} STATIC ${__SOURCES})
set_target_properties(
${__TARGET_NAME} PROPERTIES
OUTPUT_NAME ${__OUTPUT_NAME}
CLEAN_DIRECT_OUTPUT 1
)
target_include_directories(
${__TARGET_NAME} PUBLIC
${CMAKE_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/include
)
target_add_static_libraries(
${__TARGET_NAME}
"${__LIBRARIES}"
"${__LOCAL_LIBRARIES}"
)
endfunction(add_c_library)
@@ -0,0 +1,421 @@
/* -*- coding: utf-8 -*-
* ----------------------------------------------------------------------
* Copyright © 2011-2014, RedJack, LLC.
* All rights reserved.
*
* Please see the COPYING file in this distribution for license details.
* ----------------------------------------------------------------------
*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "libcork/core/allocator.h"
#include "libcork/core/attributes.h"
#include "libcork/core/error.h"
#include "libcork/core/types.h"
#include "libcork/os/process.h"
/*-----------------------------------------------------------------------
* Allocator interface
*/
struct cork_alloc_priv {
struct cork_alloc public;
struct cork_alloc_priv *next;
};
static void *
cork_alloc__default_calloc(const struct cork_alloc *alloc,
size_t count, size_t size)
{
void *result = cork_alloc_xcalloc(alloc, count, size);
if (CORK_UNLIKELY(result == NULL)) {
abort();
}
return result;
}
static void *
cork_alloc__default_malloc(const struct cork_alloc *alloc, size_t size)
{
void *result = cork_alloc_xmalloc(alloc, size);
if (CORK_UNLIKELY(result == NULL)) {
abort();
}
return result;
}
static void *
cork_alloc__default_realloc(const struct cork_alloc *alloc, void *ptr,
size_t old_size, size_t new_size)
{
void *result = cork_alloc_xrealloc(alloc, ptr, old_size, new_size);
if (CORK_UNLIKELY(result == NULL)) {
abort();
}
return result;
}
static void *
cork_alloc__default_xcalloc(const struct cork_alloc *alloc,
size_t count, size_t size)
{
void *result;
assert(count < (SIZE_MAX / size));
result = cork_alloc_xmalloc(alloc, count * size);
if (result != NULL) {
memset(result, 0, count * size);
}
return result;
}
static void *
cork_alloc__default_xmalloc(const struct cork_alloc *alloc, size_t size)
{
cork_abort("%s isn't defined", "cork_alloc:xmalloc");
}
static void *
cork_alloc__default_xrealloc(const struct cork_alloc *alloc, void *ptr,
size_t old_size, size_t new_size)
{
void *result = cork_alloc_xmalloc(alloc, new_size);
if (CORK_LIKELY(result != NULL) && ptr != NULL) {
size_t min_size = (new_size < old_size)? new_size: old_size;
memcpy(result, ptr, min_size);
cork_alloc_free(alloc, ptr, old_size);
}
return result;
}
static void
cork_alloc__default_free(const struct cork_alloc *alloc, void *ptr, size_t size)
{
cork_abort("%s isn't defined", "cork_alloc:free");
}
static bool cleanup_registered = false;
static struct cork_alloc_priv *all_allocs = NULL;
static void
cork_alloc_free_alloc(struct cork_alloc_priv *alloc)
{
cork_free_user_data(&alloc->public);
cork_alloc_delete(alloc->public.parent, struct cork_alloc_priv, alloc);
}
static void
cork_alloc_free_all(void)
{
struct cork_alloc_priv *curr;
struct cork_alloc_priv *next;
for (curr = all_allocs; curr != NULL; curr = next) {
next = curr->next;
cork_alloc_free_alloc(curr);
}
}
static void
cork_alloc_register_cleanup(void)
{
if (CORK_UNLIKELY(!cleanup_registered)) {
/* We don't use cork_cleanup because that requires the allocators to
* have already been set up! (atexit calls its functions in reverse
* order, and this one will be registered before cork_cleanup's, which
* makes it safe for cork_cleanup functions to still use the allocator,
* since the allocator atexit function will be called last.) */
atexit(cork_alloc_free_all);
cleanup_registered = true;
}
}
struct cork_alloc *
cork_alloc_new_alloc(const struct cork_alloc *parent)
{
struct cork_alloc_priv *alloc =
cork_alloc_new(parent, struct cork_alloc_priv);
alloc->public.parent = parent;
alloc->public.user_data = NULL;
alloc->public.free_user_data = NULL;
alloc->public.calloc = cork_alloc__default_calloc;
alloc->public.malloc = cork_alloc__default_malloc;
alloc->public.realloc = cork_alloc__default_realloc;
alloc->public.xcalloc = cork_alloc__default_xcalloc;
alloc->public.xmalloc = cork_alloc__default_xmalloc;
alloc->public.xrealloc = cork_alloc__default_xrealloc;
alloc->public.free = cork_alloc__default_free;
cork_alloc_register_cleanup();
alloc->next = all_allocs;
all_allocs = alloc;
return &alloc->public;
}
void
cork_alloc_set_user_data(struct cork_alloc *alloc,
void *user_data, cork_free_f free_user_data)
{
cork_free_user_data(alloc);
alloc->user_data = user_data;
alloc->free_user_data = free_user_data;
}
void
cork_alloc_set_calloc(struct cork_alloc *alloc, cork_alloc_calloc_f calloc)
{
alloc->calloc = calloc;
}
void
cork_alloc_set_malloc(struct cork_alloc *alloc, cork_alloc_malloc_f malloc)
{
alloc->malloc = malloc;
}
void
cork_alloc_set_realloc(struct cork_alloc *alloc, cork_alloc_realloc_f realloc)
{
alloc->realloc = realloc;
}
void
cork_alloc_set_xcalloc(struct cork_alloc *alloc, cork_alloc_calloc_f xcalloc)
{
alloc->xcalloc = xcalloc;
}
void
cork_alloc_set_xmalloc(struct cork_alloc *alloc, cork_alloc_malloc_f xmalloc)
{
alloc->xmalloc = xmalloc;
}
void
cork_alloc_set_xrealloc(struct cork_alloc *alloc,
cork_alloc_realloc_f xrealloc)
{
alloc->xrealloc = xrealloc;
}
void
cork_alloc_set_free(struct cork_alloc *alloc, cork_alloc_free_f free)
{
alloc->free = free;
}
/*-----------------------------------------------------------------------
* Allocating strings
*/
static inline const char *
strndup_internal(const struct cork_alloc *alloc,
const char *str, size_t len)
{
char *dest;
size_t allocated_size = len + sizeof(size_t) + 1;
size_t *new_str = cork_alloc_malloc(alloc, allocated_size);
*new_str = allocated_size;
dest = (char *) (void *) (new_str + 1);
memcpy(dest, str, len);
dest[len] = '\0';
return dest;
}
const char *
cork_alloc_strdup(const struct cork_alloc *alloc, const char *str)
{
return strndup_internal(alloc, str, strlen(str));
}
const char *
cork_alloc_strndup(const struct cork_alloc *alloc,
const char *str, size_t size)
{
return strndup_internal(alloc, str, size);
}
static inline const char *
xstrndup_internal(const struct cork_alloc *alloc,
const char *str, size_t len)
{
size_t allocated_size = len + sizeof(size_t) + 1;
size_t *new_str = cork_alloc_xmalloc(alloc, allocated_size);
if (CORK_UNLIKELY(new_str == NULL)) {
return NULL;
} else {
char *dest;
*new_str = allocated_size;
dest = (char *) (void *) (new_str + 1);
memcpy(dest, str, len);
dest[len] = '\0';
return dest;
}
}
const char *
cork_alloc_xstrdup(const struct cork_alloc *alloc, const char *str)
{
return xstrndup_internal(alloc, str, strlen(str));
}
const char *
cork_alloc_xstrndup(const struct cork_alloc *alloc,
const char *str, size_t size)
{
return xstrndup_internal(alloc, str, size);
}
void
cork_alloc_strfree(const struct cork_alloc *alloc, const char *str)
{
size_t *base = ((size_t *) str) - 1;
cork_alloc_free(alloc, base, *base);
}
/*-----------------------------------------------------------------------
* stdlib allocator
*/
static void *
cork_stdlib_alloc__calloc(const struct cork_alloc *alloc,
size_t count, size_t size)
{
void *result = calloc(count, size);
if (CORK_UNLIKELY(result == NULL)) {
abort();
}
return result;
}
static void *
cork_stdlib_alloc__malloc(const struct cork_alloc *alloc, size_t size)
{
void *result = malloc(size);
if (CORK_UNLIKELY(result == NULL)) {
abort();
}
return result;
}
static void *
cork_stdlib_alloc__realloc(const struct cork_alloc *alloc, void *ptr,
size_t old_size, size_t new_size)
{
/* Technically we don't really need to free `ptr` if the reallocation fails,
* since we'll abort the process immediately after. But my sense of
* cleanliness makes me do it anyway. */
#if CORK_HAVE_REALLOCF
void *result = reallocf(ptr, new_size);
if (result == NULL) {
abort();
}
return result;
#else
void *result = realloc(ptr, new_size);
if (result == NULL) {
free(ptr);
abort();
}
return result;
#endif
}
static void *
cork_stdlib_alloc__xcalloc(const struct cork_alloc *alloc,
size_t count, size_t size)
{
return calloc(count, size);
}
static void *
cork_stdlib_alloc__xmalloc(const struct cork_alloc *alloc, size_t size)
{
return malloc(size);
}
static void *
cork_stdlib_alloc__xrealloc(const struct cork_alloc *alloc, void *ptr,
size_t old_size, size_t new_size)
{
return realloc(ptr, new_size);
}
static void
cork_stdlib_alloc__free(const struct cork_alloc *alloc, void *ptr, size_t size)
{
free(ptr);
}
static const struct cork_alloc default_allocator = {
NULL,
NULL,
NULL,
cork_stdlib_alloc__calloc,
cork_stdlib_alloc__malloc,
cork_stdlib_alloc__realloc,
cork_stdlib_alloc__xcalloc,
cork_stdlib_alloc__xmalloc,
cork_stdlib_alloc__xrealloc,
cork_stdlib_alloc__free
};
/*-----------------------------------------------------------------------
* Customizing libcork's allocator
*/
const struct cork_alloc *cork_allocator = &default_allocator;
void
cork_set_allocator(const struct cork_alloc *alloc)
{
cork_allocator = alloc;
}
/*-----------------------------------------------------------------------
* Debugging allocator
*/
static void *
cork_debug_alloc__xmalloc(const struct cork_alloc *alloc, size_t size)
{
size_t real_size = size + sizeof(size_t);
size_t *base = cork_alloc_xmalloc(alloc->parent, real_size);
*base = size;
return base + 1;
}
static void
cork_debug_alloc__free(const struct cork_alloc *alloc, void *ptr,
size_t expected_size)
{
size_t *base = ((size_t *) ptr) - 1;
size_t actual_size = *base;
size_t real_size = actual_size + sizeof(size_t);
if (CORK_UNLIKELY(actual_size != expected_size)) {
cork_abort
("Incorrect size when freeing pointer (got %zu, expected %zu)",
expected_size, actual_size);
}
cork_alloc_free(alloc->parent, base, real_size);
}
struct cork_alloc *
cork_debug_alloc_new(const struct cork_alloc *parent)
{
struct cork_alloc *debug = cork_alloc_new_alloc(parent);
cork_alloc_set_xmalloc(debug, cork_debug_alloc__xmalloc);
cork_alloc_set_free(debug, cork_debug_alloc__free);
return debug;
}
+246
View File
@@ -0,0 +1,246 @@
/* -*- coding: utf-8 -*-
* ----------------------------------------------------------------------
* Copyright © 2011-2014, RedJack, LLC.
* All rights reserved.
*
* Please see the COPYING file in this distribution for license details.
* ----------------------------------------------------------------------
*/
#include <assert.h>
#include <errno.h>
#include <stdarg.h>
#include <string.h>
#include "libcork/config.h"
#include "libcork/core/allocator.h"
#include "libcork/core/error.h"
#include "libcork/ds/buffer.h"
#include "libcork/os/process.h"
#include "libcork/threads/basics.h"
/*-----------------------------------------------------------------------
* Life cycle
*/
struct cork_error {
cork_error code;
struct cork_buffer *message;
struct cork_buffer *other;
struct cork_buffer buf1;
struct cork_buffer buf2;
struct cork_error *next;
};
static struct cork_error *
cork_error_new(void)
{
struct cork_error *error = cork_new(struct cork_error);
error->code = CORK_ERROR_NONE;
cork_buffer_init(&error->buf1);
cork_buffer_init(&error->buf2);
error->message = &error->buf1;
error->other = &error->buf2;
return error;
}
static void
cork_error_free(struct cork_error *error)
{
cork_buffer_done(&error->buf1);
cork_buffer_done(&error->buf2);
cork_delete(struct cork_error, error);
}
static struct cork_error * volatile errors;
cork_once_barrier(cork_error_list);
static void
cork_error_list_done(void)
{
struct cork_error *curr;
struct cork_error *next;
for (curr = errors; curr != NULL; curr = next) {
next = curr->next;
cork_error_free(curr);
}
}
static void
cork_error_list_init(void)
{
cork_cleanup_at_exit(0, cork_error_list_done);
}
cork_tls(struct cork_error *, cork_error_);
static struct cork_error *
cork_error_get(void)
{
struct cork_error **error_ptr = cork_error__get();
if (CORK_UNLIKELY(*error_ptr == NULL)) {
struct cork_error *old_head;
struct cork_error *error = cork_error_new();
cork_once(cork_error_list, cork_error_list_init());
do {
old_head = errors;
error->next = old_head;
} while (cork_ptr_cas(&errors, old_head, error) != old_head);
*error_ptr = error;
return error;
} else {
return *error_ptr;
}
}
/*-----------------------------------------------------------------------
* Public error API
*/
bool
cork_error_occurred(void)
{
struct cork_error *error = cork_error_get();
return error->code != CORK_ERROR_NONE;
}
cork_error
cork_error_code(void)
{
struct cork_error *error = cork_error_get();
return error->code;
}
const char *
cork_error_message(void)
{
struct cork_error *error = cork_error_get();
return error->message->buf;
}
void
cork_error_clear(void)
{
struct cork_error *error = cork_error_get();
error->code = CORK_ERROR_NONE;
cork_buffer_clear(error->message);
}
void
cork_error_set_printf(cork_error code, const char *format, ...)
{
va_list args;
struct cork_error *error = cork_error_get();
error->code = code;
va_start(args, format);
cork_buffer_vprintf(error->message, format, args);
va_end(args);
}
void
cork_error_set_string(cork_error code, const char *str)
{
struct cork_error *error = cork_error_get();
error->code = code;
cork_buffer_set_string(error->message, str);
}
void
cork_error_set_vprintf(cork_error code, const char *format, va_list args)
{
struct cork_error *error = cork_error_get();
error->code = code;
cork_buffer_vprintf(error->message, format, args);
}
void
cork_error_prefix_printf(const char *format, ...)
{
va_list args;
struct cork_error *error = cork_error_get();
struct cork_buffer *temp;
va_start(args, format);
cork_buffer_vprintf(error->other, format, args);
va_end(args);
cork_buffer_append_copy(error->other, error->message);
temp = error->other;
error->other = error->message;
error->message = temp;
}
void
cork_error_prefix_string(const char *str)
{
struct cork_error *error = cork_error_get();
struct cork_buffer *temp;
cork_buffer_set_string(error->other, str);
cork_buffer_append_copy(error->other, error->message);
temp = error->other;
error->other = error->message;
error->message = temp;
}
void
cork_error_prefix_vprintf(const char *format, va_list args)
{
struct cork_error *error = cork_error_get();
struct cork_buffer *temp;
cork_buffer_vprintf(error->other, format, args);
cork_buffer_append_copy(error->other, error->message);
temp = error->other;
error->other = error->message;
error->message = temp;
}
/*-----------------------------------------------------------------------
* Deprecated
*/
void
cork_error_set(uint32_t error_class, unsigned int error_code,
const char *format, ...)
{
/* Create a fallback error code that's most likely not very useful. */
va_list args;
va_start(args, format);
cork_error_set_vprintf(error_class + error_code, format, args);
va_end(args);
}
void
cork_error_prefix(const char *format, ...)
{
va_list args;
va_start(args, format);
cork_error_prefix_vprintf(format, args);
va_end(args);
}
/*-----------------------------------------------------------------------
* Built-in errors
*/
void
cork_system_error_set_explicit(int err)
{
cork_error_set_string(err, strerror(err));
}
void
cork_system_error_set(void)
{
cork_error_set_string(errno, strerror(errno));
}
void
cork_unknown_error_set_(const char *location)
{
cork_error_set_printf(CORK_UNKNOWN_ERROR, "Unknown error in %s", location);
}
Loaded 100 of 734 files, more files were not shown because too many files have changed in this diff. Show more