diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 000000000..b0c5d0b49 --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,23 @@ +.PHONY: deps srpm +.DEFAULT_GOAL := srpm + +DOT_COPR := $(dir $(firstword $(MAKEFILE_LIST))) +TOP_DIR := $(realpath $(DOT_COPR)/../) + +RPM_DIR := $(TOP_DIR)/rpm +outdir ?= $(RPM_DIR)/SRPMS + +HAS_GIT := $(shell command -v git 2> /dev/null) +ifndef HAS_GIT +deps: + dnf -y install git +else +deps: +endif + +srpm: deps + git config --global --add safe.directory $(TOP_DIR) + git config --global --add safe.directory $(TOP_DIR)/libbloom + git config --global --add safe.directory $(TOP_DIR)/libcork + git config --global --add safe.directory $(TOP_DIR)/libipset + $(RPM_DIR)/genrpm.sh -o $(outdir) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..83f2dee61 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,27 @@ +# General +.dockerignore +.git +.gitmodules +.gitignore +.github +AUTHORS +Changes +COPYING +INSTALL +LICENSE +README.md + +# Code formatting +.uncrustify.cfg +code-format.bat +code-format.sh + +# CI & CD +.travis.yml +tests + +# OS-specific packaging, etc. +debian +scripts/build_deb.sh +rpm +completions diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..c175b15a9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: ['https://crowdfunding.lfx.linuxfoundation.org/projects/shadowsocks'] diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..909637159 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 000000000..d7efe753b --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,22 @@ +Please answer these questions before submitting your issue. Thanks! + +(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.) + +(PS, you can remove 3 lines above, including this one, before post your issue.) + +### What version of shadowsocks-libev are you using? + + +### What operating system are you using? + + +### What did you do? + + +### What did you expect to see? + + +### What did you see instead? + + +### What is your config in detail (with all sensitive info masked)? diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..bc10dee6b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,52 @@ +name: build + +on: + push: + push: + branches: + - master + tags: + - v* + - latest + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + submodules: true + + - uses: docker/setup-qemu-action@v1.1.0 + - uses: docker/setup-buildx-action@v1.3.0 + - uses: docker/login-action@v1.9.0 + with: + password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_USERNAME }} + + - name: check and set image version + id: prepare + run: | + case ${{ github.ref }} in + refs/heads/master) + echo ::set-output name=version::edge + echo ::set-output name=push::true + ;; + refs/tags/*) + echo ::set-output name=version::$(echo ${{ github.ref }} | sed -E 's|refs/tags/||') + echo ::set-output name=push::true + ;; + *) + echo ::set-output name=version::${{ github.sha }} + echo ::set-output name=push::false + ;; + esac; + + - name: build & push image + uses: docker/build-push-action@v2.4.0 + with: + context: . + file: docker/alpine/Dockerfile + platforms: linux/amd64,linux/arm64 + push: ${{ steps.prepare.outputs.push }} + tags: ${{ github.repository }}:${{ steps.prepare.outputs.version }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index e90f861eb..8ab417910 100644 --- a/.gitignore +++ b/.gitignore @@ -1,27 +1,58 @@ +# Ignore files generated by autoconf +/Makefile.in +/aclocal.m4 +/auto/ +/config.h.in +/configure +/doc/Makefile.in +/m4/libtool.m4 +/m4/ltoptions.m4 +/m4/ltsugar.m4 +/m4/ltversion.m4 +/m4/lt~obsolete.m4 +/src/Makefile.in +/src/config.h + +# Ignore files generated by configure build/ .deps/ /Makefile src/Makefile libev/Makefile -libasyncns/Makefile +libudns/Makefile libcork/Makefile libipset/Makefile +doc/Makefile autom4te.cache/ /config.h config.log config.status libtool pid -ss* +src/ss-* +!src/ss-nat stamp-h1 .libs .pc -debian/shadowsocks/ +debian/shadowsocks-libev/ debian/patches/ debian/files -debian/shadowsocks.substvars +debian/shadowsocks-libev.substvars debian/*.debhelper* .dirstamp +shadowsocks-libev.pc +debian/libshadowsocks-libev*.symbols +libsodium/src/libsodium/include/sodium/version.h +rpm/SPECS/shadowsocks-libev.spec +rpm/SRPMS/ +rpm/RPMS/ +rpm/BUILD/ +rpm/BUILDROOT/ +*.rpm +*.deb + +# Ignore per-project vim config +.vimrc # Ignore garbage of OS X *.DS_Store @@ -29,6 +60,13 @@ debian/*.debhelper* # Ignore vim cache *.swp +# Documentation files +doc/*.1 +doc/*.8 +doc/*.gz +doc/*.xml +doc/*.html + # Do not edit the following section # Edit Compile Debug Document Distribute *~ @@ -50,6 +88,13 @@ debian/*.debhelper* *.so *.pcf.gz *.pdb +*.tar *.tar.bz2 *.tar.gz +*.tgz +*.snap # + +# Visual Studio Code +.vscode/* +.devcontainer/* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..bf4d6cac0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "libcork"] + path = libcork + url = https://github.com/shadowsocks/libcork.git + ignore = dirty +[submodule "libipset"] + path = libipset + url = https://github.com/shadowsocks/ipset.git + ignore = dirty +[submodule "libbloom"] + path = libbloom + url = https://github.com/shadowsocks/libbloom.git + ignore = dirty diff --git a/.travis.yml b/.travis.yml index 711a59756..ee3424c2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,57 @@ +sudo: required language: c +dist : trusty compiler: - - gcc - clang -script: "sudo apt-get install libev-dev && ./configure && make" + - gcc +os: + - linux + - osx +env: + global: + - LIBSODIUM_VER=1.0.12 + - MBEDTLS_VER=2.4.0 +before_install: + - | + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + # All dependencies for macOS build. Some packages has been installed by travis so use reinstall. + brew reinstall autoconf automake xmlto c-ares libev mbedtls libsodium asciidoc >> /dev/null 2>&1; + else + wget https://github.com/jedisct1/libsodium/releases/download/$LIBSODIUM_VER/libsodium-$LIBSODIUM_VER.tar.gz; + tar xvf libsodium-$LIBSODIUM_VER.tar.gz; + pushd libsodium-$LIBSODIUM_VER; + ./configure --prefix=/usr && make; + sudo make install; + popd; + wget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz; + tar xvf mbedtls-$MBEDTLS_VER-gpl.tgz; + pushd mbedtls-$MBEDTLS_VER; + make SHARED=1; + sudo make install; + popd; + # Load cached docker images + if [[ -d $HOME/docker ]]; then + ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; + fi + fi +addons: + apt: + sources: + - george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3 + packages: + - libc-ares-dev + - libev-dev + - asciidoc + - xmlto +script: + - ./autogen.sh + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + ./configure --disable-documentation --with-mbedtls=/usr/local/opt/mbedtls --with-sodium=/usr/local/opt/libsodium; + else + ./configure; + fi + - make + - cd build && cmake ../ && make branches: only: - master diff --git a/.uncrustify.cfg b/.uncrustify.cfg new file mode 100644 index 000000000..a8c7d5111 --- /dev/null +++ b/.uncrustify.cfg @@ -0,0 +1,1376 @@ +# +# General options +# + +# The type of line endings +newlines = lf # auto/lf/crlf/cr + +# The original size of tabs in the input +input_tab_size = 8 # number + +# The size of tabs in the output (only used if align_with_tabs=true) +output_tab_size = 8 # number + +# The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn) +string_escape_char = 92 # number + +# Alternate string escape char for Pawn. Only works right before the quote char. +string_escape_char2 = 0 # number + +# +# Indenting +# + +# The number of columns to indent per level. +# Usually 2, 3, 4, or 8. +indent_columns = 4 # number + +# The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. +# For FreeBSD, this is set to 4. +indent_continue = 0 # number + +# How to use tabs when indenting code +# 0=spaces only +# 1=indent with tabs to brace level, align with spaces +# 2=indent and align with tabs, using spaces when not on a tabstop +indent_with_tabs = 0 # number + +# Comments that are not a brace level are indented with tabs on a tabstop. +# Requires indent_with_tabs=2. If false, will use spaces. +indent_cmt_with_tabs = false # false/true + +# Whether to indent strings broken by '\' so that they line up +indent_align_string = true # false/true + +# The number of spaces to indent multi-line XML strings. +# Requires indent_align_string=True +indent_xml_string = 0 # number + +# Spaces to indent '{' from level +indent_brace = 0 # number + +# Whether braces are indented to the body level +indent_braces = false # false/true + +# Disabled indenting function braces if indent_braces is true +indent_braces_no_func = false # false/true + +# Disabled indenting class braces if indent_braces is true +indent_braces_no_class = false # false/true + +# Disabled indenting struct braces if indent_braces is true +indent_braces_no_struct = false # false/true + +# Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. +indent_brace_parent = false # false/true + +# Whether the 'namespace' body is indented +indent_namespace = false # false/true + +# The number of spaces to indent a namespace block +indent_namespace_level = 0 # number + +# If the body of the namespace is longer than this number, it won't be indented. +# Requires indent_namespace=true. Default=0 (no limit) +indent_namespace_limit = 0 # number + +# Whether the 'extern "C"' body is indented +indent_extern = false # false/true + +# Whether the 'class' body is indented +indent_class = false # false/true + +# Whether to indent the stuff after a leading class colon +indent_class_colon = false # false/true + +# False=treat 'else\nif' as 'else if' for indenting purposes +# True=indent the 'if' one level +indent_else_if = false # false/true + +# Amount to indent variable declarations after a open brace. neg=relative, pos=absolute +indent_var_def_blk = 0 # number + +# Indent continued variable declarations instead of aligning. +indent_var_def_cont = false # false/true + +# True: indent continued function call parameters one indent level +# False: align parameters under the open paren +indent_func_call_param = false # false/true + +# Same as indent_func_call_param, but for function defs +indent_func_def_param = false # false/true + +# Same as indent_func_call_param, but for function protos +indent_func_proto_param = false # false/true + +# Same as indent_func_call_param, but for class declarations +indent_func_class_param = false # false/true + +# Same as indent_func_call_param, but for class variable constructors +indent_func_ctor_var_param = false # false/true + +# Same as indent_func_call_param, but for templates +indent_template_param = false # false/true + +# Double the indent for indent_func_xxx_param options +indent_func_param_double = false # false/true + +# Indentation column for standalone 'const' function decl/proto qualifier +indent_func_const = 0 # number + +# Indentation column for standalone 'throw' function decl/proto qualifier +indent_func_throw = 0 # number + +# The number of spaces to indent a continued '->' or '.' +# Usually set to 0, 1, or indent_columns. +indent_member = 0 # number + +# Spaces to indent single line ('//') comments on lines before code +indent_sing_line_comments = 0 # number + +# If set, will indent trailing single line ('//') comments relative +# to the code instead of trying to keep the same absolute column +indent_relative_single_line_comments = false # false/true + +# Spaces to indent 'case' from 'switch' +# Usually 0 or indent_columns. +indent_switch_case = 0 # number + +# Spaces to shift the 'case' line, without affecting any other lines +# Usually 0. +indent_case_shift = 0 # number + +# Spaces to indent '{' from 'case'. +# By default, the brace will appear under the 'c' in case. +# Usually set to 0 or indent_columns. +indent_case_brace = 0 # number + +# Whether to indent comments found in first column +indent_col1_comment = false # false/true + +# How to indent goto labels +# >0 : absolute column where 1 is the leftmost column +# <=0 : subtract from brace indent +indent_label = 1 # number + +# Same as indent_label, but for access specifiers that are followed by a colon +indent_access_spec = 1 # number + +# Indent the code after an access specifier by one level. +# If set, this option forces 'indent_access_spec=0' +indent_access_spec_body = false # false/true + +# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended) +indent_paren_nl = false # false/true + +# Controls the indent of a close paren after a newline. +# 0: Indent to body level +# 1: Align under the open paren +# 2: Indent to the brace level +indent_paren_close = 0 # number + +# Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren +indent_comma_paren = false # false/true + +# Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren +indent_bool_paren = false # false/true + +# If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones +indent_first_bool_expr = false # false/true + +# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended) +indent_square_nl = false # false/true + +# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies +indent_preserve_sql = false # false/true + +# Align continued statements at the '='. Default=True +# If FALSE or the '=' is followed by a newline, the next line is indent one tab. +indent_align_assign = true # false/true + +# +# Spacing options +# + +# Add or remove space around arithmetic operator '+', '-', '/', '*', etc +sp_arith = force # ignore/add/remove/force + +# Add or remove space around assignment operator '=', '+=', etc +sp_assign = force # ignore/add/remove/force + +# Add or remove space around assignment operator '=' in a prototype +sp_assign_default = ignore # ignore/add/remove/force + +# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign. +sp_before_assign = ignore # ignore/add/remove/force + +# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign. +sp_after_assign = ignore # ignore/add/remove/force + +# Add or remove space around assignment '=' in enum +sp_enum_assign = force # ignore/add/remove/force + +# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign. +sp_enum_before_assign = ignore # ignore/add/remove/force + +# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign. +sp_enum_after_assign = ignore # ignore/add/remove/force + +# Add or remove space around preprocessor '##' concatenation operator. Default=Add +sp_pp_concat = add # ignore/add/remove/force + +# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. Default=Add +sp_pp_stringify = add # ignore/add/remove/force + +# Add or remove space around boolean operators '&&' and '||' +sp_bool = force # ignore/add/remove/force + +# Add or remove space around compare operator '<', '>', '==', etc +sp_compare = force # ignore/add/remove/force + +# Add or remove space inside '(' and ')' +sp_inside_paren = remove # ignore/add/remove/force + +# Add or remove space between nested parens +sp_paren_paren = remove # ignore/add/remove/force + +# Whether to balance spaces inside nested parens +sp_balance_nested_parens = false # false/true + +# Add or remove space between ')' and '{' +sp_paren_brace = force # ignore/add/remove/force + +# Add or remove space before pointer star '*' +sp_before_ptr_star = add # ignore/add/remove/force + +# Add or remove space before pointer star '*' that isn't followed by a variable name +# If set to 'ignore', sp_before_ptr_star is used instead. +sp_before_unnamed_ptr_star = add # ignore/add/remove/force + +# Add or remove space between pointer stars '*' +sp_between_ptr_star = remove # ignore/add/remove/force + +# Add or remove space after pointer star '*', if followed by a word. +sp_after_ptr_star = remove # ignore/add/remove/force + +# Add or remove space after a pointer star '*', if followed by a func proto/def. +sp_after_ptr_star_func = remove # ignore/add/remove/force + +# Add or remove space before a pointer star '*', if followed by a func proto/def. +sp_before_ptr_star_func = ignore # ignore/add/remove/force + +# Add or remove space before a reference sign '&' +sp_before_byref = force # ignore/add/remove/force + +# Add or remove space before a reference sign '&' that isn't followed by a variable name +# If set to 'ignore', sp_before_byref is used instead. +sp_before_unnamed_byref = force # ignore/add/remove/force + +# Add or remove space after reference sign '&', if followed by a word. +sp_after_byref = ignore # ignore/add/remove/force + +# Add or remove space after a reference sign '&', if followed by a func proto/def. +sp_after_byref_func = ignore # ignore/add/remove/force + +# Add or remove space before a reference sign '&', if followed by a func proto/def. +sp_before_byref_func = ignore # ignore/add/remove/force + +# Add or remove space between type and word. Default=Force +sp_after_type = force # ignore/add/remove/force + +# Add or remove space in 'template <' vs 'template<'. +# If set to ignore, sp_before_angle is used. +sp_template_angle = ignore # ignore/add/remove/force + +# Add or remove space before '<>' +sp_before_angle = ignore # ignore/add/remove/force + +# Add or remove space inside '<' and '>' +sp_inside_angle = ignore # ignore/add/remove/force + +# Add or remove space after '<>' +sp_after_angle = ignore # ignore/add/remove/force + +# Add or remove space between '<>' and '(' as found in 'new List();' +sp_angle_paren = ignore # ignore/add/remove/force + +# Add or remove space between '<>' and a word as in 'List m;' +sp_angle_word = ignore # ignore/add/remove/force + +# Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add +sp_angle_shift = add # ignore/add/remove/force + +# Add or remove space before '(' of 'if', 'for', 'switch', and 'while' +sp_before_sparen = force # ignore/add/remove/force + +# Add or remove space inside if-condition '(' and ')' +sp_inside_sparen = remove # ignore/add/remove/force + +# Add or remove space before if-condition ')'. Overrides sp_inside_sparen. +sp_inside_sparen_close = ignore # ignore/add/remove/force + +# Add or remove space after ')' of 'if', 'for', 'switch', and 'while' +sp_after_sparen = ignore # ignore/add/remove/force + +# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while' +sp_sparen_brace = force # ignore/add/remove/force + +# Add or remove space between 'invariant' and '(' in the D language. +sp_invariant_paren = ignore # ignore/add/remove/force + +# Add or remove space after the ')' in 'invariant (C) c' in the D language. +sp_after_invariant_paren = ignore # ignore/add/remove/force + +# Add or remove space before empty statement ';' on 'if', 'for' and 'while' +sp_special_semi = ignore # ignore/add/remove/force + +# Add or remove space before ';'. Default=Remove +sp_before_semi = remove # ignore/add/remove/force + +# Add or remove space before ';' in non-empty 'for' statements +sp_before_semi_for = ignore # ignore/add/remove/force + +# Add or remove space before a semicolon of an empty part of a for statement. +sp_before_semi_for_empty = ignore # ignore/add/remove/force + +# Add or remove space after ';', except when followed by a comment. Default=Add +sp_after_semi = force # ignore/add/remove/force + +# Add or remove space after ';' in non-empty 'for' statements. Default=Force +sp_after_semi_for = force # ignore/add/remove/force + +# Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; ). +sp_after_semi_for_empty = remove # ignore/add/remove/force + +# Add or remove space before '[' (except '[]') +sp_before_square = remove # ignore/add/remove/force + +# Add or remove space before '[]' +sp_before_squares = ignore # ignore/add/remove/force + +# Add or remove space inside '[' and ']' +sp_inside_square = remove # ignore/add/remove/force + +# Add or remove space after ',' +sp_after_comma = force # ignore/add/remove/force + +# Add or remove space before ',' +sp_before_comma = remove # ignore/add/remove/force + +# Add or remove space between an open paren and comma: '(,' vs '( ,' +sp_paren_comma = force # ignore/add/remove/force + +# Add or remove space before the variadic '...' when preceded by a non-punctuator +sp_before_ellipsis = ignore # ignore/add/remove/force + +# Add or remove space after class ':' +sp_after_class_colon = ignore # ignore/add/remove/force + +# Add or remove space before class ':' +sp_before_class_colon = ignore # ignore/add/remove/force + +# Add or remove space before case ':'. Default=Remove +sp_before_case_colon = remove # ignore/add/remove/force + +# Add or remove space between 'operator' and operator sign +sp_after_operator = ignore # ignore/add/remove/force + +# Add or remove space between the operator symbol and the open paren, as in 'operator ++(' +sp_after_operator_sym = ignore # ignore/add/remove/force + +# Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a' +sp_after_cast = remove # ignore/add/remove/force + +# Add or remove spaces inside cast parens +sp_inside_paren_cast = remove # ignore/add/remove/force + +# Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)' +sp_cpp_cast_paren = ignore # ignore/add/remove/force + +# Add or remove space between 'sizeof' and '(' +sp_sizeof_paren = remove # ignore/add/remove/force + +# Add or remove space after the tag keyword (Pawn) +sp_after_tag = ignore # ignore/add/remove/force + +# Add or remove space inside enum '{' and '}' +sp_inside_braces_enum = remove # ignore/add/remove/force + +# Add or remove space inside struct/union '{' and '}' +sp_inside_braces_struct = force # ignore/add/remove/force + +# Add or remove space inside '{' and '}' +sp_inside_braces = force # ignore/add/remove/force + +# Add or remove space inside '{}' +sp_inside_braces_empty = remove # ignore/add/remove/force + +# Add or remove space between return type and function name +# A minimum of 1 is forced except for pointer return types. +sp_type_func = remove # ignore/add/remove/force + +# Add or remove space between function name and '(' on function declaration +sp_func_proto_paren = remove # ignore/add/remove/force + +# Add or remove space between function name and '(' on function definition +sp_func_def_paren = remove # ignore/add/remove/force + +# Add or remove space inside empty function '()' +sp_inside_fparens = remove # ignore/add/remove/force + +# Add or remove space inside function '(' and ')' +sp_inside_fparen = remove # ignore/add/remove/force + +# Add or remove space between ']' and '(' when part of a function call. +sp_square_fparen = ignore # ignore/add/remove/force + +# Add or remove space between ')' and '{' of function +sp_fparen_brace = ignore # ignore/add/remove/force + +# Add or remove space between function name and '(' on function calls +sp_func_call_paren = remove # ignore/add/remove/force + +# Add or remove space between function name and '()' on function calls without parameters. +# If set to 'ignore' (the default), sp_func_call_paren is used. +sp_func_call_paren_empty = ignore # ignore/add/remove/force + +# Add or remove space between the user function name and '(' on function calls +# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. +sp_func_call_user_paren = ignore # ignore/add/remove/force + +# Add or remove space between a constructor/destructor and the open paren +sp_func_class_paren = ignore # ignore/add/remove/force + +# Add or remove space between 'return' and '(' +sp_return_paren = ignore # ignore/add/remove/force + +# Add or remove space between '__attribute__' and '(' +sp_attribute_paren = remove # ignore/add/remove/force + +# Add or remove space between 'defined' and '(' in '#if defined (FOO)' +sp_defined_paren = ignore # ignore/add/remove/force + +# Add or remove space between 'throw' and '(' in 'throw (something)' +sp_throw_paren = ignore # ignore/add/remove/force + +# Add or remove space between macro and value +sp_macro = ignore # ignore/add/remove/force + +# Add or remove space between macro function ')' and value +sp_macro_func = ignore # ignore/add/remove/force + +# Add or remove space between 'else' and '{' if on the same line +sp_else_brace = force # ignore/add/remove/force + +# Add or remove space between '}' and 'else' if on the same line +sp_brace_else = force # ignore/add/remove/force + +# Add or remove space between '}' and the name of a typedef on the same line +sp_brace_typedef = force # ignore/add/remove/force + +# Add or remove space between 'catch' and '{' if on the same line +sp_catch_brace = ignore # ignore/add/remove/force + +# Add or remove space between '}' and 'catch' if on the same line +sp_brace_catch = ignore # ignore/add/remove/force + +# Add or remove space between 'finally' and '{' if on the same line +sp_finally_brace = ignore # ignore/add/remove/force + +# Add or remove space between '}' and 'finally' if on the same line +sp_brace_finally = ignore # ignore/add/remove/force + +# Add or remove space between 'try' and '{' if on the same line +sp_try_brace = ignore # ignore/add/remove/force + +# Add or remove space between get/set and '{' if on the same line +sp_getset_brace = ignore # ignore/add/remove/force + +# Add or remove space before the '::' operator +sp_before_dc = ignore # ignore/add/remove/force + +# Add or remove space after the '::' operator +sp_after_dc = ignore # ignore/add/remove/force + +# Add or remove around the D named array initializer ':' operator +sp_d_array_colon = ignore # ignore/add/remove/force + +# Add or remove space after the '!' (not) operator. Default=Remove +sp_not = remove # ignore/add/remove/force + +# Add or remove space after the '~' (invert) operator. Default=Remove +sp_inv = remove # ignore/add/remove/force + +# Add or remove space after the '&' (address-of) operator. Default=Remove +# This does not affect the spacing after a '&' that is part of a type. +sp_addr = remove # ignore/add/remove/force + +# Add or remove space around the '.' or '->' operators. Default=Remove +sp_member = remove # ignore/add/remove/force + +# Add or remove space after the '*' (dereference) operator. Default=Remove +# This does not affect the spacing after a '*' that is part of a type. +sp_deref = remove # ignore/add/remove/force + +# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove +sp_sign = remove # ignore/add/remove/force + +# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove +sp_incdec = remove # ignore/add/remove/force + +# Add or remove space before a backslash-newline at the end of a line. Default=Add +sp_before_nl_cont = add # ignore/add/remove/force + +# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;' +sp_after_oc_scope = ignore # ignore/add/remove/force + +# Add or remove space after the colon in message specs +# '-(int) f:(int) x;' vs '-(int) f: (int) x;' +sp_after_oc_colon = ignore # ignore/add/remove/force + +# Add or remove space before the colon in message specs +# '-(int) f: (int) x;' vs '-(int) f : (int) x;' +sp_before_oc_colon = ignore # ignore/add/remove/force + +# Add or remove space after the colon in message specs +# '[object setValue:1];' vs '[object setValue: 1];' +sp_after_send_oc_colon = ignore # ignore/add/remove/force + +# Add or remove space before the colon in message specs +# '[object setValue:1];' vs '[object setValue :1];' +sp_before_send_oc_colon = ignore # ignore/add/remove/force + +# Add or remove space after the (type) in message specs +# '-(int)f: (int) x;' vs '-(int)f: (int)x;' +sp_after_oc_type = ignore # ignore/add/remove/force + +# Add or remove space after the first (type) in message specs +# '-(int) f:(int)x;' vs '-(int)f:(int)x;' +sp_after_oc_return_type = ignore # ignore/add/remove/force + +# Add or remove space between '@selector' and '(' +# '@selector(msgName)' vs '@selector (msgName)' +# Also applies to @protocol() constructs +sp_after_oc_at_sel = ignore # ignore/add/remove/force + +# Add or remove space between '@selector(x)' and the following word +# '@selector(foo) a:' vs '@selector(foo)a:' +sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force + +# Add or remove space inside '@selector' parens +# '@selector(foo)' vs '@selector( foo )' +# Also applies to @protocol() constructs +sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force + +# Add or remove space before a block pointer caret +# '^int (int arg){...}' vs. ' ^int (int arg){...}' +sp_before_oc_block_caret = ignore # ignore/add/remove/force + +# Add or remove space after a block pointer caret +# '^int (int arg){...}' vs. '^ int (int arg){...}' +sp_after_oc_block_caret = ignore # ignore/add/remove/force + +# Add or remove space around the ':' in 'b ? t : f' +sp_cond_colon = force # ignore/add/remove/force + +# Add or remove space around the '?' in 'b ? t : f' +sp_cond_question = force # ignore/add/remove/force + +# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here. +sp_case_label = ignore # ignore/add/remove/force + +# Control the space around the D '..' operator. +sp_range = ignore # ignore/add/remove/force + +# Control the space after the opening of a C++ comment '// A' vs '//A' +# MPlayer devs note: we ignore the following setting because it breaks Doxygen comments +#sp_cmt_cpp_start = ignore # ignore/add/remove/force +sp_cmt_cpp_start = add # ignore/add/remove/force + +# Controls the spaces between #else or #endif and a trailing comment +sp_endif_cmt = ignore # ignore/add/remove/force + +# +# Code alignment (not left column spaces/tabs) +# + +# Whether to keep non-indenting tabs +align_keep_tabs = false # false/true + +# Whether to use tabs for aligning +align_with_tabs = false # false/true + +# Whether to bump out to the next tab when aligning +align_on_tabstop = false # false/true + +# Whether to left-align numbers +align_number_left = true # false/true + +# Align variable definitions in prototypes and functions +align_func_params = false # false/true + +# Align parameters in single-line functions that have the same name. +# The function names must already be aligned with each other. +align_same_func_call_params = false # false/true + +# The span for aligning variable definitions (0=don't align) +align_var_def_span = 0 # number + +# How to align the star in variable definitions. +# 0=Part of the type 'void * foo;' +# 1=Part of the variable 'void *foo;' +# 2=Dangling 'void *foo;' +align_var_def_star_style = 2 # number + +# How to align the '&' in variable definitions. +# 0=Part of the type +# 1=Part of the variable +# 2=Dangling +align_var_def_amp_style = 0 # number + +# The threshold for aligning variable definitions (0=no limit) +align_var_def_thresh = 0 # number + +# The gap for aligning variable definitions +align_var_def_gap = 0 # number + +# Whether to align the colon in struct bit fields +align_var_def_colon = false # false/true + +# Whether to align any attribute after the variable name +align_var_def_attribute = false # false/true + +# Whether to align inline struct/enum/union variable definitions +align_var_def_inline = false # false/true + +# The span for aligning on '=' in assignments (0=don't align) +align_assign_span = 1 # number + +# The threshold for aligning on '=' in assignments (0=no limit) +align_assign_thresh = 0 # number + +# The span for aligning on '=' in enums (0=don't align) +align_enum_equ_span = 1 # number + +# The threshold for aligning on '=' in enums (0=no limit) +align_enum_equ_thresh = 0 # number + +# The span for aligning struct/union (0=don't align) +align_var_struct_span = 0 # number + +# The threshold for aligning struct/union member definitions (0=no limit) +align_var_struct_thresh = 0 # number + +# The gap for aligning struct/union member definitions +align_var_struct_gap = 0 # number + +# The span for aligning struct initializer values (0=don't align) +align_struct_init_span = 1 # number + +# The minimum space between the type and the synonym of a typedef +align_typedef_gap = 0 # number + +# The span for aligning single-line typedefs (0=don't align) +align_typedef_span = 0 # number + +# How to align typedef'd functions with other typedefs +# 0: Don't mix them at all +# 1: align the open paren with the types +# 2: align the function type name with the other type names +align_typedef_func = 0 # number + +# Controls the positioning of the '*' in typedefs. Just try it. +# 0: Align on typedef type, ignore '*' +# 1: The '*' is part of type name: typedef int *pint; +# 2: The '*' is part of the type, but dangling: typedef int *pint; +align_typedef_star_style = 0 # number + +# Controls the positioning of the '&' in typedefs. Just try it. +# 0: Align on typedef type, ignore '&' +# 1: The '&' is part of type name: typedef int &pint; +# 2: The '&' is part of the type, but dangling: typedef int &pint; +align_typedef_amp_style = 0 # number + +# The span for aligning comments that end lines (0=don't align) +align_right_cmt_span = 0 # number + +# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment +align_right_cmt_mix = false # false/true + +# If a trailing comment is more than this number of columns away from the text it follows, +# it will qualify for being aligned. This has to be > 0 to do anything. +align_right_cmt_gap = 0 # number + +# Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore) +align_right_cmt_at_col = 0 # number + +# The span for aligning function prototypes (0=don't align) +align_func_proto_span = 0 # number + +# Minimum gap between the return type and the function name. +align_func_proto_gap = 0 # number + +# Align function protos on the 'operator' keyword instead of what follows +align_on_operator = false # false/true + +# Whether to mix aligning prototype and variable declarations. +# If true, align_var_def_XXX options are used instead of align_func_proto_XXX options. +align_mix_var_proto = false # false/true + +# Align single-line functions with function prototypes, uses align_func_proto_span +align_single_line_func = false # false/true + +# Aligning the open brace of single-line functions. +# Requires align_single_line_func=true, uses align_func_proto_span +align_single_line_brace = false # false/true + +# Gap for align_single_line_brace. +align_single_line_brace_gap = 0 # number + +# The span for aligning ObjC msg spec (0=don't align) +align_oc_msg_spec_span = 0 # number + +# Whether to align macros wrapped with a backslash and a newline. +# This will not work right if the macro contains a multi-line comment. +align_nl_cont = false # false/true + +# The minimum space between label and value of a preprocessor define +align_pp_define_gap = 0 # number + +# The span for aligning on '#define' bodies (0=don't align) +align_pp_define_span = 0 # number + +# Align lines that start with '<<' with previous '<<'. Default=true +align_left_shift = true # false/true + +# Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) +align_oc_msg_colon_span = 0 # number + +# Aligning parameters in an Obj-C '+' or '-' declaration on the ':' +align_oc_decl_colon = false # false/true + +# +# Newline adding and removing options +# + +# Whether to collapse empty blocks between '{' and '}' +nl_collapse_empty_body = false # false/true + +# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };' +nl_assign_leave_one_liners = false # false/true + +# Don't split one-line braced statements inside a class xx { } body +nl_class_leave_one_liners = false # false/true + +# Don't split one-line enums: 'enum foo { BAR = 15 };' +nl_enum_leave_one_liners = false # false/true + +# Don't split one-line get or set functions +nl_getset_leave_one_liners = false # false/true + +# Don't split one-line function definitions - 'int foo() { return 0; }' +nl_func_leave_one_liners = false # false/true + +# Don't split one-line if/else statements - 'if(a) b++;' +nl_if_leave_one_liners = false # false/true + +# Add or remove newlines at the start of the file +nl_start_of_file = remove # ignore/add/remove/force + +# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force' +nl_start_of_file_min = 0 # number + +# Add or remove newline at the end of the file +nl_end_of_file = force # ignore/add/remove/force + +# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force') +nl_end_of_file_min = 1 # number + +# Add or remove newline between '=' and '{' +nl_assign_brace = remove # ignore/add/remove/force + +# Add or remove newline between '=' and '[' (D only) +nl_assign_square = ignore # ignore/add/remove/force + +# Add or remove newline after '= [' (D only). Will also affect the newline before the ']' +nl_after_square_assign = ignore # ignore/add/remove/force + +# The number of blank lines after a block of variable definitions +nl_func_var_def_blk = 0 # number + +# Add or remove newline between a function call's ')' and '{', as in: +# list_for_each(item, &list) { } +nl_fcall_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'enum' and '{' +nl_enum_brace = remove # ignore/add/remove/force + +# Add or remove newline between 'struct and '{' +nl_struct_brace = remove # ignore/add/remove/force + +# Add or remove newline between 'union' and '{' +nl_union_brace = remove # ignore/add/remove/force + +# Add or remove newline between 'if' and '{' +nl_if_brace = remove # ignore/add/remove/force + +# Add or remove newline between '}' and 'else' +nl_brace_else = remove # ignore/add/remove/force + +# Add or remove newline between 'else if' and '{' +# If set to ignore, nl_if_brace is used instead +nl_elseif_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'else' and '{' +nl_else_brace = remove # ignore/add/remove/force + +# Add or remove newline between 'else' and 'if' +nl_else_if = remove # ignore/add/remove/force + +# Add or remove newline between '}' and 'finally' +nl_brace_finally = ignore # ignore/add/remove/force + +# Add or remove newline between 'finally' and '{' +nl_finally_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'try' and '{' +nl_try_brace = ignore # ignore/add/remove/force + +# Add or remove newline between get/set and '{' +nl_getset_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'for' and '{' +nl_for_brace = remove # ignore/add/remove/force + +# Add or remove newline between 'catch' and '{' +nl_catch_brace = ignore # ignore/add/remove/force + +# Add or remove newline between '}' and 'catch' +nl_brace_catch = ignore # ignore/add/remove/force + +# Add or remove newline between 'while' and '{' +nl_while_brace = remove # ignore/add/remove/force + +# Add or remove newline between 'using' and '{' +nl_using_brace = ignore # ignore/add/remove/force + +# Add or remove newline between two open or close braces. +# Due to general newline/brace handling, REMOVE may not work. +nl_brace_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'do' and '{' +nl_do_brace = remove # ignore/add/remove/force + +# Add or remove newline between '}' and 'while' of 'do' statement +nl_brace_while = remove # ignore/add/remove/force + +# Add or remove newline between 'switch' and '{' +nl_switch_brace = remove # ignore/add/remove/force + +# Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc. +# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace. +nl_multi_line_cond = false # false/true + +# Force a newline in a define after the macro name for multi-line defines. +nl_multi_line_define = false # false/true + +# Whether to put a newline before 'case' statement +nl_before_case = false # false/true + +# Add or remove newline between ')' and 'throw' +nl_before_throw = ignore # ignore/add/remove/force + +# Whether to put a newline after 'case' statement +nl_after_case = true # false/true + +# Newline between namespace and { +nl_namespace_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'template<>' and whatever follows. +nl_template_class = ignore # ignore/add/remove/force + +# Add or remove newline between 'class' and '{' +nl_class_brace = ignore # ignore/add/remove/force + +# Add or remove newline after each ',' in the constructor member initialization +nl_class_init_args = ignore # ignore/add/remove/force + +# Add or remove newline between return type and function name in a function definition +nl_func_type_name = force # ignore/add/remove/force + +# Add or remove newline between return type and function name inside a class {} +# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore. +nl_func_type_name_class = ignore # ignore/add/remove/force + +# Add or remove newline between function scope and name in a definition +# Controls the newline after '::' in 'void A::f() { }' +nl_func_scope_name = ignore # ignore/add/remove/force + +# Add or remove newline between return type and function name in a prototype +nl_func_proto_type_name = remove # ignore/add/remove/force + +# Add or remove newline between a function name and the opening '(' +nl_func_paren = remove # ignore/add/remove/force + +# Add or remove newline between a function name and the opening '(' in the definition +nl_func_def_paren = remove # ignore/add/remove/force + +# Add or remove newline after '(' in a function declaration +nl_func_decl_start = remove # ignore/add/remove/force + +# Add or remove newline after '(' in a function definition +nl_func_def_start = ignore # ignore/add/remove/force + +# Overrides nl_func_decl_start when there is only one parameter. +nl_func_decl_start_single = ignore # ignore/add/remove/force + +# Overrides nl_func_def_start when there is only one parameter. +nl_func_def_start_single = ignore # ignore/add/remove/force + +# Add or remove newline after each ',' in a function declaration +nl_func_decl_args = ignore # ignore/add/remove/force + +# Add or remove newline after each ',' in a function definition +nl_func_def_args = ignore # ignore/add/remove/force + +# Add or remove newline before the ')' in a function declaration +nl_func_decl_end = remove # ignore/add/remove/force + +# Add or remove newline before the ')' in a function definition +nl_func_def_end = ignore # ignore/add/remove/force + +# Overrides nl_func_decl_end when there is only one parameter. +nl_func_decl_end_single = ignore # ignore/add/remove/force + +# Overrides nl_func_def_end when there is only one parameter. +nl_func_def_end_single = ignore # ignore/add/remove/force + +# Add or remove newline between '()' in a function declaration. +nl_func_decl_empty = ignore # ignore/add/remove/force + +# Add or remove newline between '()' in a function definition. +nl_func_def_empty = ignore # ignore/add/remove/force + +# Add or remove newline between function signature and '{' +nl_fdef_brace = force # ignore/add/remove/force + +# Whether to put a newline after 'return' statement +nl_after_return = false # false/true + +# Add or remove a newline between the return keyword and return expression. +nl_return_expr = ignore # ignore/add/remove/force + +# Whether to put a newline after semicolons, except in 'for' statements +nl_after_semicolon = true # false/true + +# Whether to put a newline after brace open. +# This also adds a newline before the matching brace close. +nl_after_brace_open = false # false/true + +# If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is +# placed between the open brace and a trailing single-line comment. +nl_after_brace_open_cmt = false # false/true + +# Whether to put a newline after a virtual brace open with a non-empty body. +# These occur in un-braced if/while/do/for statement bodies. +nl_after_vbrace_open = true # false/true + +# Whether to put a newline after a virtual brace open with an empty body. +# These occur in un-braced if/while/do/for statement bodies. +nl_after_vbrace_open_empty = false # false/true + +# Whether to put a newline after a brace close. +# Does not apply if followed by a necessary ';'. +nl_after_brace_close = false # false/true + +# Whether to put a newline after a virtual brace close. +# Would add a newline before return in: 'if (foo) a++; return;' +nl_after_vbrace_close = false # false/true + +# Whether to alter newlines in '#define' macros +nl_define_macro = false # false/true + +# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif' +nl_squeeze_ifdef = false # false/true + +# Add or remove blank line before 'if' +nl_before_if = ignore # ignore/add/remove/force + +# Add or remove blank line after 'if' statement +nl_after_if = ignore # ignore/add/remove/force + +# Add or remove blank line before 'for' +nl_before_for = ignore # ignore/add/remove/force + +# Add or remove blank line after 'for' statement +nl_after_for = ignore # ignore/add/remove/force + +# Add or remove blank line before 'while' +nl_before_while = ignore # ignore/add/remove/force + +# Add or remove blank line after 'while' statement +nl_after_while = ignore # ignore/add/remove/force + +# Add or remove blank line before 'switch' +nl_before_switch = ignore # ignore/add/remove/force + +# Add or remove blank line after 'switch' statement +nl_after_switch = ignore # ignore/add/remove/force + +# Add or remove blank line before 'do' +nl_before_do = ignore # ignore/add/remove/force + +# Add or remove blank line after 'do/while' statement +nl_after_do = ignore # ignore/add/remove/force + +# Whether to double-space commented-entries in struct/enum +nl_ds_struct_enum_cmt = false # false/true + +# Whether to double-space before the close brace of a struct/union/enum +# (lower priority than 'eat_blanks_before_close_brace') +nl_ds_struct_enum_close_brace = false # false/true + +# Add or remove a newline around a class colon. +# Related to pos_class_colon, nl_class_init_args, and pos_comma. +nl_class_colon = ignore # ignore/add/remove/force + +# Change simple unbraced if statements into a one-liner +# 'if(b)\n i++;' => 'if(b) i++;' +nl_create_if_one_liner = false # false/true + +# Change simple unbraced for statements into a one-liner +# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);' +nl_create_for_one_liner = false # false/true + +# Change simple unbraced while statements into a one-liner +# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);' +nl_create_while_one_liner = false # false/true + +# +# Positioning options +# + +# The position of arithmetic operators in wrapped expressions +pos_arith = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# The position of assignment in wrapped expressions. +# Do not affect '=' followed by '{' +pos_assign = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# The position of boolean operators in wrapped expressions +pos_bool = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# The position of comparison operators in wrapped expressions +pos_compare = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# The position of conditional (b ? t : f) operators in wrapped expressions +pos_conditional = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# The position of the comma in wrapped expressions +pos_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# The position of the comma in the constructor initialization list +pos_class_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# The position of colons between constructor and member initialization +pos_class_colon = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force + +# +# Line Splitting options +# + +# Try to limit code width to N number of columns +code_width = 120 # number + +# Whether to fully split long 'for' statements at semi-colons +ls_for_split_full = false # false/true + +# Whether to fully split long function protos/calls at commas +ls_func_split_full = false # false/true + +# +# Blank line options +# + +# The maximum consecutive newlines +nl_max = 2 # number + +# The number of newlines after a function prototype, if followed by another function prototype +nl_after_func_proto = 0 # number + +# The number of newlines after a function prototype, if not followed by another function prototype +nl_after_func_proto_group = 0 # number + +# The number of newlines after '}' of a multi-line function body +nl_after_func_body = 2 # number + +# The number of newlines after '}' of a single line function body +nl_after_func_body_one_liner = 2 # number + +# The minimum number of newlines before a multi-line comment. +# Doesn't apply if after a brace open or another multi-line comment. +nl_before_block_comment = 0 # number + +# The minimum number of newlines before a single-line C comment. +# Doesn't apply if after a brace open or other single-line C comments. +nl_before_c_comment = 0 # number + +# The minimum number of newlines before a CPP comment. +# Doesn't apply if after a brace open or other CPP comments. +nl_before_cpp_comment = 0 # number + +# Whether to force a newline after a multi-line comment. +nl_after_multiline_comment = false # false/true + +# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. +# Will not change the newline count if after a brace open. +# 0 = No change. +nl_before_access_spec = 0 # number + +# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. +# 0 = No change. +nl_after_access_spec = 0 # number + +# The number of newlines between a function def and the function comment. +# 0 = No change. +nl_comment_func_def = 0 # number + +# The number of newlines after a try-catch-finally block that isn't followed by a brace close. +# 0 = No change. +nl_after_try_catch_finally = 0 # number + +# The number of newlines before and after a property, indexer or event decl. +# 0 = No change. +nl_around_cs_property = 0 # number + +# The number of newlines between the get/set/add/remove handlers in C#. +# 0 = No change. +nl_between_get_set = 0 # number + +# Whether to remove blank lines after '{' +eat_blanks_after_open_brace = true # false/true + +# Whether to remove blank lines before '}' +eat_blanks_before_close_brace = true # false/true + +# +# Code modifying options (non-whitespace) +# + +# Add or remove braces on single-line 'do' statement +mod_full_brace_do = remove # ignore/add/remove/force + +# Add or remove braces on single-line 'for' statement +mod_full_brace_for = remove # ignore/add/remove/force + +# Add or remove braces on single-line function definitions. (Pawn) +mod_full_brace_function = ignore # ignore/add/remove/force + +# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. +mod_full_brace_if = ignore # ignore/add/remove/force + +# Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. +# If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. +mod_full_brace_if_chain = false # false/true + +# Don't remove braces around statements that span N newlines +mod_full_brace_nl = 0 # number + +# Add or remove braces on single-line 'while' statement +mod_full_brace_while = remove # ignore/add/remove/force + +# Add or remove braces on single-line 'using ()' statement +mod_full_brace_using = remove # ignore/add/remove/force + +# Add or remove unnecessary paren on 'return' statement +mod_paren_on_return = remove # ignore/add/remove/force + +# Whether to change optional semicolons to real semicolons +mod_pawn_semicolon = false # false/true + +# Add parens on 'while' and 'if' statement around bools +mod_full_paren_if_bool = false # false/true + +# Whether to remove superfluous semicolons +mod_remove_extra_semicolon = true # false/true + +# If a function body exceeds the specified number of newlines and doesn't have a comment after +# the close brace, a comment will be added. +mod_add_long_function_closebrace_comment = 0 # number + +# If a switch body exceeds the specified number of newlines and doesn't have a comment after +# the close brace, a comment will be added. +mod_add_long_switch_closebrace_comment = 0 # number + +# If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after +# the #else, a comment will be added. +mod_add_long_ifdef_endif_comment = 0 # number + +# If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after +# the #endif, a comment will be added. +mod_add_long_ifdef_else_comment = 0 # number + +# If TRUE, will sort consecutive single-line 'import' statements [Java, D] +mod_sort_import = false # false/true + +# If TRUE, will sort consecutive single-line 'using' statements [C#] +mod_sort_using = false # false/true + +# If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C] +# This is generally a bad idea, as it may break your code. +mod_sort_include = false # false/true + +# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace. +mod_move_case_break = false # false/true + +# Will add or remove the braces around a fully braced case statement. +# Will only remove the braces if there are no variable declarations in the block. +mod_case_brace = ignore # ignore/add/remove/force + +# If TRUE, it will remove a void 'return;' that appears as the last statement in a function. +mod_remove_empty_return = false # false/true + +# +# Comment modifications +# + +# Try to wrap comments at cmt_width columns +cmt_width = 0 # number + +# Set the comment reflow mode (default: 0) +# 0: no reflowing (apart from the line wrapping due to cmt_width) +# 1: no touching at all +# 2: full reflow +cmt_reflow_mode = 0 # number + +# If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars. +# Default is true. +cmt_indent_multi = true # false/true + +# Whether to group c-comments that look like they are in a block +cmt_c_group = false # false/true + +# Whether to put an empty '/*' on the first line of the combined c-comment +cmt_c_nl_start = false # false/true + +# Whether to put a newline before the closing '*/' of the combined c-comment +cmt_c_nl_end = false # false/true + +# Whether to group cpp-comments that look like they are in a block +cmt_cpp_group = false # false/true + +# Whether to put an empty '/*' on the first line of the combined cpp-comment +cmt_cpp_nl_start = false # false/true + +# Whether to put a newline before the closing '*/' of the combined cpp-comment +cmt_cpp_nl_end = false # false/true + +# Whether to change cpp-comments into c-comments +cmt_cpp_to_c = false # false/true + +# Whether to put a star on subsequent comment lines +cmt_star_cont = true # false/true + +# The number of spaces to insert at the start of subsequent comment lines +cmt_sp_before_star_cont = 0 # number + +# The number of spaces to insert after the star on subsequent comment lines +cmt_sp_after_star_cont = 0 # number + +# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of +# the comment are the same length. Default=True +cmt_multi_check_last = false # false/true + +# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment. +# Will substitute $(filename) with the current file's name. +cmt_insert_file_header = "" # string + +# The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment. +# Will substitute $(filename) with the current file's name. +cmt_insert_file_footer = "" # string + +# The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment. +# Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff. +# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... } +cmt_insert_func_header = "" # string + +# The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment. +# Will substitute $(class) with the class name. +cmt_insert_class_header = "" # string + +# If a preprocessor is encountered when stepping backwards from a function name, then +# this option decides whether the comment should be inserted. +# Affects cmt_insert_func_header and cmt_insert_class_header. +cmt_insert_before_preproc = false # false/true + +# +# Preprocessor options +# + +# Control indent of preprocessors inside #if blocks at brace level 0 +pp_indent = remove # ignore/add/remove/force + +# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false) +pp_indent_at_level = false # false/true + +# If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1. +pp_indent_count = 1 # number + +# Add or remove space after # based on pp_level of #if blocks +pp_space = remove # ignore/add/remove/force + +# Sets the number of spaces added with pp_space +pp_space_count = 0 # number + +# The indent for #region and #endregion in C# and '#pragma region' in C/C++ +pp_indent_region = 0 # number + +# Whether to indent the code between #region and #endregion +pp_region_indent_code = false # false/true + +# If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level +pp_indent_if = 0 # number + +# Control whether to indent the code between #if, #else and #endif when not at file-level +pp_if_indent_code = false # false/true + +# Whether to indent '#define' at the brace level (true) or from column 1 (false) +pp_define_at_level = false # false/true + +# You can force a token to be a type with the 'type' option. +# Example: +# type myfoo1 myfoo2 +# +# You can create custom macro-based indentation using macro-open, +# macro-else and macro-close. +# Example: +# macro-open BEGIN_TEMPLATE_MESSAGE_MAP +# macro-open BEGIN_MESSAGE_MAP +# macro-close END_MESSAGE_MAP +# +# You can assign any keyword to any type with the set option. +# set func_call_user _ N_ +# +# The full syntax description of all custom definition config entries +# is shown below: +# +# define custom tokens as: +# - embed whitespace in token using '' escape character, or +# put token in quotes +# - these: ' " and ` are recognized as quote delimiters +# +# type token1 token2 token3 ... +# ^ optionally specify multiple tokens on a single line +# define def_token output_token +# ^ output_token is optional, then NULL is assumed +# macro-open token +# macro-close token +# macro-else token +# set id token1 token2 ... +# ^ optionally specify multiple tokens on a single line +# ^ id is one of the names in token_enum.h sans the CT_ prefix, +# e.g. PP_PRAGMA +# +# all tokens are separated by any mix of ',' commas, '=' equal signs +# and whitespace (space, tab) +# diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..b63b5f139 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,9 @@ +Shadowsocks-libev was originally created in late 2013, by +Clowwindy , then rewritten and maintained by +Max Lv . + +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 diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..0c1c2d066 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,160 @@ +cmake_minimum_required(VERSION 3.2) + +set(PROJECT_NAME shadowsocks-libev) +set(RELEASE_DATE 2020-09-15) +set(PROJECT_VERSION "3.3.5") +set(PROJECT_DESC "a lightweight secured socks5 proxy") +set(PROJECT_URL "https://shadowsocks.org") +set(PROJECT_ISSUES_URL "https://github.com/shadowsocks/shadowsocks-libev") +project(${PROJECT_NAME} VERSION ${PROJECT_VERSION}) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") + +#set(PROJECT_BINARY_DIR ${PROJECT_SOURCE_DIR}/out) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) +set(RUNTIME_SHARED_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/shared/bin) + +set(CMAKE_MACOSX_RPATH TRUE) + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug) +endif () +# Detect linux +if (UNIX AND NOT APPLE) + set(LINUX TRUE) +endif () + +message(STATUS "Running cmake version ${CMAKE_VERSION}") + +option(WITH_STATIC "build with static libraries." ON) +option(WITH_EMBEDDED_SRC "build with embedded libcork, libipset, and libbloom source." ON) + +# Will set GIT_EXECUTABLE and GIT_FOUND +# find_package(Git) + +# When choose to not use embedded libcork, libipset and libbloom, use libs shipped by system +if (NOT WITH_EMBEDDED_SRC) + set(USE_SYSTEM_SHARED_LIB TRUE) +endif () + +# Run platform tests +include(${PROJECT_SOURCE_DIR}/cmake/configure.cmake) +configure_file(${PROJECT_SOURCE_DIR}/cmake/config.h.cmake ${PROJECT_BINARY_DIR}/src/config.h) +add_definitions(-I${PROJECT_BINARY_DIR}/src) +add_definitions(-DHAVE_CONFIG_H) + +# pkg-config +configure_file( + ${PROJECT_SOURCE_DIR}/cmake/shadowsocks-libev.pc.cmake + ${PROJECT_BINARY_DIR}/pkgconfig/shadowsocks-libev.pc + @ONLY +) +install(FILES + ${PROJECT_BINARY_DIR}/pkgconfig/shadowsocks-libev.pc + DESTINATION lib/pkgconfig + ) + +if (WITH_EMBEDDED_SRC) +# We need libcork,libipset headers +include_directories(libcork/include) +include_directories(libipset/include) +include_directories(libbloom/murmur2) +include_directories(libbloom) + +set(LIBCORK_SOURCE + libcork/src/libcork/cli/commands.c + libcork/src/libcork/core/allocator.c + libcork/src/libcork/core/error.c + libcork/src/libcork/core/gc.c + libcork/src/libcork/core/hash.c + libcork/src/libcork/core/ip-address.c + libcork/src/libcork/core/mempool.c + libcork/src/libcork/core/timestamp.c + libcork/src/libcork/core/u128.c + libcork/src/libcork/core/version.c + libcork/src/libcork/ds/array.c + libcork/src/libcork/ds/bitset.c + libcork/src/libcork/ds/buffer.c + libcork/src/libcork/ds/dllist.c + libcork/src/libcork/ds/file-stream.c + libcork/src/libcork/ds/hash-table.c + libcork/src/libcork/ds/managed-buffer.c + libcork/src/libcork/ds/ring-buffer.c + libcork/src/libcork/ds/slice.c + libcork/src/libcork/posix/directory-walker.c + libcork/src/libcork/posix/env.c + libcork/src/libcork/posix/exec.c + libcork/src/libcork/posix/files.c + libcork/src/libcork/posix/process.c + libcork/src/libcork/pthreads/thread.c + ) +if (NOT MINGW) +set(LIBCORK_SOURCE ${LIBCORK_SOURCE} libcork/src/libcork/posix/subprocess.c) +else () +set(LIBCORK_SOURCE ${LIBCORK_SOURCE} libcork/src/libcork/posix/mingw.c) +endif () + +if (WITH_STATIC) +add_library(cork STATIC ${LIBCORK_SOURCE}) +target_compile_definitions(cork PUBLIC -DCORK_API=CORK_LOCAL) +endif () + +add_library(cork-shared SHARED ${LIBCORK_SOURCE}) +target_compile_definitions(cork-shared PUBLIC -DCORK_API=CORK_EXPORT) +set_target_properties(cork-shared PROPERTIES OUTPUT_NAME cork) +if (MINGW) +target_link_libraries(cork-shared ws2_32) +endif () + +set(LIBIPSET_SOURCE + libipset/src/libipset/general.c + libipset/src/libipset/bdd/assignments.c + libipset/src/libipset/bdd/basics.c + libipset/src/libipset/bdd/bdd-iterator.c + libipset/src/libipset/bdd/expanded.c + libipset/src/libipset/bdd/reachable.c + libipset/src/libipset/bdd/read.c + libipset/src/libipset/bdd/write.c + libipset/src/libipset/map/allocation.c + libipset/src/libipset/map/inspection.c + libipset/src/libipset/map/ipv4_map.c + libipset/src/libipset/map/ipv6_map.c + libipset/src/libipset/map/storage.c + libipset/src/libipset/set/allocation.c + libipset/src/libipset/set/inspection.c + libipset/src/libipset/set/ipv4_set.c + libipset/src/libipset/set/ipv6_set.c + libipset/src/libipset/set/iterator.c + libipset/src/libipset/set/storage.c + ) + +if (WITH_STATIC) +add_library(ipset STATIC ${LIBIPSET_SOURCE}) +endif () + +add_library(ipset-shared SHARED ${LIBIPSET_SOURCE}) +set_target_properties(ipset-shared PROPERTIES OUTPUT_NAME ipset) + +set(LIBBLOOM_SOURCE + libbloom/bloom.c + libbloom/murmur2/MurmurHash2.c + ) + +if (WITH_STATIC) +add_library(bloom STATIC ${LIBBLOOM_SOURCE}) +target_link_libraries(ipset cork bloom) +endif () + +add_library(bloom-shared SHARED ${LIBBLOOM_SOURCE}) +target_link_libraries(ipset-shared cork-shared bloom-shared) +set_target_properties(bloom-shared PROPERTIES OUTPUT_NAME bloom) +endif () + +add_subdirectory(src) +add_subdirectory(doc) + diff --git a/Changes b/Changes deleted file mode 120000 index d526672ce..000000000 --- a/Changes +++ /dev/null @@ -1 +0,0 @@ -debian/changelog \ No newline at end of file diff --git a/Changes b/Changes new file mode 100644 index 000000000..0c5dd097a --- /dev/null +++ b/Changes @@ -0,0 +1,602 @@ +shadowsocks-libev (3.3.5-1) unstable; urgency=medium + + * Remove the SNI proxy function. + * Minor bug fixes. (#2581, #2582, #2590, #2595, #2599, + #2600, #2620, #2687, #2692) + + -- Max Lv Tue, 15 Sep 2020 10:24:43 +0800 + +shadowsocks-libev (3.3.4-1) unstable; urgency=medium + + * Minor bug fixes. (#2539, #2565, #2566, #2577) + * Security bug fixes. (CVE-2019-5163, CVE-2019-5164) + + -- Max Lv Fri, 10 Jan 2020 09:28:25 +0800 + +shadowsocks-libev (3.3.3-1) unstable; urgency=medium + + * Refine the handling of suspicious connections. + + -- Max Lv Thu, 31 Oct 2019 15:06:04 +0800 + +shadowsocks-libev (3.3.2-1) unstable; urgency=medium + + * Refine the handling of fragment request. + * Minor bug fixes. (#2463, #2481, #2508) + + -- Max Lv Sat, 12 Oct 2019 08:42:24 +0800 + +shadowsocks-libev (3.3.1-1) unstable; urgency=high + + * Fix a high CPU bug introduced in 3.3.0. (#2449) + * Fix MinGW build. (#2438) + * Minor bug fixes. (#2402, #2412, #2427, #2443) + + -- Max Lv Fri, 09 Aug 2019 15:02:34 +0800 + +shadowsocks-libev (3.3.0-1) unstable; urgency=medium + + * Enlarge the socket buffer size to 16KB. + * Fix the empty list bug in ss-manager. + * Fix the IPv6 address parser. + + -- Max Lv Sat, 08 Jun 2019 07:53:20 +0800 + +shadowsocks-libev (3.2.5-1) unstable; urgency=medium + + * Fix a bug of port parser. + + -- Max Lv Sat, 09 Mar 2019 18:54:36 +0800 + +shadowsocks-libev (3.2.4-1) unstable; urgency=medium + + * Fix a crash with MinGW. + * Refine SIP003 plugin interface. + * Remove connection timeout from all clients. + + -- Max Lv Tue, 26 Feb 2019 09:40:18 +0800 + +shadowsocks-libev (3.2.3-1) unstable; urgency=medium + + * Fix the alignment issue again. + + -- Max Lv Wed, 28 Nov 2018 00:27:40 -0800 + +shadowsocks-libev (3.2.2-1) unstable; urgency=medium + + * Fix a bug on 32-bit arch. + + -- Max Lv Mon, 26 Nov 2018 20:07:21 -0800 + +shadowsocks-libev (3.2.1-1) unstable; urgency=medium + + * Add TCP fast open support to ss-tunnel by @PantherJohn. + * Fix several security issues. + + -- Max Lv Wed, 07 Nov 2018 22:31:59 -0800 + +shadowsocks-libev (3.2.0-1) unstable; urgency=medium + + * Add MinGW support by @linusyang. + * Refine c-ares integration by @xnoreq. + * Fix building issues with GCC8 by @FlyingheartCN. + * Minor bug fixes. + + -- Max Lv Mon, 28 May 2018 19:46:21 -0700 + +shadowsocks-libev (3.1.3-1) unstable; urgency=medium + + * Fix a bug in UDP relay. + + -- Max Lv Mon, 15 Jan 2018 17:19:31 -0800 + +shadowsocks-libev (3.1.2-1) unstable; urgency=medium + + * Fix a bug in DNS resolver. + * Add new TFO API support. + + -- Max Lv Thu, 28 Dec 2017 21:01:56 -0800 + +shadowsocks-libev (3.1.1-1) unstable; urgency=high + + * Fix a security issue in ss-manager. (CVE-2017-15924) + + -- Max Lv Mon, 20 Nov 2017 12:13:04 +0800 + +shadowsocks-libev (3.1.0-1) unstable; urgency=low + + * Replace libudns with libc-ares. + + -- Max Lv Thu, 14 Sep 2017 19:27:51 -0700 + +shadowsocks-libev (3.0.8-1) unstable; urgency=medium + + * Refine the ping-pong bloom filter. + * Minor bug fixes by @vfreex, @vlolteanu and @jackyyf. + + -- Max Lv Thu, 27 Jul 2017 11:01:37 +0800 + +shadowsocks-libev (3.0.7-1) unstable; urgency=medium + + * Refine manager mode by @mengxd. + * Fix a potential memory leak by @vlolteanu. + + -- Max Lv Tue, 27 Jun 2017 14:08:27 +0800 + +shadowsocks-libev (3.0.6-1) unstable; urgency=medium + + * Fix a bug with AEAD ciphers. + * Refine ACL support by @blackgear. + + -- Max Lv Wed, 26 Apr 2017 13:48:11 +0800 + +shadowsocks-libev (3.0.5-1) unstable; urgency=medium + + * Fix a bug of TCP Fast Open in ss-redir. + + -- Max Lv Tue, 21 Mar 2017 13:49:18 +0800 + +shadowsocks-libev (3.0.4-1) unstable; urgency=medium + + * Add CMake files by @wenerme. + * Support TCP Fast Open in ss-redir by @lqs. + * Support TOS/DESCP in ss-redir by @sduponch. + * Refine MPTCP by @sduponch. + + -- Max Lv Thu, 16 Mar 2017 14:07:57 +0800 + +shadowsocks-libev (3.0.3-1) unstable; urgency=medium + + * Replace nonce cache with a ping-pong bloom filter. + + -- Max Lv Fri, 24 Feb 2017 12:08:31 +0800 + +shadowsocks-libev (3.0.2-1) unstable; urgency=high + + * Add session key for AEAD. (SIP007) + + -- Max Lv Mon, 13 Feb 2017 09:07:17 +0800 + +shadowsocks-libev (3.0.1-1) unstable; urgency=medium + + * Fix a crashe when using stream ciphers. + * Fix a protocol bug in AEAD ciphers. (SIP004) + * Allow setting keys directly. (SIP006) + + -- Max Lv Tue, 07 Feb 2017 13:18:02 +0800 + +shadowsocks-libev (3.0.0-1) unstable; urgency=medium + + * Drop dependencies of OpenSSL and PolarSSL. + * Deprecate OTA (One-Time-Auth). + * Add new ciphers for SIP004: aes-128-gcm, aes-192-gcm, aes-256-gcm, + chacha20-poly1305 and chacha20-ietf-poly1305. + * Refine SIP003 to support standalone mode of obfsproxy. + + -- Max Lv Wed, 01 Feb 2017 19:10:14 +0800 + +shadowsocks-libev (2.6.3-1) unstable; urgency=medium + + * Refine the project structure. + + -- Max Lv Tue, 24 Jan 2017 19:10:45 +0800 + +shadowsocks-libev (2.6.2-1) unstable; urgency=medium + + * Refine SIP003 plugin support. + + -- Max Lv Mon, 16 Jan 2017 10:16:12 +0800 + +shadowsocks-libev (2.6.1-1) unstable; urgency=medium + + * Deprecate HTTP/TLS obfuscating. + * Add SIP003 plugin support. + + -- Max Lv Sun, 08 Jan 2017 15:14:19 +0800 + +shadowsocks-libev (2.6.0-1) unstable; urgency=medium + + * Add HTTP/TLS obfuscating. + * Add support of aunch_activate_socket on macOS. + + -- Max Lv Tue, 27 Dec 2016 16:37:23 +0800 + +shadowsocks-libev (2.5.6-1) unstable; urgency=medium + + * Add outbound ACL for server. + * Refine log format. + + -- Max Lv Tue, 01 Nov 2016 09:51:52 +0800 + +shadowsocks-libev (2.5.5-1) unstable; urgency=medium + + * Refine attack detection. + + -- Max Lv 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 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 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 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 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 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 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 Wed, 1 Jun 2016 18:21:45 +0800 + +shadowsocks-libev (2.4.6-1) unstable; urgency=low + + * Update manual pages. + + -- Max Lv 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 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 Wed, 13 Jan 2016 11:50:12 +0800 + +shadowsocks-libev (2.4.3-1) unstable; urgency=high + + * Refine the buffer allocation. + + -- Max Lv Sat, 19 Dec 2015 12:30:21 +0900 + +shadowsocks-libev (2.4.1-1) unstable; urgency=high + + * Fix a security bug. + + -- Max Lv Thu, 29 Oct 2015 15:42:47 +0900 + +shadowsocks-libev (2.4.0-1) unstable; urgency=low + + * Update the one-time authentication + + -- Max Lv 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 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 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 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 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 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 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 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 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 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 Sun, 08 Feb 2015 10:59:44 +0900 + +shadowsocks-libev (2.1.2-1) unstable; urgency=low + + * Refine multiple port binding. + + -- Max Lv Sat, 31 Jan 2015 18:56:25 +0900 + +shadowsocks-libev (2.1.1-1) unstable; urgency=low + + * Fix a memory leak. + + -- Max Lv 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 Mon, 19 Jan 2015 09:59:52 +0900 + +shadowsocks-libev (2.0.8-1) unstable; urgency=low + + * Fix a bug of IPv6. + + -- Max Lv Fri, 16 Jan 2015 10:58:12 +0900 + +shadowsocks-libev (2.0.7-1) unstable; urgency=low + + * Fix some performance issue. + + -- Max Lv 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 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 Mon, 12 Jan 2015 12:39:05 +0800 + +shadowsocks-libev (2.0.4-1) unstable; urgency=low + + * Fix building issues with MinGW32. + + -- Max Lv Sun, 11 Jan 2015 13:33:31 +0900 + +shadowsocks-libev (2.0.3-1) unstable; urgency=high + + * Fix some issues. + + -- Max Lv Sat, 10 Jan 2015 16:27:54 +0800 + +shadowsocks-libev (2.0.2-1) unstable; urgency=low + + * Fix issues with MinGW. + + -- Max Lv 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 Sat, 10 Jan 2015 10:04:28 +0800 + +shadowsocks-libev (1.6.4-1) unstable; urgency=low + + * Update documents. + + -- Max Lv Wed, 07 Jan 2015 21:48:58 +0900 + +shadowsocks-libev (1.6.3-1) unstable; urgency=low + + * Refine ss-redir. + + -- Max Lv Sun, 04 Jan 2015 19:23:52 +0900 + +shadowsocks-libev (1.6.2-1) unstable; urgency=low + + * Fix some build issues. + + -- Max Lv Tue, 30 Dec 2014 10:30:28 +0800 + +shadowsocks-libev (1.6.1-1) unstable; urgency=high + + * Add salsa20 and chacha20 support. + + -- Max Lv 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 Mon, 17 Nov 2014 14:10:21 +0800 + +shadowsocks-libev (1.5.3-2) unstable; urgency=low + + * rename as shadowsocks-libev. + + -- Symeon Huang Sat, 15 Nov 2014 14:55:28 +0000 + +shadowsocks (1.5.3-1) unstable; urgency=low + + * Fix log on Win32. + + -- Max Lv Fri, 14 Nov 2014 09:10:06 +0800 + +shadowsocks (1.5.2-1) unstable; urgency=low + + * Handle SIGTERM and SIGKILL nicely. + + -- Max Lv 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 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 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 Wed, 08 Oct 2014 18:02:02 +0800 + +shadowsocks (1.4.7-1) unstable; urgency=low + + * Add a new encryptor rc4-md5. + + -- Max Lv Tue, 09 Sep 2014 07:50:10 +0800 + +shadowsocks (1.4.6-1) unstable; urgency=low + + * Add ACL support. + + -- Max Lv 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 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 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 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 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 Tue, 12 Nov 2013 03:57:21 +0000 + +shadowsocks (1.4.0-1) unstable; urgency=low + + * Add standard socks5 udp support. + + -- Max Lv Sun, 08 Sep 2013 02:20:40 +0000 + +shadowsocks (1.3.3-1) unstable; urgency=high + + * Provide more info in verbose mode. + + -- Max Lv Fri, 21 Jun 2013 09:59:20 +0800 + +shadowsocks (1.3.2-1) unstable; urgency=high + + * Fix some ciphers by @linusyang. + + -- Max Lv 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 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 Thu, 16 May 2013 10:51:15 +0800 + +shadowsocks (1.2-2) unstable; urgency=low + + * Close timeouted TCP connections. + + -- Max Lv Tue, 07 May 2013 14:10:33 +0800 + +shadowsocks (1.2-1) unstable; urgency=low + + * Fix a high load issue. + + -- Max Lv Thu, 18 Apr 2013 10:52:34 +0800 + +shadowsocks (1.1-1) unstable; urgency=low + + * Fix a IPV6 resolve issue. + + -- Max Lv Wed, 10 Apr 2013 12:11:36 +0800 + +shadowsocks (1.0-2) unstable; urgency=low + + * Initial release. + + -- Max Lv Sat, 06 Apr 2013 16:59:15 +0800 diff --git a/Makefile.am b/Makefile.am index 04280af54..12a0b0bd7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,20 @@ -if BUILD_WINCOMPAT -SUBDIRS = libcork libipset libev src +if USE_SYSTEM_SHARED_LIB +SUBDIRS = src else -SUBDIRS = libcork libipset libasyncns libev src +SUBDIRS = libcork libipset libbloom src endif + +if ENABLE_DOCUMENTATION +SUBDIRS += doc +endif + ACLOCAL_AMFLAGS = -I m4 -man_MANS = shadowsocks.8 + +pkgconfiglibdir = $(libdir)/pkgconfig +pkgconfiglib_DATA = shadowsocks-libev.pc + +EXTRA_DIST = acl Changes completions debian docker rpm scripts README.md +EXTRA_DIST += libbloom +EXTRA_DIST += libcork/include libipset/include +EXTRA_DIST += libipset/src/libipset/map/inspection-template.c.in +EXTRA_DIST += libipset/src/libipset/set/inspection-template.c.in diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index ce6d50ea3..000000000 --- a/Makefile.in +++ /dev/null @@ -1,862 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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 = . -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure COPYING INSTALL ar-lib compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.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/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \ - $(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-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 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; }; \ - } -man8dir = $(mandir)/man8 -am__installdirs = "$(DESTDIR)$(man8dir)" -NROFF = nroff -MANS = $(man_MANS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = libcork libipset libasyncns libev src -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__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 -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@ -AR = @AR@ -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@ -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@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -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@ -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@ -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@ -acx_pthread_config = @acx_pthread_config@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -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@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@BUILD_WINCOMPAT_FALSE@SUBDIRS = libcork libipset libasyncns libev src -@BUILD_WINCOMPAT_TRUE@SUBDIRS = libcork libipset libev src -ACLOCAL_AMFLAGS = -I m4 -man_MANS = shadowsocks.8 -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: $(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 -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi - -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: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -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) - -# 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. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; 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" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - 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; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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 -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @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__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.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 - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @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 $(MANS) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(man8dir)"; 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-man - -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-man8 - -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-man - -uninstall-man: uninstall-man8 - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-lzma 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-man8 install-pdf install-pdf-am 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-recursive \ - uninstall uninstall-am uninstall-man uninstall-man8 - - -# 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: diff --git a/README.md b/README.md index 8821ab9cf..8a874db89 100644 --- a/README.md +++ b/README.md @@ -1,282 +1,662 @@ -shadowsocks-libev -================= +# shadowsocks-libev -Intro ------ +[![Build Status](https://travis-ci.com/shadowsocks/shadowsocks-libev.svg?branch=master)](https://travis-ci.com/shadowsocks/shadowsocks-libev) [![Snap Status](https://snapcraft.io/shadowsocks-libev/badge.svg)](https://snapcraft.io/shadowsocks-libev) -[Shadowsocks-libev](http://shadowsocks.org) is a lightweight secured scoks5 -proxy for embedded devices and low end boxes. +## Intro -It is a port of [shadowsocks](https://github.com/clowwindy/shadowsocks) -created by [@clowwindy](https://github.com/clowwindy) maintained by +[Shadowsocks-libev](https://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), and maintained by [@madeye](https://github.com/madeye) and [@linusyang](https://github.com/linusyang). -Current version: 1.4.8 | [![Build Status](https://travis-ci.org/madeye/shadowsocks-libev.png?branch=master)](https://travis-ci.org/madeye/shadowsocks-libev) | [Changelog](Changes) +Current version: 3.3.5 | [Changelog](debian/changelog) + +## Features + +Shadowsocks-libev is written in pure C and depends on [libev](http://software.schmorp.de/pkg/libev.html). It's designed +to be a lightweight implementation of shadowsocks protocol, in order to keep the resource usage as low as possible. + +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). + +## Quick Start + +Snap is the recommended way to install the latest binaries. + +### Install snap core + +https://snapcraft.io/core -Features --------- +### Install from snapcraft.io -Shadowsocks-libev is writen in pure C and only depends on -[libev](http://software.schmorp.de/pkg/libev.html) and -[openssl](http://www.openssl.org/) or [polarssl](https://polarssl.org/). +Stable channel: + +```bash +sudo snap install shadowsocks-libev +``` + +Edge channel: + +```bash +sudo snap install shadowsocks-libev --edge +``` -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). +## Installation -Installation ------------- +### Distribution-specific guide -#### Notes about PolarSSL +- [Debian & Ubuntu](#debian--ubuntu) + + [Install from repository](#install-from-repository-not-recommended) + + [Build deb package from source](#build-deb-package-from-source) + + [Configure and start the service](#configure-and-start-the-service) +- [Fedora & RHEL](#fedora--rhel) + + [Build from source with centos](#build-from-source-with-centos) +- [Archlinux & Manjaro](#archlinux--manjaro) +- [NixOS](#nixos) +- [Nix](#nix) +- [Directly build and install on UNIX-like system](#linux) +- [FreeBSD](#freebsd) + + [Install](#install) + + [Configuration](#configuration) + + [Run](#run) + + [Run as client](#run-as-client) +- [OpenWRT](#openwrt) +- [OS X](#os-x) +- [Windows (MinGW)](#windows-mingw) +- [Docker](#docker) -* Default crypto library is OpenSSL. 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__. +* * * + +### Initialise the build environment + +This repository uses submodules, so you should pull them before you start, using: + +```bash +git submodule update --init --recursive +``` + +### Pre-build configure guide + +For a complete list of available configure-time option, +try `configure --help`. ### Debian & Ubuntu -#### Install from repository -Add either of the following lines to your /etc/apt/sources.list +#### Install from repository (not recommended) +Shadowsocks-libev is available in the official repository for following distributions: + +* Debian 8 or higher, including oldoldstable (jessie), old stable (stretch), stable (buster), testing (bullseye) and unstable (sid) +* Ubuntu 16.10 or higher + +```bash +sudo apt update +sudo apt install shadowsocks-libev ``` -# Debian Wheezy, Ubuntu 12.04 or any distribution with libssl > 1.0.1 -deb http://shadowsocks.org/debian wheezy main -# Debian Squeeze, Ubuntu 11.04, or any distribution with libssl > 0.9.8, but < 1.0.0 -deb http://shadowsocks.org/debian squeeze main +#### Build deb package from source + +Supported distributions: + +* Debian 8, 9 or higher +* Ubuntu 14.04 LTS, 16.04 LTS, 16.10 or higher + +You can build shadowsocks-libev and all its dependencies by script: + +```bash +mkdir -p ~/build-area/ +cp ./scripts/build_deb.sh ~/build-area/ +cd ~/build-area +./build_deb.sh ``` -Then, +For older systems, building `.deb` packages is not supported. +Please try to build and install directly from source. See the [Linux](#linux) section below. + +**Note for Debian 8 (Jessie) users to build their own deb packages**: + +We strongly encourage you to install shadowsocks-libev from `jessie-backports-sloppy`. If you insist on building from source, you will need to manually install libsodium from `jessie-backports-sloppy`, **NOT** libsodium in main repository. + +For more info about backports, you can refer [Debian Backports](https://backports.debian.org). ``` bash -sudo apt-get update -sudo apt-get install shadowsocks +cd shadowsocks-libev +sudo sh -c 'printf "deb http://deb.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list' +sudo sh -c 'printf "deb http://deb.debian.org/debian jessie-backports-sloppy main" >> /etc/apt/sources.list.d/jessie-backports.list' +sudo apt-get install --no-install-recommends devscripts equivs +mk-build-deps --root-cmd sudo --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" +./autogen.sh && dpkg-buildpackage -b -us -uc +cd .. +sudo dpkg -i shadowsocks-libev*.deb ``` -#### Build package from source +**Note for Debian 9 (Stretch) users to build their own deb packages**: + +We strongly encourage you to install shadowsocks-libev from `stretch-backports`. If you insist on building from source, you will need to manually install libsodium from `stretch-backports`, **NOT** libsodium in main repository. + +For more info about backports, you can refer [Debian Backports](https://backports.debian.org). ``` bash cd shadowsocks-libev -sudo apt-get install build-essential autoconf libtool libssl-dev gawk debhelper -sudo dpkg-buildpackage +sudo sh -c 'printf "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list' +sudo apt-get install --no-install-recommends devscripts equivs +mk-build-deps --root-cmd sudo --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" +./autogen.sh && dpkg-buildpackage -b -us -uc cd .. -sudo dpkg -i shadowsocks*.deb +sudo dpkg -i shadowsocks-libev*.deb ``` #### Configure and start the service ``` -# Edit the configuration -sudo vim /etc/shadowsocks/config.json +# 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 start +sudo /etc/init.d/shadowsocks-libev start # for sysvinit, or +sudo systemctl start shadowsocks-libev # for systemd ``` -### CentOS +### Fedora & RHEL + +Supported distributions: + +* Recent Fedora versions (until EOL) +* RHEL 6, 7 and derivatives (including CentOS, Scientific Linux) + +#### Build from source with centos -Install the dependencies, +If you are using CentOS 7, you need to install these prerequirements to build from source code: ```bash -yum install -y gcc automake autoconf libtool make build-essential autoconf libtool -yum install -y curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel +yum install epel-release -y +yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y ``` -Compile and install, +### Archlinux & Manjaro ```bash -./configure && make -make install +sudo pacman -S shadowsocks-libev ``` -Then copy this [init script](rpm/SOURCES/etc/init.d/shadowsocks) to `/etc/init.d/`. +Please refer to downstream [PKGBUILD](https://github.com/archlinux/svntogit-community/blob/packages/shadowsocks-libev/trunk/PKGBUILD) +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: +In general, you need the following build dependencies: + +* autotools (autoconf, automake, libtool) +* gettext +* pkg-config +* libmbedtls +* libsodium +* libpcre3 (old pcre library) +* libev +* libc-ares +* asciidoc (for documentation only) +* xmlto (for documentation only) + +Notes: Fedora 26 libsodium version >= 1.0.12, so you can install via dnf install libsodium instead build from source. + +If your system is too old to provide libmbedtls and libsodium (later than **v1.0.8**), you will need to either install those libraries manually or upgrade your system. + +If your system provides with those libraries, you **should not** install them from source.You should jump to this section and install them from the distribution repository instead. + +For some of the distributions, you might install build dependencies like this: ```bash -sudo apt-get install build-essential autoconf libtool libssl-dev -./configure && make +# Installation of basic build dependencies +## Debian / Ubuntu +sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev pkg-config +## CentOS / Fedora / RHEL +sudo yum install gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel +## Arch +sudo pacman -S gettext gcc autoconf libtool automake make asciidoc xmlto c-ares libev + +# Installation of libsodium +export LIBSODIUM_VER=1.0.16 +wget https://download.libsodium.org/libsodium/releases/old/libsodium-$LIBSODIUM_VER.tar.gz +tar xvf libsodium-$LIBSODIUM_VER.tar.gz +pushd libsodium-$LIBSODIUM_VER +./configure --prefix=/usr && make +sudo make install +popd +sudo ldconfig + +# Installation of MbedTLS +export MBEDTLS_VER=2.6.0 +wget https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-$MBEDTLS_VER.tar.gz +tar xvf mbedtls-$MBEDTLS_VER.tar.gz +pushd mbedtls-$MBEDTLS_VER +make SHARED=1 CFLAGS="-O2 -fPIC" +sudo make DESTDIR=/usr install +popd +sudo ldconfig + +# Start building +./autogen.sh && ./configure && make sudo make install ``` +You may need to manually install missing softwares. + ### FreeBSD +#### Install +Shadowsocks-libev is available in FreeBSD Ports Collection. You can install it in either way, `pkg` or `ports`. + +**pkg (recommended)** + +```bash +pkg install shadowsocks-libev +``` + +**ports** ```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 +#### Configuration +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. +To enable shadowsocks-libev, add the following rc variable to your `/etc/rc.conf` file: ``` shadowsocks_libev_enable="YES" ``` -Start the shadowsocks server: +#### Run + +Start the Shadowsocks server: ```bash service shadowsocks_libev start ``` +#### Run as client +By default, shadowsocks-libev is running as a server in FreeBSD. If you would like to start shadowsocks-libev in client mode, you can modify the rc script (`/usr/local/etc/rc.d/shadowsocks_libev`) manually. + +``` +# modify the following line from "ss-server" to "ss-local" +command="/usr/local/bin/ss-local" +``` + +Note that is simply a workaround, each time you upgrade the port your changes will be overwritten by the new version. + ### OpenWRT -```bash -# At OpenWRT build root -pushd package -git clone https://github.com/madeye/shadowsocks-libev.git -popd +The OpenWRT project is maintained here: +[openwrt-shadowsocks](https://github.com/shadowsocks/openwrt-shadowsocks). -# Enable shadowsocks-libev in network category -make menuconfig +### OS X +For OS X, use [Homebrew](http://brew.sh) to install or build. -# Optional -make -j +Install Homebrew: -# Build the package -make V=99 package/shadowsocks-libev/openwrt/compile +```bash +ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` +Install shadowsocks-libev: -### Windows +```bash +brew install shadowsocks-libev +``` -For Windows, use either MinGW (msys) or Cygwin to build. -At the moment, only `ss-local` is supported to build against MinGW (msys). +### Windows (MinGW) +To build Windows native binaries, the recommended method is to use Docker: -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): +* On Windows: double-click `make.bat` in `docker\mingw` +* On Unix-like system: -* OpenSSL + cd shadowsocks-libev/docker/mingw + make -```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 -``` +A tarball with 32-bit and 64-bit binaries will be generated in the same directory. -* PolarSSL +You could also manually use MinGW-w64 compilers to build in Unix-like shell (MSYS2/Cygwin), or cross-compile on Unix-like systems (Linux/MacOS). Please refer to build scripts in `docker/mingw`. -```bash -tar zxf polarssl-1.3.2-gpl.tgz -cd polarssl-1.3.2 -make lib WINDOWS=1 -make install DESTDIR="$HOME/prebuilt" -``` +Currently you need to use a patched libev library for MinGW: -Then, build the binary using the commands below, and all `.exe` files -will be built at `$HOME/ss/bin`: +* https://github.com/shadowsocks/libev/archive/mingw.zip -* OpenSSL +Notice that TCP Fast Open (TFO) is only available on **Windows 10**, **1607** or later version (precisely, build >= 14393). If you are using **1709** (build 16299) or later version, you also need to run the following command in PowerShell/Command Prompt **as Administrator** and **reboot** to use TFO properly: -```bash -./configure --prefix="$HOME/ss" --with-openssl="$HOME/prebuilt" -make && make install -``` + netsh int tcp set global fastopenfallback=disabled -* PolarSSL +### Docker -```bash -./configure --prefix="$HOME/ss" --with-crypto-library=polarssl --with-polarssl=$HOME/prebuilt -make && make install +As you expect, simply pull the image and run. +``` +docker pull shadowsocks/shadowsocks-libev +docker run -e PASSWORD= -p:8388 -p:8388/udp -d shadowsocks/shadowsocks-libev ``` -Usage ------ +More information about the image can be found [here](docker/alpine/README.md). -``` -usage: +## Usage - ss-[local|redir|server|tunnel] +For a detailed and complete list of all supported arguments, +you may refer to the man pages of the applications, respectively. - -s host name or ip address of your remote server - -p port number of your remote server - -l port number of your local server - -k password of your remote server + ss-[local|redir|server|tunnel|manager] + -s Host name or IP address of your remote server. - [-m ] 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 and seed-cfb - [-f ] file to store the pid - [-t ] socket timeout in seconds - [-c ] config file in json + -p Port number of your remote server. + -l Port number of your local server. - [-i ] network interface to bind, - not available in redir mode - [-b ] local address to bind, - not available in server mode - [-u] enable udprelay mode - not available in redir mode - [-L :] setup a local port forwarding tunnel, - only available in tunnel mode - [-v] verbose mode + -k Password of your remote server. + -m Encrypt method: rc4-md5, + aes-128-gcm, aes-192-gcm, aes-256-gcm, + aes-128-cfb, aes-192-cfb, aes-256-cfb, + aes-128-ctr, aes-192-ctr, aes-256-ctr, + camellia-128-cfb, camellia-192-cfb, + camellia-256-cfb, bf-cfb, + chacha20-ietf-poly1305, + xchacha20-ietf-poly1305, + salsa20, chacha20 and chacha20-ietf. + The default cipher is chacha20-ietf-poly1305. - [--fast-open] enable TCP fast open, - only available on Linux kernel > 3.7.0 - [--acl ] config file of ACL (Access Control List) + [-a ] Run as another user. -notes: + [-f ] The file path to store pid. - ss-redir provides a transparent proxy function and only works on the - Linux platform with iptables. + [-t ] Socket timeout in seconds. -``` + [-c ] The path to config file. + + [-n ] Max number of open files. -## Advanced usage + [-i ] Network interface to bind. + (not available in redir mode) -The latest shadowsocks-libev has provided a *redir* mode. You can configure your linux based box or router to proxy all tcp traffic transparently. + [-b ] Local address to bind. + For servers: Specify the local address to use + while this server is making outbound + connections to remote servers on behalf of the + clients. + For clients: Specify the local address to use + while this client is making outbound + connections to the server. + + [-u] Enable UDP relay. + (TPROXY is required in redir mode) + + [-U] Enable UDP relay and disable TCP relay. + (not available in local mode) + + [-T] Use tproxy instead of redirect. (for tcp) + (only available in redir mode) + + [-L :] Destination server address and port + for local port forwarding. + (only available in tunnel mode) + + [-6] Resolve hostname to IPv6 address first. + + [-d ] Name servers for internal DNS resolver. + (only available in server mode) + + [--reuse-port] Enable port reuse. + + [--fast-open] Enable TCP fast open. + with Linux kernel > 3.7.0. + (only available in local and server mode) + + [--acl ] Path to ACL (Access Control List). + (only available in local and server mode) + + [--manager-address ] UNIX domain socket address. + (only available in server and manager mode) + + [--mtu ] MTU of your network interface. + + [--mptcp] Enable Multipath TCP on MPTCP Kernel. + + [--no-delay] Enable TCP_NODELAY. + + [--executable ] Path to the executable of ss-server. + (only available in manager mode) + + [-D ] Path to the working directory of ss-manager. + (only available in manager mode) + + [--key ] Key of your remote server. + + [--plugin ] Enable SIP003 plugin. (Experimental) + + [--plugin-opts ] Set SIP003 plugin options. (Experimental) + + [-v] Verbose mode. + +## Transparent proxy + +The latest shadowsocks-libev has provided a *redir* mode. You can configure your Linux-based box or router to proxy all TCP traffic transparently, which is handy if you use an OpenWRT-powered router. # Create new chain - root@Wrt:~# iptables -t nat -N SHADOWSOCKS - + iptables -t nat -N SHADOWSOCKS + 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 + 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 + iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN + 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 - + iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345 + + # Add any UDP rules + ip route add local default dev lo table 100 + ip rule add fwmark 1 lookup 100 + 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 OUTPUT -p tcp -j SHADOWSOCKS - + iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS + iptables -t mangle -A PREROUTING -j SHADOWSOCKS + # Start the shadowsocks-redir - root@Wrt:~# ss-redir -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid + ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid + +## Transparent proxy (pure tproxy) + +Executing this script on the linux host can proxy all outgoing traffic of this machine (except the traffic sent to the reserved address). Other hosts under the same LAN can also change their default gateway to the ip of this linux host (at the same time change the dns server to 1.1.1.1 or 8.8.8.8, etc.) to proxy their outgoing traffic. + +> Of course, the ipv6 proxy is similar, just change `iptables` to `ip6tables`, `ip` to `ip -6`, `127.0.0.1` to `::1`, and other details. + +```shell +#!/bin/bash + +start_ssredir() { + # please modify MyIP, MyPort, etc. + (ss-redir -s MyIP -p MyPort -m MyMethod -k MyPasswd -b 127.0.0.1 -l 60080 --no-delay -u -T -v >/var/log/ss-redir.log &) +} + +stop_ssredir() { + kill -9 $(pidof ss-redir) &>/dev/null +} + +start_iptables() { + ##################### SSREDIR ##################### + iptables -t mangle -N SSREDIR + + # connection-mark -> packet-mark + iptables -t mangle -A SSREDIR -j CONNMARK --restore-mark + iptables -t mangle -A SSREDIR -m mark --mark 0x2333 -j RETURN + + # please modify MyIP, MyPort, etc. + # ignore traffic sent to ss-server + iptables -t mangle -A SSREDIR -p tcp -d MyIP --dport MyPort -j RETURN + iptables -t mangle -A SSREDIR -p udp -d MyIP --dport MyPort -j RETURN + + # ignore traffic sent to reserved addresses + iptables -t mangle -A SSREDIR -d 0.0.0.0/8 -j RETURN + iptables -t mangle -A SSREDIR -d 10.0.0.0/8 -j RETURN + iptables -t mangle -A SSREDIR -d 100.64.0.0/10 -j RETURN + iptables -t mangle -A SSREDIR -d 127.0.0.0/8 -j RETURN + iptables -t mangle -A SSREDIR -d 169.254.0.0/16 -j RETURN + iptables -t mangle -A SSREDIR -d 172.16.0.0/12 -j RETURN + iptables -t mangle -A SSREDIR -d 192.0.0.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 192.0.2.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 192.88.99.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 192.168.0.0/16 -j RETURN + iptables -t mangle -A SSREDIR -d 198.18.0.0/15 -j RETURN + iptables -t mangle -A SSREDIR -d 198.51.100.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 203.0.113.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 224.0.0.0/4 -j RETURN + iptables -t mangle -A SSREDIR -d 240.0.0.0/4 -j RETURN + iptables -t mangle -A SSREDIR -d 255.255.255.255/32 -j RETURN + + # mark the first packet of the connection + iptables -t mangle -A SSREDIR -p tcp --syn -j MARK --set-mark 0x2333 + iptables -t mangle -A SSREDIR -p udp -m conntrack --ctstate NEW -j MARK --set-mark 0x2333 + + # packet-mark -> connection-mark + iptables -t mangle -A SSREDIR -j CONNMARK --save-mark + + ##################### OUTPUT ##################### + # proxy the outgoing traffic from this machine + iptables -t mangle -A OUTPUT -p tcp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + iptables -t mangle -A OUTPUT -p udp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + + ##################### PREROUTING ##################### + # proxy traffic passing through this machine (other->other) + iptables -t mangle -A PREROUTING -p tcp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + iptables -t mangle -A PREROUTING -p udp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + + # hand over the marked package to TPROXY for processing + iptables -t mangle -A PREROUTING -p tcp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 + iptables -t mangle -A PREROUTING -p udp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 +} + +stop_iptables() { + ##################### PREROUTING ##################### + iptables -t mangle -D PREROUTING -p tcp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 &>/dev/null + iptables -t mangle -D PREROUTING -p udp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 &>/dev/null + + iptables -t mangle -D PREROUTING -p tcp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + iptables -t mangle -D PREROUTING -p udp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + + ##################### OUTPUT ##################### + iptables -t mangle -D OUTPUT -p tcp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + iptables -t mangle -D OUTPUT -p udp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + + ##################### SSREDIR ##################### + iptables -t mangle -F SSREDIR &>/dev/null + iptables -t mangle -X SSREDIR &>/dev/null +} + +start_iproute2() { + ip route add local default dev lo table 100 + ip rule add fwmark 0x2333 table 100 +} + +stop_iproute2() { + ip rule del table 100 &>/dev/null + ip route flush table 100 &>/dev/null +} + +start_resolvconf() { + # or nameserver 8.8.8.8, etc. + echo "nameserver 1.1.1.1" >/etc/resolv.conf +} + +stop_resolvconf() { + echo "nameserver 114.114.114.114" >/etc/resolv.conf +} + +start() { + echo "start ..." + start_ssredir + start_iptables + start_iproute2 + start_resolvconf + echo "start end" +} + +stop() { + echo "stop ..." + stop_resolvconf + stop_iproute2 + stop_iptables + stop_ssredir + echo "stop end" +} + +restart() { + stop + sleep 1 + start +} + +main() { + if [ $# -eq 0 ]; then + echo "usage: $0 start|stop|restart ..." + return 1 + fi + + for funcname in "$@"; do + if [ "$(type -t $funcname)" != 'function' ]; then + echo "'$funcname' not a shell function" + return 1 + fi + done + + for funcname in "$@"; do + $funcname + done + return 0 +} +main "$@" +``` ## Security Tips -Although shadowsocks-libev can handle thousands of concurrent connections nicely, we still recommend to -set up your server's firewall rules to limit connections from each user. +For any public server, to avoid users accessing localhost of your server, please add `--acl acl/server_block_local.acl` to the command line. - # Up to 32 connections are enough for normal usages +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) 2014 Max Lv +``` +Copyright: 2013-2015, Clow Windy + 2013-2018, Max Lv + 2014, Linus Yang 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 @@ -290,3 +670,4 @@ 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 . +``` diff --git a/README_pt_BR.md b/README_pt_BR.md new file mode 100644 index 000000000..e9dd1a137 --- /dev/null +++ b/README_pt_BR.md @@ -0,0 +1,665 @@ +# shadowsocks-libev + +[![Build Status](https://travis-ci.com/shadowsocks/shadowsocks-libev.svg?branch=master)](https://travis-ci.com/shadowsocks/shadowsocks-libev) [![Snap Status](https://build.snapcraft.io/badge/shadowsocks/shadowsocks-libev.svg)](https://build.snapcraft.io/user/shadowsocks/shadowsocks-libev) + +## Introdução + +[Shadowsocks-libev](https://shadowsocks.org) é um SOCKS5 leve e seguro +proxy para dispositivos embutidos e caixas de baixo custo. + +É uma porta de [Shadowsocks](https://github.com/shadowsocks/shadowsocks) +criado por [@clowwindy](https://github.com/clowwindy) e mantido por +[@madeye](https://github.com/madeye) e [@linusyang](https://github.com/linusyang). + +Versão atual: 3.3.5 | [Changelog](debian/changelog) + +## Características + +Shadowsocks-libev é escrito em C puro e depende de [libev](http://software.schmorp.de/pkg/libev.html). Ele foi projetado para ser uma implementação leve do protocolo shadowsocks, a fim de manter o uso de recursos o mais baixo possível. + +Para obter uma lista completa de comparação de recursos entre diferentes versões de shadowsocks, consulte a [página da Wiki (https://github.com/shadowsocks/shadowsocks/wiki/Feature-Comparison-across-Different-Versions). + +## Começo rápido + +Snap é a maneira recomendada de instalar os binários mais recentes. + +### Instale o snap core + +https://snapcraft.io/core + +### Instalar a partir do snapcraft.io + +Stable channel: + +```bash +sudo snap install shadowsocks-libev +``` + +Edge channel: + +```bash +sudo snap install shadowsocks-libev --edge +``` + +## Instalação + +### Guia específico de distribuição + +- [Debian & Ubuntu](#debian--ubuntu) + + [Instalar do repositório](#instale-a-partir-do-repositório-não-recomendado) + + [Construa o pacote deb a partir da fonte](#compile-o-pacote-deb-a-partir-da-fonte) + + [Configurar e iniciar o serviço](#configurar-e-iniciar-o-serviço) +- [Fedora & RHEL](#fedora--rhel) + + [Construir a partir da fonte com centos](#construa-a-partir-da-fonte-com-centos) +- [Archlinux & Manjaro](#archlinux--manjaro) +- [NixOS](#nixos) +- [Nix](#nix) +- [Compile e instale diretamente no sistema semelhante ao UNIX](#linux) +- [FreeBSD](#freebsd) + + [Instalar](#instalar) + + [Configuração](#configuração) + + [Executar](#executar) + + [Executar como cliente](#executar-como-cliente) +- [OpenWRT](#openwrt) +- [OS X](#os-x) +- [Windows (MinGW)](#windows-mingw) +- [Docker](#docker) + +* * * + +### Inicialize o ambiente de compilação + +Este repositório usa submódulos, então você deve puxá-los antes de começar, usando: + +```bash +git submodule update --init --recursive +``` + +### Guia de configuração de pré-compilação + +Para obter uma lista completa das opções de tempo de configuração disponíveis, +tentar `configure --help`. + +### Debian & Ubuntu + +#### Instale a partir do repositório (não recomendado) + +Shadowsocks-libev está disponível no repositório oficial para as seguintes distribuições: + +* Debian 8 ou superior, incluindo oldoldstable (jessie), old stable (stretch), stable (buster), testing (bullseye) e unstable (sid) +* Ubuntu 16.10 ou superior + +```bash +sudo apt update +sudo apt install shadowsocks-libev +``` + +#### Compile o pacote deb a partir da fonte. + +Distribuições suportadas: + +* Debian 8, 9 ou superior +* Ubuntu 14.04 LTS, 16.04 LTS, 16.10 ou superior + +Você pode construir shadowsocks-libev e todas as suas dependências por script: + +```bash +mkdir -p ~/build-area/ +cp ./scripts/build_deb.sh ~/build-area/ +cd ~/build-area +./build_deb.sh +``` + +Para sistemas mais antigos, a construção de pacotes `.deb` não é suportada. +Por favor, tente construir e instalar diretamente da fonte. Veja a seção [Linux](#linux) abaixo. + +**Nota para usuários do Debian 8 (Jessie) para construir seus próprios pacotes deb**: + +Nós encorajamos você a instalar shadowsocks-libev de `jessie-backports-sloppy`. Se você insistir em compilar a partir da fonte, você precisará instalar manualmente o libsodium de `jessie-backports-sloppy`, **NÃO** libsodium no repositório principal. + +Para mais informações sobre backports, você pode consultar [Debian Backports](https://backports.debian.org). + +``` bash +cd shadowsocks-libev +sudo sh -c 'printf "deb http://deb.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list' +sudo sh -c 'printf "deb http://deb.debian.org/debian jessie-backports-sloppy main" >> /etc/apt/sources.list.d/jessie-backports.list' +sudo apt-get install --no-install-recommends devscripts equivs +mk-build-deps --root-cmd sudo --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" +./autogen.sh && dpkg-buildpackage -b -us -uc +cd .. +sudo dpkg -i shadowsocks-libev*.deb +``` + +**Nota para usuários do Debian 9 (Stretch) para construir seus próprios pacotes deb**: + +Nós encorajamos você a instalar shadowsocks-libev de `stretch-backports`. Se você insistir em compilar a partir do código-fonte, precisará instalar manualmente o libsodium de `stretch-backports`, **NÃO** libsodium no repositório principal. + +Para mais informações sobre backports, você pode consultar [Debian Backports](https://backports.debian.org). + +``` bash +cd shadowsocks-libev +sudo sh -c 'printf "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list' +sudo apt-get install --no-install-recommends devscripts equivs +mk-build-deps --root-cmd sudo --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" +./autogen.sh && dpkg-buildpackage -b -us -uc +cd .. +sudo dpkg -i shadowsocks-libev*.deb +``` + +#### Configurar e iniciar o serviço + +``` +# Edite o arquivo de configuração +sudo vim /etc/shadowsocks-libev/config.json + +# Edite a configuração padrão do debian +sudo vim /etc/default/shadowsocks-libev + +# Inicia o serviço +sudo /etc/init.d/shadowsocks-libev start # para sysvinit, ou +sudo systemctl start shadowsocks-libev # para systemd +``` + +### Fedora & RHEL + +Distribuições suportadas: + +* Versões recentes do Fedora (até EOL) +* RHEL 6, 7 e derivados (incluindo CentOS, Scientific Linux) + +#### Construa a partir da fonte com centos + +Se você estiver usando o CentOS 7, precisará instalar estes pré-requisitos para compilar a partir do código-fonte: + +```bash +yum install epel-release -y +yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y +``` + +### Archlinux & Manjaro + +```bash +sudo pacman -S shadowsocks-libev +``` + +Consulte o script downstream [PKGBUILD](https://github.com/archlinux/svntogit-community/blob/packages/shadowsocks-libev/trunk/PKGBUILD) para modificações extras e bugs específicos da distribuição. + +### NixOS + +```bash +nix-env -iA nixos.shadowsocks-libev +``` + +### Nix + +```bash +nix-env -iA nixpkgs.shadowsocks-libev +``` + +### Linux + +Em geral, você precisa das seguintes dependências de compilação: + +* autotools (autoconf, automake, libtool) +* gettext +* pkg-config +* libmbedtls +* libsodium +* libpcre3 (antiga biblioteca pcre) +* libev +* libc-ares +* asciidoc (somente para documentação) +* xmlto (apenas para documentação) + +Notas: Fedora 26 libsodium versão >= 1.0.12, então você pode instalar via dnf install libsodium em vez de compilar a partir da fonte. + +Se seu sistema for muito antigo para fornecer libmbedtls e libsodium (posterior a **v1.0.8**), você precisará instalar essas bibliotecas manualmente ou atualizar seu sistema. + +Se o seu sistema fornece essas bibliotecas, você **não deve** instalá-las a partir do código-fonte. Você deve ir para esta seção e instalá-las a partir do repositório de distribuição. + +Para algumas das distribuições, você pode instalar dependências de compilação como esta: + +```bash +# Instalação de dependências básicas de compilação +## Debian / Ubuntu +sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev pkg-config +## CentOS / Fedora / RHEL +sudo yum install gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel +## Arch +sudo pacman -S gettext gcc autoconf libtool automake make asciidoc xmlto c-ares libev + +# Instalação do libsodium +export LIBSODIUM_VER=1.0.16 +wget https://download.libsodium.org/libsodium/releases/old/libsodium-$LIBSODIUM_VER.tar.gz +tar xvf libsodium-$LIBSODIUM_VER.tar.gz +pushd libsodium-$LIBSODIUM_VER +./configure --prefix=/usr && make +sudo make install +popd +sudo ldconfig + +# Instalação do MbedTLS +export MBEDTLS_VER=2.6.0 +wget https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-$MBEDTLS_VER.tar.gz +tar xvf mbedtls-$MBEDTLS_VER.tar.gz +pushd mbedtls-$MBEDTLS_VER +make SHARED=1 CFLAGS="-O2 -fPIC" +sudo make DESTDIR=/usr install +popd +sudo ldconfig + +# Comece a construir +./autogen.sh && ./configure && make +sudo make install +``` + +Pode ser necessário instalar manualmente os softwares ausentes. + +### FreeBSD +#### Instalar +Shadowsocks-libev está disponível na Coleção de Ports do FreeBSD. Você pode instalá-lo de qualquer maneira, `pkg` ou `ports`. + +**pkg (recomendado)** + +```bash +pkg install shadowsocks-libev +``` + +**portas** + +```bash +cd /usr/ports/net/shadowsocks-libev +make install +``` + +#### Configuração +Edite seu arquivo `config.json`. Por padrão, está localizado em `/usr/local/etc/shadowsocks-libev`. + +Para habilitar shadowsocks-libev, adicione a seguinte variável rc ao seu arquivo `/etc/rc.conf`: + +``` +shadowsocks_libev_enable="YES" +``` + +#### Executar + +Inicie o servidor Shadowsocks: + +```bash +service shadowsocks_libev start +``` + +#### Executar como cliente +Por padrão, shadowsocks-libev está rodando como um servidor no FreeBSD. Se você quiser iniciar o shadowsocks-libev no modo cliente, você pode modificar o script rc (`/usr/local/etc/rc.d/shadowsocks_libev`) manualmente. + +``` +# modifique a seguinte linha de "ss-server" para "ss-local" +command="/usr/local/bin/ss-local" +``` + +Observe que é simplesmente uma solução alternativa, cada vez que você atualizar a porta, suas alterações serão substituídas pela nova versão. + +### OpenWRT + +O projeto OpenWRT é mantido aqui: +[openwrt-shadowsocks](https://github.com/shadowsocks/openwrt-shadowsocks). + +### OS X +Para OS X, use [Homebrew](http://brew.sh) para instalar ou compilar. + +Instale o Homebrew: + +```bash +ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +``` +Instale shadowsocks-libev: + +```bash +brew install shadowsocks-libev +``` + +### Windows (MinGW) +Para compilar binários nativos do Windows, o método recomendado é usar o Docker: + +* No Windows: clique duas vezes em `make.bat` em `docker\mingw` +* No sistema do tipo Unix: + + cd shadowsocks-libev/docker/mingw + make + +Um tarball com binários de 32 bits e 64 bits será gerado no mesmo diretório. + +Você também pode usar compiladores MinGW-w64 manualmente para compilar em shell do tipo Unix (MSYS2/Cygwin) ou compilar em sistemas semelhantes ao Unix (Linux/MacOS). Por favor, consulte os scripts de compilação em `docker/mingw`. + +Atualmente você precisa usar uma biblioteca libev corrigida para MinGW: + +* https://github.com/shadowsocks/libev/archive/mingw.zip + +Observe que o TCP Fast Open (TFO) está disponível apenas no **Windows 10**, **1607** ou versão posterior (precisamente, build >= 14393). Se você estiver usando **1709** (compilação 16299) ou versão posterior, também precisará executar o seguinte comando no PowerShell/Prompt de comando **como administrador** e **reinicializar** para usar o TFO corretamente: + + netsh int tcp set global fastopenfallback=disabled + +### Docker + +Como você espera, basta puxar a imagem e executar. +``` +docker pull shadowsocks/shadowsocks-libev +docker run -e PASSWORD= -p:8388 -p:8388/udp -d shadowsocks/shadowsocks-libev +``` + +Mais informações sobre a imagem podem ser encontradas [aqui](docker/alpine/README.md). + +## Utilização + +Para obter uma lista detalhada e completa de todos os argumentos suportados, +você pode consultar as páginas de manual dos aplicativos, respectivamente. + + ss-[local|redir|server|tunnel|manager] + + -s Nome do host ou endereço IP de seu servidor remoto. + + -p Número da porta do seu servidor remoto. + + -l Número da porta do seu servidor local. + + -k Senha do seu servidor remoto. + + -m Método de criptografia: rc4-md5, + aes-128-gcm, aes-192-gcm, aes-256-gcm, + aes-128-cfb, aes-192-cfb, aes-256-cfb, + aes-128-ctr, aes-192-ctr, aes-256-ctr, + camellia-128-cfb, camellia-192-cfb, + camellia-256-cfb, bf-cfb, + chacha20-ietf-poly1305, + xchacha20-ietf-poly1305, + salsa20, chacha20 e chacha20-ietf. + A cifra padrão é chacha20-ietf-poly1305. + + [-a ] Executar como outro usuário. + + [-f ] O caminho do arquivo para armazenar pid. + + [-t ] Tempo limite do soquete em segundos. + + [-c ] O caminho para o arquivo de configuração. + + [-n ] Número máximo de arquivos abertos. + + [-i ] Interface de rede a ser vinculada. + (não disponível no modo redir) + + [-b ] Endereço local para ligar. + Para servidores: Especifique o endereço local a ser usado + enquanto este servidor está fazendo saída + conexões a servidores remotos em nome do + clientes. + Para clientes: Especifique o endereço local a ser usado + enquanto este cliente está fazendo saída + conexões com o servidor. + + [-u] Habilita retransmissão UDP. + (TPROXY é necessário no modo redir) + + [-U] Ativa a retransmissão UDP e desativa a retransmissão TCP. + (não disponível no modo local) + + [-T] Use tproxy em vez de redirecionar. (para tcp) + (disponível apenas no modo redir) + + [-L :] Endereço e porta do servidor de destino + para encaminhamento de porta local. + (disponível apenas no modo túnel) + + [-6] Primeiro, resolva o nome do host para o endereço IPv6. + + [-d ] Servidores de nome para resolvedor de DNS interno. + (disponível apenas no modo servidor) + + [--reuse-port] Habilita a reutilização de porta. + + [--fast-open] Habilita a abertura rápida do TCP. + com kernel do Linux > 3.7.0. + (disponível apenas no modo local e servidor) + + [--acl ] Caminho para ACL (lista de controle de acesso). + (disponível apenas no modo local e servidor) + + [--manager-address ] endereço de soquete do domínio UNIX. + (disponível apenas no modo servidor e gerenciador) + + [--mtu ] MTU de sua interface de rede. + + [--mptcp] Habilita o Multipath TCP no Kernel MPTCP. + + [--no-delay] Habilita TCP_NODELAY. + + [--executable ] Caminho para o executável do ss-server. + (disponível apenas no modo gerenciador) + + [-D ] Caminho para o diretório de trabalho do ss-manager. + (disponível apenas no modo gerenciador) + + [--key ] Chave do seu servidor remoto. + +## proxy transparente + +O mais recente shadowsocks-libev forneceu um modo *redir*. Você pode configurar sua caixa ou roteador baseado em Linux para fazer proxy de todo o tráfego TCP de forma transparente, o que é útil se você usar um roteador com OpenWRT. + + # Criar nova cadeia + iptables -t nat -N SHADOWSOCKS + iptables -t mangle -N SHADOWSOCKS + + # Ignore os endereços do seu servidor shadowsocks + # É muito IMPORTANTE, apenas tome cuidado. + iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN + + # Ignore LANs e quaisquer outros endereços que você gostaria de ignorar o proxy + # Veja Wikipedia e RFC5735 para lista completa de redes reservadas. + # Consulte ashi009/bestroutetb para obter uma lista de rotas CHN altamente otimizada. + iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN + iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN + + # Qualquer outra coisa deve ser redirecionada para a porta local do shadowsocks + iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345 + + # Adicione quaisquer regras UDP + ip route add local default dev lo table 100 + ip rule add fwmark 1 lookup 100 + iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01 + + # Aplicar as regras + iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS + iptables -t mangle -A PREROUTING -j SHADOWSOCKS + + # Iniciar o shadowsocks-redir + ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid + +## Proxy transparente (tproxy puro) + +A execução deste script no host linux pode fazer proxy de todo o tráfego de saída desta máquina (exceto o tráfego enviado para o endereço reservado). Outros hosts na mesma LAN também podem alterar seu gateway padrão para o ip deste host linux (ao mesmo tempo, alterar o servidor dns para 1.1.1.1 ou 8.8.8.8, etc.) para fazer proxy de seu tráfego de saída. + +> Claro, o proxy ipv6 é semelhante, basta alterar `iptables` para `ip6tables`, `ip` para `ip -6`, `127.0.0.1` para `::1`, e outros detalhes. + +```shell +#!/bin/bash + +start_ssredir() { + # modifique MyIP, MyPort, etc. + (ss-redir -s MyIP -p MyPort -m MyMethod -k MyPasswd -b 127.0.0.1 -l 60080 --no-delay -u -T -v >/var/log/ss-redir.log &) +} + +stop_ssredir() { + kill -9 $(pidof ss-redir) &>/dev/null +} + +start_iptables() { + ##################### SSREDIR ##################### + iptables -t mangle -N SSREDIR + + # connection-mark -> packet-mark + iptables -t mangle -A SSREDIR -j CONNMARK --restore-mark + iptables -t mangle -A SSREDIR -m mark --mark 0x2333 -j RETURN + + # modifique MyIP, MyPort, etc. + # ignorar o tráfego enviado para o servidor ss + iptables -t mangle -A SSREDIR -p tcp -d MyIP --dport MyPort -j RETURN + iptables -t mangle -A SSREDIR -p udp -d MyIP --dport MyPort -j RETURN + + # ignorar o tráfego enviado para endereços reservados + iptables -t mangle -A SSREDIR -d 0.0.0.0/8 -j RETURN + iptables -t mangle -A SSREDIR -d 10.0.0.0/8 -j RETURN + iptables -t mangle -A SSREDIR -d 100.64.0.0/10 -j RETURN + iptables -t mangle -A SSREDIR -d 127.0.0.0/8 -j RETURN + iptables -t mangle -A SSREDIR -d 169.254.0.0/16 -j RETURN + iptables -t mangle -A SSREDIR -d 172.16.0.0/12 -j RETURN + iptables -t mangle -A SSREDIR -d 192.0.0.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 192.0.2.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 192.88.99.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 192.168.0.0/16 -j RETURN + iptables -t mangle -A SSREDIR -d 198.18.0.0/15 -j RETURN + iptables -t mangle -A SSREDIR -d 198.51.100.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 203.0.113.0/24 -j RETURN + iptables -t mangle -A SSREDIR -d 224.0.0.0/4 -j RETURN + iptables -t mangle -A SSREDIR -d 240.0.0.0/4 -j RETURN + iptables -t mangle -A SSREDIR -d 255.255.255.255/32 -j RETURN + + # marca o primeiro pacote da conexão + iptables -t mangle -A SSREDIR -p tcp --syn -j MARK --set-mark 0x2333 + iptables -t mangle -A SSREDIR -p udp -m conntrack --ctstate NEW -j MARK --set-mark 0x2333 + + # packet-mark -> connection-mark + iptables -t mangle -A SSREDIR -j CONNMARK --save-mark + + ##################### OUTPUT ##################### + # proxy the outgoing traffic from this machine + iptables -t mangle -A OUTPUT -p tcp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + iptables -t mangle -A OUTPUT -p udp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + + ##################### PREROUTING ##################### + # proxy traffic passing through this machine (other->other) + iptables -t mangle -A PREROUTING -p tcp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + iptables -t mangle -A PREROUTING -p udp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR + + # hand over the marked package to TPROXY for processing + iptables -t mangle -A PREROUTING -p tcp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 + iptables -t mangle -A PREROUTING -p udp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 +} + +stop_iptables() { + ##################### PREROUTING ##################### + iptables -t mangle -D PREROUTING -p tcp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 &>/dev/null + iptables -t mangle -D PREROUTING -p udp -m mark --mark 0x2333 -j TPROXY --on-ip 127.0.0.1 --on-port 60080 &>/dev/null + + iptables -t mangle -D PREROUTING -p tcp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + iptables -t mangle -D PREROUTING -p udp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + + ##################### OUTPUT ##################### + iptables -t mangle -D OUTPUT -p tcp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + iptables -t mangle -D OUTPUT -p udp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSREDIR &>/dev/null + + ##################### SSREDIR ##################### + iptables -t mangle -F SSREDIR &>/dev/null + iptables -t mangle -X SSREDIR &>/dev/null +} + +start_iproute2() { + ip route add local default dev lo table 100 + ip rule add fwmark 0x2333 table 100 +} + +stop_iproute2() { + ip rule del table 100 &>/dev/null + ip route flush table 100 &>/dev/null +} + +start_resolvconf() { + # or nameserver 8.8.8.8, etc. + echo "nameserver 1.1.1.1" >/etc/resolv.conf +} + +stop_resolvconf() { + echo "nameserver 114.114.114.114" >/etc/resolv.conf +} + +start() { + echo "start ..." + start_ssredir + start_iptables + start_iproute2 + start_resolvconf + echo "start end" +} + +stop() { + echo "stop ..." + stop_resolvconf + stop_iproute2 + stop_iptables + stop_ssredir + echo "stop end" +} + +restart() { + stop + sleep 1 + start +} + +main() { + if [ $# -eq 0 ]; then + echo "usage: $0 start|stop|restart ..." + return 1 + fi + + for funcname in "$@"; do + if [ "$(type -t $funcname)" != 'function' ]; then + echo "'$funcname' not a shell function" + return 1 + fi + done + + for funcname in "$@"; do + $funcname + done + return 0 +} +main "$@" +``` + +## Dicas de segurança + +Para qualquer servidor público, para evitar que os usuários acessem o localhost do seu servidor, adicione `--acl acl/server_block_local.acl` à linha de comando. + +Embora shadowsocks-libev possa lidar bem com milhares de conexões simultâneas, ainda recomendamos +configurando as regras de firewall do seu servidor para limitar as conexões de cada usuário: + + # Até 32 conexões são suficientes para uso normal + iptables -A INPUT -p tcp --syn --dport ${SHADOWSOCKS_PORT} -m connlimit --connlimit-above 32 -j REJECT --reject-with tcp-reset + +## Licença + +``` +Copyright: 2013-2015, Clow Windy + 2013-2018, Max Lv + 2014, Linus Yang + +Este programa é um software livre: você pode redistribuí-lo +e/ou modificá-lo sob os termos da GNU General Public License +conforme publicada pela Free Software Foundation, a versão 3 +da Licença ou (a seu critério) qualquer versão posterior. + +Este programa é distribuído na esperança de que seja útil, + mas SEM QUALQUER GARANTIA; sem mesmo a garantia implícita +de COMERCIALIZAÇÃO ou ADEQUAÇÃO A UM DETERMINADO FIM.Veja +a Licença Pública Geral GNU para mais detalhes. + +Você deve ter recebido uma cópia da GNU General Public License +juntamente com este programa. Caso contrário, +consulte . +``` diff --git a/acl/chn.acl b/acl/chn.acl index a2257116c..2093569a6 100644 --- a/acl/chn.acl +++ b/acl/chn.acl @@ -1,3 +1,6 @@ +[proxy_all] + +[bypass_list] 1.0.1.0/24 1.0.2.0/23 1.0.8.0/21 @@ -10,27 +13,35 @@ 1.1.32.0/19 1.2.0.0/23 1.2.2.0/24 -1.2.4.0/24 1.2.5.0/24 1.2.6.0/23 -1.2.8.0/24 -1.2.9.0/24 -1.2.10.0/23 -1.2.12.0/22 +1.2.8.0/21 1.2.16.0/20 1.2.32.0/19 1.2.64.0/18 1.3.0.0/16 1.4.1.0/24 1.4.2.0/23 -1.4.4.0/24 -1.4.5.0/24 -1.4.6.0/23 +1.4.4.0/22 1.4.8.0/21 1.4.16.0/20 1.4.32.0/19 1.4.64.0/18 -1.8.0.0/16 +1.8.0.0/18 +1.8.64.0/19 +1.8.96.0/22 +1.8.100.0/23 +1.8.112.0/20 +1.8.128.0/20 +1.8.144.0/22 +1.8.148.0/23 +1.8.154.0/23 +1.8.156.0/22 +1.8.160.0/19 +1.8.192.0/19 +1.8.224.0/20 +1.8.244.0/22 +1.8.248.0/21 1.10.0.0/21 1.10.8.0/23 1.10.11.0/24 @@ -39,30 +50,46 @@ 1.10.32.0/19 1.10.64.0/18 1.12.0.0/14 +1.18.128.0/24 1.24.0.0/13 1.45.0.0/16 -1.48.0.0/15 -1.50.0.0/16 -1.51.0.0/16 +1.48.0.0/14 1.56.0.0/13 1.68.0.0/14 -1.80.0.0/13 -1.88.0.0/14 -1.92.0.0/15 -1.94.0.0/15 -1.116.0.0/14 +1.80.0.0/12 +1.116.0.0/15 +1.118.1.0/24 +1.118.2.0/23 +1.118.4.0/22 +1.118.8.0/21 +1.118.16.0/20 +1.118.32.0/19 +1.118.64.0/18 +1.118.128.0/17 +1.119.0.0/16 1.180.0.0/14 1.184.0.0/15 1.188.0.0/14 1.192.0.0/13 1.202.0.0/15 1.204.0.0/14 +2.20.54.23/32 +8.128.0.0/10 +8.209.36.0/22 +8.209.40.0/21 +8.209.48.0/20 +8.209.192.0/18 +8.210.0.0/15 +8.212.0.0/14 +8.216.0.0/13 14.0.0.0/21 14.0.12.0/22 14.1.0.0/22 +14.1.24.0/22 +14.1.108.0/22 14.16.0.0/12 14.102.128.0/22 -14.102.156.0/22 +14.102.180.0/22 14.103.0.0/16 14.104.0.0/13 14.112.0.0/12 @@ -74,6 +101,19 @@ 14.196.0.0/15 14.204.0.0/15 14.208.0.0/12 +20.81.0.0/24 +20.134.160.0/20 +20.139.160.0/20 +20.249.255.0/24 +20.251.0.0/22 +23.236.64.0/25 +23.236.64.128/26 +23.236.64.192/27 +27.0.128.0/21 +27.0.160.0/21 +27.0.188.0/22 +27.0.204.0/22 +27.0.208.0/21 27.8.0.0/13 27.16.0.0/12 27.34.232.0/21 @@ -91,8 +131,10 @@ 27.106.128.0/18 27.106.204.0/22 27.109.32.0/19 +27.109.124.0/22 27.112.0.0/18 27.112.80.0/20 +27.112.112.0/21 27.113.128.0/18 27.115.0.0/17 27.116.44.0/22 @@ -107,7 +149,6 @@ 27.192.0.0/11 27.224.0.0/14 36.0.0.0/22 -36.0.8.0/21 36.0.16.0/20 36.0.32.0/19 36.0.64.0/18 @@ -124,13 +165,25 @@ 36.37.48.0/20 36.40.0.0/13 36.48.0.0/15 -36.51.0.0/16 +36.51.0.0/17 +36.51.128.0/18 +36.51.192.0/19 +36.51.224.0/20 +36.51.240.0/21 +36.51.248.0/22 +36.51.252.0/23 36.56.0.0/13 36.96.0.0/11 36.128.0.0/10 36.192.0.0/11 36.248.0.0/14 36.254.0.0/16 +36.255.116.0/22 +36.255.128.0/22 +36.255.164.0/22 +36.255.172.0/22 +36.255.176.0/22 +38.142.239.114/32 39.0.0.0/24 39.0.2.0/23 39.0.4.0/22 @@ -140,7 +193,27 @@ 39.0.64.0/18 39.0.128.0/17 39.64.0.0/11 +39.96.0.0/13 +39.104.0.0/14 +39.108.0.0/16 +39.109.120.0/23 39.128.0.0/10 +40.0.176.0/20 +40.0.247.0/24 +40.0.248.0/22 +40.0.252.0/23 +40.0.255.0/24 +40.72.0.0/15 +40.77.136.112/28 +40.77.236.224/27 +40.77.254.64/27 +40.125.128.0/17 +40.126.64.0/18 +40.198.10.0/24 +40.198.16.0/21 +40.198.24.0/23 +40.251.225.0/24 +40.251.227.0/24 42.0.0.0/22 42.0.8.0/21 42.0.16.0/21 @@ -151,12 +224,8 @@ 42.1.32.0/20 42.1.48.0/21 42.1.56.0/22 -42.1.128.0/17 42.4.0.0/14 -42.48.0.0/15 -42.50.0.0/16 -42.51.0.0/16 -42.52.0.0/14 +42.48.0.0/13 42.56.0.0/14 42.62.0.0/17 42.62.128.0/19 @@ -169,7 +238,13 @@ 42.83.80.0/22 42.83.88.0/21 42.83.96.0/19 -42.83.128.0/17 +42.83.128.0/23 +42.83.134.0/24 +42.83.139.0/24 +42.83.140.0/22 +42.83.144.0/20 +42.83.160.0/19 +42.83.192.0/18 42.84.0.0/14 42.88.0.0/13 42.96.64.0/19 @@ -199,7 +274,13 @@ 42.156.48.0/20 42.156.64.0/18 42.156.128.0/17 -42.157.0.0/16 +42.157.0.0/21 +42.157.8.0/22 +42.157.14.0/23 +42.157.16.0/20 +42.157.32.0/19 +42.157.64.0/18 +42.157.128.0/17 42.158.0.0/15 42.160.0.0/12 42.176.0.0/13 @@ -211,72 +292,574 @@ 42.187.112.0/21 42.187.120.0/22 42.187.128.0/17 -42.192.0.0/15 -42.194.0.0/21 -42.194.8.0/22 -42.194.12.0/22 -42.194.16.0/20 -42.194.32.0/19 -42.194.64.0/18 -42.194.128.0/17 -42.195.0.0/16 -42.196.0.0/14 +42.192.0.0/13 42.201.0.0/17 42.202.0.0/15 42.204.0.0/14 42.208.0.0/12 42.224.0.0/12 -42.240.0.0/17 -42.240.128.0/17 +42.240.0.0/16 42.242.0.0/15 -42.244.0.0/14 +42.244.0.0/15 +42.246.0.0/16 +42.247.0.0/22 +42.247.4.0/24 +42.247.5.0/25 +42.247.5.128/26 +42.247.5.204/30 +42.247.5.208/28 +42.247.5.224/27 +42.247.6.0/23 +42.247.8.0/21 +42.247.16.0/20 +42.247.32.0/19 +42.247.64.0/18 +42.247.128.0/17 42.248.0.0/13 +43.224.12.0/22 +43.224.24.0/22 +43.224.44.0/22 +43.224.52.0/22 +43.224.56.0/22 +43.224.68.0/22 +43.224.72.0/22 +43.224.80.0/22 +43.224.100.0/22 +43.224.144.0/22 +43.224.160.0/22 +43.224.176.0/22 +43.224.184.0/22 +43.224.200.0/21 +43.224.208.0/21 +43.224.216.0/22 +43.224.240.0/22 +43.225.76.0/22 +43.225.86.0/24 +43.225.120.0/22 +43.225.180.0/22 +43.225.208.0/22 +43.225.216.0/21 +43.225.224.0/20 +43.225.240.0/21 +43.225.252.0/22 +43.226.32.0/19 +43.226.64.0/19 +43.226.96.0/20 +43.226.112.0/21 +43.226.120.0/22 +43.226.128.0/19 +43.226.160.0/21 +43.226.236.0/22 +43.226.240.0/20 +43.227.0.0/21 +43.227.8.0/22 +43.227.32.0/19 +43.227.64.0/19 +43.227.104.0/22 +43.227.136.0/21 +43.227.144.0/22 +43.227.152.0/21 +43.227.160.0/20 +43.227.176.0/21 +43.227.188.0/22 +43.227.192.0/19 +43.227.232.0/22 +43.227.248.0/21 +43.228.0.0/18 +43.228.64.0/21 +43.228.76.0/22 +43.228.100.0/22 +43.228.116.0/24 +43.228.118.0/23 +43.228.132.0/22 +43.228.136.0/22 +43.228.148.0/22 +43.228.152.0/22 +43.228.188.0/22 +43.229.40.0/22 +43.229.48.0/22 +43.229.56.0/22 +43.229.96.0/22 +43.229.136.0/21 +43.229.168.0/21 +43.229.176.0/20 +43.229.192.0/21 +43.229.216.0/21 +43.229.232.0/21 +43.230.20.0/22 +43.230.32.0/22 +43.230.68.0/22 +43.230.72.0/22 +43.230.84.0/22 +43.230.124.0/22 +43.230.220.0/22 +43.230.224.0/19 +43.231.12.0/22 +43.231.32.0/20 +43.231.80.0/20 +43.231.96.0/20 +43.231.136.0/21 +43.231.144.0/20 +43.231.160.0/20 +43.231.176.0/21 +43.236.0.0/15 +43.238.0.0/16 +43.239.0.0/19 +43.239.32.0/20 +43.239.48.0/22 +43.239.116.0/22 +43.239.120.0/22 +43.239.172.0/22 +43.240.0.0/22 +43.240.56.0/21 +43.240.68.0/22 +43.240.72.0/21 +43.240.84.0/22 +43.240.124.0/22 +43.240.128.0/21 +43.240.136.0/22 +43.240.156.0/22 +43.240.160.0/19 +43.240.192.0/19 +43.240.240.0/20 +43.241.0.0/20 +43.241.16.0/21 +43.241.48.0/22 +43.241.76.0/22 +43.241.80.0/20 +43.241.112.0/22 +43.241.168.0/21 +43.241.176.0/21 +43.241.184.0/22 +43.241.208.0/20 +43.241.224.0/20 +43.241.240.0/22 +43.241.248.0/22 +43.242.8.0/21 +43.242.16.0/20 +43.242.48.0/22 +43.242.53.0/24 +43.242.54.0/23 +43.242.56.0/21 +43.242.64.0/22 +43.242.72.0/21 +43.242.80.0/20 +43.242.96.0/22 +43.242.144.0/20 +43.242.160.0/21 +43.242.180.0/22 +43.242.188.0/22 +43.242.192.0/21 +43.242.204.0/22 +43.242.216.0/21 +43.242.252.0/22 +43.243.4.0/22 +43.243.8.0/21 +43.243.16.0/22 +43.243.88.0/22 +43.243.128.0/22 +43.243.136.0/22 +43.243.144.0/21 +43.243.156.0/22 +43.243.180.0/22 +43.243.228.0/22 +43.243.232.0/22 +43.243.244.0/22 +43.246.0.0/18 +43.246.64.0/19 +43.246.96.0/22 +43.246.228.0/22 +43.247.4.0/22 +43.247.8.0/22 +43.247.44.0/22 +43.247.48.0/22 +43.247.68.0/22 +43.247.76.0/22 +43.247.84.0/22 +43.247.88.0/21 +43.247.96.0/21 +43.247.108.0/22 +43.247.112.0/22 +43.247.148.0/22 +43.247.152.0/22 +43.247.176.0/20 +43.247.196.0/22 +43.247.200.0/21 +43.247.208.0/20 +43.247.224.0/19 +43.248.0.0/21 +43.248.20.0/22 +43.248.28.0/22 +43.248.48.0/22 +43.248.76.0/22 +43.248.80.0/20 +43.248.96.0/19 +43.248.128.0/20 +43.248.144.0/21 +43.248.176.0/20 +43.248.192.0/20 +43.248.208.0/22 +43.248.228.0/22 +43.248.232.0/22 +43.248.244.0/22 +43.249.4.0/22 +43.249.120.0/22 +43.249.132.0/22 +43.249.136.0/22 +43.249.144.0/20 +43.249.160.0/21 +43.249.168.0/22 +43.249.192.0/22 +43.249.236.0/22 +43.250.4.0/22 +43.250.12.0/22 +43.250.16.0/21 +43.250.28.0/22 +43.250.32.0/22 +43.250.96.0/21 +43.250.108.0/22 +43.250.112.0/21 +43.250.128.0/22 +43.250.144.0/21 +43.250.160.0/22 +43.250.168.0/22 +43.250.176.0/22 +43.250.200.0/22 +43.250.212.0/22 +43.250.216.0/21 +43.250.236.0/22 +43.250.244.0/22 +43.251.4.0/22 +43.251.36.0/22 +43.251.192.0/22 +43.251.232.0/22 +43.251.244.0/22 +43.252.48.0/22 +43.252.56.0/22 +43.252.224.0/22 +43.254.0.0/21 +43.254.8.0/22 +43.254.24.0/22 +43.254.36.0/22 +43.254.44.0/22 +43.254.52.0/22 +43.254.64.0/22 +43.254.72.0/22 +43.254.84.0/22 +43.254.88.0/21 +43.254.100.0/22 +43.254.104.0/22 +43.254.112.0/21 +43.254.128.0/22 +43.254.136.0/21 +43.254.144.0/20 +43.254.168.0/21 +43.254.180.0/22 +43.254.184.0/21 +43.254.192.0/22 +43.254.200.0/22 +43.254.208.0/22 +43.254.220.0/22 +43.254.224.0/20 +43.254.240.0/22 +43.254.248.0/21 +43.255.0.0/21 +43.255.8.0/22 +43.255.16.0/22 +43.255.48.0/22 +43.255.64.0/20 +43.255.84.0/22 +43.255.96.0/22 +43.255.144.0/22 +43.255.176.0/22 +43.255.184.0/22 +43.255.192.0/22 +43.255.200.0/21 +43.255.208.0/21 +43.255.224.0/21 +43.255.232.0/22 +43.255.244.0/22 +45.40.192.0/20 +45.40.208.0/21 +45.40.224.0/19 +45.65.16.0/20 +45.112.132.0/22 +45.112.188.0/22 +45.112.208.0/22 +45.112.216.0/21 +45.112.228.0/22 +45.112.232.0/21 +45.113.12.0/22 +45.113.16.0/20 +45.113.40.0/22 +45.113.52.0/22 +45.113.72.0/22 +45.113.144.0/21 +45.113.168.0/22 +45.113.184.0/22 +45.113.200.0/21 +45.113.208.0/20 +45.113.240.0/22 +45.113.252.0/22 +45.114.0.0/22 +45.114.32.0/22 +45.114.52.0/22 +45.114.96.0/22 +45.114.136.0/22 +45.114.196.0/22 +45.114.200.0/22 +45.114.228.0/22 +45.114.237.0/24 +45.114.238.0/23 +45.114.252.0/22 +45.115.44.0/22 +45.115.100.0/22 +45.115.120.0/22 +45.115.132.0/22 +45.115.144.0/22 +45.115.156.0/22 +45.115.164.0/22 +45.115.200.0/22 +45.115.212.0/22 +45.115.244.0/22 +45.115.248.0/22 +45.116.16.0/22 +45.116.24.0/22 +45.116.32.0/21 +45.116.52.0/22 +45.116.96.0/21 +45.116.140.0/22 +45.116.152.0/22 +45.116.208.0/22 +45.117.8.0/22 +45.117.20.0/22 +45.117.68.0/22 +45.117.124.0/22 +45.117.252.0/22 +45.119.60.0/22 +45.119.64.0/21 +45.119.72.0/22 +45.119.104.0/22 +45.119.232.0/22 +45.120.100.0/22 +45.120.140.0/22 +45.120.164.0/22 +45.120.180.128/27 +45.120.240.0/22 +45.121.52.0/22 +45.121.64.0/21 +45.121.72.0/22 +45.121.92.0/22 +45.121.96.0/22 +45.121.172.0/22 +45.121.176.0/22 +45.121.240.0/20 +45.122.0.0/19 +45.122.32.0/21 +45.122.40.0/22 +45.122.60.0/22 +45.122.64.0/19 +45.122.96.0/20 +45.122.112.0/21 +45.122.160.0/19 +45.122.192.0/20 +45.122.208.0/21 +45.122.216.0/22 +45.123.28.0/22 +45.123.32.0/21 +45.123.44.0/22 +45.123.48.0/20 +45.123.64.0/20 +45.123.80.0/21 +45.123.120.0/22 +45.123.128.0/21 +45.123.136.0/22 +45.123.148.0/22 +45.123.152.0/21 +45.123.164.0/22 +45.123.168.0/21 +45.123.176.0/21 +45.123.184.0/22 +45.123.204.0/22 +45.123.212.0/22 +45.123.224.0/19 +45.124.0.0/22 +45.124.20.0/22 +45.124.28.0/22 +45.124.32.0/21 +45.124.44.0/22 +45.124.68.0/22 +45.124.76.0/22 +45.124.80.0/22 +45.124.100.0/22 +45.124.124.0/22 +45.124.172.0/22 +45.124.176.0/22 +45.124.208.0/22 +45.124.248.0/22 +45.125.24.0/22 +45.125.44.0/22 +45.125.52.0/22 +45.125.56.0/22 +45.125.76.0/22 +45.125.80.0/20 +45.125.96.0/21 +45.125.136.0/22 +45.126.48.0/21 +45.126.108.0/22 +45.126.112.0/21 +45.126.120.0/22 +45.126.220.0/22 +45.127.8.0/21 +45.127.128.0/22 +45.127.144.0/21 +45.127.156.0/22 +45.248.8.0/22 +45.248.80.0/22 +45.248.88.0/22 +45.248.96.0/20 +45.248.128.0/21 +45.248.204.0/22 +45.248.208.0/20 +45.248.224.0/19 +45.249.0.0/21 +45.249.12.0/22 +45.249.16.0/20 +45.249.32.0/21 +45.249.112.0/22 +45.249.188.0/22 +45.249.192.0/20 +45.249.208.0/21 +45.250.12.0/22 +45.250.16.0/22 +45.250.28.0/22 +45.250.32.0/21 +45.250.40.0/22 +45.250.76.0/22 +45.250.80.0/20 +45.250.96.0/22 +45.250.104.0/21 +45.250.112.0/20 +45.250.128.0/20 +45.250.144.0/21 +45.250.152.0/22 +45.250.164.0/22 +45.250.180.0/22 +45.250.184.0/21 +45.250.192.0/22 +45.251.0.0/22 +45.251.8.0/22 +45.251.16.0/21 +45.251.52.0/22 +45.251.84.0/22 +45.251.88.0/21 +45.251.96.0/21 +45.251.120.0/21 +45.251.137.0/24 +45.251.138.0/23 +45.251.140.0/22 +45.251.144.0/20 +45.251.160.0/19 +45.251.192.0/19 +45.251.224.0/22 +45.252.0.0/19 +45.252.32.0/20 +45.252.48.0/22 +45.252.84.0/22 +45.252.88.0/21 +45.252.96.0/19 +45.252.128.0/19 +45.252.160.0/20 +45.252.176.0/22 +45.252.192.0/19 +45.252.224.0/21 +45.252.232.0/22 +45.253.0.0/18 +45.253.64.0/20 +45.253.80.0/21 +45.253.92.0/22 +45.253.96.0/20 +45.253.112.0/21 +45.253.120.0/22 +45.253.130.0/23 +45.253.132.0/22 +45.253.136.0/21 +45.253.144.0/20 +45.253.160.0/19 +45.253.192.0/19 +45.253.224.0/20 +45.253.240.0/22 +45.254.0.0/20 +45.254.16.0/21 +45.254.28.0/22 +45.254.40.0/22 +45.254.48.0/20 +45.254.64.0/18 +45.254.128.0/18 +45.254.192.0/19 +45.254.224.0/21 +45.254.236.0/22 +45.254.240.0/22 +45.254.248.0/22 +45.255.0.0/18 +45.255.64.0/19 +45.255.96.0/20 +45.255.112.0/21 +45.255.120.0/22 +45.255.136.0/21 +45.255.144.0/20 +45.255.160.0/19 +45.255.192.0/19 +45.255.224.0/20 +45.255.240.0/21 +45.255.248.0/22 +46.248.24.0/23 +47.92.0.0/14 +47.96.0.0/11 49.4.0.0/14 -49.51.0.0/16 +49.51.56.0/22 +49.51.60.0/23 +49.51.110.0/23 +49.51.112.0/20 49.52.0.0/14 49.64.0.0/11 49.112.0.0/13 49.120.0.0/14 49.128.0.0/24 49.128.2.0/23 +49.128.4.0/22 49.140.0.0/15 49.152.0.0/14 -49.208.0.0/15 -49.210.0.0/15 +49.208.0.0/14 49.220.0.0/14 49.232.0.0/14 49.239.0.0/18 49.239.192.0/18 -49.246.224.0/19 +52.80.0.0/14 +52.94.249.0/27 +52.130.0.0/15 54.222.0.0/15 +54.231.208.0/20 +54.240.224.0/24 +57.92.96.0/20 58.14.0.0/15 -58.16.0.0/16 -58.17.0.0/17 -58.17.128.0/17 -58.18.0.0/16 -58.19.0.0/16 -58.20.0.0/16 -58.21.0.0/16 -58.22.0.0/15 +58.16.0.0/13 58.24.0.0/15 58.30.0.0/15 -58.32.0.0/13 -58.40.0.0/15 -58.42.0.0/16 -58.43.0.0/16 -58.44.0.0/14 -58.48.0.0/13 -58.56.0.0/15 -58.58.0.0/16 -58.59.0.0/17 -58.59.128.0/17 -58.60.0.0/14 +58.32.0.0/11 58.65.232.0/21 58.66.0.0/15 -58.68.128.0/17 +58.68.128.0/19 +58.68.160.0/23 +58.68.163.0/24 +58.68.164.0/22 +58.68.179.0/24 +58.68.180.0/24 +58.68.200.0/21 +58.68.208.0/20 +58.68.224.0/19 58.82.0.0/17 -58.83.0.0/17 -58.83.128.0/17 +58.83.0.0/16 58.87.64.0/18 58.99.128.0/17 58.100.0.0/15 @@ -284,82 +867,52 @@ 58.128.0.0/13 58.144.0.0/16 58.154.0.0/15 -58.192.0.0/15 -58.194.0.0/15 -58.196.0.0/15 -58.198.0.0/15 -58.200.0.0/13 -58.208.0.0/12 -58.240.0.0/15 -58.242.0.0/15 -58.244.0.0/15 -58.246.0.0/15 -58.248.0.0/13 -59.32.0.0/13 -59.40.0.0/15 -59.42.0.0/16 -59.43.0.0/16 -59.44.0.0/14 -59.48.0.0/16 -59.49.0.0/17 -59.49.128.0/17 -59.50.0.0/16 -59.51.0.0/17 -59.51.128.0/17 -59.52.0.0/14 -59.56.0.0/14 -59.60.0.0/15 -59.62.0.0/15 -59.64.0.0/14 -59.68.0.0/14 -59.72.0.0/15 -59.74.0.0/15 -59.76.0.0/16 -59.77.0.0/16 -59.78.0.0/15 -59.80.0.0/14 -59.107.0.0/17 -59.107.128.0/17 -59.108.0.0/15 -59.110.0.0/15 +58.192.0.0/11 +58.240.0.0/12 +59.32.0.0/11 +59.64.0.0/12 +59.80.0.0/15 +59.82.0.0/16 +59.83.0.0/18 +59.83.132.0/22 +59.83.136.0/21 +59.83.144.0/20 +59.83.160.0/19 +59.83.192.0/19 +59.83.224.0/20 +59.83.240.0/21 +59.83.248.0/22 +59.83.252.0/23 +59.83.254.0/24 +59.107.0.0/16 +59.108.0.0/14 59.151.0.0/17 +59.152.16.0/20 +59.152.36.0/22 +59.152.64.0/20 +59.152.112.0/21 +59.153.4.0/22 +59.153.32.0/22 +59.153.64.0/21 +59.153.72.0/22 +59.153.92.0/22 +59.153.136.0/22 +59.153.152.0/21 +59.153.164.0/22 +59.153.168.0/21 +59.153.176.0/20 +59.153.192.0/22 59.155.0.0/16 -59.172.0.0/15 -59.174.0.0/15 +59.172.0.0/14 59.191.0.0/17 -59.191.240.0/20 59.192.0.0/10 -60.0.0.0/13 -60.8.0.0/15 -60.10.0.0/16 -60.11.0.0/16 -60.12.0.0/16 -60.13.0.0/18 -60.13.64.0/18 -60.13.128.0/17 -60.14.0.0/15 -60.16.0.0/13 -60.24.0.0/14 -60.28.0.0/15 -60.30.0.0/16 -60.31.0.0/16 +60.0.0.0/11 60.55.0.0/16 60.63.0.0/16 -60.160.0.0/15 -60.162.0.0/15 -60.164.0.0/15 -60.166.0.0/15 -60.168.0.0/13 -60.176.0.0/12 +60.160.0.0/11 60.194.0.0/15 -60.200.0.0/14 -60.204.0.0/16 -60.205.0.0/16 -60.206.0.0/15 -60.208.0.0/13 -60.216.0.0/15 -60.218.0.0/15 -60.220.0.0/14 +60.200.0.0/13 +60.208.0.0/12 60.232.0.0/15 60.235.0.0/16 60.245.128.0/17 @@ -367,102 +920,65 @@ 60.252.0.0/16 60.253.128.0/17 60.255.0.0/16 -61.4.80.0/22 +61.4.81.0/24 +61.4.82.0/23 61.4.84.0/22 61.4.88.0/21 61.4.176.0/20 61.8.160.0/20 -61.28.0.0/20 -61.28.16.0/20 -61.28.32.0/19 -61.28.64.0/18 +61.14.212.0/22 +61.14.216.0/21 +61.14.240.0/21 +61.28.0.0/17 61.29.128.0/18 61.29.192.0/19 61.29.224.0/20 -61.29.240.0/20 61.45.128.0/18 61.45.224.0/20 61.47.128.0/18 -61.48.0.0/14 -61.52.0.0/15 -61.54.0.0/16 -61.55.0.0/16 +61.48.0.0/13 61.87.192.0/18 -61.128.0.0/15 -61.130.0.0/15 -61.132.0.0/16 -61.133.0.0/17 -61.133.128.0/17 -61.134.0.0/18 -61.134.64.0/19 -61.134.96.0/19 -61.134.128.0/18 -61.134.192.0/18 -61.135.0.0/16 -61.136.0.0/18 -61.136.64.0/18 -61.136.128.0/17 -61.137.0.0/17 -61.137.128.0/17 -61.138.0.0/18 -61.138.64.0/18 -61.138.128.0/18 -61.138.192.0/18 -61.139.0.0/17 -61.139.128.0/18 -61.139.192.0/18 -61.140.0.0/14 -61.144.0.0/14 -61.148.0.0/15 -61.150.0.0/15 -61.152.0.0/16 -61.153.0.0/16 -61.154.0.0/15 -61.156.0.0/16 -61.157.0.0/16 -61.158.0.0/17 -61.158.128.0/17 -61.159.0.0/18 -61.159.64.0/18 -61.159.128.0/17 -61.160.0.0/16 -61.161.0.0/18 -61.161.64.0/18 -61.161.128.0/17 -61.162.0.0/16 -61.163.0.0/16 -61.164.0.0/16 -61.165.0.0/16 -61.166.0.0/16 -61.167.0.0/16 -61.168.0.0/16 -61.169.0.0/16 -61.170.0.0/15 -61.172.0.0/14 -61.176.0.0/16 -61.177.0.0/16 -61.178.0.0/16 -61.179.0.0/16 -61.180.0.0/17 -61.180.128.0/17 -61.181.0.0/16 -61.182.0.0/16 -61.183.0.0/16 -61.184.0.0/14 -61.188.0.0/16 -61.189.0.0/17 -61.189.128.0/17 -61.190.0.0/15 +61.128.0.0/10 61.232.0.0/14 61.236.0.0/15 61.240.0.0/14 +62.234.0.0/16 +68.79.0.0/18 +69.230.192.0/18 +69.231.128.0/18 +69.234.192.0/18 +69.235.128.0/18 +71.131.192.0/18 +71.132.0.0/18 +71.136.64.0/18 +71.137.0.0/18 +72.163.240.0/23 +72.163.248.0/22 +81.68.0.0/14 +81.161.63.0/24 +82.156.0.0/15 +87.254.207.0/24 +91.223.53.0/24 +91.239.190.0/24 +93.183.14.0/24 +93.183.18.0/24 +94.191.0.0/17 101.0.0.0/22 101.1.0.0/22 101.2.172.0/22 101.4.0.0/14 101.16.0.0/12 -101.32.0.0/12 +101.32.0.0/14 +101.36.0.0/18 +101.36.64.0/20 +101.36.88.0/21 +101.36.96.0/19 +101.36.128.0/17 +101.37.0.0/16 +101.38.0.0/15 +101.40.0.0/13 101.48.0.0/15 +101.50.8.0/21 101.50.56.0/22 101.52.0.0/16 101.53.100.0/22 @@ -503,10 +1019,28 @@ 101.128.32.0/19 101.129.0.0/16 101.130.0.0/15 -101.132.0.0/14 +101.132.0.0/15 +101.134.0.0/17 +101.134.128.0/19 +101.134.160.0/20 +101.134.176.0/21 +101.134.184.0/22 +101.134.189.0/24 +101.134.190.0/23 +101.134.192.0/18 +101.135.0.0/16 101.144.0.0/12 101.192.0.0/14 -101.196.0.0/14 +101.196.0.0/16 +101.198.128.0/18 +101.198.194.0/24 +101.198.196.0/23 +101.198.200.0/22 +101.198.224.0/19 +101.199.0.0/19 +101.199.48.0/20 +101.199.64.0/18 +101.199.128.0/17 101.200.0.0/15 101.203.128.0/19 101.203.160.0/21 @@ -520,8 +1054,7 @@ 101.234.80.0/20 101.234.96.0/19 101.236.0.0/14 -101.240.0.0/14 -101.244.0.0/14 +101.240.0.0/13 101.248.0.0/15 101.251.0.0/22 101.251.8.0/21 @@ -531,80 +1064,73 @@ 101.251.128.0/17 101.252.0.0/15 101.254.0.0/16 +102.176.130.0/24 103.1.8.0/22 103.1.20.0/22 103.1.24.0/22 -103.1.72.0/22 103.1.88.0/22 103.1.168.0/22 103.2.108.0/22 103.2.156.0/22 103.2.164.0/22 -103.2.200.0/22 -103.2.204.0/22 -103.2.208.0/22 -103.2.212.0/22 +103.2.200.0/21 +103.2.208.0/21 103.3.84.0/22 -103.3.88.0/22 -103.3.92.0/22 -103.3.96.0/22 -103.3.100.0/22 -103.3.104.0/22 -103.3.108.0/22 -103.3.112.0/22 -103.3.116.0/22 -103.3.120.0/22 -103.3.124.0/22 -103.3.128.0/22 -103.3.132.0/22 -103.3.136.0/22 -103.3.140.0/22 +103.3.88.0/21 +103.3.96.0/19 +103.3.128.0/20 103.3.148.0/22 -103.3.152.0/22 -103.3.156.0/22 +103.3.152.0/21 103.4.56.0/22 103.4.168.0/22 103.4.184.0/22 103.5.36.0/22 -103.5.52.0/22 +103.5.52.0/23 103.5.56.0/22 +103.5.152.0/22 +103.5.168.0/22 +103.5.192.0/22 103.5.252.0/22 103.6.76.0/22 +103.6.108.0/22 +103.6.120.0/22 103.6.220.0/22 -103.7.4.0/22 -103.7.28.0/22 +103.6.228.0/22 +103.7.140.0/22 103.7.212.0/22 -103.7.216.0/22 -103.7.220.0/22 -103.8.4.0/22 +103.7.216.0/21 +103.8.0.0/21 103.8.8.0/22 103.8.32.0/22 103.8.52.0/22 +103.8.68.0/22 103.8.108.0/22 103.8.156.0/22 -103.8.200.0/22 -103.8.204.0/22 +103.8.200.0/21 103.8.220.0/22 +103.9.8.0/22 +103.9.24.0/22 +103.9.108.0/22 103.9.152.0/22 -103.9.248.0/22 -103.9.252.0/22 +103.9.248.0/21 103.10.0.0/22 103.10.16.0/22 103.10.84.0/22 103.10.111.0/24 103.10.140.0/22 +103.11.16.0/22 +103.11.168.0/22 103.11.180.0/22 103.12.32.0/22 -103.12.68.0/22 103.12.136.0/22 103.12.184.0/22 103.12.232.0/22 +103.13.12.0/22 103.13.124.0/22 103.13.144.0/22 103.13.196.0/22 103.13.244.0/22 103.14.84.0/22 -103.14.112.0/22 103.14.132.0/22 103.14.136.0/22 103.14.156.0/22 @@ -615,104 +1141,71 @@ 103.15.96.0/22 103.15.200.0/22 103.16.52.0/22 -103.16.80.0/22 -103.16.84.0/22 +103.16.80.0/21 103.16.88.0/22 103.16.108.0/22 103.16.124.0/22 103.17.40.0/22 -103.17.120.0/22 +103.17.64.0/22 +103.17.120.0/23 +103.17.136.0/22 103.17.160.0/22 103.17.204.0/22 103.17.228.0/22 103.18.192.0/22 -103.18.208.0/22 -103.18.212.0/22 +103.18.208.0/21 103.18.224.0/22 103.19.12.0/22 -103.19.40.0/22 -103.19.44.0/22 -103.19.64.0/22 -103.19.68.0/22 +103.19.40.0/21 +103.19.64.0/21 103.19.72.0/22 103.19.232.0/22 103.20.12.0/22 -103.20.32.0/22 +103.20.32.0/23 +103.20.34.0/24 +103.20.68.0/22 103.20.112.0/22 103.20.128.0/22 103.20.160.0/22 103.20.248.0/22 -103.21.112.0/22 -103.21.116.0/22 -103.21.136.0/22 +103.21.112.0/21 103.21.140.0/22 103.21.176.0/22 -103.21.208.0/22 103.21.240.0/22 -103.22.0.0/22 -103.22.4.0/22 -103.22.8.0/22 -103.22.12.0/22 -103.22.16.0/22 -103.22.20.0/22 -103.22.24.0/22 -103.22.28.0/22 -103.22.32.0/22 -103.22.36.0/22 -103.22.40.0/22 -103.22.44.0/22 -103.22.48.0/22 -103.22.52.0/22 -103.22.56.0/22 -103.22.60.0/22 -103.22.64.0/22 -103.22.68.0/22 -103.22.72.0/22 -103.22.76.0/22 -103.22.80.0/22 -103.22.84.0/22 -103.22.88.0/22 -103.22.92.0/22 +103.22.0.0/18 +103.22.64.0/19 103.22.100.0/22 -103.22.104.0/22 -103.22.108.0/22 -103.22.112.0/22 -103.22.116.0/22 -103.22.120.0/22 -103.22.124.0/22 +103.22.104.0/21 +103.22.112.0/20 103.22.188.0/22 103.22.228.0/22 103.22.252.0/22 103.23.8.0/22 103.23.56.0/22 -103.23.160.0/22 -103.23.164.0/22 +103.23.160.0/21 103.23.176.0/22 103.23.228.0/22 +103.24.24.0/22 103.24.116.0/22 103.24.128.0/22 103.24.144.0/22 103.24.176.0/22 103.24.184.0/22 -103.24.220.0/22 103.24.228.0/22 -103.24.248.0/22 103.24.252.0/22 -103.25.8.0/23 103.25.20.0/22 -103.25.24.0/22 -103.25.28.0/22 -103.25.32.0/22 -103.25.36.0/22 +103.25.24.0/21 +103.25.32.0/21 103.25.40.0/22 103.25.48.0/22 -103.25.64.0/22 -103.25.68.0/22 +103.25.64.0/21 103.25.148.0/22 103.25.156.0/22 103.25.216.0/22 103.26.0.0/22 103.26.64.0/22 +103.26.76.0/22 +103.26.116.0/22 103.26.156.0/22 103.26.160.0/22 103.26.228.0/22 @@ -722,48 +1215,1179 @@ 103.27.24.0/22 103.27.56.0/22 103.27.96.0/22 -103.27.208.0/22 103.27.240.0/22 103.28.4.0/22 103.28.8.0/22 +103.28.184.0/22 103.28.204.0/22 +103.28.212.0/22 103.29.16.0/22 -103.29.128.0/22 -103.29.132.0/22 +103.29.128.0/21 103.29.136.0/22 103.30.20.0/22 103.30.96.0/22 103.30.148.0/22 -103.30.200.0/22 -103.30.216.0/22 +103.30.202.0/23 103.30.228.0/22 -103.30.232.0/22 103.30.236.0/22 103.31.0.0/22 -103.31.48.0/22 -103.31.52.0/22 -103.31.56.0/22 +103.31.48.0/21 103.31.60.0/22 -103.31.64.0/22 -103.31.68.0/22 -103.31.72.0/22 +103.31.64.0/21 +103.31.72.0/24 103.31.148.0/22 103.31.160.0/22 103.31.168.0/22 103.31.200.0/22 -103.224.40.0/22 -103.224.44.0/22 +103.31.236.0/22 +103.32.0.0/15 +103.34.0.0/16 +103.35.0.0/19 +103.35.32.0/20 +103.35.48.0/22 +103.35.104.0/22 +103.35.220.0/22 +103.36.28.0/22 +103.36.36.0/22 +103.36.56.0/21 +103.36.64.0/22 +103.36.72.0/22 +103.36.96.0/22 +103.36.132.0/22 +103.36.136.0/22 +103.36.160.0/19 +103.36.192.0/19 +103.36.224.0/20 +103.36.240.0/21 +103.37.12.0/22 +103.37.16.0/22 +103.37.24.0/22 +103.37.44.0/22 +103.37.52.0/22 +103.37.56.0/22 +103.37.72.0/22 +103.37.100.0/22 +103.37.104.0/22 +103.37.136.0/21 +103.37.144.0/20 +103.37.160.0/21 +103.37.172.0/22 +103.37.176.0/22 +103.37.188.0/22 +103.37.208.0/20 +103.37.252.0/22 +103.38.0.0/22 +103.38.32.0/22 +103.38.40.0/21 +103.38.76.0/22 +103.38.84.0/22 +103.38.92.0/22 +103.38.96.0/22 +103.38.116.0/22 +103.38.132.0/22 +103.38.140.0/22 +103.38.220.0/22 +103.38.224.0/21 +103.38.232.0/22 +103.38.252.0/23 +103.39.64.0/22 +103.39.88.0/22 +103.39.100.0/22 +103.39.104.0/22 +103.39.160.0/19 +103.39.200.0/21 +103.39.208.0/20 +103.39.224.0/21 +103.39.232.0/22 +103.40.12.0/22 +103.40.16.0/20 +103.40.32.0/20 +103.40.88.0/22 +103.40.192.0/22 +103.40.212.0/22 +103.40.220.0/22 +103.40.228.0/22 +103.40.232.0/21 +103.40.240.0/20 +103.41.0.0/22 +103.41.52.0/22 +103.41.140.0/22 +103.41.148.0/22 +103.41.152.0/22 +103.41.160.0/21 +103.41.220.0/22 +103.41.224.0/21 +103.41.232.0/22 +103.42.8.0/22 +103.42.24.0/22 +103.42.32.0/22 +103.42.64.0/21 +103.42.76.0/22 +103.42.232.0/22 +103.43.26.0/23 +103.43.96.0/21 +103.43.104.0/22 +103.43.124.0/22 +103.43.184.0/22 +103.43.192.0/21 +103.43.208.0/22 +103.43.220.0/22 +103.43.224.0/22 +103.43.240.0/22 +103.44.58.0/23 +103.44.80.0/22 +103.44.120.0/21 +103.44.144.0/22 +103.44.152.0/22 +103.44.168.0/22 +103.44.176.0/20 +103.44.192.0/20 +103.44.224.0/22 +103.44.236.0/22 +103.44.240.0/20 +103.45.0.0/18 +103.45.72.0/21 +103.45.80.0/20 +103.45.96.0/19 +103.45.128.0/18 +103.45.192.0/19 +103.45.224.0/22 +103.45.248.0/22 +103.46.0.0/22 +103.46.12.0/22 +103.46.16.0/20 +103.46.32.0/19 +103.46.64.0/18 +103.46.128.0/21 +103.46.136.0/22 +103.46.152.0/21 +103.46.160.0/20 +103.46.176.0/21 +103.46.244.0/22 +103.46.248.0/22 +103.47.4.0/22 +103.47.20.0/22 +103.47.36.0/22 +103.47.40.0/22 +103.47.48.0/22 +103.47.80.0/22 +103.47.96.0/22 +103.47.116.0/22 +103.47.120.0/22 +103.47.136.0/21 +103.47.212.0/22 +103.48.52.0/22 +103.48.92.0/22 +103.48.148.0/22 +103.48.152.0/22 +103.48.202.0/23 +103.48.216.0/21 +103.48.224.0/20 +103.48.240.0/21 +103.49.12.0/22 +103.49.20.0/22 +103.49.72.0/21 +103.49.96.0/22 +103.49.108.0/22 +103.49.128.0/22 +103.49.176.0/21 +103.50.36.0/22 +103.50.44.0/22 +103.50.48.0/20 +103.50.64.0/21 +103.50.72.0/22 +103.50.92.0/22 +103.50.108.0/22 +103.50.112.0/20 +103.50.132.0/22 +103.50.136.0/21 +103.50.172.0/22 +103.50.176.0/20 +103.50.192.0/21 +103.50.200.0/22 +103.50.220.0/22 +103.50.224.0/20 +103.50.240.0/21 +103.50.248.0/22 +103.52.40.0/22 +103.52.72.0/21 +103.52.80.0/21 +103.52.96.0/21 +103.52.104.0/22 +103.52.160.0/21 +103.52.172.0/22 +103.52.176.0/22 +103.52.184.0/22 +103.52.196.0/22 +103.53.64.0/21 +103.53.92.0/22 +103.53.124.0/22 +103.53.128.0/20 +103.53.144.0/22 +103.53.160.0/22 +103.53.180.0/22 +103.53.204.0/22 +103.53.208.0/21 +103.53.236.0/22 +103.53.248.0/22 +103.54.8.0/22 +103.54.48.0/22 +103.54.160.0/21 +103.54.212.0/22 +103.54.228.0/22 +103.54.240.0/22 +103.55.80.0/22 +103.55.120.0/22 +103.55.152.0/22 +103.55.172.0/22 +103.55.204.0/22 +103.55.208.0/22 +103.55.228.0/22 +103.55.236.0/22 +103.55.240.0/22 +103.56.20.0/22 +103.56.32.0/22 +103.56.56.0/21 +103.56.72.0/21 +103.56.140.0/22 +103.56.152.0/22 +103.56.184.0/22 +103.56.200.0/22 +103.57.12.0/22 +103.57.52.0/22 +103.57.56.0/22 +103.57.76.0/22 +103.57.136.0/22 +103.57.196.0/22 +103.58.24.0/22 +103.59.76.0/22 +103.59.112.0/21 +103.59.120.0/24 +103.59.123.0/24 +103.59.124.0/22 +103.59.128.0/22 +103.59.148.0/22 +103.60.32.0/22 +103.60.44.0/22 +103.60.164.0/22 +103.60.228.0/22 +103.60.236.0/22 +103.61.60.0/24 +103.61.104.0/22 +103.61.140.0/22 +103.61.152.0/21 +103.61.160.0/22 +103.61.172.0/22 +103.61.176.0/22 +103.62.24.0/22 +103.62.72.0/21 +103.62.80.0/21 +103.62.88.0/22 +103.62.96.0/19 +103.62.128.0/21 +103.62.156.0/22 +103.62.160.0/19 +103.62.192.0/22 +103.62.204.0/22 +103.62.208.0/20 +103.62.224.0/22 +103.63.32.0/19 +103.63.64.0/20 +103.63.80.0/21 +103.63.88.0/22 +103.63.140.0/22 +103.63.144.0/22 +103.63.152.0/22 +103.63.160.0/20 +103.63.176.0/21 +103.63.184.0/22 +103.63.192.0/20 +103.63.208.0/22 +103.63.240.0/20 +103.64.0.0/21 +103.64.24.0/21 +103.64.32.0/19 +103.64.64.0/18 +103.64.140.0/22 +103.64.144.0/22 +103.64.152.0/21 +103.64.160.0/19 +103.64.192.0/18 +103.65.0.0/21 +103.65.12.0/22 +103.65.16.0/22 +103.65.48.0/20 +103.65.64.0/19 +103.65.100.0/22 +103.65.104.0/21 +103.65.112.0/20 +103.65.128.0/21 +103.65.136.0/22 +103.65.144.0/20 +103.65.160.0/20 +103.66.32.0/22 +103.66.40.0/22 +103.66.108.0/22 +103.66.200.0/22 +103.66.240.0/20 +103.67.0.0/21 +103.67.8.0/22 +103.67.40.0/21 +103.67.48.0/20 +103.67.64.0/18 +103.67.128.0/20 +103.67.144.0/21 +103.67.172.0/24 +103.67.175.0/24 +103.67.192.0/22 +103.67.212.0/22 +103.68.88.0/22 +103.68.100.0/22 +103.68.128.0/22 +103.69.16.0/22 +103.69.212.0/23 +103.70.8.0/22 +103.70.148.0/22 +103.70.236.0/22 +103.70.252.0/22 +103.71.0.0/22 +103.71.68.0/22 +103.71.72.0/22 +103.71.80.0/21 +103.71.88.0/22 +103.71.120.0/21 +103.71.128.0/22 +103.71.196.0/22 +103.71.200.0/22 +103.71.232.0/22 +103.72.12.0/22 +103.72.16.0/20 +103.72.32.0/20 +103.72.48.0/21 +103.72.112.0/21 +103.72.124.0/22 +103.72.128.0/21 +103.72.149.0/24 +103.72.150.0/23 +103.72.172.0/22 +103.72.180.0/22 +103.72.224.0/19 +103.73.0.0/19 +103.73.48.0/22 +103.73.116.0/22 +103.73.120.0/22 +103.73.128.0/20 +103.73.168.0/22 +103.73.176.0/22 +103.73.204.0/22 +103.73.208.0/22 +103.73.240.0/23 +103.73.244.0/22 +103.73.248.0/22 +103.74.24.0/21 +103.74.32.0/20 +103.74.48.0/22 +103.74.56.0/21 +103.74.80.0/22 +103.74.124.0/22 +103.74.148.0/22 +103.74.152.0/21 +103.74.204.0/22 +103.74.232.0/22 +103.75.87.0/24 +103.75.88.0/21 +103.75.104.0/21 +103.75.112.0/22 +103.75.120.0/22 +103.75.128.0/22 +103.75.144.0/22 +103.75.152.0/22 +103.76.60.0/22 +103.76.64.0/21 +103.76.72.0/22 +103.76.92.0/22 +103.76.216.0/21 +103.76.224.0/22 +103.77.28.0/22 +103.77.52.0/22 +103.77.56.0/22 +103.77.88.0/22 +103.77.132.0/22 +103.77.148.0/22 +103.77.220.0/22 +103.78.56.0/21 +103.78.64.0/22 +103.78.124.0/22 +103.78.172.0/22 +103.78.176.0/22 +103.78.196.0/22 +103.78.228.0/22 +103.79.24.0/21 +103.79.36.0/22 +103.79.40.0/21 +103.79.56.0/21 +103.79.64.0/21 +103.79.80.0/21 +103.79.136.0/22 +103.79.188.0/22 +103.79.192.0/20 +103.79.208.0/21 +103.79.243.0/24 +103.80.44.0/22 +103.80.72.0/22 +103.80.176.0/21 +103.80.184.0/22 +103.80.192.0/22 +103.80.200.0/22 +103.80.232.0/22 +103.81.4.0/22 +103.81.44.0/22 +103.81.48.0/22 +103.81.96.0/22 +103.81.120.0/22 +103.81.148.0/22 +103.81.164.0/22 +103.81.200.0/22 +103.81.232.0/22 +103.82.60.0/22 +103.82.68.0/22 +103.82.84.0/22 +103.82.104.0/22 +103.82.224.0/22 +103.82.236.0/22 +103.83.44.0/22 +103.83.52.0/22 +103.83.60.0/22 +103.83.72.0/22 +103.83.112.0/22 +103.83.132.0/22 +103.83.180.0/22 +103.84.0.0/22 +103.84.12.0/22 +103.84.20.0/22 +103.84.24.0/21 +103.84.48.0/22 +103.84.56.0/22 +103.84.64.0/22 +103.84.72.0/22 +103.85.44.0/22 +103.85.48.0/21 +103.85.56.0/22 +103.85.84.0/22 +103.85.136.0/22 +103.85.144.0/22 +103.85.164.0/22 +103.85.168.0/21 +103.85.176.0/22 +103.86.28.0/22 +103.86.32.0/22 +103.86.60.0/22 +103.86.129.0/24 +103.86.204.0/22 +103.86.208.0/20 +103.86.224.0/19 +103.87.0.0/21 +103.87.20.0/22 +103.87.32.0/22 +103.87.96.0/22 +103.87.132.0/22 +103.87.180.0/22 +103.87.224.0/22 +103.88.4.0/22 +103.88.8.0/21 +103.88.16.0/21 +103.88.32.0/21 +103.88.60.0/22 +103.88.64.0/22 +103.88.72.0/22 +103.88.96.0/21 +103.88.152.0/23 +103.88.164.0/22 +103.88.212.0/22 +103.89.28.0/22 +103.89.96.0/20 +103.89.112.0/22 +103.89.148.0/22 +103.89.172.0/22 +103.89.184.0/21 +103.89.192.0/19 +103.89.224.0/21 +103.90.52.0/22 +103.90.92.0/22 +103.90.100.0/22 +103.90.104.0/21 +103.90.112.0/20 +103.90.128.0/21 +103.90.152.0/22 +103.90.168.0/22 +103.90.173.0/24 +103.90.176.0/22 +103.90.188.0/22 +103.90.192.0/22 +103.91.36.0/22 +103.91.40.0/22 +103.91.108.0/22 +103.91.152.0/22 +103.91.176.0/22 +103.91.200.0/22 +103.91.208.0/21 +103.91.236.0/22 +103.92.48.0/20 +103.92.64.0/20 +103.92.80.0/22 +103.92.88.0/22 +103.92.108.0/22 +103.92.124.0/22 +103.92.132.0/22 +103.92.156.0/22 +103.92.164.0/22 +103.92.168.0/21 +103.92.176.0/20 +103.92.192.0/22 +103.92.236.0/22 +103.92.240.0/20 +103.93.0.0/21 +103.93.28.0/22 +103.93.84.0/22 +103.93.152.0/22 +103.93.180.0/22 +103.93.204.0/22 +103.94.12.0/22 +103.94.20.0/22 +103.94.28.0/22 +103.94.32.0/20 +103.94.72.0/22 +103.94.88.0/22 +103.94.116.0/22 +103.94.160.0/22 +103.94.182.0/24 +103.94.200.0/22 +103.95.31.0/24 +103.95.52.0/22 +103.95.70.0/23 +103.95.88.0/21 +103.95.136.0/21 +103.95.144.0/22 +103.95.152.0/22 +103.95.216.0/21 +103.95.224.0/22 +103.95.236.0/22 +103.95.240.0/20 +103.96.8.0/22 +103.96.124.0/22 +103.96.136.0/22 +103.96.152.0/21 +103.96.160.0/19 +103.96.192.0/20 +103.96.208.0/21 +103.96.216.0/22 +103.97.40.0/22 +103.97.60.0/23 +103.97.112.0/21 +103.97.148.0/22 +103.97.188.0/22 +103.97.192.0/22 +103.98.40.0/21 +103.98.48.0/22 +103.98.56.0/22 +103.98.80.0/22 +103.98.88.0/22 +103.98.100.0/22 +103.98.124.0/24 +103.98.126.0/23 +103.98.136.0/21 +103.98.144.0/22 +103.98.164.0/22 +103.98.168.0/22 +103.98.180.0/22 +103.98.196.0/22 +103.98.216.0/21 +103.98.224.0/21 +103.98.232.0/22 +103.98.240.0/21 +103.98.248.0/23 +103.98.250.0/24 +103.98.252.0/22 +103.99.56.0/22 +103.99.104.0/22 +103.99.116.0/22 +103.99.120.0/22 +103.99.132.0/22 +103.99.136.0/21 +103.99.144.0/22 +103.99.152.0/22 +103.99.220.0/22 +103.99.232.0/21 +103.100.0.0/22 +103.100.32.0/22 +103.100.40.0/22 +103.100.48.0/22 +103.100.56.0/22 +103.100.64.0/22 +103.100.88.0/22 +103.100.116.0/22 +103.100.144.0/22 +103.100.240.0/22 +103.100.248.0/21 +103.101.4.0/22 +103.101.8.0/21 +103.101.60.0/22 +103.101.121.0/24 +103.101.122.0/23 +103.101.124.0/24 +103.101.126.0/23 +103.101.144.0/21 +103.101.180.0/22 +103.101.184.0/22 +103.102.76.0/22 +103.102.80.0/22 +103.102.168.0/21 +103.102.180.0/22 +103.102.184.0/21 +103.102.192.0/22 +103.102.196.0/24 +103.102.200.0/22 +103.102.208.0/21 +103.103.12.0/22 +103.103.16.0/22 +103.103.36.0/22 +103.103.72.0/22 +103.103.188.0/22 +103.103.204.0/22 +103.104.36.0/22 +103.104.40.0/22 +103.104.64.0/22 +103.104.152.0/22 +103.104.252.0/22 +103.105.0.0/21 +103.105.12.0/22 +103.105.16.0/22 +103.105.60.0/22 +103.105.116.0/22 +103.105.180.0/22 +103.105.184.0/22 +103.105.200.0/21 +103.105.220.0/22 +103.106.36.0/22 +103.106.40.0/21 +103.106.60.0/22 +103.106.68.0/22 +103.106.96.0/22 +103.106.120.0/22 +103.106.128.0/21 +103.106.190.0/23 +103.106.196.0/22 +103.106.212.0/22 +103.106.252.0/22 +103.107.0.0/22 +103.107.28.0/22 +103.107.32.0/22 +103.107.44.0/22 +103.107.72.0/22 +103.107.164.0/22 +103.107.168.0/22 +103.107.188.0/22 +103.107.192.0/22 +103.107.208.0/20 +103.108.52.0/22 +103.108.160.0/21 +103.108.194.0/24 +103.108.196.0/22 +103.108.208.0/21 +103.108.224.0/22 +103.108.244.0/22 +103.108.251.0/24 +103.109.20.0/22 +103.109.48.0/22 +103.109.88.0/22 +103.109.106.0/23 +103.109.248.0/22 +103.110.32.0/22 +103.110.92.0/22 +103.110.119.0/24 +103.110.127.0/24 +103.110.128.0/23 +103.110.131.0/24 +103.110.132.0/22 +103.110.136.0/22 +103.110.156.0/22 +103.110.188.0/22 +103.110.204.0/22 +103.111.64.0/22 +103.111.172.0/22 +103.111.252.0/22 +103.112.72.0/22 +103.112.88.0/21 +103.112.108.0/22 +103.112.112.0/22 +103.112.140.0/22 +103.113.4.0/22 +103.113.144.0/22 +103.113.220.0/22 +103.113.232.0/21 +103.114.4.0/22 +103.114.68.0/22 +103.114.100.0/22 +103.114.148.0/22 +103.114.156.0/23 +103.114.159.0/24 +103.114.212.0/22 +103.114.236.0/22 +103.114.240.0/22 +103.115.52.0/22 +103.115.68.0/22 +103.115.92.0/22 +103.115.120.0/22 +103.115.148.0/22 +103.115.248.0/22 +103.116.76.0/22 +103.116.92.0/22 +103.116.120.0/22 +103.116.128.0/22 +103.116.150.0/23 +103.116.184.0/22 +103.116.220.0/22 +103.116.224.0/21 +103.117.16.0/22 +103.117.88.0/22 +103.117.188.0/22 +103.117.220.0/22 +103.118.19.0/24 +103.118.52.0/22 +103.118.56.0/21 +103.118.64.0/21 +103.118.72.0/22 +103.118.88.0/22 +103.118.173.0/24 +103.119.115.0/24 +103.119.156.0/22 +103.119.180.0/22 +103.119.200.0/22 +103.119.224.0/22 +103.120.52.0/22 +103.120.72.0/22 +103.120.76.0/24 +103.120.88.0/22 +103.120.96.0/22 +103.120.140.0/22 +103.120.196.0/22 +103.120.224.0/22 +103.121.52.0/22 +103.121.160.0/21 +103.121.250.0/24 +103.121.252.0/22 +103.122.48.0/22 +103.122.178.0/23 +103.122.192.0/22 +103.122.240.0/23 +103.122.242.0/24 +103.123.4.0/22 +103.123.56.0/22 +103.123.88.0/21 +103.123.116.0/22 +103.123.176.0/22 +103.123.200.0/21 +103.123.208.0/21 +103.124.24.0/22 +103.124.48.0/22 +103.124.64.0/22 +103.124.212.0/22 +103.124.216.0/22 +103.125.20.0/22 +103.125.44.0/22 +103.125.132.0/22 +103.125.164.0/22 +103.125.196.0/22 +103.125.236.0/22 +103.126.0.0/22 +103.126.16.0/23 +103.126.44.0/22 +103.126.124.0/22 +103.126.128.0/22 +103.129.53.0/24 +103.129.54.0/23 +103.129.148.0/22 +103.130.132.0/22 +103.130.160.0/22 +103.130.228.0/22 +103.131.20.0/22 +103.131.36.0/22 +103.131.152.0/22 +103.131.168.0/22 +103.131.224.0/21 +103.131.240.0/22 +103.132.60.0/22 +103.132.64.0/20 +103.132.80.0/22 +103.132.104.0/21 +103.132.112.0/21 +103.132.120.0/22 +103.132.188.0/22 +103.132.208.0/21 +103.133.12.0/22 +103.133.40.0/22 +103.133.128.0/22 +103.133.232.0/22 +103.134.196.0/22 +103.135.80.0/22 +103.135.124.0/22 +103.135.148.0/22 +103.135.156.0/22 +103.135.160.0/21 +103.135.176.0/22 +103.135.184.0/22 +103.135.192.0/21 +103.135.236.0/22 +103.136.128.0/22 +103.136.232.0/22 +103.137.58.0/23 +103.137.60.0/24 +103.137.136.0/23 +103.137.149.0/24 +103.137.180.0/22 +103.137.236.0/22 +103.138.2.0/23 +103.138.134.0/23 +103.138.208.0/23 +103.138.220.0/23 +103.138.248.0/23 +103.139.22.0/23 +103.139.134.0/23 +103.139.136.0/23 +103.139.172.0/23 +103.139.204.0/23 +103.139.212.0/23 +103.140.14.0/23 +103.140.46.0/23 +103.140.140.0/23 +103.140.144.0/23 +103.140.192.0/23 +103.141.10.0/23 +103.141.58.0/23 +103.141.128.0/23 +103.141.186.0/23 +103.141.242.0/23 +103.142.0.0/23 +103.142.28.0/23 +103.142.58.0/23 +103.142.82.0/23 +103.142.96.0/23 +103.142.122.0/23 +103.142.128.0/23 +103.142.154.0/23 +103.142.156.0/23 +103.142.180.0/23 +103.142.186.0/23 +103.142.220.0/23 +103.142.230.0/24 +103.142.234.0/23 +103.142.238.0/23 +103.143.16.0/22 +103.143.31.0/24 +103.143.74.0/23 +103.143.124.0/23 +103.143.132.0/22 +103.143.174.0/23 +103.143.228.0/23 +103.144.66.0/23 +103.144.70.0/23 +103.144.72.0/23 +103.144.136.0/23 +103.144.158.0/23 +103.145.40.0/22 +103.145.73.0/24 +103.145.80.0/23 +103.145.90.0/23 +103.145.92.0/22 +103.145.98.0/23 +103.145.107.0/24 +103.145.188.0/23 +103.146.6.0/23 +103.146.72.0/23 +103.146.90.0/23 +103.146.126.0/23 +103.146.138.0/23 +103.146.236.0/23 +103.146.252.0/23 +103.147.124.0/23 +103.147.198.0/23 +103.147.206.0/23 +103.148.174.0/23 +103.192.0.0/19 +103.192.48.0/21 +103.192.56.0/22 +103.192.84.0/22 +103.192.88.0/21 +103.192.96.0/20 +103.192.112.0/22 +103.192.128.0/20 +103.192.144.0/22 +103.192.164.0/22 +103.192.188.0/22 +103.192.208.0/21 +103.192.216.0/22 +103.192.252.0/22 +103.193.40.0/21 +103.193.120.0/22 +103.193.140.0/22 +103.193.160.0/22 +103.193.188.0/22 +103.193.192.0/22 +103.193.212.0/22 +103.193.216.0/21 +103.193.224.0/20 +103.194.16.0/22 +103.194.230.0/23 +103.195.112.0/22 +103.195.152.0/22 +103.195.160.0/22 +103.196.64.0/22 +103.196.72.0/22 +103.196.88.0/21 +103.196.96.0/22 +103.196.168.0/22 +103.196.185.0/24 +103.196.186.0/23 +103.197.181.0/24 +103.197.183.0/24 +103.197.228.0/22 +103.197.253.0/24 +103.197.254.0/23 +103.198.20.0/22 +103.198.60.0/22 +103.198.64.0/22 +103.198.72.0/22 +103.198.124.0/22 +103.198.156.0/22 +103.198.180.0/22 +103.198.196.0/22 +103.198.200.0/22 +103.198.216.0/21 +103.198.224.0/20 +103.198.240.0/21 +103.199.164.0/22 +103.199.196.0/22 +103.199.228.0/22 +103.199.252.0/22 +103.200.52.0/22 +103.200.64.0/21 +103.200.136.0/21 +103.200.144.0/20 +103.200.160.0/19 +103.200.192.0/22 +103.200.220.0/22 +103.200.224.0/19 +103.201.0.0/20 +103.201.16.0/21 +103.201.28.0/22 +103.201.32.0/19 +103.201.64.0/22 +103.201.76.0/22 +103.201.80.0/20 +103.201.96.0/20 +103.201.112.0/21 +103.201.120.0/22 +103.201.152.0/21 +103.201.160.0/19 +103.201.192.0/18 +103.202.0.0/19 +103.202.32.0/20 +103.202.56.0/21 +103.202.64.0/18 +103.202.128.0/20 +103.202.144.0/22 +103.202.152.0/21 +103.202.160.0/19 +103.202.192.0/20 +103.202.212.0/22 +103.202.228.0/22 +103.202.236.0/22 +103.202.240.0/20 +103.203.0.0/19 +103.203.32.0/22 +103.203.96.0/19 +103.203.128.0/22 +103.203.140.0/22 +103.203.164.0/22 +103.203.168.0/22 +103.203.192.0/22 +103.203.200.0/22 +103.203.212.0/22 +103.203.216.0/22 +103.204.24.0/22 +103.204.88.0/22 +103.204.112.0/22 +103.204.136.0/21 +103.204.144.0/21 +103.204.152.0/22 +103.204.196.0/22 +103.204.232.0/21 +103.205.4.0/22 +103.205.40.0/21 +103.205.52.0/22 +103.205.108.0/22 +103.205.116.0/22 +103.205.120.0/24 +103.205.136.0/22 +103.205.162.0/24 +103.205.188.0/22 +103.205.192.0/21 +103.205.200.0/22 +103.205.236.0/22 +103.205.248.0/21 +103.206.0.0/22 +103.206.44.0/22 +103.206.148.0/22 +103.207.104.0/22 +103.207.184.0/21 +103.207.192.0/20 +103.207.208.0/21 +103.207.220.0/22 +103.207.228.0/22 +103.207.232.0/22 +103.208.12.0/22 +103.208.16.0/22 +103.208.28.0/22 +103.208.48.0/22 +103.208.148.0/22 +103.209.112.0/22 +103.209.136.0/22 +103.209.200.0/22 +103.209.208.0/22 +103.209.216.0/22 +103.210.0.0/22 +103.210.96.0/22 +103.210.156.0/22 +103.210.160.0/19 +103.210.217.0/24 +103.210.218.0/23 +103.211.44.0/22 +103.211.96.0/23 +103.211.98.0/24 +103.211.100.0/22 +103.211.156.0/22 +103.211.165.0/24 +103.211.168.0/22 +103.211.220.0/22 +103.211.248.0/22 +103.212.0.0/20 +103.212.44.0/22 +103.212.48.0/22 +103.212.84.0/22 +103.212.100.0/22 +103.212.148.0/22 +103.212.164.0/22 +103.212.196.0/22 +103.212.200.0/22 +103.212.252.0/22 +103.213.40.0/21 +103.213.48.0/20 +103.213.64.0/19 +103.213.96.0/22 +103.213.132.0/22 +103.213.136.0/21 +103.213.144.0/20 +103.213.160.0/19 +103.213.252.0/22 +103.214.48.0/22 +103.214.84.0/22 +103.214.212.0/22 +103.214.240.0/21 +103.215.28.0/22 +103.215.32.0/21 +103.215.44.0/22 +103.215.100.0/23 +103.215.108.0/22 +103.215.116.0/22 +103.215.120.0/22 +103.215.140.0/22 +103.216.4.0/22 +103.216.8.0/21 +103.216.16.0/20 +103.216.32.0/20 +103.216.64.0/22 +103.216.108.0/22 +103.216.136.0/22 +103.216.152.0/22 +103.216.224.0/21 +103.216.240.0/20 +103.217.0.0/18 +103.217.168.0/22 +103.217.180.0/22 +103.217.184.0/21 +103.217.192.0/20 +103.218.8.0/21 +103.218.16.0/21 +103.218.29.0/24 +103.218.30.0/23 +103.218.32.0/19 +103.218.64.0/19 +103.218.192.0/20 +103.218.208.0/21 +103.218.216.0/22 +103.219.24.0/21 +103.219.32.0/21 +103.219.64.0/22 +103.219.84.0/22 +103.219.88.0/21 +103.219.96.0/21 +103.219.176.0/22 +103.219.184.0/22 +103.220.48.0/20 +103.220.64.0/22 +103.220.92.0/22 +103.220.96.0/22 +103.220.104.0/21 +103.220.116.0/22 +103.220.120.0/21 +103.220.128.0/20 +103.220.144.0/21 +103.220.152.0/22 +103.220.160.0/19 +103.220.192.0/21 +103.220.200.0/22 +103.220.240.0/20 +103.221.0.0/19 +103.221.32.0/21 +103.221.88.0/21 +103.221.96.0/19 +103.221.128.0/18 +103.221.192.0/20 +103.222.0.0/20 +103.222.16.0/22 +103.222.24.0/21 +103.222.33.0/24 +103.222.34.0/23 +103.222.36.0/22 +103.222.40.0/21 +103.222.48.0/20 +103.222.64.0/18 +103.222.128.0/18 +103.222.192.0/19 +103.222.224.0/21 +103.222.232.0/22 +103.222.240.0/21 +103.223.16.0/20 +103.223.32.0/19 +103.223.64.0/19 +103.223.96.0/20 +103.223.112.0/21 +103.223.124.0/22 +103.223.128.0/21 +103.223.140.0/22 +103.223.144.0/20 +103.223.160.0/20 +103.223.176.0/21 +103.223.188.0/22 +103.223.192.0/18 +103.224.0.0/22 +103.224.40.0/21 103.224.60.0/22 -103.224.80.0/22 103.224.220.0/22 -103.224.224.0/22 -103.224.228.0/22 +103.224.224.0/21 103.224.232.0/22 -103.225.84.0/22 -103.226.16.0/22 103.226.40.0/22 -103.226.56.0/22 -103.226.60.0/22 +103.226.56.0/21 103.226.80.0/22 103.226.116.0/22 103.226.132.0/22 @@ -771,22 +2395,20 @@ 103.226.180.0/22 103.226.196.0/22 103.227.48.0/22 -103.227.72.0/22 -103.227.76.0/22 +103.227.72.0/21 103.227.80.0/22 103.227.100.0/22 103.227.120.0/22 103.227.132.0/22 103.227.136.0/22 103.227.196.0/22 -103.227.204.0/22 +103.227.204.0/23 +103.227.206.0/24 103.227.212.0/22 103.227.228.0/22 103.228.12.0/22 -103.228.28.0/22 -103.228.68.0/22 103.228.88.0/22 -103.228.128.0/22 +103.228.136.0/22 103.228.160.0/22 103.228.176.0/22 103.228.204.0/22 @@ -798,65 +2420,126 @@ 103.229.148.0/22 103.229.172.0/22 103.229.212.0/22 -103.229.216.0/22 -103.229.220.0/22 +103.229.216.0/21 103.229.228.0/22 103.229.236.0/22 103.229.240.0/22 103.230.0.0/22 103.230.28.0/22 -103.230.40.0/22 -103.230.44.0/22 +103.230.40.0/21 103.230.96.0/22 103.230.196.0/22 -103.230.200.0/22 -103.230.204.0/22 +103.230.200.0/21 103.230.212.0/22 103.230.236.0/22 -103.231.16.0/22 -103.231.20.0/22 -103.231.64.0/22 -103.231.68.0/22 +103.231.16.0/21 +103.231.64.0/21 +103.231.144.0/22 +103.231.180.0/22 +103.231.244.0/22 +103.232.4.0/22 +103.232.17.168/29 +103.232.144.0/22 +103.233.4.0/22 +103.233.44.0/22 +103.233.52.0/22 +103.233.104.0/22 +103.233.128.0/22 +103.233.136.0/22 +103.233.228.0/22 +103.234.0.0/22 +103.234.20.0/22 +103.234.56.0/22 +103.234.124.0/22 +103.234.128.0/22 +103.234.172.0/22 +103.234.180.0/22 +103.235.56.0/21 +103.235.80.0/22 +103.235.85.0/24 +103.235.86.0/23 +103.235.128.0/20 +103.235.144.0/21 +103.235.184.0/22 +103.235.192.0/22 +103.235.200.0/22 +103.235.220.0/22 +103.235.224.0/19 +103.236.0.0/18 +103.236.64.0/19 +103.236.96.0/22 +103.236.120.0/22 +103.236.184.0/22 +103.236.240.0/20 +103.237.0.0/20 +103.237.24.0/21 +103.237.68.0/22 +103.237.88.0/22 +103.237.152.0/22 +103.237.176.0/20 +103.237.192.0/18 +103.238.0.0/21 +103.238.18.0/23 +103.238.20.0/22 +103.238.24.0/21 +103.238.32.0/20 +103.238.48.0/21 +103.238.56.0/22 +103.238.88.0/21 +103.238.96.0/22 +103.238.132.0/22 +103.238.140.0/22 +103.238.144.0/22 +103.238.160.0/22 +103.238.165.0/24 +103.238.166.0/23 +103.238.168.0/21 +103.238.176.0/20 +103.238.196.0/22 +103.238.204.0/22 +103.238.252.0/22 +103.239.0.0/22 +103.239.44.0/22 +103.239.68.0/22 +103.239.152.0/21 +103.239.180.0/22 +103.239.184.0/22 +103.239.192.0/21 +103.239.204.0/22 +103.239.208.0/22 +103.239.224.0/22 +103.239.244.0/22 103.240.16.0/22 103.240.36.0/22 103.240.72.0/22 103.240.84.0/22 103.240.124.0/22 -103.240.156.0/22 103.240.172.0/22 +103.240.188.0/22 103.240.244.0/22 103.241.12.0/22 -103.241.72.0/22 103.241.92.0/22 103.241.96.0/22 103.241.160.0/22 -103.241.184.0/22 -103.241.188.0/22 +103.241.184.0/21 103.241.220.0/22 -103.242.8.0/22 -103.242.64.0/22 -103.242.128.0/22 -103.242.132.0/22 +103.242.64.0/23 +103.242.128.0/23 103.242.160.0/22 -103.242.168.0/22 -103.242.172.0/22 +103.242.168.0/21 103.242.176.0/22 103.242.200.0/22 103.242.212.0/22 103.242.220.0/22 103.242.240.0/22 -103.243.24.0/22 103.243.136.0/22 103.243.252.0/22 103.244.16.0/22 -103.244.56.0/22 +103.244.58.0/23 103.244.60.0/22 -103.244.64.0/22 -103.244.68.0/22 -103.244.72.0/22 -103.244.76.0/22 -103.244.80.0/22 -103.244.84.0/22 +103.244.64.0/20 +103.244.80.0/21 +103.244.116.0/22 103.244.164.0/22 103.244.232.0/22 103.244.252.0/22 @@ -866,36 +2549,29 @@ 103.245.80.0/22 103.245.124.0/22 103.245.128.0/22 -103.246.8.0/22 -103.246.12.0/22 -103.246.120.0/22 -103.246.124.0/22 +103.246.8.0/21 +103.246.120.0/21 103.246.132.0/22 103.246.152.0/22 -103.246.156.0/22 -103.247.168.0/22 -103.247.172.0/22 +103.247.168.0/21 103.247.176.0/22 103.247.200.0/22 103.247.212.0/22 -103.248.0.0/23 -103.248.64.0/22 +103.248.64.0/23 103.248.100.0/22 103.248.124.0/22 103.248.152.0/22 103.248.168.0/22 103.248.192.0/22 103.248.212.0/22 -103.248.224.0/22 -103.248.228.0/22 -103.249.12.0/22 +103.248.224.0/21 +103.249.8.0/21 103.249.52.0/22 103.249.128.0/22 103.249.136.0/22 103.249.144.0/22 103.249.164.0/22 -103.249.168.0/22 -103.249.172.0/22 +103.249.168.0/21 103.249.176.0/22 103.249.188.0/22 103.249.192.0/22 @@ -909,20 +2585,19 @@ 103.250.216.0/22 103.250.224.0/22 103.250.236.0/22 -103.250.248.0/22 -103.250.252.0/22 +103.250.248.0/21 103.251.32.0/22 103.251.84.0/22 103.251.96.0/22 103.251.124.0/22 -103.251.128.0/22 103.251.160.0/22 +103.251.192.0/22 103.251.204.0/22 -103.251.236.0/22 103.251.240.0/22 103.252.28.0/22 103.252.36.0/22 103.252.64.0/22 +103.252.96.0/22 103.252.104.0/22 103.252.172.0/22 103.252.204.0/22 @@ -937,52 +2612,102 @@ 103.253.232.0/22 103.254.8.0/22 103.254.20.0/22 -103.254.64.0/22 -103.254.68.0/22 -103.254.72.0/22 +103.254.64.0/21 103.254.76.0/22 103.254.112.0/22 -103.254.148.0/22 103.254.176.0/22 103.254.188.0/22 -103.254.196.0/24 -103.254.220.0/22 103.255.68.0/22 -103.255.88.0/22 -103.255.92.0/22 -103.255.136.0/22 -103.255.140.0/22 +103.255.88.0/21 +103.255.136.0/21 103.255.184.0/22 103.255.200.0/22 103.255.208.0/22 -103.255.212.0/22 103.255.228.0/22 +104.222.196.0/24 106.0.0.0/24 106.0.2.0/23 106.0.4.0/22 106.0.8.0/21 106.0.16.0/20 +106.0.44.0/22 106.0.64.0/18 -106.2.0.0/15 +106.2.0.0/23 +106.2.3.0/24 +106.2.4.0/22 +106.2.8.0/21 +106.2.16.0/20 +106.2.32.0/19 +106.2.64.0/18 +106.2.128.0/17 +106.3.16.0/20 +106.3.32.0/19 +106.3.64.0/20 +106.3.80.0/22 +106.3.88.0/21 +106.3.96.0/19 +106.3.128.0/19 +106.3.164.0/22 +106.3.168.0/21 +106.3.176.0/20 +106.3.192.0/18 106.4.0.0/14 106.8.0.0/15 106.11.0.0/16 106.12.0.0/14 106.16.0.0/12 106.32.0.0/12 -106.48.0.0/15 +106.48.0.0/21 +106.48.8.0/22 +106.48.16.0/20 +106.48.32.0/20 +106.48.57.0/24 +106.48.60.0/24 +106.48.63.0/24 +106.48.64.0/18 +106.48.128.0/17 +106.49.1.0/24 +106.49.2.0/23 +106.49.4.0/22 +106.49.8.0/21 +106.49.16.0/20 +106.49.32.0/19 +106.49.64.0/19 +106.49.96.0/24 +106.49.98.0/23 +106.49.100.0/22 +106.49.104.0/21 +106.49.112.0/20 +106.49.128.0/17 106.50.0.0/16 106.52.0.0/14 106.56.0.0/13 -106.74.0.0/15 +106.74.0.0/16 +106.75.0.0/17 +106.75.128.0/18 +106.75.201.0/24 +106.75.204.0/22 +106.75.208.0/20 +106.75.224.0/19 106.80.0.0/12 106.108.0.0/14 -106.112.0.0/13 -106.120.0.0/13 +106.112.0.0/12 106.224.0.0/12 +109.71.4.0/24 +109.244.0.0/16 110.6.0.0/15 110.16.0.0/14 -110.40.0.0/14 +110.34.40.0/21 +110.40.0.0/15 +110.42.0.0/16 +110.43.0.0/18 +110.43.64.0/21 +110.43.72.0/22 +110.43.76.0/23 +110.43.80.0/20 +110.43.96.0/19 +110.43.128.0/17 +110.44.12.0/22 110.44.144.0/20 110.48.0.0/16 110.51.0.0/16 @@ -990,33 +2715,33 @@ 110.56.0.0/13 110.64.0.0/15 110.72.0.0/15 -110.75.0.0/17 -110.75.128.0/19 -110.75.160.0/19 -110.75.192.0/18 -110.76.0.0/19 +110.75.0.0/16 +110.76.0.0/20 +110.76.16.0/22 +110.76.20.0/24 +110.76.22.0/24 +110.76.24.0/21 110.76.32.0/19 +110.76.132.0/22 110.76.156.0/22 110.76.184.0/22 110.76.192.0/18 110.77.0.0/17 110.80.0.0/13 110.88.0.0/14 +110.92.68.0/22 110.93.32.0/19 110.94.0.0/15 110.96.0.0/11 110.152.0.0/14 110.156.0.0/15 -110.165.32.0/19 110.166.0.0/15 110.172.192.0/18 110.173.0.0/19 110.173.32.0/20 110.173.64.0/19 -110.173.96.0/19 110.173.192.0/19 -110.176.0.0/13 -110.184.0.0/13 +110.176.0.0/12 110.192.0.0/11 110.228.0.0/14 110.232.32.0/19 @@ -1029,8 +2754,8 @@ 111.72.0.0/13 111.85.0.0/16 111.91.192.0/19 -111.112.0.0/15 -111.114.0.0/15 +111.92.248.0/21 +111.112.0.0/14 111.116.0.0/15 111.118.200.0/21 111.119.64.0/18 @@ -1045,27 +2770,29 @@ 111.176.0.0/13 111.186.0.0/15 111.192.0.0/12 -111.208.0.0/14 -111.212.0.0/14 +111.208.0.0/13 +111.221.28.0/24 111.221.128.0/17 111.222.0.0/16 +111.223.4.0/22 +111.223.8.0/21 +111.223.16.0/22 111.223.240.0/22 -111.223.248.0/22 -111.224.0.0/14 -111.228.0.0/14 +111.223.249.0/24 +111.223.250.0/23 +111.224.0.0/13 111.235.96.0/19 111.235.156.0/22 -111.235.160.0/19 +111.235.160.0/21 +111.235.170.0/23 +111.235.172.0/22 +111.235.176.0/20 112.0.0.0/10 -112.64.0.0/15 -112.66.0.0/15 -112.73.0.0/16 -112.74.0.0/15 -112.80.0.0/13 -112.88.0.0/13 -112.96.0.0/15 -112.98.0.0/15 -112.100.0.0/14 +112.64.0.0/14 +112.73.64.0/18 +112.74.0.0/16 +112.80.0.0/12 +112.96.0.0/13 112.109.128.0/17 112.111.0.0/16 112.112.0.0/14 @@ -1083,28 +2810,29 @@ 113.12.0.0/14 113.16.0.0/15 113.18.0.0/16 +113.21.232.0/21 113.24.0.0/14 113.31.0.0/16 113.44.0.0/14 113.48.0.0/14 113.52.160.0/19 +113.52.228.0/22 113.54.0.0/15 113.56.0.0/15 113.58.0.0/16 113.59.0.0/17 113.59.224.0/22 113.62.0.0/15 -113.64.0.0/11 -113.96.0.0/12 -113.112.0.0/13 -113.120.0.0/13 +113.64.0.0/10 113.128.0.0/15 113.130.96.0/20 113.130.112.0/21 113.132.0.0/14 113.136.0.0/13 113.194.0.0/15 -113.197.100.0/22 +113.197.100.0/23 +113.197.102.0/24 +113.197.104.0/22 113.200.0.0/15 113.202.0.0/16 113.204.0.0/14 @@ -1121,7 +2849,13 @@ 113.224.0.0/12 113.240.0.0/13 113.248.0.0/14 -114.28.0.0/16 +114.28.0.0/17 +114.28.128.0/18 +114.28.192.0/19 +114.28.232.0/22 +114.28.236.0/23 +114.28.240.0/20 +114.31.64.0/21 114.54.0.0/15 114.60.0.0/14 114.64.0.0/14 @@ -1134,29 +2868,48 @@ 114.110.64.0/18 114.111.0.0/19 114.111.160.0/19 -114.112.0.0/14 +114.112.4.0/22 +114.112.8.0/22 +114.112.24.0/21 +114.112.32.0/19 +114.112.64.0/19 +114.112.96.0/20 +114.112.116.0/22 +114.112.120.0/21 +114.112.136.0/21 +114.112.144.0/20 +114.112.160.0/19 +114.112.192.0/19 +114.113.0.0/17 +114.113.128.0/21 +114.113.140.0/22 +114.113.144.0/20 +114.113.160.0/19 +114.113.196.0/22 +114.113.200.0/21 +114.113.208.0/20 +114.113.224.0/20 +114.114.0.0/15 114.116.0.0/15 -114.118.0.0/15 +114.118.0.0/16 +114.119.0.0/17 +114.119.192.0/18 114.132.0.0/16 114.135.0.0/16 114.138.0.0/15 114.141.64.0/21 +114.141.80.0/21 114.141.128.0/18 114.196.0.0/15 114.198.248.0/21 -114.208.0.0/14 -114.212.0.0/15 -114.214.0.0/16 -114.215.0.0/16 -114.216.0.0/13 -114.224.0.0/12 -114.240.0.0/12 +114.208.0.0/12 +114.224.0.0/11 115.24.0.0/14 115.28.0.0/15 +115.31.64.0/20 115.32.0.0/14 -115.44.0.0/15 -115.46.0.0/16 -115.47.0.0/16 +115.42.56.0/22 +115.44.0.0/14 115.48.0.0/12 115.69.64.0/20 115.84.0.0/18 @@ -1167,15 +2920,25 @@ 115.120.0.0/14 115.124.16.0/20 115.148.0.0/14 -115.152.0.0/15 -115.154.0.0/15 -115.156.0.0/15 -115.158.0.0/16 -115.159.0.0/16 +115.152.0.0/13 115.166.64.0/19 -115.168.0.0/14 +115.168.0.0/16 +115.169.0.0/23 +115.169.3.0/24 +115.169.6.0/24 +115.169.9.0/24 +115.169.14.0/23 +115.169.16.0/20 +115.169.39.0/24 +115.169.42.0/23 +115.169.44.0/22 +115.169.48.0/20 +115.169.64.0/18 +115.169.128.0/17 +115.170.0.0/15 115.172.0.0/14 115.180.0.0/14 +115.187.0.0/20 115.190.0.0/15 115.192.0.0/11 115.224.0.0/12 @@ -1193,12 +2956,23 @@ 116.58.128.0/20 116.58.208.0/20 116.60.0.0/14 -116.66.0.0/17 +116.66.0.0/18 +116.66.64.0/19 +116.66.96.0/20 +116.66.120.0/22 +116.68.136.0/21 +116.68.176.0/21 116.69.0.0/16 116.70.0.0/17 -116.76.0.0/15 -116.78.0.0/15 -116.85.0.0/16 +116.76.0.0/14 +116.85.0.0/17 +116.85.128.0/18 +116.85.192.0/19 +116.85.224.0/20 +116.85.240.0/21 +116.85.248.0/23 +116.85.250.0/24 +116.85.252.0/22 116.89.144.0/20 116.90.80.0/20 116.90.184.0/21 @@ -1211,11 +2985,27 @@ 116.193.32.0/19 116.193.176.0/21 116.194.0.0/15 -116.196.0.0/16 +116.196.0.0/21 +116.196.8.0/22 +116.196.12.0/23 +116.196.16.0/20 +116.196.32.0/19 +116.196.64.0/18 +116.196.128.0/18 +116.196.192.0/21 +116.196.200.0/23 +116.196.203.0/24 +116.196.204.0/22 +116.196.208.0/20 +116.196.224.0/19 +116.197.160.0/21 +116.197.180.0/23 116.198.0.0/16 116.199.0.0/17 116.199.128.0/19 -116.204.0.0/15 +116.204.0.0/17 +116.204.232.0/22 +116.205.0.0/16 116.207.0.0/16 116.208.0.0/14 116.212.160.0/20 @@ -1228,12 +3018,17 @@ 116.216.0.0/14 116.224.0.0/12 116.242.0.0/15 -116.244.0.0/15 -116.246.0.0/15 +116.244.0.0/14 116.248.0.0/15 -116.251.64.0/18 116.252.0.0/15 -116.254.128.0/17 +116.254.104.0/21 +116.254.129.0/24 +116.254.130.0/23 +116.254.132.0/22 +116.254.136.0/21 +116.254.144.0/20 +116.254.160.0/19 +116.254.192.0/18 116.255.128.0/17 117.8.0.0/13 117.21.0.0/16 @@ -1242,17 +3037,24 @@ 117.32.0.0/13 117.40.0.0/14 117.44.0.0/15 -117.48.0.0/14 +117.48.0.0/15 +117.50.0.0/16 +117.51.128.0/23 +117.51.131.0/24 +117.51.132.0/22 +117.51.136.0/21 +117.51.144.0/20 +117.51.160.0/19 +117.51.192.0/18 117.53.48.0/20 117.53.176.0/20 117.57.0.0/16 -117.58.0.0/17 +117.58.0.0/18 117.59.0.0/16 117.60.0.0/14 117.64.0.0/13 117.72.0.0/15 -117.74.64.0/20 -117.74.80.0/20 +117.74.64.0/19 117.74.128.0/17 117.75.0.0/16 117.76.0.0/14 @@ -1267,16 +3069,37 @@ 117.112.0.0/13 117.120.64.0/18 117.120.128.0/17 -117.121.0.0/17 -117.121.128.0/18 +117.121.0.0/19 +117.121.32.0/21 +117.121.40.0/22 +117.121.44.0/23 +117.121.46.0/24 +117.121.48.0/20 +117.121.64.0/18 +117.121.128.0/20 +117.121.148.0/22 +117.121.152.0/21 +117.121.160.0/19 117.121.192.0/21 117.122.128.0/17 117.124.0.0/14 117.128.0.0/10 118.24.0.0/15 -118.26.0.0/16 +118.26.0.0/19 +118.26.36.0/22 +118.26.40.0/21 +118.26.48.0/20 +118.26.64.0/19 +118.26.104.0/21 +118.26.112.0/20 +118.26.128.0/17 118.28.0.0/15 -118.30.0.0/16 +118.30.0.0/20 +118.30.16.0/21 +118.30.24.0/22 +118.30.32.0/19 +118.30.64.0/18 +118.30.128.0/17 118.31.0.0/16 118.64.0.0/15 118.66.0.0/16 @@ -1288,34 +3111,83 @@ 118.88.64.0/18 118.88.128.0/17 118.89.0.0/16 -118.91.240.0/20 118.102.16.0/20 118.102.32.0/21 +118.103.164.0/22 +118.103.168.0/21 +118.103.176.0/22 +118.103.245.0/24 +118.103.246.0/23 118.112.0.0/13 118.120.0.0/14 118.124.0.0/15 -118.126.0.0/16 +118.126.1.0/24 +118.126.2.0/23 +118.126.4.0/22 +118.126.8.0/21 +118.126.16.0/23 +118.126.18.0/24 +118.126.32.0/19 +118.126.64.0/18 +118.126.128.0/17 118.127.128.0/19 118.132.0.0/14 118.144.0.0/14 118.178.0.0/16 118.180.0.0/14 -118.184.0.0/16 +118.184.5.0/24 +118.184.10.0/24 +118.184.115.0/24 +118.184.116.0/22 +118.184.120.0/23 +118.184.122.0/24 +118.184.128.0/18 +118.184.192.0/19 +118.184.240.0/20 118.186.0.0/15 118.188.0.0/16 -118.190.0.0/15 -118.192.0.0/15 +118.190.0.0/16 +118.191.0.0/20 +118.191.24.0/21 +118.191.32.0/19 +118.191.64.0/18 +118.191.144.0/21 +118.191.153.0/24 +118.191.154.0/23 +118.191.156.0/22 +118.191.160.0/19 +118.191.192.0/20 +118.191.209.0/24 +118.191.210.0/23 +118.191.212.0/22 +118.191.248.0/21 +118.192.0.0/16 +118.193.0.0/22 +118.193.32.0/20 +118.193.56.0/21 +118.193.68.0/22 +118.193.72.0/24 +118.193.77.0/24 +118.193.96.0/19 118.194.0.0/17 -118.194.128.0/17 -118.195.0.0/17 -118.195.128.0/17 +118.194.128.0/18 +118.194.192.0/19 +118.194.232.0/21 +118.194.240.0/20 +118.195.0.0/16 118.196.0.0/14 118.202.0.0/15 118.204.0.0/14 -118.212.0.0/16 -118.213.0.0/16 +118.212.0.0/15 +118.215.192.0/18 118.224.0.0/14 -118.228.0.0/15 +118.228.0.0/17 +118.228.128.0/20 +118.228.144.0/21 +118.228.156.0/22 +118.228.160.0/19 +118.228.192.0/18 +118.229.0.0/16 118.230.0.0/16 118.239.0.0/16 118.242.0.0/16 @@ -1326,49 +3198,48 @@ 119.2.128.0/17 119.3.0.0/16 119.4.0.0/14 -119.8.0.0/16 119.10.0.0/17 119.15.136.0/21 119.16.0.0/16 119.18.192.0/20 119.18.208.0/21 -119.18.224.0/20 -119.18.240.0/20 +119.18.224.0/19 119.19.0.0/16 119.20.0.0/14 119.27.64.0/18 -119.27.128.0/19 -119.27.160.0/19 -119.27.192.0/18 -119.28.0.0/15 +119.27.128.0/17 +119.28.28.0/24 +119.29.0.0/16 119.30.48.0/20 119.31.192.0/19 119.32.0.0/14 -119.36.0.0/16 -119.37.0.0/17 -119.37.128.0/18 -119.37.192.0/18 +119.36.0.0/15 119.38.0.0/17 119.38.128.0/18 119.38.192.0/20 -119.38.208.0/20 -119.38.224.0/19 +119.38.208.0/22 +119.38.212.0/23 +119.38.214.0/27 +119.38.214.56/29 +119.38.214.64/26 +119.38.214.128/25 +119.38.215.0/24 +119.38.216.0/21 119.39.0.0/16 119.40.0.0/18 119.40.64.0/20 119.40.128.0/17 119.41.0.0/16 119.42.0.0/19 -119.42.128.0/21 -119.42.136.0/21 +119.42.52.0/22 +119.42.128.0/20 119.42.224.0/19 119.44.0.0/15 119.48.0.0/13 119.57.0.0/16 119.58.0.0/16 119.59.128.0/17 -119.60.0.0/16 -119.61.0.0/16 +119.60.0.0/15 119.62.0.0/16 119.63.32.0/19 119.75.208.0/20 @@ -1376,53 +3247,77 @@ 119.80.0.0/16 119.82.208.0/20 119.84.0.0/14 -119.88.0.0/14 +119.88.0.0/16 +119.89.0.0/17 +119.89.128.0/21 +119.89.136.0/23 +119.89.139.0/24 +119.89.140.0/22 +119.89.144.0/20 +119.89.160.0/20 +119.89.176.0/22 +119.89.180.0/23 +119.89.183.0/24 +119.89.184.0/21 +119.89.192.0/23 +119.89.194.0/24 +119.89.196.0/22 +119.89.200.0/21 +119.89.208.0/21 +119.89.217.0/24 +119.89.218.0/23 +119.89.220.0/22 +119.89.224.0/19 +119.90.0.0/15 119.96.0.0/13 119.108.0.0/15 -119.112.0.0/13 -119.120.0.0/13 +119.112.0.0/12 119.128.0.0/12 119.144.0.0/14 -119.148.160.0/20 -119.148.176.0/20 +119.148.160.0/19 119.151.192.0/18 119.160.200.0/21 -119.161.128.0/17 +119.161.120.0/21 +119.161.128.0/21 +119.161.160.0/19 +119.161.192.0/18 119.162.0.0/15 119.164.0.0/14 119.176.0.0/12 119.232.0.0/15 -119.235.128.0/18 +119.235.128.0/19 +119.235.160.0/20 +119.235.184.0/22 119.248.0.0/14 119.252.96.0/21 -119.252.240.0/20 +119.252.240.0/21 +119.252.249.0/24 +119.252.252.0/23 119.253.0.0/16 119.254.0.0/15 120.0.0.0/12 120.24.0.0/14 -120.30.0.0/16 -120.31.0.0/16 -120.32.0.0/13 -120.40.0.0/14 -120.44.0.0/14 +120.30.0.0/15 +120.32.0.0/12 120.48.0.0/15 120.52.0.0/14 -120.64.0.0/14 -120.68.0.0/14 +120.64.0.0/13 120.72.32.0/19 120.72.128.0/17 120.76.0.0/14 120.80.0.0/13 120.88.8.0/21 120.90.0.0/15 -120.92.0.0/16 -120.94.0.0/16 -120.95.0.0/16 -120.128.0.0/14 -120.132.0.0/17 -120.132.128.0/17 -120.133.0.0/16 -120.134.0.0/15 +120.92.0.0/17 +120.92.128.0/18 +120.92.192.0/22 +120.92.198.0/23 +120.92.200.0/21 +120.92.208.0/20 +120.92.224.0/19 +120.94.0.0/15 +120.128.0.0/13 +120.136.16.0/21 120.136.128.0/18 120.137.0.0/17 120.143.128.0/19 @@ -1431,17 +3326,11 @@ 121.0.16.0/20 121.4.0.0/15 121.8.0.0/13 -121.16.0.0/13 -121.24.0.0/14 -121.28.0.0/15 -121.30.0.0/16 -121.31.0.0/16 -121.32.0.0/14 -121.36.0.0/16 -121.37.0.0/16 -121.38.0.0/15 +121.16.0.0/12 +121.32.0.0/13 121.40.0.0/14 121.46.0.0/18 +121.46.76.0/22 121.46.128.0/17 121.47.0.0/16 121.48.0.0/15 @@ -1466,10 +3355,7 @@ 121.100.128.0/17 121.101.0.0/18 121.101.208.0/20 -121.192.0.0/16 -121.193.0.0/16 -121.194.0.0/15 -121.196.0.0/14 +121.192.0.0/13 121.200.192.0/21 121.201.0.0/16 121.204.0.0/14 @@ -1479,24 +3365,48 @@ 122.0.64.0/18 122.0.128.0/17 122.4.0.0/14 -122.8.0.0/16 -122.9.0.0/16 -122.10.0.0/17 -122.10.128.0/17 +122.10.132.0/23 +122.10.136.0/23 +122.10.196.0/23 +122.10.216.0/22 +122.10.228.0/22 +122.10.232.0/21 +122.10.240.0/21 +122.10.248.0/22 122.11.0.0/17 -122.12.0.0/16 -122.13.0.0/16 -122.14.0.0/16 +122.12.0.0/15 +122.14.0.0/17 +122.14.192.0/18 122.48.0.0/16 122.49.0.0/18 122.51.0.0/16 122.64.0.0/11 122.96.0.0/15 +122.98.144.0/20 +122.98.160.0/21 +122.98.172.0/22 +122.98.176.0/20 +122.98.192.0/21 +122.98.232.0/21 +122.98.240.0/20 122.102.0.0/20 -122.102.64.0/20 -122.102.80.0/20 -122.112.0.0/14 +122.102.64.0/19 +122.112.0.0/18 +122.112.64.0/19 +122.112.96.0/22 +122.112.107.0/24 +122.112.118.0/24 +122.112.122.0/24 +122.112.125.0/24 +122.112.128.0/17 +122.113.0.0/16 +122.114.0.0/16 +122.115.0.0/18 +122.115.80.0/20 +122.115.96.0/19 +122.115.128.0/17 122.119.0.0/16 +122.128.100.0/22 122.128.120.0/21 122.136.0.0/13 122.144.128.0/17 @@ -1505,6 +3415,7 @@ 122.188.0.0/14 122.192.0.0/14 122.198.0.0/16 +122.200.40.0/21 122.200.64.0/18 122.201.48.0/20 122.204.0.0/14 @@ -1513,16 +3424,30 @@ 122.248.24.0/21 122.248.48.0/20 122.255.64.0/21 -123.0.128.0/18 +123.0.128.0/21 +123.0.136.0/23 +123.0.139.0/24 +123.0.140.0/22 +123.0.144.0/20 +123.0.160.0/19 123.4.0.0/14 123.8.0.0/13 -123.49.128.0/17 +123.49.130.0/23 +123.49.132.0/22 +123.49.136.0/22 +123.49.152.0/21 +123.49.160.0/19 +123.49.192.0/18 123.50.160.0/19 123.52.0.0/14 123.56.0.0/15 -123.58.0.0/16 +123.58.0.0/18 +123.58.64.0/20 +123.58.80.0/21 +123.58.88.0/22 +123.58.96.0/19 +123.58.128.0/17 123.59.0.0/16 -123.60.0.0/16 123.61.0.0/16 123.62.0.0/16 123.64.0.0/11 @@ -1530,104 +3455,106 @@ 123.98.0.0/17 123.99.128.0/17 123.100.0.0/19 +123.100.232.0/24 123.101.0.0/16 -123.103.0.0/17 -123.108.128.0/20 +123.103.0.0/20 +123.103.16.0/21 +123.103.24.0/22 +123.103.28.0/23 +123.103.30.0/24 +123.103.32.0/19 +123.103.64.0/18 +123.108.134.0/24 +123.108.138.0/23 +123.108.140.0/24 +123.108.142.0/24 123.108.208.0/20 123.112.0.0/12 123.128.0.0/13 -123.136.80.0/20 123.137.0.0/16 123.138.0.0/15 -123.144.0.0/14 -123.148.0.0/16 -123.149.0.0/16 -123.150.0.0/15 -123.152.0.0/13 -123.160.0.0/14 -123.164.0.0/14 -123.168.0.0/14 -123.172.0.0/15 -123.174.0.0/15 +123.144.0.0/12 +123.160.0.0/12 123.176.60.0/22 123.176.80.0/20 123.177.0.0/16 123.178.0.0/15 123.180.0.0/14 -123.184.0.0/14 -123.188.0.0/14 +123.184.0.0/13 123.196.0.0/15 123.199.128.0/17 123.206.0.0/15 123.232.0.0/14 123.242.0.0/17 +123.242.192.0/21 123.244.0.0/14 123.249.0.0/16 -123.253.0.0/16 +123.253.109.0/24 +123.253.110.0/24 +123.253.240.0/22 +123.254.96.0/21 124.6.64.0/18 124.14.0.0/15 124.16.0.0/15 -124.20.0.0/16 -124.21.0.0/20 -124.21.16.0/20 -124.21.32.0/19 -124.21.64.0/18 -124.21.128.0/17 -124.22.0.0/15 +124.20.0.0/14 124.28.192.0/18 124.29.0.0/17 124.31.0.0/16 124.40.112.0/20 124.40.128.0/18 124.40.192.0/19 -124.42.0.0/17 -124.42.128.0/17 +124.40.240.0/22 +124.42.0.0/16 124.47.0.0/18 124.64.0.0/15 124.66.0.0/17 124.67.0.0/16 -124.68.0.0/14 -124.72.0.0/16 -124.73.0.0/16 -124.74.0.0/15 -124.76.0.0/14 -124.88.0.0/16 -124.89.0.0/17 -124.89.128.0/17 -124.90.0.0/15 -124.92.0.0/14 +124.68.0.0/17 +124.68.128.0/18 +124.68.192.0/19 +124.68.224.0/20 +124.68.240.0/23 +124.68.242.0/24 +124.68.244.0/23 +124.68.254.0/23 +124.69.0.0/16 +124.70.0.0/15 +124.72.0.0/13 +124.88.0.0/13 124.108.8.0/21 124.108.40.0/21 124.109.96.0/21 -124.112.0.0/15 -124.114.0.0/15 -124.116.0.0/16 -124.117.0.0/16 -124.118.0.0/15 +124.112.0.0/14 +124.116.0.0/15 +124.118.0.0/16 +124.119.0.0/17 +124.119.128.0/18 +124.119.192.0/19 +124.119.224.0/20 +124.119.240.0/22 +124.119.244.0/23 +124.119.246.0/25 +124.119.246.128/26 +124.119.246.192/27 +124.119.246.224/28 +124.119.246.240/29 +124.119.246.248/30 +124.119.246.254/31 +124.119.247.0/24 +124.119.248.0/21 124.126.0.0/15 124.128.0.0/13 124.147.128.0/17 +124.150.137.0/24 124.151.0.0/16 124.152.0.0/16 -124.156.0.0/16 -124.160.0.0/16 -124.161.0.0/16 -124.162.0.0/16 -124.163.0.0/16 -124.164.0.0/14 -124.172.0.0/15 -124.174.0.0/15 +124.160.0.0/13 +124.172.0.0/14 124.192.0.0/15 124.196.0.0/16 124.200.0.0/13 124.220.0.0/14 -124.224.0.0/16 -124.225.0.0/16 -124.226.0.0/15 -124.228.0.0/14 -124.232.0.0/15 -124.234.0.0/15 -124.236.0.0/14 +124.224.0.0/12 124.240.0.0/17 124.240.128.0/18 124.242.0.0/16 @@ -1637,70 +3564,133 @@ 124.250.0.0/15 124.254.0.0/18 125.31.192.0/18 -125.32.0.0/16 -125.33.0.0/16 -125.34.0.0/16 -125.35.0.0/17 -125.35.128.0/17 -125.36.0.0/14 -125.40.0.0/13 +125.32.0.0/12 125.58.128.0/17 125.61.128.0/17 125.62.0.0/18 -125.64.0.0/13 -125.72.0.0/16 -125.73.0.0/16 -125.74.0.0/15 -125.76.0.0/17 -125.76.128.0/17 -125.77.0.0/16 -125.78.0.0/15 -125.80.0.0/13 -125.88.0.0/13 +125.64.0.0/11 125.96.0.0/15 125.98.0.0/16 125.104.0.0/13 125.112.0.0/12 125.169.0.0/16 125.171.0.0/16 -125.208.0.0/18 -125.210.0.0/16 -125.211.0.0/16 +125.208.0.0/19 +125.208.37.0/24 +125.208.40.0/24 +125.208.45.0/24 +125.208.46.0/23 +125.208.48.0/20 +125.210.0.0/15 125.213.0.0/17 125.214.96.0/19 125.215.0.0/18 -125.216.0.0/15 -125.218.0.0/16 -125.219.0.0/16 -125.220.0.0/15 -125.222.0.0/15 -125.254.128.0/18 -125.254.192.0/18 -134.196.0.0/16 +125.216.0.0/13 +125.254.128.0/17 +128.108.0.0/16 +129.28.0.0/16 +129.204.0.0/16 +129.211.0.0/16 +129.223.254.0/24 +129.227.99.0/24 +130.36.146.0/23 +130.214.218.0/23 +131.228.96.0/24 +131.253.12.0/29 +131.253.12.80/28 +131.253.12.240/29 +132.232.0.0/16 +132.237.134.0/24 +132.237.150.0/24 +134.175.0.0/16 +135.159.208.0/20 +135.244.80.0/20 +137.59.59.0/24 +137.59.88.0/22 +138.32.244.0/22 +139.5.56.0/21 +139.5.80.0/22 +139.5.92.0/22 +139.5.128.0/22 +139.5.160.0/22 +139.5.192.0/22 +139.5.204.0/22 +139.5.244.0/22 139.9.0.0/16 139.129.0.0/16 +139.138.238.0/28 139.148.0.0/16 139.155.0.0/16 -139.159.0.0/16 +139.159.0.0/19 +139.159.32.0/21 +139.159.40.0/22 +139.159.52.0/22 +139.159.56.0/21 +139.159.64.0/19 +139.159.96.0/20 +139.159.112.0/22 +139.159.116.0/23 +139.159.120.0/21 +139.159.128.0/17 139.170.0.0/16 139.176.0.0/16 139.183.0.0/16 139.186.0.0/16 139.189.0.0/16 -139.196.0.0/14 +139.196.0.0/15 +139.198.0.0/21 +139.198.8.0/23 +139.198.11.0/24 +139.198.12.0/22 +139.198.16.0/20 +139.198.32.0/19 +139.198.66.0/23 +139.198.68.0/22 +139.198.72.0/21 +139.198.80.0/20 +139.198.96.0/20 +139.198.113.0/24 +139.198.114.0/23 +139.198.116.0/22 +139.198.122.0/23 +139.198.124.0/22 +139.198.128.0/17 +139.199.0.0/16 139.200.0.0/13 139.208.0.0/13 -139.220.0.0/15 +139.217.0.0/16 +139.219.0.0/16 +139.220.0.0/17 +139.220.128.0/18 +139.220.192.0/22 +139.220.196.0/23 +139.220.200.0/21 +139.220.208.0/23 +139.220.212.0/22 +139.220.216.0/21 +139.220.224.0/19 +139.221.0.0/16 139.224.0.0/16 139.226.0.0/15 140.75.0.0/16 +140.101.208.0/24 140.143.0.0/16 -140.205.0.0/16 +140.179.0.0/16 +140.205.0.0/18 +140.205.64.0/19 +140.205.96.0/20 +140.205.112.0/21 +140.205.120.0/23 +140.205.123.0/24 +140.205.124.0/22 +140.205.128.0/17 140.206.0.0/15 140.210.0.0/16 140.224.0.0/16 140.237.0.0/16 140.240.0.0/16 +140.242.223.0/24 +140.242.224.0/24 140.243.0.0/16 140.246.0.0/16 140.249.0.0/16 @@ -1709,16 +3699,70 @@ 144.0.0.0/16 144.7.0.0/16 144.12.0.0/16 +144.36.146.0/23 +144.48.64.0/22 +144.48.88.0/22 +144.48.156.0/22 +144.48.180.0/22 +144.48.184.0/22 +144.48.204.0/22 +144.48.208.0/21 144.52.0.0/16 144.123.0.0/16 +144.211.80.0/24 +144.211.138.0/24 144.255.0.0/16 +146.56.192.0/18 +146.196.56.0/22 +146.196.68.0/22 +146.196.92.0/22 +146.196.112.0/21 +146.196.124.0/22 +146.217.137.0/24 +146.222.79.0/24 +146.222.81.0/24 +146.222.94.0/24 +147.243.13.32/27 +147.243.13.64/27 +147.243.14.32/27 +148.70.0.0/16 150.0.0.0/16 150.115.0.0/16 150.121.0.0/16 150.122.0.0/16 +150.129.136.0/22 +150.129.192.0/22 +150.129.252.0/22 150.138.0.0/15 +150.158.0.0/16 +150.222.88.0/23 150.223.0.0/16 +150.242.0.0/21 +150.242.8.0/22 +150.242.28.0/22 +150.242.44.0/22 +150.242.48.0/21 +150.242.56.0/22 +150.242.76.0/22 +150.242.80.0/22 +150.242.92.0/22 +150.242.96.0/22 +150.242.112.0/21 +150.242.120.0/22 +150.242.152.0/22 +150.242.158.0/24 +150.242.160.0/21 +150.242.168.0/22 +150.242.184.0/21 +150.242.192.0/22 +150.242.224.0/22 +150.242.232.0/21 +150.242.240.0/21 +150.242.248.0/22 150.255.0.0/16 +152.32.178.0/23 +152.104.128.0/17 +152.136.0.0/16 153.0.0.0/16 153.3.0.0/16 153.34.0.0/15 @@ -1726,38 +3770,111 @@ 153.99.0.0/16 153.101.0.0/16 153.118.0.0/15 +154.8.128.0/17 +155.126.176.0/23 +156.107.160.0/24 +156.107.170.0/24 +156.107.179.0/24 +156.107.181.0/24 +156.154.62.0/23 157.0.0.0/16 157.18.0.0/16 157.61.0.0/16 +157.119.8.0/21 +157.119.16.0/22 +157.119.28.0/22 +157.119.132.0/22 +157.119.136.0/21 +157.119.144.0/20 +157.119.160.0/21 +157.119.172.0/22 +157.119.192.0/21 +157.119.240.0/22 +157.119.252.0/22 157.122.0.0/16 +157.133.186.0/23 +157.133.192.0/21 +157.133.212.0/24 +157.133.236.0/24 157.148.0.0/16 157.156.0.0/16 157.255.0.0/16 +159.75.0.0/16 +159.221.232.0/22 159.226.0.0/16 +160.19.208.0/21 +160.19.216.0/22 +160.20.48.0/22 +160.62.10.0/24 +160.83.109.0/24 +160.83.110.0/23 +160.202.60.0/23 +160.202.62.0/24 +160.202.148.0/22 +160.202.152.0/22 +160.202.212.0/22 +160.202.216.0/21 +160.202.224.0/19 +160.238.64.0/22 +161.163.0.0/21 +161.163.28.0/23 +161.163.176.0/24 +161.163.178.0/23 +161.163.180.0/22 +161.189.0.0/16 161.207.0.0/16 +162.14.0.0/16 162.105.0.0/16 163.0.0.0/16 +163.47.4.0/22 +163.53.0.0/20 +163.53.36.0/22 +163.53.40.0/22 +163.53.48.0/20 +163.53.64.0/22 +163.53.88.0/21 +163.53.96.0/19 +163.53.128.0/21 +163.53.136.0/22 +163.53.160.0/20 +163.53.188.0/22 +163.53.220.0/22 +163.53.236.0/22 +163.53.240.0/22 +163.116.202.0/23 163.125.0.0/16 163.142.0.0/16 163.177.0.0/16 163.179.0.0/16 163.204.0.0/16 +163.244.246.0/24 +164.52.80.0/24 +165.156.30.0/24 166.111.0.0/16 167.139.0.0/16 167.189.0.0/16 +167.220.244.0/22 +168.159.144.0/21 +168.159.152.0/22 +168.159.156.0/23 +168.159.158.0/24 168.160.0.0/16 +168.230.0.0/24 +170.179.0.0/16 +170.225.224.0/23 +170.252.152.0/21 171.8.0.0/13 +171.22.147.0/24 171.34.0.0/15 171.36.0.0/14 171.40.0.0/13 -171.80.0.0/14 -171.84.0.0/14 -171.88.0.0/13 +171.80.0.0/12 171.104.0.0/13 -171.112.0.0/14 -171.116.0.0/14 -171.120.0.0/13 +171.112.0.0/12 171.208.0.0/12 +172.60.2.0/24 +172.81.192.0/18 +173.39.200.0/23 175.0.0.0/12 175.16.0.0/13 175.24.0.0/14 @@ -1769,16 +3886,33 @@ 175.64.0.0/11 175.102.0.0/16 175.106.128.0/17 +175.111.144.0/20 +175.111.160.0/20 +175.111.184.0/22 175.146.0.0/15 175.148.0.0/14 175.152.0.0/14 +175.158.96.0/22 175.160.0.0/12 +175.176.156.0/22 +175.176.188.0/22 175.178.0.0/16 175.184.128.0/18 175.185.0.0/16 175.186.0.0/15 175.188.0.0/14 -180.76.0.0/16 +180.76.16.0/20 +180.76.32.0/19 +180.76.64.0/18 +180.76.128.0/18 +180.76.192.0/19 +180.76.224.0/20 +180.76.240.0/24 +180.76.242.0/23 +180.76.244.0/22 +180.76.248.0/22 +180.76.252.0/23 +180.76.255.0/24 180.77.0.0/16 180.78.0.0/15 180.84.0.0/15 @@ -1786,6 +3920,7 @@ 180.88.0.0/14 180.94.56.0/21 180.94.96.0/20 +180.94.120.0/21 180.95.128.0/17 180.96.0.0/11 180.129.128.0/17 @@ -1796,9 +3931,11 @@ 180.148.216.0/21 180.148.224.0/19 180.149.128.0/19 -180.150.160.0/19 +180.150.160.0/21 +180.150.176.0/20 180.152.0.0/13 180.160.0.0/12 +180.178.112.0/21 180.178.192.0/18 180.184.0.0/14 180.188.0.0/17 @@ -1807,13 +3944,26 @@ 180.201.0.0/16 180.202.0.0/15 180.208.0.0/15 -180.210.224.0/19 +180.210.212.0/22 +180.210.233.0/24 +180.210.236.0/22 180.212.0.0/15 180.222.224.0/19 -180.223.0.0/16 +180.223.0.0/19 +180.223.32.0/20 +180.223.48.0/21 +180.223.57.0/24 +180.223.58.0/23 +180.223.60.0/22 +180.223.80.0/20 +180.223.96.0/19 +180.223.128.0/17 180.233.0.0/18 180.233.64.0/19 +180.233.144.0/22 180.235.64.0/19 +180.235.112.0/22 +182.16.144.0/21 182.16.192.0/19 182.18.0.0/17 182.23.184.0/21 @@ -1821,17 +3971,18 @@ 182.32.0.0/12 182.48.96.0/19 182.49.0.0/16 -182.50.0.0/20 +182.50.0.0/22 +182.50.8.0/21 182.50.112.0/20 182.51.0.0/16 182.54.0.0/17 -182.61.0.0/16 -182.80.0.0/14 -182.84.0.0/14 +182.61.0.0/18 +182.61.128.0/19 +182.61.192.0/18 +182.80.0.0/13 182.88.0.0/14 182.92.0.0/16 -182.96.0.0/12 -182.112.0.0/12 +182.96.0.0/11 182.128.0.0/12 182.144.0.0/13 182.157.0.0/16 @@ -1839,12 +3990,21 @@ 182.174.0.0/15 182.200.0.0/13 182.236.128.0/17 +182.237.24.0/21 182.238.0.0/16 182.239.0.0/19 182.240.0.0/13 -182.254.0.0/16 +182.254.0.0/17 +182.254.128.0/18 +182.254.192.0/19 +182.254.224.0/20 +182.254.240.0/21 +182.254.248.0/23 +182.254.251.0/24 +182.254.252.0/22 183.0.0.0/10 183.64.0.0/13 +183.78.160.0/21 183.78.180.0/22 183.81.180.0/22 183.84.0.0/15 @@ -1857,17 +4017,57 @@ 183.168.0.0/15 183.170.0.0/16 183.172.0.0/14 -183.182.0.0/19 183.184.0.0/13 183.192.0.0/10 +185.109.236.0/24 +185.216.118.0/24 +188.131.128.0/17 +192.11.23.0/24 +192.11.26.0/24 +192.11.39.0/24 +192.11.236.0/24 +192.23.191.0/24 +192.55.10.0/23 +192.55.40.0/24 +192.55.46.0/24 +192.55.68.0/22 +192.102.204.0/22 192.124.154.0/24 -192.188.170.0/24 +192.137.31.0/24 +192.139.136.0/24 +192.140.128.0/21 +192.140.136.0/22 +192.140.156.0/22 +192.140.160.0/19 +192.140.192.0/20 +192.140.208.0/21 +192.144.128.0/17 +192.163.11.0/24 +192.232.97.0/24 +193.9.22.0/24 +193.17.120.0/22 +193.20.64.0/22 +193.112.0.0/16 +193.200.196.0/24 +193.200.222.160/28 +194.138.136.0/24 +194.138.202.0/23 +194.138.245.0/24 +198.175.100.0/22 +198.208.17.0/24 +198.208.19.0/24 +199.7.72.0/24 +199.65.192.0/21 +199.244.144.0/24 202.0.100.0/23 202.0.122.0/23 -202.0.176.0/22 +202.1.105.0/24 +202.1.106.0/24 202.3.128.0/23 202.4.128.0/19 202.4.252.0/22 +202.5.208.0/21 +202.5.216.0/22 202.6.6.0/23 202.6.66.0/23 202.6.72.0/23 @@ -1895,12 +4095,14 @@ 202.9.54.0/24 202.9.57.0/24 202.9.58.0/23 -202.10.64.0/20 +202.10.64.0/21 +202.10.74.0/23 +202.10.76.0/22 +202.10.112.0/20 202.12.1.0/24 202.12.2.0/24 202.12.17.0/24 -202.12.18.0/24 -202.12.19.0/24 +202.12.18.0/23 202.12.72.0/24 202.12.84.0/23 202.12.96.0/24 @@ -1932,6 +4134,7 @@ 202.14.158.0/23 202.14.169.0/24 202.14.170.0/23 +202.14.172.0/22 202.14.176.0/24 202.14.184.0/23 202.14.208.0/23 @@ -1943,9 +4146,7 @@ 202.14.226.0/23 202.14.231.0/24 202.14.235.0/24 -202.14.236.0/23 -202.14.238.0/24 -202.14.239.0/24 +202.14.236.0/22 202.14.246.0/24 202.14.251.0/24 202.20.66.0/24 @@ -1958,7 +4159,8 @@ 202.20.117.0/24 202.20.120.0/24 202.20.125.0/24 -202.20.127.0/24 +202.20.126.0/23 +202.21.48.0/20 202.21.131.0/24 202.21.132.0/24 202.21.141.0/24 @@ -1969,36 +4171,29 @@ 202.21.152.0/23 202.21.154.0/24 202.21.156.0/24 -202.22.248.0/22 -202.22.252.0/22 +202.21.208.0/24 +202.22.248.0/21 +202.27.12.0/24 +202.27.14.0/24 202.27.136.0/23 -202.38.0.0/23 -202.38.2.0/23 +202.36.226.0/24 +202.38.0.0/22 202.38.8.0/21 202.38.48.0/20 -202.38.64.0/19 -202.38.96.0/19 -202.38.128.0/23 -202.38.130.0/23 -202.38.132.0/23 -202.38.134.0/24 -202.38.135.0/24 +202.38.64.0/18 +202.38.128.0/21 202.38.136.0/23 202.38.138.0/24 -202.38.140.0/23 -202.38.142.0/23 +202.38.140.0/22 202.38.146.0/23 202.38.149.0/24 202.38.150.0/23 -202.38.152.0/23 -202.38.154.0/23 +202.38.152.0/22 202.38.156.0/24 202.38.158.0/23 202.38.160.0/23 202.38.164.0/22 -202.38.168.0/23 -202.38.170.0/24 -202.38.171.0/24 +202.38.168.0/22 202.38.176.0/23 202.38.184.0/21 202.38.192.0/18 @@ -2020,14 +4215,19 @@ 202.41.12.0/23 202.41.128.0/24 202.41.130.0/23 +202.41.142.0/24 202.41.152.0/21 202.41.192.0/24 +202.41.196.0/22 +202.41.200.0/22 202.41.240.0/20 202.43.76.0/22 202.43.144.0/20 202.44.16.0/20 +202.44.48.0/22 202.44.67.0/24 202.44.74.0/24 +202.44.97.0/24 202.44.129.0/24 202.44.132.0/23 202.44.146.0/23 @@ -2038,72 +4238,99 @@ 202.46.16.0/23 202.46.18.0/24 202.46.20.0/23 -202.46.32.0/19 202.46.128.0/24 202.46.224.0/20 202.47.82.0/23 +202.47.96.0/20 202.47.126.0/24 202.47.128.0/24 202.47.130.0/23 +202.52.34.0/24 +202.52.143.0/24 +202.53.140.0/24 +202.53.143.0/24 +202.53.202.0/24 +202.57.212.0/22 +202.57.216.0/22 202.57.240.0/20 202.58.0.0/24 -202.59.0.0/24 +202.58.112.0/22 +202.59.0.0/23 202.59.212.0/22 -202.59.232.0/23 202.59.236.0/24 +202.59.240.0/24 202.60.48.0/21 202.60.96.0/21 202.60.112.0/20 202.60.132.0/22 202.60.136.0/21 202.60.144.0/20 +202.61.68.0/22 +202.61.76.0/22 +202.61.88.0/22 +202.61.123.0/24 +202.61.127.0/24 202.62.112.0/22 202.62.248.0/22 202.62.252.0/24 202.62.255.0/24 -202.63.81.0/24 -202.63.82.0/23 -202.63.84.0/22 -202.63.88.0/21 +202.63.80.0/20 202.63.160.0/19 202.63.248.0/22 +202.63.253.0/24 202.65.0.0/21 202.65.8.0/23 202.67.0.0/22 -202.69.4.0/22 +202.69.4.0/23 202.69.16.0/20 202.70.0.0/19 202.70.96.0/20 202.70.192.0/20 +202.71.32.0/20 202.72.40.0/21 202.72.80.0/20 +202.72.112.0/20 202.73.128.0/22 +202.73.240.0/20 202.74.8.0/21 +202.74.36.0/24 +202.74.42.0/24 +202.74.52.0/24 202.74.80.0/20 202.74.254.0/23 202.75.208.0/20 202.75.252.0/22 +202.76.247.0/24 202.76.252.0/22 202.77.80.0/21 202.77.92.0/22 202.78.8.0/21 202.79.224.0/21 202.79.248.0/22 -202.80.192.0/21 -202.80.200.0/21 +202.80.192.0/20 202.81.0.0/22 +202.81.176.0/20 202.83.252.0/22 -202.84.4.0/22 -202.84.8.0/21 +202.84.0.0/20 +202.84.16.0/23 +202.84.22.0/24 202.84.24.0/21 202.85.208.0/20 202.86.249.0/24 -202.86.252.0/22 202.87.80.0/20 +202.88.32.0/22 202.89.8.0/21 +202.89.96.0/22 +202.89.108.0/22 +202.89.119.0/24 +202.89.232.0/21 202.90.0.0/22 -202.90.112.0/20 +202.90.16.0/20 +202.90.37.0/24 +202.90.96.0/19 +202.90.193.0/24 202.90.196.0/24 +202.90.205.0/24 202.90.224.0/20 202.91.0.0/22 202.91.96.0/20 @@ -2116,248 +4343,78 @@ 202.92.252.0/22 202.93.0.0/22 202.93.252.0/22 +202.94.0.0/19 +202.94.74.0/24 +202.94.81.0/24 202.94.92.0/22 -202.95.0.0/22 -202.95.4.0/22 -202.95.8.0/21 -202.95.16.0/20 202.95.240.0/21 202.95.252.0/22 -202.96.0.0/18 -202.96.64.0/21 -202.96.72.0/21 -202.96.80.0/20 -202.96.96.0/21 -202.96.104.0/21 -202.96.112.0/20 -202.96.128.0/21 -202.96.136.0/21 -202.96.144.0/20 -202.96.160.0/21 -202.96.168.0/21 -202.96.176.0/20 -202.96.192.0/21 -202.96.200.0/21 -202.96.208.0/20 -202.96.224.0/21 -202.96.232.0/21 -202.96.240.0/20 -202.97.0.0/21 -202.97.8.0/21 -202.97.16.0/20 -202.97.32.0/19 -202.97.64.0/19 -202.97.96.0/20 -202.97.112.0/20 -202.97.128.0/18 -202.97.192.0/19 -202.97.224.0/21 -202.97.232.0/21 -202.97.240.0/20 -202.98.0.0/21 -202.98.8.0/21 -202.98.16.0/20 -202.98.32.0/21 -202.98.40.0/21 -202.98.48.0/20 -202.98.64.0/19 -202.98.96.0/21 -202.98.104.0/21 -202.98.112.0/20 -202.98.128.0/19 -202.98.160.0/21 -202.98.168.0/21 -202.98.176.0/20 -202.98.192.0/21 -202.98.200.0/21 -202.98.208.0/20 -202.98.224.0/21 -202.98.232.0/21 -202.98.240.0/20 -202.99.0.0/18 -202.99.64.0/19 -202.99.96.0/21 -202.99.104.0/21 -202.99.112.0/20 -202.99.128.0/19 -202.99.160.0/21 -202.99.168.0/21 -202.99.176.0/20 -202.99.192.0/21 -202.99.200.0/21 -202.99.208.0/20 -202.99.224.0/21 -202.99.232.0/21 -202.99.240.0/20 -202.100.0.0/21 -202.100.8.0/21 -202.100.16.0/20 -202.100.32.0/19 -202.100.64.0/21 -202.100.72.0/21 -202.100.80.0/20 -202.100.96.0/21 -202.100.104.0/21 -202.100.112.0/20 -202.100.128.0/21 -202.100.136.0/21 -202.100.144.0/20 -202.100.160.0/21 -202.100.168.0/21 -202.100.176.0/20 -202.100.192.0/21 -202.100.200.0/21 -202.100.208.0/20 -202.100.224.0/19 -202.101.0.0/18 -202.101.64.0/19 -202.101.96.0/19 -202.101.128.0/18 -202.101.192.0/19 -202.101.224.0/21 -202.101.232.0/21 -202.101.240.0/20 -202.102.0.0/19 -202.102.32.0/19 -202.102.64.0/18 -202.102.128.0/21 -202.102.136.0/21 -202.102.144.0/20 -202.102.160.0/19 -202.102.192.0/21 -202.102.200.0/21 -202.102.208.0/20 -202.102.224.0/21 -202.102.232.0/21 -202.102.240.0/20 -202.103.0.0/21 -202.103.8.0/21 -202.103.16.0/20 -202.103.32.0/19 -202.103.64.0/19 -202.103.96.0/21 -202.103.104.0/21 -202.103.112.0/20 -202.103.128.0/18 -202.103.192.0/19 -202.103.224.0/21 -202.103.232.0/21 -202.103.240.0/20 -202.104.0.0/15 -202.106.0.0/16 -202.107.0.0/17 -202.107.128.0/17 -202.108.0.0/16 -202.109.0.0/16 -202.110.0.0/18 -202.110.64.0/18 -202.110.128.0/18 -202.110.192.0/18 -202.111.0.0/17 -202.111.128.0/19 -202.111.160.0/19 -202.111.192.0/18 -202.112.0.0/16 -202.113.0.0/20 -202.113.16.0/20 -202.113.32.0/19 -202.113.64.0/18 -202.113.128.0/18 -202.113.192.0/19 -202.113.224.0/20 -202.113.240.0/20 -202.114.0.0/19 -202.114.32.0/19 -202.114.64.0/18 -202.114.128.0/17 -202.115.0.0/19 -202.115.32.0/19 -202.115.64.0/18 -202.115.128.0/17 -202.116.0.0/19 -202.116.32.0/20 -202.116.48.0/20 -202.116.64.0/19 -202.116.96.0/19 -202.116.128.0/17 -202.117.0.0/18 -202.117.64.0/18 -202.117.128.0/17 -202.118.0.0/19 -202.118.32.0/19 -202.118.64.0/18 -202.118.128.0/17 -202.119.0.0/19 -202.119.32.0/19 -202.119.64.0/20 -202.119.80.0/20 -202.119.96.0/19 -202.119.128.0/17 -202.120.0.0/18 -202.120.64.0/18 -202.120.128.0/17 -202.121.0.0/16 +202.96.0.0/12 +202.112.0.0/13 +202.120.0.0/15 202.122.0.0/21 202.122.32.0/21 202.122.64.0/19 -202.122.112.0/21 -202.122.120.0/21 +202.122.112.0/20 202.122.128.0/24 202.122.132.0/24 202.123.96.0/20 +202.123.116.0/22 +202.123.120.0/22 202.124.16.0/21 202.124.24.0/22 +202.125.107.0/24 +202.125.109.0/24 202.125.112.0/20 202.125.176.0/20 -202.127.0.0/23 -202.127.2.0/24 -202.127.3.0/24 -202.127.4.0/24 -202.127.5.0/24 -202.127.6.0/23 +202.127.0.0/21 202.127.12.0/22 202.127.16.0/20 202.127.40.0/21 202.127.48.0/20 202.127.112.0/20 -202.127.128.0/20 -202.127.144.0/20 +202.127.128.0/19 202.127.160.0/21 -202.127.192.0/23 -202.127.194.0/23 -202.127.196.0/22 -202.127.200.0/21 -202.127.208.0/24 -202.127.209.0/24 +202.127.192.0/20 +202.127.208.0/23 202.127.212.0/22 202.127.216.0/21 202.127.224.0/19 +202.129.208.0/24 202.130.0.0/19 +202.130.39.0/24 202.130.224.0/19 202.131.16.0/21 -202.131.48.0/20 +202.131.59.0/24 202.131.208.0/20 202.133.32.0/20 202.134.58.0/24 202.134.128.0/20 +202.134.208.0/20 202.136.48.0/20 202.136.208.0/20 202.136.224.0/20 +202.136.248.0/22 +202.136.254.0/23 202.137.231.0/24 +202.140.140.0/22 +202.140.144.0/20 202.141.160.0/19 202.142.16.0/20 202.143.4.0/22 202.143.16.0/20 202.143.32.0/20 202.143.56.0/21 +202.143.100.0/22 +202.143.104.0/22 202.146.160.0/20 +202.146.186.0/24 202.146.188.0/22 202.146.196.0/22 202.146.200.0/21 202.147.144.0/20 202.148.32.0/20 -202.148.64.0/19 -202.148.96.0/19 +202.148.64.0/18 202.149.32.0/19 202.149.160.0/19 202.149.224.0/19 @@ -2370,15 +4427,18 @@ 202.151.128.0/19 202.152.176.0/20 202.153.0.0/22 +202.153.7.0/24 202.153.48.0/20 202.157.192.0/19 202.158.160.0/19 +202.158.242.0/24 +202.160.140.0/22 +202.160.156.0/22 202.160.176.0/20 202.162.67.0/24 202.162.75.0/24 202.164.0.0/20 202.164.96.0/19 -202.165.96.0/20 202.165.176.0/20 202.165.208.0/20 202.165.239.0/24 @@ -2388,22 +4448,31 @@ 202.165.251.0/24 202.165.252.0/22 202.166.224.0/19 -202.168.160.0/20 -202.168.176.0/20 +202.168.80.0/22 +202.168.128.0/20 +202.168.160.0/19 202.170.128.0/19 202.170.216.0/21 202.170.224.0/19 202.171.216.0/21 +202.171.232.0/24 202.171.235.0/24 202.172.0.0/22 +202.172.7.0/24 202.173.0.0/22 +202.173.6.0/24 202.173.8.0/21 +202.173.112.0/22 202.173.224.0/19 202.174.64.0/20 +202.174.124.0/22 202.176.224.0/19 +202.179.160.0/20 202.179.240.0/20 202.180.128.0/19 202.180.208.0/21 +202.181.8.0/22 +202.181.28.0/22 202.181.112.0/20 202.182.32.0/20 202.182.192.0/19 @@ -2414,9 +4483,7 @@ 202.191.68.0/22 202.191.72.0/21 202.191.80.0/20 -202.192.0.0/13 -202.200.0.0/14 -202.204.0.0/14 +202.192.0.0/12 203.0.4.0/22 203.0.10.0/23 203.0.18.0/24 @@ -2539,7 +4606,6 @@ 203.8.0.0/24 203.8.8.0/24 203.8.23.0/24 -203.8.24.0/21 203.8.70.0/24 203.8.82.0/24 203.8.86.0/23 @@ -2603,7 +4669,8 @@ 203.12.66.0/24 203.12.70.0/23 203.12.87.0/24 -203.12.88.0/21 +203.12.90.0/24 +203.12.92.0/22 203.12.100.0/23 203.12.103.0/24 203.12.114.0/24 @@ -2611,7 +4678,6 @@ 203.12.130.0/24 203.12.137.0/24 203.12.196.0/22 -203.12.200.0/21 203.12.211.0/24 203.12.219.0/24 203.12.226.0/24 @@ -2619,7 +4685,6 @@ 203.13.18.0/24 203.13.24.0/24 203.13.44.0/23 -203.13.80.0/21 203.13.88.0/23 203.13.92.0/22 203.13.173.0/24 @@ -2654,7 +4719,8 @@ 203.15.156.0/22 203.15.174.0/24 203.15.227.0/24 -203.15.232.0/21 +203.15.232.0/22 +203.15.238.0/23 203.15.240.0/23 203.15.246.0/24 203.16.10.0/24 @@ -2665,6 +4731,7 @@ 203.16.49.0/24 203.16.50.0/23 203.16.58.0/24 +203.16.63.0/24 203.16.133.0/24 203.16.161.0/24 203.16.162.0/24 @@ -2686,7 +4753,7 @@ 203.17.190.0/23 203.17.231.0/24 203.17.233.0/24 -203.17.248.0/24 +203.17.248.0/23 203.17.255.0/24 203.18.2.0/23 203.18.4.0/24 @@ -2694,7 +4761,6 @@ 203.18.31.0/24 203.18.37.0/24 203.18.48.0/23 -203.18.50.0/24 203.18.52.0/24 203.18.72.0/22 203.18.80.0/23 @@ -2712,10 +4778,10 @@ 203.18.208.0/24 203.18.211.0/24 203.18.215.0/24 +203.19.1.0/24 203.19.18.0/24 203.19.24.0/24 203.19.30.0/24 -203.19.32.0/21 203.19.41.0/24 203.19.44.0/23 203.19.46.0/24 @@ -2729,6 +4795,7 @@ 203.19.131.0/24 203.19.133.0/24 203.19.144.0/24 +203.19.147.0/24 203.19.149.0/24 203.19.156.0/24 203.19.176.0/24 @@ -2741,6 +4808,7 @@ 203.19.255.0/24 203.20.17.0/24 203.20.40.0/23 +203.20.44.0/24 203.20.48.0/24 203.20.61.0/24 203.20.65.0/24 @@ -2753,7 +4821,7 @@ 203.20.122.0/24 203.20.126.0/23 203.20.135.0/24 -203.20.136.0/21 +203.20.140.0/22 203.20.150.0/24 203.20.230.0/24 203.20.232.0/24 @@ -2779,7 +4847,6 @@ 203.22.31.0/24 203.22.68.0/24 203.22.76.0/24 -203.22.78.0/24 203.22.84.0/24 203.22.87.0/24 203.22.92.0/22 @@ -2852,7 +4919,6 @@ 203.25.19.0/24 203.25.20.0/23 203.25.46.0/24 -203.25.48.0/21 203.25.64.0/23 203.25.91.0/24 203.25.99.0/24 @@ -2900,6 +4966,7 @@ 203.26.148.0/23 203.26.154.0/24 203.26.158.0/23 +203.26.161.0/24 203.26.170.0/24 203.26.173.0/24 203.26.176.0/24 @@ -2995,7 +5062,6 @@ 203.29.254.0/23 203.30.16.0/23 203.30.25.0/24 -203.30.27.0/24 203.30.29.0/24 203.30.66.0/24 203.30.81.0/24 @@ -3069,7 +5135,7 @@ 203.32.212.0/24 203.33.4.0/24 203.33.7.0/24 -203.33.8.0/21 +203.33.12.0/23 203.33.21.0/24 203.33.26.0/24 203.33.32.0/24 @@ -3150,7 +5216,8 @@ 203.56.38.0/24 203.56.40.0/24 203.56.46.0/24 -203.56.48.0/21 +203.56.50.0/23 +203.56.52.0/22 203.56.68.0/23 203.56.82.0/23 203.56.84.0/23 @@ -3211,77 +5278,70 @@ 203.62.228.0/22 203.62.234.0/24 203.62.246.0/24 +203.65.240.0/22 203.76.160.0/22 203.76.168.0/22 +203.76.208.0/21 +203.76.216.0/22 +203.76.240.0/22 203.77.180.0/22 203.78.48.0/20 +203.78.156.0/22 203.79.0.0/20 -203.79.32.0/20 203.80.4.0/23 203.80.32.0/20 203.80.57.0/24 +203.80.129.0/24 203.80.132.0/22 -203.80.136.0/21 +203.80.140.0/22 203.80.144.0/20 203.81.0.0/21 203.81.16.0/20 +203.81.244.0/22 203.82.0.0/23 203.82.16.0/21 +203.82.112.0/20 +203.82.224.0/20 203.83.0.0/22 +203.83.12.0/22 203.83.56.0/21 203.83.224.0/20 -203.86.0.0/19 -203.86.32.0/19 -203.86.64.0/20 -203.86.80.0/20 -203.86.96.0/19 +203.86.0.0/18 +203.86.64.0/19 +203.86.250.0/24 203.86.254.0/23 203.88.32.0/19 +203.88.100.0/22 203.88.192.0/19 203.89.0.0/22 -203.89.8.0/21 +203.89.100.0/22 203.89.136.0/22 +203.89.144.0/24 203.90.0.0/22 -203.90.8.0/22 -203.90.128.0/19 -203.90.160.0/19 +203.90.8.0/21 +203.90.128.0/18 203.90.192.0/19 203.91.32.0/19 203.91.96.0/20 203.91.120.0/21 203.92.0.0/22 +203.92.6.0/24 203.92.160.0/19 -203.93.0.0/22 -203.93.4.0/22 -203.93.8.0/24 -203.93.9.0/24 -203.93.10.0/23 -203.93.12.0/22 -203.93.16.0/20 -203.93.32.0/19 -203.93.64.0/18 -203.93.128.0/21 -203.93.136.0/22 -203.93.140.0/24 -203.93.141.0/24 -203.93.142.0/23 -203.93.144.0/20 -203.93.160.0/19 -203.93.192.0/18 -203.94.0.0/22 -203.94.4.0/22 -203.94.8.0/21 -203.94.16.0/20 +203.93.0.0/16 +203.94.0.0/19 203.95.0.0/21 -203.95.96.0/20 -203.95.112.0/20 +203.95.96.0/19 203.95.128.0/18 +203.95.200.0/21 +203.95.208.0/22 203.95.224.0/19 203.99.8.0/21 -203.99.16.0/20 +203.99.16.0/22 +203.99.30.0/23 203.99.80.0/20 203.100.32.0/20 -203.100.48.0/21 +203.100.58.0/24 +203.100.60.0/24 203.100.63.0/24 203.100.80.0/20 203.100.96.0/19 @@ -3289,17 +5349,27 @@ 203.104.32.0/20 203.105.96.0/19 203.105.128.0/19 -203.107.0.0/17 +203.107.0.0/19 +203.107.32.0/20 +203.107.52.0/22 +203.107.56.0/21 +203.107.69.0/24 +203.107.70.0/23 +203.107.72.0/21 +203.107.80.0/20 +203.107.96.0/19 203.110.160.0/19 203.110.208.0/20 203.110.232.0/23 203.110.234.0/24 +203.114.80.0/20 203.114.244.0/22 203.118.192.0/19 203.118.241.0/24 203.118.248.0/22 -203.119.24.0/21 -203.119.32.0/22 +203.119.24.0/23 +203.119.32.0/24 +203.119.34.0/23 203.119.80.0/22 203.119.85.0/24 203.119.113.0/24 @@ -3307,18 +5377,20 @@ 203.119.116.0/22 203.119.120.0/21 203.119.128.0/17 +203.123.58.0/24 203.128.32.0/19 203.128.96.0/19 +203.128.128.0/24 203.128.224.0/21 -203.129.8.0/21 -203.130.32.0/19 +203.130.32.0/20 203.132.32.0/19 -203.134.240.0/21 -203.135.96.0/20 -203.135.112.0/20 +203.134.240.0/22 +203.134.246.0/23 +203.135.96.0/19 203.135.160.0/20 +203.142.12.0/23 +203.142.219.0/24 203.142.224.0/19 -203.144.96.0/19 203.145.0.0/19 203.148.0.0/18 203.148.64.0/20 @@ -3330,20 +5402,22 @@ 203.153.0.0/22 203.156.192.0/18 203.158.16.0/21 -203.160.104.0/21 203.160.129.0/24 203.160.192.0/19 203.161.0.0/22 203.161.180.0/24 +203.161.183.0/24 203.161.192.0/19 203.166.160.0/19 +203.167.28.0/22 203.168.0.0/19 203.170.58.0/23 203.171.0.0/22 +203.171.208.0/24 203.171.224.0/20 203.174.4.0/24 -203.174.7.0/24 -203.174.96.0/19 +203.174.6.0/24 +203.174.96.0/20 203.175.128.0/19 203.175.192.0/18 203.176.0.0/18 @@ -3355,24 +5429,28 @@ 203.189.6.0/23 203.189.112.0/22 203.189.192.0/19 +203.189.240.0/22 203.190.96.0/20 203.190.249.0/24 203.191.0.0/23 -203.191.16.0/20 +203.191.2.0/24 +203.191.5.0/24 +203.191.7.0/24 +203.191.29.0/24 +203.191.31.0/24 203.191.64.0/18 -203.191.144.0/21 -203.191.152.0/21 +203.191.133.0/24 +203.191.144.0/20 203.192.0.0/19 203.193.224.0/19 -203.194.120.0/21 203.195.64.0/19 -203.195.112.0/21 203.195.128.0/17 -203.196.0.0/21 -203.196.8.0/21 +203.196.0.0/20 +203.196.28.0/22 +203.201.181.0/24 +203.201.182.0/24 203.202.236.0/22 203.205.64.0/19 -203.205.128.0/17 203.207.64.0/18 203.207.128.0/17 203.208.0.0/20 @@ -3381,399 +5459,329 @@ 203.209.224.0/19 203.212.0.0/20 203.212.80.0/20 -203.215.232.0/21 -203.222.192.0/20 +203.217.164.0/22 203.223.0.0/20 -203.223.16.0/21 -210.2.0.0/20 -210.2.16.0/20 +203.223.16.0/24 +203.223.22.0/24 +204.55.160.0/24 +204.74.96.0/24 +204.114.176.0/23 +206.219.44.0/23 +206.219.50.0/23 +206.219.52.0/23 +207.89.20.0/24 +210.2.0.0/23 +210.2.2.0/24 +210.2.5.0/24 +210.2.6.0/23 +210.2.8.0/21 +210.2.24.0/21 210.5.0.0/19 -210.5.56.0/21 -210.5.128.0/20 -210.5.144.0/20 -210.12.0.0/18 -210.12.64.0/18 -210.12.128.0/18 -210.12.192.0/18 -210.13.0.0/18 -210.13.64.0/18 -210.13.128.0/17 +210.5.56.0/24 +210.5.60.0/24 +210.5.128.0/19 +210.7.56.0/21 +210.12.0.0/15 210.14.64.0/19 210.14.112.0/20 -210.14.128.0/19 -210.14.160.0/19 -210.14.192.0/19 -210.14.224.0/19 -210.15.0.0/19 -210.15.32.0/19 -210.15.64.0/19 -210.15.96.0/19 +210.14.128.0/17 +210.15.0.0/17 210.15.128.0/18 -210.16.128.0/18 -210.21.0.0/17 -210.21.128.0/17 +210.16.128.0/21 +210.16.136.0/22 +210.16.156.0/22 +210.16.160.0/19 +210.21.0.0/16 210.22.0.0/16 210.23.32.0/19 210.25.0.0/16 210.26.0.0/15 210.28.0.0/14 -210.32.0.0/14 -210.36.0.0/14 -210.40.0.0/13 -210.48.136.0/21 +210.32.0.0/12 210.51.0.0/16 210.52.0.0/18 -210.52.64.0/18 +210.52.64.0/23 +210.52.66.0/24 +210.52.68.0/22 +210.52.72.0/21 +210.52.80.0/20 +210.52.96.0/21 +210.52.104.0/22 +210.52.108.0/24 +210.52.110.0/23 +210.52.112.0/20 210.52.128.0/17 -210.53.0.0/17 -210.53.128.0/17 +210.53.0.0/16 210.56.192.0/19 -210.72.0.0/17 -210.72.128.0/19 -210.72.160.0/19 -210.72.192.0/18 -210.73.0.0/19 -210.73.32.0/19 -210.73.64.0/18 -210.73.128.0/17 -210.74.0.0/19 -210.74.32.0/19 -210.74.64.0/19 -210.74.96.0/19 -210.74.128.0/19 -210.74.160.0/19 -210.74.192.0/18 -210.75.0.0/16 -210.76.0.0/19 -210.76.32.0/19 -210.76.64.0/18 -210.76.128.0/17 -210.77.0.0/16 -210.78.0.0/19 -210.78.32.0/19 -210.78.64.0/18 -210.78.128.0/19 -210.78.160.0/19 -210.78.192.0/18 +210.72.0.0/14 +210.76.0.0/15 +210.78.0.0/16 210.79.64.0/18 210.79.224.0/19 210.82.0.0/15 -210.87.128.0/20 -210.87.144.0/20 -210.87.160.0/19 +210.87.128.0/18 210.185.192.0/18 210.192.96.0/19 -211.64.0.0/14 -211.68.0.0/15 -211.70.0.0/15 -211.80.0.0/16 -211.81.0.0/16 -211.82.0.0/16 -211.83.0.0/16 -211.84.0.0/15 -211.86.0.0/15 -211.88.0.0/16 -211.89.0.0/16 -211.90.0.0/15 -211.92.0.0/15 -211.94.0.0/15 -211.96.0.0/15 -211.98.0.0/16 -211.99.0.0/18 -211.99.64.0/19 -211.99.96.0/19 -211.99.128.0/17 -211.100.0.0/16 -211.101.0.0/18 -211.101.64.0/18 -211.101.128.0/17 -211.102.0.0/16 -211.103.0.0/17 -211.103.128.0/17 -211.136.0.0/14 -211.140.0.0/15 -211.142.0.0/17 -211.142.128.0/17 -211.143.0.0/16 -211.144.0.0/15 -211.146.0.0/16 -211.147.0.0/16 -211.148.0.0/14 -211.152.0.0/15 -211.154.0.0/16 +211.64.0.0/13 +211.80.0.0/12 +211.96.0.0/14 +211.100.0.0/17 +211.100.128.0/19 +211.100.160.0/20 +211.100.184.0/21 +211.100.192.0/18 +211.101.0.0/16 +211.102.0.0/15 +211.136.0.0/13 +211.144.0.0/13 +211.152.0.0/17 +211.152.134.0/23 +211.152.138.0/23 +211.152.140.0/22 +211.152.150.0/23 +211.152.157.0/24 +211.152.158.0/23 +211.152.160.0/19 +211.152.192.0/18 +211.153.0.0/16 +211.154.0.0/19 +211.154.32.0/20 +211.154.48.0/21 +211.154.64.0/18 +211.154.128.0/17 211.155.0.0/18 -211.155.64.0/19 -211.155.96.0/19 +211.155.67.0/24 +211.155.68.0/24 +211.155.72.0/21 +211.155.80.0/20 +211.155.97.0/24 +211.155.98.0/23 +211.155.100.0/22 +211.155.104.0/21 +211.155.113.0/24 +211.155.117.0/24 +211.155.118.0/23 +211.155.120.0/21 211.155.128.0/17 -211.156.0.0/14 -211.160.0.0/14 -211.164.0.0/14 -218.0.0.0/16 -218.1.0.0/16 -218.2.0.0/15 -218.4.0.0/15 -218.6.0.0/16 -218.7.0.0/16 -218.8.0.0/15 -218.10.0.0/16 -218.11.0.0/16 -218.12.0.0/16 -218.13.0.0/16 -218.14.0.0/15 -218.16.0.0/14 -218.20.0.0/16 -218.21.0.0/17 -218.21.128.0/17 -218.22.0.0/15 -218.24.0.0/15 -218.26.0.0/16 -218.27.0.0/16 +211.156.0.0/18 +211.156.64.0/19 +211.156.96.0/21 +211.156.104.0/22 +211.156.108.0/23 +211.156.112.0/20 +211.156.128.0/17 +211.157.0.0/16 +211.158.0.0/15 +211.160.0.0/13 +212.64.0.0/17 +212.129.128.0/17 +218.0.0.0/12 +218.16.0.0/13 +218.24.0.0/14 218.28.0.0/15 -218.30.0.0/15 -218.56.0.0/14 -218.60.0.0/15 -218.62.0.0/17 -218.62.128.0/17 -218.63.0.0/16 -218.64.0.0/15 -218.66.0.0/16 -218.67.0.0/17 -218.67.128.0/17 -218.68.0.0/15 -218.70.0.0/15 -218.72.0.0/14 -218.76.0.0/15 -218.78.0.0/15 -218.80.0.0/14 -218.84.0.0/14 -218.88.0.0/13 +218.30.0.0/19 +218.30.64.0/18 +218.30.128.0/18 +218.30.192.0/19 +218.30.224.0/20 +218.30.240.0/21 +218.30.248.0/22 +218.30.252.0/25 +218.30.252.128/26 +218.30.252.194/31 +218.30.252.196/30 +218.30.252.200/29 +218.30.252.208/28 +218.30.252.224/27 +218.30.253.0/24 +218.30.254.0/23 +218.31.0.0/16 +218.56.0.0/13 +218.64.0.0/11 218.96.0.0/15 -218.98.0.0/17 -218.98.128.0/18 -218.98.192.0/19 -218.98.224.0/19 +218.98.0.0/18 +218.98.96.0/21 +218.98.104.0/22 +218.98.108.0/23 +218.98.110.0/24 +218.98.112.0/20 +218.98.128.0/19 +218.98.192.0/18 218.99.0.0/16 -218.100.88.0/21 218.100.96.0/19 218.100.128.0/17 -218.104.0.0/17 -218.104.128.0/19 -218.104.160.0/19 -218.104.192.0/21 -218.104.200.0/21 -218.104.208.0/20 -218.104.224.0/19 -218.105.0.0/16 -218.106.0.0/15 -218.108.0.0/16 -218.109.0.0/16 +218.104.0.0/14 +218.108.0.0/15 218.185.192.0/19 -218.185.240.0/21 -218.192.0.0/16 -218.193.0.0/16 -218.194.0.0/16 -218.195.0.0/16 -218.196.0.0/14 -218.200.0.0/14 -218.204.0.0/15 -218.206.0.0/15 +218.192.0.0/12 218.240.0.0/14 218.244.0.0/15 -218.246.0.0/15 +218.246.0.0/17 +218.246.129.0/24 +218.246.131.0/24 +218.246.132.0/23 +218.246.134.0/24 +218.246.139.0/24 +218.246.144.0/20 +218.246.160.0/19 +218.246.192.0/18 +218.247.0.0/18 +218.247.96.0/19 +218.247.128.0/17 218.249.0.0/16 219.72.0.0/16 219.82.0.0/16 219.83.128.0/17 -219.128.0.0/12 -219.144.0.0/14 -219.148.0.0/16 -219.149.0.0/17 -219.149.128.0/18 -219.149.192.0/18 -219.150.0.0/19 -219.150.32.0/19 -219.150.64.0/19 -219.150.96.0/20 -219.150.112.0/20 -219.150.128.0/17 -219.151.0.0/19 -219.151.32.0/19 -219.151.64.0/18 -219.151.128.0/17 -219.152.0.0/15 -219.154.0.0/15 -219.156.0.0/15 -219.158.0.0/17 -219.158.128.0/17 -219.159.0.0/18 -219.159.64.0/18 -219.159.128.0/17 -219.216.0.0/15 -219.218.0.0/15 -219.220.0.0/16 -219.221.0.0/16 -219.222.0.0/15 -219.224.0.0/15 -219.226.0.0/16 -219.227.0.0/16 -219.228.0.0/15 -219.230.0.0/15 -219.232.0.0/14 -219.236.0.0/15 -219.238.0.0/15 +219.90.68.0/22 +219.90.72.0/21 +219.128.0.0/11 +219.216.0.0/13 +219.224.0.0/13 +219.232.0.0/15 +219.234.0.0/21 +219.234.9.0/24 +219.234.10.0/23 +219.234.12.0/22 +219.234.32.0/19 +219.234.64.0/18 +219.234.128.0/17 +219.235.0.0/16 +219.236.0.0/14 219.242.0.0/15 219.244.0.0/14 220.101.192.0/18 220.112.0.0/14 220.152.128.0/17 -220.154.0.0/15 +220.154.0.0/16 +220.155.0.0/21 +220.155.9.0/24 +220.155.10.0/23 +220.155.12.0/22 +220.155.16.0/21 +220.155.24.0/22 +220.155.28.0/23 +220.155.31.0/24 +220.155.32.0/19 +220.155.64.0/18 +220.155.128.0/17 +220.158.241.0/24 +220.158.243.0/24 220.160.0.0/11 -220.192.0.0/15 -220.194.0.0/15 -220.196.0.0/14 -220.200.0.0/13 +220.192.0.0/12 220.231.0.0/18 220.231.128.0/17 220.232.64.0/18 220.234.0.0/16 -220.242.0.0/15 +220.242.0.0/24 +220.242.12.0/23 +220.242.14.0/24 +220.242.17.0/24 +220.242.18.0/23 +220.242.20.0/24 +220.242.32.0/20 +220.242.48.0/23 +220.242.53.0/24 +220.242.55.0/24 +220.242.56.0/22 +220.242.60.0/23 +220.242.62.0/24 +220.242.64.0/19 +220.242.96.0/20 +220.242.112.0/21 +220.242.120.0/22 +220.242.124.0/23 +220.242.126.0/24 +220.242.173.0/24 +220.242.197.0/24 +220.242.205.0/24 +220.242.207.0/24 +220.242.215.0/24 +220.242.216.0/21 +220.242.224.0/19 +220.243.0.0/17 +220.243.128.0/18 +220.243.204.0/24 +220.243.214.0/24 +220.243.217.0/24 +220.243.218.0/24 +220.243.238.0/24 220.247.136.0/21 220.248.0.0/14 220.252.0.0/16 -221.0.0.0/15 -221.2.0.0/16 -221.3.0.0/17 -221.3.128.0/17 -221.4.0.0/16 -221.5.0.0/17 -221.5.128.0/17 -221.6.0.0/16 -221.7.0.0/19 -221.7.32.0/19 -221.7.64.0/19 -221.7.96.0/19 -221.7.128.0/17 -221.8.0.0/15 -221.10.0.0/16 -221.11.0.0/17 -221.11.128.0/18 -221.11.192.0/19 -221.11.224.0/19 +221.0.0.0/13 +221.8.0.0/14 221.12.0.0/17 221.12.128.0/18 -221.13.0.0/18 -221.13.64.0/19 -221.13.96.0/19 -221.13.128.0/17 +221.13.0.0/16 221.14.0.0/15 221.122.0.0/15 221.128.128.0/17 221.129.0.0/16 221.130.0.0/15 221.133.224.0/19 -221.136.0.0/16 -221.137.0.0/16 +221.136.0.0/15 221.172.0.0/14 -221.176.0.0/13 -221.192.0.0/15 -221.194.0.0/16 -221.195.0.0/16 +221.176.0.0/19 +221.176.32.0/20 +221.176.48.0/21 +221.176.56.0/24 +221.176.58.0/23 +221.176.60.0/22 +221.176.64.0/18 +221.176.128.0/17 +221.177.0.0/16 +221.178.0.0/15 +221.180.0.0/14 +221.192.0.0/14 221.196.0.0/15 221.198.0.0/16 -221.199.0.0/19 -221.199.32.0/20 -221.199.48.0/20 -221.199.64.0/18 +221.199.0.0/17 221.199.128.0/18 221.199.192.0/20 221.199.224.0/19 -221.200.0.0/14 -221.204.0.0/15 -221.206.0.0/16 -221.207.0.0/18 -221.207.64.0/18 -221.207.128.0/17 -221.208.0.0/14 -221.212.0.0/16 -221.213.0.0/16 -221.214.0.0/15 -221.216.0.0/13 -221.224.0.0/13 -221.232.0.0/14 -221.236.0.0/15 -221.238.0.0/16 -221.239.0.0/17 -221.239.128.0/17 -222.16.0.0/15 -222.18.0.0/15 -222.20.0.0/15 -222.22.0.0/16 -222.23.0.0/16 -222.24.0.0/15 -222.26.0.0/15 -222.28.0.0/14 +221.200.0.0/13 +221.208.0.0/12 +221.224.0.0/12 +222.16.0.0/12 222.32.0.0/11 -222.64.0.0/13 -222.72.0.0/15 -222.74.0.0/16 -222.75.0.0/16 -222.76.0.0/14 -222.80.0.0/15 -222.82.0.0/16 -222.83.0.0/17 -222.83.128.0/17 -222.84.0.0/16 -222.85.0.0/17 -222.85.128.0/17 -222.86.0.0/15 -222.88.0.0/15 -222.90.0.0/15 -222.92.0.0/14 +222.64.0.0/11 222.125.0.0/16 -222.126.128.0/17 -222.128.0.0/14 -222.132.0.0/14 -222.136.0.0/13 -222.160.0.0/15 -222.162.0.0/16 -222.163.0.0/19 -222.163.32.0/19 -222.163.64.0/18 -222.163.128.0/17 -222.168.0.0/15 -222.170.0.0/15 -222.172.0.0/17 -222.172.128.0/17 -222.173.0.0/16 -222.174.0.0/15 -222.176.0.0/13 -222.184.0.0/13 -222.192.0.0/14 -222.196.0.0/15 -222.198.0.0/16 -222.199.0.0/16 -222.200.0.0/14 -222.204.0.0/15 -222.206.0.0/15 -222.208.0.0/13 -222.216.0.0/15 -222.218.0.0/16 -222.219.0.0/16 -222.220.0.0/15 -222.222.0.0/15 +222.126.128.0/19 +222.126.160.0/21 +222.126.168.0/22 +222.126.172.0/23 +222.126.174.40/29 +222.126.174.76/30 +222.126.174.88/29 +222.126.174.144/28 +222.126.178.0/23 +222.126.180.0/22 +222.126.184.0/21 +222.126.192.0/21 +222.126.200.104/29 +222.126.206.0/23 +222.126.208.0/22 +222.126.212.0/26 +222.126.212.64/27 +222.126.212.96/28 +222.126.212.112/29 +222.126.212.128/25 +222.126.213.0/24 +222.126.214.0/23 +222.126.216.0/21 +222.126.224.0/19 +222.128.0.0/12 +222.160.0.0/14 +222.168.0.0/13 +222.176.0.0/12 +222.192.0.0/11 222.240.0.0/13 -222.248.0.0/16 -222.249.0.0/17 -222.249.128.0/19 -222.249.160.0/20 -222.249.176.0/20 -222.249.192.0/18 -223.0.0.0/15 -223.2.0.0/15 -223.4.0.0/14 -223.8.0.0/13 +222.248.0.0/15 +223.0.0.0/12 223.20.0.0/15 223.27.184.0/22 +223.29.208.0/22 +223.29.252.0/22 223.64.0.0/11 223.96.0.0/12 223.112.0.0/14 @@ -3785,17 +5793,21 @@ 223.166.0.0/15 223.192.0.0/15 223.198.0.0/15 -223.201.0.0/16 +223.201.4.0/22 +223.201.8.0/21 +223.201.16.0/20 +223.201.32.0/19 +223.201.64.0/18 +223.201.128.0/17 223.202.0.0/15 -223.208.0.0/14 -223.212.0.0/15 -223.214.0.0/15 +223.208.0.0/13 223.220.0.0/15 223.223.176.0/20 223.223.192.0/20 223.240.0.0/13 223.248.0.0/14 -223.252.128.0/17 +223.252.128.0/19 +223.252.192.0/18 223.254.0.0/16 223.255.0.0/17 223.255.236.0/22 diff --git a/acl/gfwlist.acl b/acl/gfwlist.acl new file mode 100644 index 000000000..0f5072ed3 --- /dev/null +++ b/acl/gfwlist.acl @@ -0,0 +1,5752 @@ +# gfw list rules for shadowsocks-libev $ +# updated on 2020-04-18 01:30:05$ +[bypass_all] + +[proxy_list] +# Telegram IPs$ +149.154.167.99/32 +149.154.175.10/32 +149.154.167.40/32 +149.154.167.42/32 +149.154.175.117/32 +149.154.175.50/32 +149.154.167.50/32 +149.154.167.51/32 +149.154.175.100/32 +149.154.167.91/32 +149.154.167.90/32 +149.154.165.120/32 +149.154.166.120/32 +149.154.164.250/32 +149.154.167.117/32 +149.154.167.118/32 +149.154.167.192/27 +149.154.164.8/29 +91.108.8.0/27 +91.108.12.0/27 +91.108.16.0/27 +91.108.56.0/24 +91.108.4.0/24 +149.154.160.0/22 +149.154.164.0/22 +149.154.168.0/22 +149.154.172.0/22 +91.108.56.0/22 +91.108.4.0/22 +91.108.8.0/22 +91.108.16.0/22 +91.108.12.0/22 +149.154.160.0/20 +2001:b28:f23d:f001::e/128 +2001:67c:4e8:f002::e/128 +2001:b28:f23d:f003::e/128 +2001:b28:f23d:f001::a/128 +2001:67c:4e8:f002::a/128 +2001:b28:f23d:f003::a/128 +2001:67c:4e8:f004::a/128 +2001:b28:f23f:f005::a/128 +2001:67c:4e8:fa60::/64 +2001:b28:f23d::/48 +2001:b28:f23f::/48 +2001:67c:4e8::/48 +(^|\.)030buy\.com$ +(^|\.)0rz\.tw$ +(^|\.)1000giri\.net$ +(^|\.)100ke\.org$ +(^|\.)10conditionsoflove\.com$ +(^|\.)10musume\.com$ +(^|\.)10\.tt$ +(^|\.)123rf\.com$ +(^|\.)12bet\.com$ +(^|\.)12vpn\.com$ +(^|\.)12vpn\.net$ +(^|\.)138\.com$ +(^|\.)141hongkong\.com$ +(^|\.)141jj\.com$ +(^|\.)141tube\.com$ +(^|\.)1688\.com\.au$ +(^|\.)173ng\.com$ +(^|\.)177pic\.info$ +(^|\.)17t17p\.com$ +(^|\.)18board\.com$ +(^|\.)18board\.info$ +(^|\.)18onlygirls\.com$ +(^|\.)18p2p\.com$ +(^|\.)18virginsex\.com$ +(^|\.)1949er\.org$ +(^|\.)1984bbs\.com$ +(^|\.)1984bbs\.org$ +(^|\.)1989report\.hkja\.org\.hk$ +(^|\.)1991way\.com$ +(^|\.)1998cdp\.org$ +(^|\.)1-apple\.com\.tw$ +(^|\.)1bao\.org$ +(^|\.)1dumb\.com$ +(^|\.)1e100\.net$ +(^|\.)1eew\.com$ +(^|\.)1mobile\.com$ +(^|\.)1mobile\.tw$ +(^|\.)1pondo\.tv$ +(^|\.)2000fun\.com$ +(^|\.)2008xianzhang\.info$ +(^|\.)2017\.hk$ +(^|\.)21andy\.com$ +(^|\.)21join\.com$ +(^|\.)21pron\.com$ +(^|\.)21sextury\.com$ +(^|\.)228\.net\.tw$ +(^|\.)233abc\.com$ +(^|\.)24hrs\.ca$ +(^|\.)24smile\.org$ +(^|\.)25u\.com$ +(^|\.)2-hand\.info$ +(^|\.)2lipstube\.com$ +(^|\.)2shared\.com$ +(^|\.)2waky\.com$ +(^|\.)30boxes\.com$ +(^|\.)315lz\.com$ +(^|\.)32red\.com$ +(^|\.)36rain\.com$ +(^|\.)3a5a\.com$ +(^|\.)3-a\.net$ +(^|\.)3arabtv\.com$ +(^|\.)3boys2girls\.com$ +(^|\.)3d-game\.com$ +(^|\.)3proxy\.ru$ +(^|\.)3ren\.ca$ +(^|\.)3tui\.net$ +(^|\.)43110\.cf$ +(^|\.)466453\.com$ +(^|\.)4bluestones\.biz$ +(^|\.)4chan\.com$ +(^|\.)4dq\.com$ +(^|\.)4everproxy\.com$ +(^|\.)4irc\.com$ +(^|\.)4mydomain\.com$ +(^|\.)4pu\.com$ +(^|\.)4rbtv\.com$ +(^|\.)4shared\.com$ +(^|\.)4sqi\.net$ +(^|\.)51\.ca$ +(^|\.)51jav\.org$ +(^|\.)51luoben\.com$ +(^|\.)5278\.cc$ +(^|\.)5299\.tv$ +(^|\.)56cun04\.jigsy\.com$ +(^|\.)5aimiku\.com$ +(^|\.)5i01\.com$ +(^|\.)5isotoi5\.org$ +(^|\.)5maodang\.com$ +(^|\.)63i\.com$ +(^|\.)64museum\.org$ +(^|\.)64tianwang\.com$ +(^|\.)64wiki\.com$ +(^|\.)666kb\.com$ +(^|\.)66\.ca$ +(^|\.)6park\.com$ +(^|\.)6parker\.com$ +(^|\.)6parknews\.com$ +(^|\.)7capture\.com$ +(^|\.)7cow\.com$ +(^|\.)85cc\.net$ +(^|\.)85cc\.us$ +(^|\.)85st\.com$ +(^|\.)881903\.com$ +(^|\.)888\.com$ +(^|\.)888poker\.com$ +(^|\.)89\.64\.charter\.constitutionalism\.solutions$ +(^|\.)89-64\.org$ +(^|\.)8-d\.com$ +(^|\.)8news\.com\.tw$ +(^|\.)8z1\.net$ +(^|\.)9001700\.com$ +(^|\.)908taiwan\.org$ +(^|\.)91porn\.com$ +(^|\.)91vps\.club$ +(^|\.)92ccav\.com$ +(^|\.)991\.com$ +(^|\.)99btgc01\.com$ +(^|\.)99cn\.info$ +(^|\.)9bis\.com$ +(^|\.)9bis\.net$ +(^|\.)9gag\.com$ +(^|\.)a248\.e\.akamai\.net$ +(^|\.)a5\.com\.ru$ +(^|\.)aamacau\.com$ +(^|\.)abc\.com$ +(^|\.)abchinese\.com$ +(^|\.)abclite\.net$ +(^|\.)abc\.net\.au$ +(^|\.)abc\.pp\.ru$ +(^|\.)abc\.xyz$ +(^|\.)abebooks\.com$ +(^|\.)abematv\.akamaized\.net$ +(^|\.)abitno\.linpie\.com$ +(^|\.)ablwang\.com$ +(^|\.)aboluowang\.com$ +(^|\.)aboutgfw\.com$ +(^|\.)about\.google$ +(^|\.)abs\.edu$ +(^|\.)accim\.org$ +(^|\.)aceros-de-hispania\.com$ +(^|\.)acevpn\.com$ +(^|\.)acg18\.me$ +(^|\.)acgkj\.com$ +(^|\.)ac\.jiruan\.net$ +(^|\.)acmedia365\.com$ +(^|\.)acmetoy\.com$ +(^|\.)acnw\.com\.au$ +(^|\.)actfortibet\.org$ +(^|\.)actimes\.com\.au$ +(^|\.)activpn\.com$ +(^|\.)aculo\.us$ +(^|\.)adcex\.com$ +(^|\.)addictedtocoffee\.de$ +(^|\.)adelaidebbs\.com$ +(^|\.)admin\.recaptcha\.net$ +(^|\.)admob\.com$ +(^|\.)adpl\.org\.hk$ +(^|\.)adsense\.com$ +(^|\.)ads-twitter\.com$ +(^|\.)adult\.friendfinder\.com$ +(^|\.)adultfriendfinder\.com$ +(^|\.)adultkeep\.net$ +(^|\.)adult-sex-games\.com$ +(^|\.)advanscene\.com$ +(^|\.)advertfan\.com$ +(^|\.)ae\.hao123\.com$ +(^|\.)aenhancers\.com$ +(^|\.)ae\.org$ +(^|\.)aex\.com$ +(^|\.)afantibbs\.com$ +(^|\.)af\.mil$ +(^|\.)agnesb\.fr$ +(^|\.)agoogleaday\.com$ +(^|\.)agro\.hk$ +(^|\.)ai\.binwang\.me$ +(^|\.)ai\.google$ +(^|\.)ai-kan\.net$ +(^|\.)aiph\.net$ +(^|\.)airasia\.com$ +(^|\.)airconsole\.com$ +(^|\.)airvpn\.org$ +(^|\.)aisex\.com$ +(^|\.)aiss\.anws\.gov\.tw$ +(^|\.)ait\.org\.tw$ +(^|\.)aiweiweiblog\.com$ +(^|\.)aiweiwei\.com$ +(^|\.)ai-wen\.net$ +(^|\.)akademiye\.org$ +(^|\.)akamaihd\.net$ +(^|\.)akiba-online\.com$ +(^|\.)akiba-web\.com$ +(^|\.)akow\.org$ +(^|\.)alabout\.com$ +(^|\.)alanhou\.com$ +(^|\.)alarab\.qa$ +(^|\.)alasbarricadas\.org$ +(^|\.)alexlur\.org$ +(^|\.)alforattv\.net$ +(^|\.)alhayat\.com$ +(^|\.)alicejapan\.co\.jp$ +(^|\.)aliengu\.com$ +(^|\.)al-islam\.com$ +(^|\.)alkasir\.com$ +(^|\.)allcoin\.com$ +(^|\.)allconnected\.co$ +(^|\.)alldrawnsex\.com$ +(^|\.)allervpn\.com$ +(^|\.)allfinegirls\.com$ +(^|\.)allgirlmassage\.com$ +(^|\.)allgirlsallowed\.org$ +(^|\.)allgravure\.com$ +(^|\.)alliance\.org\.hk$ +(^|\.)allinfa\.com$ +(^|\.)alljackpotscasino\.com$ +(^|\.)allmovie\.com$ +(^|\.)allowed\.org$ +(^|\.)almasdarnews\.com$ +(^|\.)almostmy\.com$ +(^|\.)alphaporno\.com$ +(^|\.)al-qimmah\.net$ +(^|\.)alternate-tools\.com$ +(^|\.)alternativeto\.net$ +(^|\.)altrec\.com$ +(^|\.)alvinalexander\.com$ +(^|\.)alwaysdata\.com$ +(^|\.)alwaysdata\.net$ +(^|\.)alwaysvpn\.com$ +(^|\.)am730\.com\.hk$ +(^|\.)amazon\.co\.jp$ +(^|\.)amazon\.com$ +(^|\.)ameblo\.jp$ +(^|\.)americangreencard\.com$ +(^|\.)americanunfinished\.com$ +(^|\.)amiblockedornot\.com$ +(^|\.)amigobbs\.net$ +(^|\.)amitabhafoundation\.us$ +(^|\.)amnesty\.org$ +(^|\.)amnesty\.org\.hk$ +(^|\.)amnesty\.tw$ +(^|\.)amnestyusa\.org$ +(^|\.)amnyemachen\.org$ +(^|\.)amoiist\.com$ +(^|\.)ampproject\.org$ +(^|\.)amtb-taipei\.org$ +(^|\.)anchorfree\.com$ +(^|\.)ancsconf\.org$ +(^|\.)andfaraway\.net$ +(^|\.)android\.com$ +(^|\.)androidify\.com$ +(^|\.)androidplus\.co$ +(^|\.)androidtv\.com$ +(^|\.)android-x86\.org$ +(^|\.)andygod\.com$ +(^|\.)angela-merkel\.de$ +(^|\.)angelfire\.com$ +(^|\.)angola\.org$ +(^|\.)angularjs\.org$ +(^|\.)animecrazy\.net$ +(^|\.)animeshippuuden\.com$ +(^|\.)aniscartujo\.com$ +(^|\.)annatam\.com$ +(^|\.)anobii\.com$ +(^|\.)anontext\.com$ +(^|\.)anonymise\.us$ +(^|\.)anonymitynetwork\.com$ +(^|\.)anonymizer\.com$ +(^|\.)anonymouse\.org$ +(^|\.)a-normal-day\.com$ +(^|\.)anpopo\.com$ +(^|\.)answering-islam\.org$ +(^|\.)anthonycalzadilla\.com$ +(^|\.)anti1984\.com$ +(^|\.)antichristendom\.com$ +(^|\.)antiwave\.net$ +(^|\.)anyporn\.com$ +(^|\.)anysex\.com$ +(^|\.)aobo\.com\.au$ +(^|\.)aofriend\.com$ +(^|\.)aofriend\.com\.au$ +(^|\.)aojiao\.org$ +(^|\.)aolchannels\.aol\.com$ +(^|\.)aomiwang\.com$ +(^|\.)apartmentratings\.com$ +(^|\.)apartments\.com$ +(^|\.)apetube\.com$ +(^|\.)api\.ai$ +(^|\.)apiary\.io$ +(^|\.)apidocs\.linksalpha\.com$ +(^|\.)api\.dropboxapi\.com$ +(^|\.)apigee\.com$ +(^|\.)api\.linksalpha\.com$ +(^|\.)api\.proxlet\.com$ +(^|\.)api\.pureapk\.com$ +(^|\.)api\.recaptcha\.net$ +(^|\.)api-secure\.recaptcha\.net$ +(^|\.)api-verify\.recaptcha\.net$ +(^|\.)apk-dl\.com$ +(^|\.)apkdler\.com$ +(^|\.)apkmirror\.com$ +(^|\.)apkmonk\.com$ +(^|\.)apkplz\.com$ +(^|\.)apkpure\.com$ +(^|\.)aplusvpn\.com$ +(^|\.)app\.box\.com$ +(^|\.)appdownloader\.net$ +(^|\.)app\.heywire\.com$ +(^|\.)appledaily\.com$ +(^|\.)appledaily\.com\.hk$ +(^|\.)appledaily\.com\.tw$ +(^|\.)appshopper\.com$ +(^|\.)app\.smartmailcloud\.com$ +(^|\.)appsocks\.net$ +(^|\.)appspot\.com$ +(^|\.)appsto\.re$ +(^|\.)app\.tutanota\.com$ +(^|\.)aptoide\.com$ +(^|\.)archive\.fo$ +(^|\.)archive\.is$ +(^|\.)archive\.li$ +(^|\.)archive\.org$ +(^|\.)archives\.gov$ +(^|\.)archives\.gov\.tw$ +(^|\.)archive\.today$ +(^|\.)arctosia\.com$ +(^|\.)areca-backup\.org$ +(^|\.)arena\.taipei$ +(^|\.)arethusa\.su$ +(^|\.)ar\.hao123\.com$ +(^|\.)arlingtoncemetery\.mil$ +(^|\.)army\.mil$ +(^|\.)art4tibet1998\.org$ +(^|\.)arte\.tv$ +(^|\.)artofpeacefoundation\.org$ +(^|\.)artstation\.com$ +(^|\.)artsy\.net$ +(^|\.)asacp\.org$ +(^|\.)asdfg\.jp$ +(^|\.)asg\.to$ +(^|\.)asia-gaming\.com$ +(^|\.)asiaharvest\.org$ +(^|\.)asianews\.it$ +(^|\.)asiansexdiary\.com$ +(^|\.)asianspiss\.com$ +(^|\.)asianwomensfilm\.de$ +(^|\.)asiatgp\.com$ +(^|\.)asiatoday\.us$ +(^|\.)askstudent\.com$ +(^|\.)askynz\.net$ +(^|\.)assembla\.com$ +(^|\.)assets\.bwbx\.io$ +(^|\.)assimp\.org$ +(^|\.)astrill\.com$ +(^|\.)atchinese\.com$ +(^|\.)atc\.org\.au$ +(^|\.)atdmt\.com$ +(^|\.)atgfw\.org$ +(^|\.)athenaeizou\.com$ +(^|\.)atlanta168\.com$ +(^|\.)atlaspost\.com$ +(^|\.)atnext\.com$ +(^|\.)authorizeddns\.net$ +(^|\.)authorizeddns\.org$ +(^|\.)authorizeddns\.us$ +(^|\.)autodraw\.com$ +(^|\.)avaaz\.org$ +(^|\.)avbody\.tv$ +(^|\.)avcity\.tv$ +(^|\.)av\.com$ +(^|\.)avcool\.com$ +(^|\.)avdb\.in$ +(^|\.)avdb\.tv$ +(^|\.)av-e-body\.com$ +(^|\.)avfantasy\.com$ +(^|\.)avg\.com$ +(^|\.)avgle\.com$ +(^|\.)avidemux\.org$ +(^|\.)avmoo\.com$ +(^|\.)avmoo\.net$ +(^|\.)avmoo\.pw$ +(^|\.)avmo\.pw$ +(^|\.)av\.movie$ +(^|\.)av\.nightlife141\.com$ +(^|\.)avoision\.com$ +(^|\.)avyahoo\.com$ +(^|\.)axureformac\.com$ +(^|\.)azerbaycan\.tv$ +(^|\.)azerimix\.com$ +(^|\.)azubu\.tv$ +(^|\.)azurewebsites\.net$ +(^|\.)b0ne\.com$ +(^|\.)babynet\.com\.hk$ +(^|\.)backchina\.com$ +(^|\.)backpackers\.com\.tw$ +(^|\.)backtotiananmen\.com$ +(^|\.)badiucao\.com$ +(^|\.)badjojo\.com$ +(^|\.)badoo\.com$ +(^|\.)bahamut\.com\.tw$ +(^|\.)baidu\.jp$ +(^|\.)baijie\.org$ +(^|\.)bailandaily\.com$ +(^|\.)baixing\.me$ +(^|\.)bakgeekhome\.tk$ +(^|\.)banana-vpn\.com$ +(^|\.)band\.us$ +(^|\.)bandwagonhost\.com$ +(^|\.)bangbrosnetwork\.com$ +(^|\.)bangchen\.net$ +(^|\.)bangdream\.space$ +(^|\.)bangyoulater\.com$ +(^|\.)bankmobilevibe\.com$ +(^|\.)bannedbook\.org$ +(^|\.)bannednews\.org$ +(^|\.)banorte\.com$ +(^|\.)baramangaonline\.com$ +(^|\.)barenakedislam\.com$ +(^|\.)barnabu\.co\.uk$ +(^|\.)barton\.de$ +(^|\.)bartvpn\.com$ +(^|\.)bash-hackers\.org$ +(^|\.)bastillepost\.com$ +(^|\.)bayvoice\.net$ +(^|\.)bbcchinese\.com$ +(^|\.)bbc\.com$ +(^|\.)bbc\.co\.uk$ +(^|\.)bb-chat\.tv$ +(^|\.)bbchat\.tv$ +(^|\.)bbci\.co\.uk$ +(^|\.)bbc\.in$ +(^|\.)bbg\.gov$ +(^|\.)bbkz\.com$ +(^|\.)bbnradio\.org$ +(^|\.)bbs\.brockbbs\.com$ +(^|\.)bbs\.cantonese\.asia$ +(^|\.)bbsdigest\.com$ +(^|\.)bbs\.ecstart\.com$ +(^|\.)bbsfeed\.com$ +(^|\.)bbs\.hanminzu\.org$ +(^|\.)bbs\.hasi\.wang$ +(^|\.)bbs\.huasing\.org$ +(^|\.)bbs\.junglobal\.net$ +(^|\.)bbs\.kimy\.com\.tw$ +(^|\.)bbsland\.com$ +(^|\.)bbs\.mikocon\.com$ +(^|\.)bbsmo\.com$ +(^|\.)bbs\.morbell\.com$ +(^|\.)bbs\.mychat\.to$ +(^|\.)bbs\.netbig\.com$ +(^|\.)bbsone\.com$ +(^|\.)bbs\.ozchinese\.com$ +(^|\.)bbs\.qmzdd\.com$ +(^|\.)bbs\.sina\.com$ +(^|\.)bbs\.skykiwi\.com$ +(^|\.)bbs\.sou-tong\.org$ +(^|\.)bbs\.tuitui\.info$ +(^|\.)bbs-tw\.com$ +(^|\.)bbtoystore\.com$ +(^|\.)bb\.ttv\.com\.tw$ +(^|\.)bcast\.co\.nz$ +(^|\.)bcc\.com\.tw$ +(^|\.)bcchinese\.net$ +(^|\.)bcex\.ca$ +(^|\.)bcmorning\.com$ +(^|\.)bdsmvideos\.net$ +(^|\.)beaconevents\.com$ +(^|\.)bebo\.com$ +(^|\.)beeg\.com$ +(^|\.)beevpn\.com$ +(^|\.)behance\.net$ +(^|\.)behindkink\.com$ +(^|\.)beijing1989\.com$ +(^|\.)beijingspring\.com$ +(^|\.)beijingzx\.org$ +(^|\.)belamionline\.com$ +(^|\.)bell\.wiki$ +(^|\.)bemywife\.cc$ +(^|\.)beric\.me$ +(^|\.)berlintwitterwall\.com$ +(^|\.)berm\.co\.nz$ +(^|\.)bestforchina\.org$ +(^|\.)bestgore\.com$ +(^|\.)bestpornstardb\.com$ +(^|\.)bestvpnanalysis\.com$ +(^|\.)bestvpn\.com$ +(^|\.)bestvpnserver\.com$ +(^|\.)bestvpnservice\.com$ +(^|\.)bestvpnusa\.com$ +(^|\.)bet365\.com$ +(^|\.)betfair\.com$ +(^|\.)betternet\.co$ +(^|\.)bettervpn\.com$ +(^|\.)bettween\.com$ +(^|\.)betvictor\.com$ +(^|\.)bewww\.net$ +(^|\.)beyondfirewall\.com$ +(^|\.)bfnn\.org$ +(^|\.)bfsh\.hk$ +(^|\.)bgvpn\.com$ +(^|\.)bianlei\.com$ +(^|\.)biantailajiao\.com$ +(^|\.)biantailajiao\.in$ +(^|\.)biblesforamerica\.org$ +(^|\.)bibox\.com$ +(^|\.)bic2011\.org$ +(^|\.)bigfools\.com$ +(^|\.)bigjapanesesex\.com$ +(^|\.)bigmoney\.biz$ +(^|\.)bignews\.org$ +(^|\.)big\.one$ +(^|\.)bigsound\.org$ +(^|\.)biliworld\.com$ +(^|\.)billypan\.com$ +(^|\.)binance\.com$ +(^|\.)binux\.me$ +(^|\.)bipic\.net$ +(^|\.)bird\.so$ +(^|\.)bitc\.bme\.emory\.edu$ +(^|\.)bitcointalk\.org$ +(^|\.)bitcoinworld\.com$ +(^|\.)bit\.do$ +(^|\.)bitfinex\.com$ +(^|\.)bithumb\.com$ +(^|\.)bitinka\.com\.ar$ +(^|\.)bit\.ly$ +(^|\.)bitmex\.com$ +(^|\.)bitshare\.com$ +(^|\.)bitsnoop\.com$ +(^|\.)bitvise\.com$ +(^|\.)bit-z\.com$ +(^|\.)bizhat\.com$ +(^|\.)bjnewlife\.org$ +(^|\.)bjs\.org$ +(^|\.)bjzc\.org$ +(^|\.)blacklogic\.com$ +(^|\.)blackvpn\.com$ +(^|\.)bl-doujinsouko\.com$ +(^|\.)blewpass\.com$ +(^|\.)blinkx\.com$ +(^|\.)blinw\.com$ +(^|\.)blip\.tv$ +(^|\.)blockcn\.com$ +(^|\.)blockless\.com$ +(^|\.)blogblog\.com$ +(^|\.)blog\.calibre-ebook\.com$ +(^|\.)blogcatalog\.com$ +(^|\.)blogcity\.me$ +(^|\.)blog\.cnyes\.com$ +(^|\.)blog\.daum\.net$ +(^|\.)blog\.de$ +(^|\.)blogdns\.org$ +(^|\.)blog\.exblog\.co\.jp$ +(^|\.)blog\.excite\.co\.jp$ +(^|\.)blog\.expofutures\.com$ +(^|\.)blog\.fizzik\.com$ +(^|\.)blog\.foolsmountain\.com$ +(^|\.)blog\.fuckgfw233\.org$ +(^|\.)blogger\.com$ +(^|\.)blog\.google$ +(^|\.)blog\.goo\.ne\.jp$ +(^|\.)blogimg\.jp$ +(^|\.)blog\.inoreader\.com$ +(^|\.)blog\.istef\.info$ +(^|\.)blog\.jackjia\.com$ +(^|\.)blog\.jp$ +(^|\.)blog\.kangye\.org$ +(^|\.)blog\.lester850\.info$ +(^|\.)bloglines\.com$ +(^|\.)bloglovin\.com$ +(^|\.)blog\.martinoei\.com$ +(^|\.)blog\.pathtosharepoint\.com$ +(^|\.)blog\.pentalogic\.net$ +(^|\.)blog\.qooza\.hk$ +(^|\.)blog\.ranxiang\.com$ +(^|\.)blogs\.icerocket\.com$ +(^|\.)blog\.sina\.com\.tw$ +(^|\.)blogs\.libraryinformationtechnology\.com$ +(^|\.)blog\.sogoo\.org$ +(^|\.)blog\.soylent\.com$ +(^|\.)blogspot\.ae$ +(^|\.)blogspot\.al$ +(^|\.)blogspot\.am$ +(^|\.)blogspot\.ba$ +(^|\.)blogspot\.be$ +(^|\.)blogspot\.bg$ +(^|\.)blogspot\.ca$ +(^|\.)blogspot\.cat$ +(^|\.)blogspot\.ch$ +(^|\.)blogspot\.cl$ +(^|\.)blogspot\.com$ +(^|\.)blogspot\.com\.ar$ +(^|\.)blogspot\.com\.au$ +(^|\.)blogspot\.com\.br$ +(^|\.)blogspot\.com\.by$ +(^|\.)blogspot\.com\.co$ +(^|\.)blogspot\.com\.cy$ +(^|\.)blogspot\.com\.ee$ +(^|\.)blogspot\.com\.eg$ +(^|\.)blogspot\.com\.es$ +(^|\.)blogspot\.com\.mt$ +(^|\.)blogspot\.com\.ng$ +(^|\.)blogspot\.com\.tr$ +(^|\.)blogspot\.com\.uy$ +(^|\.)blogspot\.co\.uk$ +(^|\.)blogspot\.cz$ +(^|\.)blogspot\.de$ +(^|\.)blogspot\.dk$ +(^|\.)blogspot\.fi$ +(^|\.)blogspot\.fr$ +(^|\.)blogspot\.gr$ +(^|\.)blogspot\.hk$ +(^|\.)blogspot\.hr$ +(^|\.)blogspot\.hu$ +(^|\.)blogspot\.ie$ +(^|\.)blogspot\.in$ +(^|\.)blogspot\.is$ +(^|\.)blogspot\.it$ +(^|\.)blogspot\.jp$ +(^|\.)blogspot\.kr$ +(^|\.)blogspot\.li$ +(^|\.)blogspot\.lt$ +(^|\.)blogspot\.lu$ +(^|\.)blogspot\.md$ +(^|\.)blogspot\.mk$ +(^|\.)blogspot\.mx$ +(^|\.)blogspot\.my$ +(^|\.)blogspot\.nl$ +(^|\.)blogspot\.no$ +(^|\.)blogspot\.pe$ +(^|\.)blogspot\.pt$ +(^|\.)blogspot\.qa$ +(^|\.)blogspot\.ro$ +(^|\.)blogspot\.ru$ +(^|\.)blogspot\.se$ +(^|\.)blogspot\.sg$ +(^|\.)blogspot\.si$ +(^|\.)blogspot\.sk$ +(^|\.)blogspot\.sn$ +(^|\.)blogspot\.tw$ +(^|\.)blogspot\.ug$ +(^|\.)blogs\.tampabay\.com$ +(^|\.)blogs\.yahoo\.co\.jp$ +(^|\.)blog\.syx86\.cn$ +(^|\.)blog\.syx86\.com$ +(^|\.)blog\.taragana\.com$ +(^|\.)blogtd\.net$ +(^|\.)blogtd\.org$ +(^|\.)blog\.tiney\.com$ +(^|\.)blog\.workflow\.is$ +(^|\.)blog\.xuite\.net$ +(^|\.)blog\.youthwant\.com\.tw$ +(^|\.)blog\.youxu\.info$ +(^|\.)bloodshed\.net$ +(^|\.)bloomberg\.cn$ +(^|\.)bloomberg\.com$ +(^|\.)bloomberg\.de$ +(^|\.)bloombergview\.com$ +(^|\.)bloomfortune\.com$ +(^|\.)blueangellive\.com$ +(^|\.)bmfinn\.com$ +(^|\.)bnews\.co$ +(^|\.)bnn\.co$ +(^|\.)bnrmetal\.com$ +(^|\.)boardreader\.com$ +(^|\.)bod\.asia$ +(^|\.)bodog88\.com$ +(^|\.)bolehvpn\.net$ +(^|\.)bolin\.netfirms\.com$ +(^|\.)bonbonme\.com$ +(^|\.)bonbonsex\.com$ +(^|\.)bonfoundation\.org$ +(^|\.)bongacams\.com$ +(^|\.)boobstagram\.com$ +(^|\.)book\.com\.tw$ +(^|\.)bookepub\.com$ +(^|\.)books\.com\.tw$ +(^|\.)booktopia\.com\.au$ +(^|\.)book\.zi5\.me$ +(^|\.)boomssr\.com$ +(^|\.)botanwang\.com$ +(^|\.)bot\.nu$ +(^|\.)bowenpress\.com$ +(^|\.)boxpn\.com$ +(^|\.)boxunblog\.com$ +(^|\.)boxunclub\.com$ +(^|\.)boxun\.com$ +(^|\.)boxun\.tv$ +(^|\.)boyangu\.com$ +(^|\.)boyfriendtv\.com$ +(^|\.)boysfood\.com$ +(^|\.)boysmaster\.com$ +(^|\.)brainyquote\.com$ +(^|\.)brandonhutchinson\.com$ +(^|\.)braumeister\.org$ +(^|\.)bravotube\.net$ +(^|\.)brazzers\.com$ +(^|\.)break\.com$ +(^|\.)breakgfw\.com$ +(^|\.)breaking911\.com$ +(^|\.)breakingtweets\.com$ +(^|\.)breakwall\.net$ +(^|\.)br\.hao123\.com$ +(^|\.)briefdream\.com$ +(^|\.)briian\.com$ +(^|\.)brizzly\.com$ +(^|\.)brkmd\.com$ +(^|\.)broadbook\.com$ +(^|\.)broadpressinc\.com$ +(^|\.)br\.st$ +(^|\.)brucewang\.net$ +(^|\.)brutaltgp\.com$ +(^|\.)bt2mag\.com$ +(^|\.)bt95\.com$ +(^|\.)btaia\.com$ +(^|\.)btbtav\.com$ +(^|\.)btc98\.com$ +(^|\.)btcbank\.bank$ +(^|\.)btctrade\.im$ +(^|\.)btdigg\.org$ +(^|\.)btku\.me$ +(^|\.)btku\.org$ +(^|\.)btspread\.com$ +(^|\.)btsynckeys\.com$ +(^|\.)budaedu\.org$ +(^|\.)buddhanet\.com\.tw$ +(^|\.)buddhistchannel\.tv$ +(^|\.)buffered\.com$ +(^|\.)bullogger\.com$ +(^|\.)bullog\.org$ +(^|\.)bunbunhk\.com$ +(^|\.)busayari\.com$ +(^|\.)businessinsider\.com$ +(^|\.)businesstoday\.com\.tw$ +(^|\.)businessweek\.com$ +(^|\.)busu\.org$ +(^|\.)busytrade\.com$ +(^|\.)buugaa\.com$ +(^|\.)buy\.yahoo\.com\.tw$ +(^|\.)buzzhand\.com$ +(^|\.)buzzhand\.net$ +(^|\.)buzzorange\.com$ +(^|\.)bvpn\.com$ +(^|\.)bwgyhw\.com$ +(^|\.)bwh1\.net$ +(^|\.)bwsj\.hk$ +(^|\.)bx\.in\.th$ +(^|\.)bx\.tl$ +(^|\.)bynet\.co\.il$ +(^|\.)c100tibet\.org$ +(^|\.)c1522\.mooo\.com$ +(^|\.)c2cx\.com$ +(^|\.)cablegatesearch\.net$ +(^|\.)cachinese\.com$ +(^|\.)cacnw\.com$ +(^|\.)cactusvpn\.com$ +(^|\.)cafepress\.com$ +(^|\.)cahr\.org\.tw$ +(^|\.)calameo\.com$ +(^|\.)calebelston\.com$ +(^|\.)calgarychinese\.ca$ +(^|\.)calgarychinese\.com$ +(^|\.)calgarychinese\.net$ +(^|\.)cam4\.com$ +(^|\.)cam4\.jp$ +(^|\.)cam4\.sg$ +(^|\.)camfrog\.com$ +(^|\.)cams\.com$ +(^|\.)cams\.org\.sg$ +(^|\.)canadameet\.com$ +(^|\.)canalporno\.com$ +(^|\.)canyu\.org$ +(^|\.)caobian\.info$ +(^|\.)caochangqing\.com$ +(^|\.)cao\.im$ +(^|\.)cap\.org\.hk$ +(^|\.)carabinasypistolas\.com$ +(^|\.)cardinalkungfoundation\.org$ +(^|\.)carfax\.com$ +(^|\.)caribbeancom\.com$ +(^|\.)cari\.com\.my$ +(^|\.)carmotorshow\.com$ +(^|\.)cartoonmovement\.com$ +(^|\.)casadeltibetbcn\.org$ +(^|\.)casatibet\.org\.mx$ +(^|\.)casinobellini\.com$ +(^|\.)casinoking\.com$ +(^|\.)casinoriva\.com$ +(^|\.)casino\.williamhill\.com$ +(^|\.)castbox\.fm$ +(^|\.)catch22\.net$ +(^|\.)catchgod\.com$ +(^|\.)catfightpayperview\.xxx$ +(^|\.)catholic\.org\.hk$ +(^|\.)catholic\.org\.tw$ +(^|\.)cathvoice\.org\.tw$ +(^|\.)cattt\.com$ +(^|\.)cbc\.ca$ +(^|\.)cbsnews\.com$ +(^|\.)cbs\.ntu\.edu\.tw$ +(^|\.)cbtc\.org\.hk$ +(^|\.)cccat\.cc$ +(^|\.)cccat\.co$ +(^|\.)ccdtr\.org$ +(^|\.)cchere\.com$ +(^|\.)ccim\.org$ +(^|\.)cclife\.ca$ +(^|\.)cclifefl\.org$ +(^|\.)cclife\.org$ +(^|\.)ccthere\.com$ +(^|\.)ccthere\.net$ +(^|\.)cctmweb\.net$ +(^|\.)cctongbao\.com$ +(^|\.)ccue\.ca$ +(^|\.)ccue\.com$ +(^|\.)ccvoice\.ca$ +(^|\.)ccw\.org\.tw$ +(^|\.)cdbook\.org$ +(^|\.)cdcparty\.com$ +(^|\.)cdef\.org$ +(^|\.)cdig\.info$ +(^|\.)cdjp\.org$ +(^|\.)cdn1\.lp\.saboom\.com$ +(^|\.)cdn-apple\.com$ +(^|\.)cdn\.assets\.lfpcontent\.com$ +(^|\.)cdnews\.com\.tw$ +(^|\.)cdn\.helixstudios\.net$ +(^|\.)cdn-images\.mailchimp\.com$ +(^|\.)cdninstagram\.com$ +(^|\.)cdn\.printfriendly\.com$ +(^|\.)cdn\.seatguru\.com$ +(^|\.)cdn\.softlayer\.net$ +(^|\.)cdp1989\.org$ +(^|\.)cdp1998\.org$ +(^|\.)cdp2006\.org$ +(^|\.)cdpa\.url\.tw$ +(^|\.)cdpeu\.org$ +(^|\.)cdpusa\.org$ +(^|\.)cdpweb\.org$ +(^|\.)cdpwu\.org$ +(^|\.)cdw\.com$ +(^|\.)cecc\.gov$ +(^|\.)cellulo\.info$ +(^|\.)cenews\.eu$ +(^|\.)centauro\.com\.br$ +(^|\.)centerforhumanreprod\.com$ +(^|\.)centralnation\.com$ +(^|\.)centurys\.net$ +(^|\.)certificate\.revocationcheck\.com$ +(^|\.)certificate-transparency\.org$ +(^|\.)c-est-simple\.com$ +(^|\.)cfhks\.org\.hk$ +(^|\.)cfos\.de$ +(^|\.)cftfc\.com$ +(^|\.)cgdepot\.org$ +(^|\.)cgst\.edu$ +(^|\.)changeip\.name$ +(^|\.)changeip\.net$ +(^|\.)changeip\.org$ +(^|\.)change\.org$ +(^|\.)changp\.com$ +(^|\.)changsa\.net$ +(^|\.)channel8news\.sg$ +(^|\.)chaoex\.com$ +(^|\.)chapm25\.com$ +(^|\.)chatnook\.com$ +(^|\.)chaturbate\.com$ +(^|\.)chengmingmag\.com$ +(^|\.)chenguangcheng\.com$ +(^|\.)chenpokong\.com$ +(^|\.)chenpokong\.net$ +(^|\.)chenshan20042005\.wordpress\.com$ +(^|\.)cherrysave\.com$ +(^|\.)chhongbi\.org$ +(^|\.)chicagoncmtv\.com$ +(^|\.)china101\.com$ +(^|\.)china18\.org$ +(^|\.)china21\.com$ +(^|\.)china21\.org$ +(^|\.)china5000\.us$ +(^|\.)chinaaffairs\.org$ +(^|\.)chinaaid\.me$ +(^|\.)chinaaid\.net$ +(^|\.)chinaaid\.org$ +(^|\.)chinaaid\.us$ +(^|\.)chinachange\.org$ +(^|\.)chinachannel\.hk$ +(^|\.)chinacitynews\.be$ +(^|\.)chinacomments\.org$ +(^|\.)chinadialogue\.net$ +(^|\.)chinadigitaltimes\.net$ +(^|\.)chinaelections\.org$ +(^|\.)chinaeweekly\.com$ +(^|\.)chinafreepress\.org$ +(^|\.)chinagate\.com$ +(^|\.)chinageeks\.org$ +(^|\.)chinagfw\.org$ +(^|\.)chinagonet\.com$ +(^|\.)chinagreenparty\.org$ +(^|\.)china\.hket\.com$ +(^|\.)chinahorizon\.org$ +(^|\.)chinahush\.com$ +(^|\.)chinainperspective\.com$ +(^|\.)chinainterimgov\.org$ +(^|\.)chinalaborwatch\.org$ +(^|\.)chinalawandpolicy\.com$ +(^|\.)chinalawtranslate\.com$ +(^|\.)china-mmm\.jp\.net$ +(^|\.)china-mmm\.net$ +(^|\.)china-mmm\.sa\.com$ +(^|\.)chinamule\.com$ +(^|\.)chinamz\.org$ +(^|\.)chinanewscenter\.com$ +(^|\.)chinapost\.com\.tw$ +(^|\.)chinapress\.com\.my$ +(^|\.)china-review\.com\.ua$ +(^|\.)chinarightsia\.org$ +(^|\.)chinasmile\.net$ +(^|\.)chinasocialdemocraticparty\.com$ +(^|\.)chinasoul\.org$ +(^|\.)chinasucks\.net$ +(^|\.)chinatimes\.com$ +(^|\.)chinatopsex\.com$ +(^|\.)chinatown\.com\.au$ +(^|\.)chinatweeps\.com$ +(^|\.)china\.ucanews\.com$ +(^|\.)chinaview\.wordpress\.com$ +(^|\.)chinaway\.org$ +(^|\.)china-week\.com$ +(^|\.)chinaworker\.info$ +(^|\.)chinaxchina\.com$ +(^|\.)chinayouth\.org\.hk$ +(^|\.)chinayuanmin\.org$ +(^|\.)chinesedaily\.com$ +(^|\.)chinesedailynews\.com$ +(^|\.)chinesedemocracy\.com$ +(^|\.)chinese\.donga\.com$ +(^|\.)chinese\.engadget\.com$ +(^|\.)chinesegay\.org$ +(^|\.)chinese-hermit\.net$ +(^|\.)chinese\.irib\.ir$ +(^|\.)chinese-leaders\.org$ +(^|\.)chinese-memorial\.org$ +(^|\.)chinesen\.de$ +(^|\.)chinesenews\.net\.au$ +(^|\.)chinesepen\.org$ +(^|\.)chinese\.soifind\.com$ +(^|\.)chinesetalks\.net$ +(^|\.)chineseupress\.com$ +(^|\.)chingcheong\.com$ +(^|\.)chinman\.net$ +(^|\.)chithu\.org$ +(^|\.)chn\.chosun\.com$ +(^|\.)chobit\.cc$ +(^|\.)chrdnet\.com$ +(^|\.)christianfreedom\.org$ +(^|\.)christianstudy\.com$ +(^|\.)christiantimes\.org\.hk$ +(^|\.)christusrex\.org$ +(^|\.)chrlawyers\.hk$ +(^|\.)chromecast\.com$ +(^|\.)chrome\.com$ +(^|\.)chromeexperiments\.com$ +(^|\.)chromercise\.com$ +(^|\.)chromestatus\.com$ +(^|\.)chromium\.org$ +(^|\.)ch\.shvoong\.com$ +(^|\.)chuang-yen\.org$ +(^|\.)chubold\.com$ +(^|\.)chubun\.com$ +(^|\.)chuizi\.net$ +(^|\.)churchinhongkong\.org$ +(^|\.)chushigangdrug\.ch$ +(^|\.)cienen\.com$ +(^|\.)cineastentreff\.de$ +(^|\.)cipfg\.org$ +(^|\.)circlethebayfortibet\.org$ +(^|\.)cirosantilli\.com$ +(^|\.)citizencn\.com$ +(^|\.)citizenlab\.org$ +(^|\.)citizenscommission\.hk$ +(^|\.)citizensradio\.org$ +(^|\.)city365\.ca$ +(^|\.)city9x\.com$ +(^|\.)citypopulation\.de$ +(^|\.)citytalk\.tw$ +(^|\.)civicparty\.hk$ +(^|\.)civildisobediencemovement\.org$ +(^|\.)civilhrfront\.org$ +(^|\.)civiliangunner\.com$ +(^|\.)civilmedia\.tw$ +(^|\.)ck101\.com$ +(^|\.)clarionproject\.org$ +(^|\.)classicalguitarblog\.net$ +(^|\.)clb\.org\.hk$ +(^|\.)cl\.d0z\.net$ +(^|\.)cldr\.unicode\.org$ +(^|\.)cleansite\.biz$ +(^|\.)cleansite\.info$ +(^|\.)cleansite\.us$ +(^|\.)clearharmony\.net$ +(^|\.)clearsurance\.com$ +(^|\.)clearwisdom\.net$ +(^|\.)clementine-player\.org$ +(^|\.)cling\.omy\.sg$ +(^|\.)clinica-tibet\.ru$ +(^|\.)clipfish\.de$ +(^|\.)cloakpoint\.com$ +(^|\.)cloud\.feedly\.com$ +(^|\.)cloud\.mail\.ru$ +(^|\.)club1069\.com$ +(^|\.)clyp\.it$ +(^|\.)cmcn\.org$ +(^|\.)cmi\.org\.tw$ +(^|\.)cmp\.hku\.hk$ +(^|\.)cms\.gov$ +(^|\.)cmule\.com$ +(^|\.)cmule\.org$ +(^|\.)cmx\.im$ +(^|\.)cn2\.streetvoice\.com$ +(^|\.)cn6\.eu$ +(^|\.)cnabc\.com$ +(^|\.)cna\.com\.tw$ +(^|\.)cnbbnews\.wordpress\.com$ +(^|\.)cn\.calameo\.com$ +(^|\.)cn\.dayabook\.com$ +(^|\.)cnd\.org$ +(^|\.)cnex\.org\.cn$ +(^|\.)cn\.fmnnow\.com$ +(^|\.)cn\.freeones\.com$ +(^|\.)cn\.giganews\.com$ +(^|\.)cn\.ibtimes\.com$ +(^|\.)cnineu\.com$ +(^|\.)cnn\.com$ +(^|\.)cnnews\.chosun\.com$ +(^|\.)cn\.nytstyle\.com$ +(^|\.)cnpolitics\.org$ +(^|\.)cn-proxy\.com$ +(^|\.)cnproxy\.com$ +(^|\.)cn\.sandscotaicentral\.com$ +(^|\.)cn\.shafaqna\.com$ +(^|\.)cn\.streetvoice\.com$ +(^|\.)cn\.thegay\.com$ +(^|\.)cn\.uncyclopedia\.wikia\.com$ +(^|\.)cn\.uptodown\.com$ +(^|\.)cn\.voa\.mobi$ +(^|\.)coat\.co\.jp$ +(^|\.)cobinhood\.com$ +(^|\.)cochina\.co$ +(^|\.)cochina\.org$ +(^|\.)code1984\.com$ +(^|\.)codeshare\.io$ +(^|\.)codeskulptor\.org$ +(^|\.)coin2co\.in$ +(^|\.)coinbene\.com$ +(^|\.)coinegg\.com$ +(^|\.)coinex\.com$ +(^|\.)coingi\.com$ +(^|\.)coinrail\.co\.kr$ +(^|\.)cointiger\.com$ +(^|\.)cointobe\.com$ +(^|\.)coinut\.com$ +(^|\.)collateralmurder\.com$ +(^|\.)collateralmurder\.org$ +(^|\.)comefromchina\.com$ +(^|\.)com\.google$ +(^|\.)comic-mega\.me$ +(^|\.)commandarms\.com$ +(^|\.)commentshk\.com$ +(^|\.)communistcrimes\.org$ +(^|\.)communitychoicecu\.com$ +(^|\.)community\.windy\.com$ +(^|\.)compileheart\.com$ +(^|\.)compress\.to$ +(^|\.)co\.ng\.mil$ +(^|\.)connect\.facebook\.net$ +(^|\.)conoha\.jp$ +(^|\.)contactmagazine\.net$ +(^|\.)contests\.twilio\.com$ +(^|\.)convio\.net$ +(^|\.)coobay\.com$ +(^|\.)coolaler\.com$ +(^|\.)coolder\.com$ +(^|\.)coolloud\.org\.tw$ +(^|\.)coolncute\.com$ +(^|\.)coolstuffinc\.com$ +(^|\.)corumcollege\.com$ +(^|\.)cosmic\.monar\.ch$ +(^|\.)cos-moe\.com$ +(^|\.)cosplayjav\.pl$ +(^|\.)costco\.com$ +(^|\.)cotweet\.com$ +(^|\.)counter\.social$ +(^|\.)coursehero\.com$ +(^|\.)cpj\.org$ +(^|\.)cq99\.us$ +(^|\.)crackle\.com$ +(^|\.)crazys\.cc$ +(^|\.)crazyshit\.com$ +(^|\.)crbug\.com$ +(^|\.)crchina\.org$ +(^|\.)crd-net\.org$ +(^|\.)creaders\.net$ +(^|\.)creadersnet\.com$ +(^|\.)creativelab5\.com$ +(^|\.)crisisresponse\.google$ +(^|\.)cristyli\.com$ +(^|\.)crocotube\.com$ +(^|\.)crossfire\.co\.kr$ +(^|\.)crossthewall\.net$ +(^|\.)crossvpn\.net$ +(^|\.)crrev\.com$ +(^|\.)crucial\.com$ +(^|\.)csdparty\.com$ +(^|\.)c-spanvideo\.org$ +(^|\.)css\.pixnet\.in$ +(^|\.)csuchen\.de$ +(^|\.)csw\.org\.uk$ +(^|\.)ctao\.org$ +(^|\.)ctfriend\.net$ +(^|\.)cthlo\.github\.io$ +(^|\.)ctitv\.com\.tw$ +(^|\.)ct\.org\.tw$ +(^|\.)cts\.com\.tw$ +(^|\.)cuhkacs\.org$ +(^|\.)cuihua\.org$ +(^|\.)cuiweiping\.net$ +(^|\.)culture\.tw$ +(^|\.)cumlouder\.com$ +(^|\.)curvefish\.com$ +(^|\.)cusu\.hk$ +(^|\.)cutscenes\.net$ +(^|\.)cw\.com\.tw$ +(^|\.)cyberghost\.natado\.com$ +(^|\.)cyberghostvpn\.com$ +(^|\.)cynscribe\.com$ +(^|\.)cytode\.us$ +(^|\.)d100\.net$ +(^|\.)d1b183sg0nvnuh\.cloudfront\.net$ +(^|\.)d1c37gjwa26taa\.cloudfront\.net$ +(^|\.)d2bay\.com$ +(^|\.)d2pass\.com$ +(^|\.)d3c33hcgiwev3\.cloudfront\.net$ +(^|\.)d3rhr7kgmtrq1v\.cloudfront\.net$ +(^|\.)dabr\.co\.uk$ +(^|\.)dabr\.eu$ +(^|\.)dabr\.me$ +(^|\.)dabr\.mobi$ +(^|\.)dadazim\.com$ +(^|\.)dadi360\.com$ +(^|\.)dafabet\.com$ +(^|\.)dafagood\.com$ +(^|\.)dafahao\.com$ +(^|\.)dafoh\.org$ +(^|\.)daftporn\.com$ +(^|\.)dagelijksestandaard\.nl$ +(^|\.)daidostup\.ru$ +(^|\.)dailidaili\.com$ +(^|\.)dailymotion\.com$ +(^|\.)dailynews\.sina\.com$ +(^|\.)dailyview\.tw$ +(^|\.)daiphapinfo\.net$ +(^|\.)dajiyuan\.com$ +(^|\.)dajiyuan\.de$ +(^|\.)dajiyuan\.eu$ +(^|\.)dajusha\.baywords\.com$ +(^|\.)dalailama80\.org$ +(^|\.)dalailama-archives\.org$ +(^|\.)dalailamacenter\.org$ +(^|\.)dalailama\.com$ +(^|\.)dalailamafellows\.org$ +(^|\.)dalailamafilm\.com$ +(^|\.)dalailamafoundation\.org$ +(^|\.)dalailamahindi\.com$ +(^|\.)dalailamainaustralia\.org$ +(^|\.)dalailamajapanese\.com$ +(^|\.)dalailama\.mn$ +(^|\.)dalailamaprotesters\.info$ +(^|\.)dalailamaquotes\.org$ +(^|\.)dalailama\.ru$ +(^|\.)dalailamatrust\.org$ +(^|\.)dalailama\.usc\.edu$ +(^|\.)dalailamavisit\.org\.nz$ +(^|\.)dalailamaworld\.com$ +(^|\.)dalianmeng\.org$ +(^|\.)daliulian\.org$ +(^|\.)danbooru\.donmai\.us$ +(^|\.)danke4china\.net$ +(^|\.)danwei\.org$ +(^|\.)daodu14\.jigsy\.com$ +(^|\.)daolan\.net$ +(^|\.)daozhongxing\.org$ +(^|\.)darktech\.org$ +(^|\.)darktoy\.net$ +(^|\.)darpa\.mil$ +(^|\.)dastrassi\.org$ +(^|\.)data\.flurry\.com$ +(^|\.)data\.gov\.tw$ +(^|\.)data-vocabulary\.org$ +(^|\.)daum\.net$ +(^|\.)david-kilgour\.com$ +(^|\.)dawangidc\.com$ +(^|\.)daxa\.cn$ +(^|\.)daylife\.com$ +(^|\.)dbc\.hk$ +(^|\.)db\.tt$ +(^|\.)dcard\.tw$ +(^|\.)dcmilitary\.com$ +(^|\.)ddc\.com\.tw$ +(^|\.)ddhw\.info$ +(^|\.)ddns\.info$ +(^|\.)ddns\.me\.uk$ +(^|\.)ddns\.mobi$ +(^|\.)ddns\.ms$ +(^|\.)ddns\.name$ +(^|\.)ddns\.net$ +(^|\.)ddns\.us$ +(^|\.)deaftone\.com$ +(^|\.)debug\.com$ +(^|\.)deck\.ly$ +(^|\.)decodet\.co$ +(^|\.)deepmind\.com$ +(^|\.)deezer\.com$ +(^|\.)definebabe\.com$ +(^|\.)deja\.com$ +(^|\.)delcamp\.net$ +(^|\.)delicious\.com$ +(^|\.)democrats\.org$ +(^|\.)demo\.opera-mini\.net$ +(^|\.)demosisto\.hk$ +(^|\.)depositphotos\.com$ +(^|\.)derekhsu\.homeip\.net$ +(^|\.)de-sci\.org$ +(^|\.)desc\.se$ +(^|\.)design\.google$ +(^|\.)desipro\.de$ +(^|\.)dessci\.com$ +(^|\.)destiny\.xfiles\.to$ +(^|\.)destroy-china\.jp$ +(^|\.)deutsche-welle\.de$ +(^|\.)developers\.box\.net$ +(^|\.)devio\.us$ +(^|\.)devpn\.com$ +(^|\.)dfas\.mil$ +(^|\.)dfn\.org$ +(^|\.)d-fukyu\.com$ +(^|\.)dharamsalanet\.com$ +(^|\.)dharmakara\.net$ +(^|\.)dhcp\.biz$ +(^|\.)diaoyuislands\.org$ +(^|\.)dictionary\.goo\.ne\.jp$ +(^|\.)difangwenge\.org$ +(^|\.)digiland\.tw$ +(^|\.)digisfera\.com$ +(^|\.)digitalnomadsproject\.org$ +(^|\.)diigo\.com$ +(^|\.)dilber\.se$ +(^|\.)dingchin\.com\.tw$ +(^|\.)dipity\.com$ +(^|\.)directcreative\.com$ +(^|\.)discoins\.com$ +(^|\.)disconnect\.me$ +(^|\.)discordapp\.com$ +(^|\.)discordapp\.net$ +(^|\.)discuss4u\.com$ +(^|\.)discuss\.com\.hk$ +(^|\.)dish\.com$ +(^|\.)disp\.cc$ +(^|\.)disqus\.com$ +(^|\.)dit-inc\.us$ +(^|\.)dizhidizhi\.com$ +(^|\.)dizhuzhishang\.com$ +(^|\.)djangosnippets\.org$ +(^|\.)djorz\.com$ +(^|\.)dl\.box\.net$ +(^|\.)dl-laby\.jp$ +(^|\.)dlsite\.com$ +(^|\.)dlyoutube\.com$ +(^|\.)dm530\.net$ +(^|\.)dmcdn\.net$ +(^|\.)dmhy\.org$ +(^|\.)dmm\.co\.jp$ +(^|\.)dns04\.com$ +(^|\.)dns05\.com$ +(^|\.)dns1\.us$ +(^|\.)dns2go\.com$ +(^|\.)dns2\.us$ +(^|\.)dnscrypt\.org$ +(^|\.)dns-dns\.com$ +(^|\.)dnset\.com$ +(^|\.)dns\.google$ +(^|\.)dnsrd\.com$ +(^|\.)dnssec\.net$ +(^|\.)dns-stuff\.com$ +(^|\.)dnvod\.tv$ +(^|\.)doctorvoice\.org$ +(^|\.)documentingreality\.com$ +(^|\.)dogfartnetwork\.com$ +(^|\.)dojin\.com$ +(^|\.)dok-forum\.net$ +(^|\.)dolc\.de$ +(^|\.)dolf\.org\.hk$ +(^|\.)dollf\.com$ +(^|\.)domain\.club\.tw$ +(^|\.)domainhelp\.search\.com$ +(^|\.)domains\.google$ +(^|\.)domaintoday\.com\.au$ +(^|\.)dongtaiwang\.com$ +(^|\.)dongtaiwang\.net$ +(^|\.)dongyangjing\.com$ +(^|\.)dontfilter\.us$ +(^|\.)dontmovetochina\.com$ +(^|\.)dorjeshugden\.com$ +(^|\.)dotplane\.com$ +(^|\.)dotsub\.com$ +(^|\.)dotvpn\.com$ +(^|\.)doubibackup\.com$ +(^|\.)doub\.io$ +(^|\.)doubmirror\.cf$ +(^|\.)dougscripts\.com$ +(^|\.)douhokanko\.net$ +(^|\.)doujincafe\.com$ +(^|\.)dowei\.org$ +(^|\.)download\.aircrack-ng\.org$ +(^|\.)download\.cnet\.com$ +(^|\.)download\.ithome\.com\.tw$ +(^|\.)dphk\.org$ +(^|\.)dpp\.org\.tw$ +(^|\.)dpr\.info$ +(^|\.)dragonex\.io$ +(^|\.)dragonsprings\.org$ +(^|\.)dreamamateurs\.com$ +(^|\.)drepung\.org$ +(^|\.)drgan\.net$ +(^|\.)drmingxia\.org$ +(^|\.)dropbooks\.tv$ +(^|\.)dropbox\.com$ +(^|\.)dropboxusercontent\.com$ +(^|\.)drsunacademy\.com$ +(^|\.)drtuber\.com$ +(^|\.)dscn\.info$ +(^|\.)dsmtp\.com$ +(^|\.)dstk\.dk$ +(^|\.)dtdns\.net$ +(^|\.)dtiblog\.com$ +(^|\.)dtic\.mil$ +(^|\.)dtwang\.org$ +(^|\.)duanzhihu\.com$ +(^|\.)duck\.com$ +(^|\.)duckdns\.org$ +(^|\.)duckduckgo\.com$ +(^|\.)duckduckgo-owned-server\.yahoo\.net$ +(^|\.)duckload\.com$ +(^|\.)duckmylife\.com$ +(^|\.)duga\.jp$ +(^|\.)duihuahrjournal\.org$ +(^|\.)duihua\.org$ +(^|\.)dumb1\.com$ +(^|\.)dunyabulteni\.net$ +(^|\.)duoweitimes\.com$ +(^|\.)duping\.net$ +(^|\.)duplicati\.com$ +(^|\.)dupola\.com$ +(^|\.)dupola\.net$ +(^|\.)dushi\.ca$ +(^|\.)dvdpac\.com$ +(^|\.)dvorak\.org$ +(^|\.)dw\.com$ +(^|\.)dw\.de$ +(^|\.)dwnews\.com$ +(^|\.)dwnews\.net$ +(^|\.)dw-world\.com$ +(^|\.)dw-world\.de$ +(^|\.)dynamicdns\.biz$ +(^|\.)dynamicdns\.co\.uk$ +(^|\.)dynamicdns\.me\.uk$ +(^|\.)dynamic-dns\.net$ +(^|\.)dynamicdns\.org\.uk$ +(^|\.)dynawebinc\.com$ +(^|\.)dyndns-ip\.com$ +(^|\.)dyndns\.org$ +(^|\.)dyndns-pics\.com$ +(^|\.)dyndns\.pro$ +(^|\.)dynssl\.com$ +(^|\.)dynu\.com$ +(^|\.)dynu\.net$ +(^|\.)dynupdate\.no-ip\.com$ +(^|\.)dysfz\.cc$ +(^|\.)dzze\.com$ +(^|\.)e123\.hk$ +(^|\.)earlytibet\.com$ +(^|\.)earthcam\.com$ +(^|\.)earthvpn\.com$ +(^|\.)eastern-ark\.com$ +(^|\.)easternlightning\.org$ +(^|\.)eastturkestan\.com$ +(^|\.)eastturkistancc\.org$ +(^|\.)eastturkistangovernmentinexile\.us$ +(^|\.)eastturkistan-gov\.org$ +(^|\.)easyca\.ca$ +(^|\.)easypic\.com$ +(^|\.)ebony-beauty\.com$ +(^|\.)ebookbrowse\.com$ +(^|\.)ebookee\.com$ +(^|\.)ebook\.hyread\.com\.tw$ +(^|\.)ebtcbank\.com$ +(^|\.)ecfa\.org\.tw$ +(^|\.)echofon\.com$ +(^|\.)ecimg\.tw$ +(^|\.)e-classical\.com\.tw$ +(^|\.)ecministry\.net$ +(^|\.)economist\.com$ +(^|\.)ecsm\.vs\.com$ +(^|\.)edgecastcdn\.net$ +(^|\.)edicypages\.com$ +(^|\.)edmontonchina\.cn$ +(^|\.)edmontonservice\.com$ +(^|\.)edns\.biz$ +(^|\.)edoors\.com$ +(^|\.)edubridge\.com$ +(^|\.)edupro\.org$ +(^|\.)eeas\.europa\.eu$ +(^|\.)eesti\.ee$ +(^|\.)eevpn\.com$ +(^|\.)efcc\.org\.hk$ +(^|\.)effers\.com$ +(^|\.)efksoft\.com$ +(^|\.)efukt\.com$ +(^|\.)e-gold\.com$ +(^|\.)e-hentaidb\.com$ +(^|\.)e-hentai\.org$ +(^|\.)eic-av\.com$ +(^|\.)e-info\.org\.tw$ +(^|\.)eireinikotaerukai\.com$ +(^|\.)eisbb\.com$ +(^|\.)eksisozluk\.com$ +(^|\.)electionsmeter\.com$ +(^|\.)elgoog\.im$ +(^|\.)ellawine\.org$ +(^|\.)elpais\.com$ +(^|\.)eltondisney\.com$ +(^|\.)emaga\.com$ +(^|\.)emanna\.com$ +(^|\.)embr\.in$ +(^|\.)emilylau\.org\.hk$ +(^|\.)empfil\.com$ +(^|\.)emule-ed2k\.com$ +(^|\.)emulefans\.com$ +(^|\.)emuparadise\.me$ +(^|\.)enanyang\.my$ +(^|\.)encyclopedia\.com$ +(^|\.)enewstree\.com$ +(^|\.)enfal\.de$ +(^|\.)en\.favotter\.net$ +(^|\.)engagedaily\.org$ +(^|\.)englishforeveryone\.org$ +(^|\.)englishfromengland\.co\.uk$ +(^|\.)englishpen\.org$ +(^|\.)en\.hao123\.com$ +(^|\.)enlighten\.org\.tw$ +(^|\.)entermap\.com$ +(^|\.)entnt\.com$ +(^|\.)environment\.google$ +(^|\.)epac\.to$ +(^|\.)epa\.gov\.tw$ +(^|\.)episcopalchurch\.org$ +(^|\.)epochhk\.com$ +(^|\.)epochtimes-bg\.com$ +(^|\.)epochtimes\.co\.il$ +(^|\.)epochtimes\.co\.kr$ +(^|\.)epochtimes\.com$ +(^|\.)epochtimes\.cz$ +(^|\.)epochtimes\.de$ +(^|\.)epochtimes\.fr$ +(^|\.)epochtimes\.ie$ +(^|\.)epochtimes\.it$ +(^|\.)epochtimes\.jp$ +(^|\.)epochtimes-romania\.com$ +(^|\.)epochtimes\.ru$ +(^|\.)epochtimes\.se$ +(^|\.)epochtimestr\.com$ +(^|\.)epochweek\.com$ +(^|\.)epochweekly\.com$ +(^|\.)eporner\.com$ +(^|\.)equinenow\.com$ +(^|\.)erabaru\.net$ +(^|\.)eracom\.com\.tw$ +(^|\.)eraysoft\.com\.tr$ +(^|\.)erepublik\.com$ +(^|\.)erights\.net$ +(^|\.)eriversoft\.com$ +(^|\.)erktv\.com$ +(^|\.)ernestmandel\.org$ +(^|\.)erodaizensyu\.com$ +(^|\.)erodoujinlog\.com$ +(^|\.)erodoujinworld\.com$ +(^|\.)eromangadouzin\.com$ +(^|\.)eromanga-kingdom\.com$ +(^|\.)eromon\.net$ +(^|\.)eroprofile\.com$ +(^|\.)eroticsaloon\.net$ +(^|\.)eslite\.com$ +(^|\.)esmtp\.biz$ +(^|\.)esurance\.com$ +(^|\.)etaa\.org\.au$ +(^|\.)etadult\.com$ +(^|\.)etaiwannews\.com$ +(^|\.)etherdelta\.com$ +(^|\.)etizer\.org$ +(^|\.)etokki\.com$ +(^|\.)etools\.ncol\.com$ +(^|\.)etowns\.net$ +(^|\.)etowns\.org$ +(^|\.)e-traderland\.net$ +(^|\.)ettoday\.net$ +(^|\.)etvonline\.hk$ +(^|\.)eucasino\.com$ +(^|\.)eulam\.com$ +(^|\.)eu\.org$ +(^|\.)eurekavpt\.com$ +(^|\.)euronews\.com$ +(^|\.)evchk\.wikia\.com$ +(^|\.)evschool\.net$ +(^|\.)exblog\.jp$ +(^|\.)exchristian\.hk$ +(^|\.)exmo\.com$ +(^|\.)exmormon\.org$ +(^|\.)expatshield\.com$ +(^|\.)expecthim\.com$ +(^|\.)expekt\.com$ +(^|\.)experts-univers\.com$ +(^|\.)exploader\.net$ +(^|\.)expressvpn\.com$ +(^|\.)exrates\.me$ +(^|\.)extmatrix\.com$ +(^|\.)extremetube\.com$ +(^|\.)exx\.com$ +(^|\.)eyevio\.jp$ +(^|\.)eyny\.com$ +(^|\.)e-zone\.com\.hk$ +(^|\.)ezpc\.tk$ +(^|\.)ezpeer\.com$ +(^|\.)ezua\.com$ +(^|\.)facebook\.br$ +(^|\.)facebook\.com$ +(^|\.)facebook\.design$ +(^|\.)facebook\.hu$ +(^|\.)facebook\.in$ +(^|\.)facebookmail\.com$ +(^|\.)facebook\.nl$ +(^|\.)facebookquotes4u\.com$ +(^|\.)facebook\.se$ +(^|\.)faceless\.me$ +(^|\.)facesofnyfw\.com$ +(^|\.)facesoftibetanselfimmolators\.info$ +(^|\.)fa\.gov\.tw$ +(^|\.)fail\.hk$ +(^|\.)faith100\.org$ +(^|\.)faithfuleye\.com$ +(^|\.)faiththedog\.info$ +(^|\.)fakku\.net$ +(^|\.)falsefire\.com$ +(^|\.)falunart\.org$ +(^|\.)falunasia\.info$ +(^|\.)falunau\.org$ +(^|\.)falunaz\.net$ +(^|\.)falun\.caltech\.edu$ +(^|\.)falun-co\.org$ +(^|\.)falundafa-dc\.org$ +(^|\.)falundafa-florida\.org$ +(^|\.)falundafaindia\.org$ +(^|\.)falundafamuseum\.org$ +(^|\.)falundafa-nc\.org$ +(^|\.)falundafa\.org$ +(^|\.)falundafa-pa\.net$ +(^|\.)falundafa-sacramento\.org$ +(^|\.)falungong\.club$ +(^|\.)falungong\.de$ +(^|\.)falungong\.org\.uk$ +(^|\.)falunhr\.org$ +(^|\.)faluninfo\.de$ +(^|\.)faluninfo\.net$ +(^|\.)falun-ny\.net$ +(^|\.)falunpilipinas\.net$ +(^|\.)falunworld\.net$ +(^|\.)familyfed\.org$ +(^|\.)famunion\.com$ +(^|\.)fangbinxing\.com$ +(^|\.)fangeming\.com$ +(^|\.)fangeqiang\.com$ +(^|\.)fanglizhi\.info$ +(^|\.)fangmincn\.org$ +(^|\.)fangong\.forums-free\.com$ +(^|\.)fangongheike\.com$ +(^|\.)fangong\.org$ +(^|\.)fanhaodang\.com$ +(^|\.)fan-qiang\.com$ +(^|\.)fanqiangdang\.com$ +(^|\.)fanqianghou\.com$ +(^|\.)fanqiang\.tk$ +(^|\.)fanqiangyakexi\.net$ +(^|\.)fanqiangzhe\.com$ +(^|\.)fanswong\.com$ +(^|\.)fanyue\.info$ +(^|\.)fapdu\.com$ +(^|\.)faproxy\.com$ +(^|\.)faqserv\.com$ +(^|\.)fartit\.com$ +(^|\.)farwestchina\.com$ +(^|\.)fastpic\.ru$ +(^|\.)fastssh\.com$ +(^|\.)faststone\.org$ +(^|\.)fast\.wistia\.com$ +(^|\.)fatbtc\.com$ +(^|\.)favstar\.fm$ +(^|\.)fawanghuihui\.org$ +(^|\.)faydao\.com$ +(^|\.)fbaddins\.com$ +(^|\.)fbcdn\.net$ +(^|\.)fb\.com$ +(^|\.)fb\.me$ +(^|\.)fbsbx\.com$ +(^|\.)fbworkmail\.com$ +(^|\.)fc2blog\.net$ +(^|\.)fc2china\.com$ +(^|\.)fc2cn\.com$ +(^|\.)fc2\.com$ +(^|\.)fda\.gov\.tw$ +(^|\.)fdc64\.de$ +(^|\.)fdc64\.org$ +(^|\.)fdc89\.jp$ +(^|\.)feedburner\.com$ +(^|\.)feeds\.fileforum\.com$ +(^|\.)feedx\.net$ +(^|\.)feelssh\.com$ +(^|\.)feer\.com$ +(^|\.)feifeiss\.com$ +(^|\.)feitianacademy\.org$ +(^|\.)feitian-california\.org$ +(^|\.)feministteacher\.com$ +(^|\.)fengzhenghu\.com$ +(^|\.)fengzhenghu\.net$ +(^|\.)fevernet\.com$ +(^|\.)fffff\.at$ +(^|\.)ff\.im$ +(^|\.)fflick\.com$ +(^|\.)ffvpn\.com$ +(^|\.)fgmtv\.net$ +(^|\.)fgmtv\.org$ +(^|\.)fhreports\.net$ +(^|\.)fiddle\.jshell\.net$ +(^|\.)figprayer\.com$ +(^|\.)fileflyer\.com$ +(^|\.)files2me\.com$ +(^|\.)fileserve\.com$ +(^|\.)filesor\.com$ +(^|\.)fillthesquare\.org$ +(^|\.)filmingfortibet\.org$ +(^|\.)filmy\.olabloga\.pl$ +(^|\.)filthdump\.com$ +(^|\.)financetwitter\.com$ +(^|\.)finchvpn\.com$ +(^|\.)findmespot\.com$ +(^|\.)findyoutube\.com$ +(^|\.)findyoutube\.net$ +(^|\.)fingerdaily\.com$ +(^|\.)finler\.net$ +(^|\.)firearmsworld\.net$ +(^|\.)firebaseio\.com$ +(^|\.)fireofliberty\.org$ +(^|\.)firetweet\.io$ +(^|\.)firstfivefollowers\.com$ +(^|\.)flagsonline\.it$ +(^|\.)flecheinthepeche\.fr$ +(^|\.)fleshbot\.com$ +(^|\.)fleursdeslettres\.com$ +(^|\.)flgg\.us$ +(^|\.)flgjustice\.org$ +(^|\.)flickr\.com$ +(^|\.)flickrhivemind\.net$ +(^|\.)flickriver\.com$ +(^|\.)fling\.com$ +(^|\.)flipboard\.com$ +(^|\.)flipkart\.com$ +(^|\.)flitto\.com$ +(^|\.)flnet\.org$ +(^|\.)flog\.tw$ +(^|\.)flyvpn\.com$ +(^|\.)flyzy2005\.com$ +(^|\.)fnac\.be$ +(^|\.)fnac\.com$ +(^|\.)fochk\.org$ +(^|\.)focustaiwan\.tw$ +(^|\.)focusvpn\.com$ +(^|\.)fofg-europe\.net$ +(^|\.)fofg\.org$ +(^|\.)fofldfradio\.org$ +(^|\.)fooooo\.com$ +(^|\.)footwiball\.com$ +(^|\.)foreignpolicy\.com$ +(^|\.)forum4hk\.com$ +(^|\.)forum\.baby-kingdom\.com$ +(^|\.)forum\.cyberctm\.com$ +(^|\.)forum\.idsam\.com$ +(^|\.)forum\.my903\.com$ +(^|\.)forum\.mymaji\.com$ +(^|\.)forum\.omy\.sg$ +(^|\.)forum\.palmislife\.com$ +(^|\.)forum\.setty\.com\.tw$ +(^|\.)forum\.sina\.com\.hk$ +(^|\.)forum\.slime\.com\.tw$ +(^|\.)forum\.tvb\.com$ +(^|\.)forum\.xinbao\.de$ +(^|\.)fotile\.me$ +(^|\.)fourface\.nodesnoop\.com$ +(^|\.)fourthinternational\.org$ +(^|\.)foxdie\.us$ +(^|\.)foxgay\.com$ +(^|\.)foxsub\.com$ +(^|\.)foxtang\.com$ +(^|\.)fpmtmexico\.org$ +(^|\.)fpmt\.org$ +(^|\.)fpmt-osel\.org$ +(^|\.)fpmt\.tw$ +(^|\.)fqok\.org$ +(^|\.)fqrouter\.com$ +(^|\.)fq\.wikia\.com$ +(^|\.)franklc\.com$ +(^|\.)freakshare\.com$ +(^|\.)free4u\.com\.ar$ +(^|\.)freealim\.com$ +(^|\.)freebrowser\.org$ +(^|\.)freechal\.com$ +(^|\.)freechinaforum\.org$ +(^|\.)freechina\.net$ +(^|\.)freechina\.news$ +(^|\.)freechinaweibo\.com$ +(^|\.)freeddns\.com$ +(^|\.)freeddns\.org$ +(^|\.)freedomchina\.info$ +(^|\.)freedomcollection\.org$ +(^|\.)freedomhouse\.org$ +(^|\.)freedominfonetweb\.wordpress\.com$ +(^|\.)freedomsherald\.org$ +(^|\.)freeforums\.org$ +(^|\.)freefq\.com$ +(^|\.)free\.fr$ +(^|\.)freefuckvids\.com$ +(^|\.)freegao\.com$ +(^|\.)free-gate\.org$ +(^|\.)free-hada-now\.org$ +(^|\.)freehongkong\.org$ +(^|\.)freeilhamtohti\.org$ +(^|\.)freekwonpyong\.org$ +(^|\.)freelotto\.com$ +(^|\.)freeman2\.com$ +(^|\.)freemoren\.com$ +(^|\.)freemorenews\.com$ +(^|\.)freemuse\.org$ +(^|\.)freenet-china\.org$ +(^|\.)freenetproject\.org$ +(^|\.)freenewscn\.com$ +(^|\.)freeopenvpn\.com$ +(^|\.)freeoz\.org$ +(^|\.)free-proxy\.cz$ +(^|\.)free-ssh\.com$ +(^|\.)freessh\.us$ +(^|\.)free-ss\.site$ +(^|\.)freetcp\.com$ +(^|\.)freetibetanheroes\.org$ +(^|\.)freetibet\.net$ +(^|\.)freetibet\.org$ +(^|\.)freeviewmovies\.com$ +(^|\.)freevpn\.me$ +(^|\.)freevpn\.nl$ +(^|\.)freewallpaper4\.me$ +(^|\.)freewebs\.com$ +(^|\.)freewechat\.com$ +(^|\.)freeweibo\.com$ +(^|\.)freewww\.biz$ +(^|\.)freewww\.info$ +(^|\.)freexinwen\.com$ +(^|\.)freeyellow\.com$ +(^|\.)freeyoutubeproxy\.net$ +(^|\.)friendfeed\.com$ +(^|\.)friendfeed-media\.com$ +(^|\.)friends-of-tibet\.org$ +(^|\.)friendsoftibet\.org$ +(^|\.)fring\.com$ +(^|\.)fringenetwork\.com$ +(^|\.)fromchinatousa\.net$ +(^|\.)frommel\.net$ +(^|\.)from-pr\.com$ +(^|\.)from-sd\.com$ +(^|\.)frontlinedefenders\.org$ +(^|\.)frootvpn\.com$ +(^|\.)fscked\.org$ +(^|\.)fsurf\.com$ +(^|\.)ftchinese\.com$ +(^|\.)ftp1\.biz$ +(^|\.)ftpserver\.biz$ +(^|\.)ftv\.com\.tw$ +(^|\.)fucd\.com$ +(^|\.)fuckcnnic\.net$ +(^|\.)fuckgfw\.org$ +(^|\.)fulione\.com$ +(^|\.)fullerconsideration\.com$ +(^|\.)fulue\.com$ +(^|\.)funf\.tw$ +(^|\.)funkyimg\.com$ +(^|\.)funp\.com$ +(^|\.)fuq\.com$ +(^|\.)furbo\.org$ +(^|\.)furhhdl\.org$ +(^|\.)furinkan\.com$ +(^|\.)furl\.net$ +(^|\.)futurechinaforum\.org$ +(^|\.)futuremessage\.org$ +(^|\.)fux\.com$ +(^|\.)fuyindiantai\.org$ +(^|\.)fuyin\.net$ +(^|\.)fuyu\.org\.tw$ +(^|\.)fw\.cm$ +(^|\.)fxcm-chinese\.com$ +(^|\.)fxnetworks\.com$ +(^|\.)fzh999\.com$ +(^|\.)fzh999\.net$ +(^|\.)fzlm\.com$ +(^|\.)g0v\.social$ +(^|\.)g6hentai\.com$ +(^|\.)gabocorp\.com$ +(^|\.)gaeproxy\.com$ +(^|\.)gaforum\.org$ +(^|\.)galaxymacau\.com$ +(^|\.)galenwu\.com$ +(^|\.)galstars\.net$ +(^|\.)game735\.com$ +(^|\.)gamebase\.com\.tw$ +(^|\.)gamejolt\.com$ +(^|\.)gamer2-cds\.cdn\.hinet\.net$ +(^|\.)gamer-cds\.cdn\.hinet\.net$ +(^|\.)gamer\.com\.tw$ +(^|\.)gamez\.com\.tw$ +(^|\.)gamousa\.com$ +(^|\.)ganges\.com$ +(^|\.)gaoming\.net$ +(^|\.)gaopi\.net$ +(^|\.)gaozhisheng\.net$ +(^|\.)gaozhisheng\.org$ +(^|\.)gardennetworks\.com$ +(^|\.)gardennetworks\.org$ +(^|\.)g-area\.org$ +(^|\.)gartlive\.com$ +(^|\.)gatecoin\.com$ +(^|\.)gate\.io$ +(^|\.)gate-project\.com$ +(^|\.)gather\.com$ +(^|\.)gatherproxy\.com$ +(^|\.)gati\.org\.tw$ +(^|\.)gaybubble\.com$ +(^|\.)gaycn\.net$ +(^|\.)gayhub\.com$ +(^|\.)gaymap\.cc$ +(^|\.)gaymenring\.com$ +(^|\.)gaytube\.com$ +(^|\.)gaywatch\.com$ +(^|\.)gazotube\.com$ +(^|\.)gcc\.org\.hk$ +(^|\.)gclooney\.com$ +(^|\.)gcmasia\.com$ +(^|\.)g\.co$ +(^|\.)gcpnews\.com$ +(^|\.)gcr\.io$ +(^|\.)gdbt\.net$ +(^|\.)gdzf\.org$ +(^|\.)geek-art\.net$ +(^|\.)geekerhome\.com$ +(^|\.)geekheart\.info$ +(^|\.)gekikame\.com$ +(^|\.)gelbooru\.com$ +(^|\.)geocities\.co\.jp$ +(^|\.)geocities\.com$ +(^|\.)geocities\.jp$ +(^|\.)gerefoundation\.org$ +(^|\.)get\.app$ +(^|\.)getastrill\.com$ +(^|\.)getchu\.com$ +(^|\.)getcloak\.com$ +(^|\.)get\.dev$ +(^|\.)getfoxyproxy\.org$ +(^|\.)getfreedur\.com$ +(^|\.)getgom\.com$ +(^|\.)get\.how$ +(^|\.)geti2p\.net$ +(^|\.)getiton\.com$ +(^|\.)getjetso\.com$ +(^|\.)getlantern\.org$ +(^|\.)getmdl\.io$ +(^|\.)getoutline\.org$ +(^|\.)get\.page$ +(^|\.)getsocialscope\.com$ +(^|\.)getsync\.com$ +(^|\.)gettrials\.com$ +(^|\.)gettyimages\.com$ +(^|\.)getuploader\.com$ +(^|\.)gfbv\.de$ +(^|\.)gfgold\.com\.hk$ +(^|\.)gfsale\.com$ +(^|\.)gfw\.org\.ua$ +(^|\.)gfw\.press$ +(^|\.)ggpht\.com$ +(^|\.)ggssl\.com$ +(^|\.)ghostpath\.com$ +(^|\.)ghut\.org$ +(^|\.)giantessnight\.com$ +(^|\.)gifree\.com$ +(^|\.)giga-web\.jp$ +(^|\.)gigporno\.ru$ +(^|\.)girlbanker\.com$ +(^|\.)gist\.github\.com$ +(^|\.)github\.com$ +(^|\.)git\.io$ +(^|\.)gizlen\.net$ +(^|\.)gjczz\.com$ +(^|\.)glass8\.eu$ +(^|\.)global\.bing\.com$ +(^|\.)globaljihad\.net$ +(^|\.)globalmediaoutreach\.com$ +(^|\.)globalmuseumoncommunism\.org$ +(^|\.)globalrescue\.net$ +(^|\.)globaltm\.org$ +(^|\.)globalvoicesonline\.org$ +(^|\.)globalvoices\.org$ +(^|\.)globalvpn\.net$ +(^|\.)glock\.com$ +(^|\.)gloryhole\.com$ +(^|\.)glorystar\.me$ +(^|\.)gluckman\.com$ +(^|\.)glype\.com$ +(^|\.)gmail\.com$ +(^|\.)gmbd\.cn$ +(^|\.)gmhz\.org$ +(^|\.)gmll\.org$ +(^|\.)gmodules\.com$ +(^|\.)gmozomg\.izihost\.org$ +(^|\.)gnci\.org\.hk$ +(^|\.)go141\.com$ +(^|\.)goagent\.biz$ +(^|\.)goagent\.codeplex\.com$ +(^|\.)goagentplus\.com$ +(^|\.)gobet\.cc$ +(^|\.)godfootsteps\.org$ +(^|\.)godns\.work$ +(^|\.)godoc\.org$ +(^|\.)godsdirectcontact\.co\.uk$ +(^|\.)godsdirectcontact\.org$ +(^|\.)godsdirectcontact\.org\.tw$ +(^|\.)godsimmediatecontact\.com$ +(^|\.)gogotunnel\.com$ +(^|\.)gohappy\.com\.tw$ +(^|\.)gojet\.krtco\.com\.tw$ +(^|\.)gokbayrak\.com$ +(^|\.)golang\.org$ +(^|\.)goldbet\.com$ +(^|\.)goldbetsports\.com$ +(^|\.)goldeneyevault\.com$ +(^|\.)goldenfrog\.com$ +(^|\.)goldjizz\.com$ +(^|\.)goldstep\.net$ +(^|\.)goldwave\.com$ +(^|\.)go\.nesnode\.com$ +(^|\.)gongmeng\.info$ +(^|\.)gongm\.in$ +(^|\.)gongminliliang\.com$ +(^|\.)gongwt\.com$ +(^|\.)gooday\.xyz$ +(^|\.)gooddns\.info$ +(^|\.)goodreaders\.com$ +(^|\.)goodreads\.com$ +(^|\.)goodtv\.com\.tw$ +(^|\.)goodtv\.tv$ +(^|\.)goofind\.com$ +(^|\.)goo\.gl$ +(^|\.)google\.ad$ +(^|\.)google\.ae$ +(^|\.)google\.al$ +(^|\.)google\.am$ +(^|\.)googleapis\.cn$ +(^|\.)googleapis\.com$ +(^|\.)googleapps\.com$ +(^|\.)googlearth\.com$ +(^|\.)googleartproject\.com$ +(^|\.)google\.as$ +(^|\.)google\.at$ +(^|\.)google\.az$ +(^|\.)google\.ba$ +(^|\.)google\.be$ +(^|\.)google\.bf$ +(^|\.)google\.bg$ +(^|\.)google\.bi$ +(^|\.)google\.bj$ +(^|\.)googleblog\.com$ +(^|\.)googlebot\.com$ +(^|\.)google\.bs$ +(^|\.)google\.bt$ +(^|\.)google\.by$ +(^|\.)google\.ca$ +(^|\.)google\.calstate\.edu$ +(^|\.)google\.cat$ +(^|\.)google\.cd$ +(^|\.)google\.cf$ +(^|\.)google\.cg$ +(^|\.)google\.ch$ +(^|\.)googlechinawebmaster\.com$ +(^|\.)google\.ci$ +(^|\.)google\.cl$ +(^|\.)google\.cm$ +(^|\.)google\.cn$ +(^|\.)google\.co\.ao$ +(^|\.)google\.co\.bw$ +(^|\.)google\.co\.ck$ +(^|\.)google\.co\.cr$ +(^|\.)googlecode\.com$ +(^|\.)google\.co\.id$ +(^|\.)google\.co\.il$ +(^|\.)google\.co\.in$ +(^|\.)google\.co\.jp$ +(^|\.)google\.co\.ke$ +(^|\.)google\.co\.kr$ +(^|\.)google\.co\.ls$ +(^|\.)google\.com$ +(^|\.)google\.co\.ma$ +(^|\.)google\.com\.af$ +(^|\.)google\.com\.ag$ +(^|\.)google\.com\.ai$ +(^|\.)google\.com\.ar$ +(^|\.)google\.com\.au$ +(^|\.)google\.com\.bd$ +(^|\.)google\.com\.bh$ +(^|\.)google\.com\.bn$ +(^|\.)google\.com\.bo$ +(^|\.)google\.com\.br$ +(^|\.)google\.com\.bz$ +(^|\.)google\.com\.co$ +(^|\.)google\.com\.cu$ +(^|\.)google\.com\.cy$ +(^|\.)google\.com\.do$ +(^|\.)google\.com\.ec$ +(^|\.)google\.com\.eg$ +(^|\.)google\.com\.et$ +(^|\.)google\.com\.fj$ +(^|\.)google\.com\.gh$ +(^|\.)google\.com\.gi$ +(^|\.)google\.com\.gt$ +(^|\.)google\.com\.hk$ +(^|\.)google\.com\.jm$ +(^|\.)google\.com\.kh$ +(^|\.)google\.com\.kw$ +(^|\.)google\.com\.lb$ +(^|\.)google\.com\.ly$ +(^|\.)googlecommerce\.com$ +(^|\.)google\.com\.mm$ +(^|\.)google\.com\.mt$ +(^|\.)google\.com\.mx$ +(^|\.)google\.com\.my$ +(^|\.)google\.com\.na$ +(^|\.)google\.com\.nf$ +(^|\.)google\.com\.ng$ +(^|\.)google\.com\.ni$ +(^|\.)google\.com\.np$ +(^|\.)google\.com\.om$ +(^|\.)google\.com\.pa$ +(^|\.)google\.com\.pe$ +(^|\.)google\.com\.pg$ +(^|\.)google\.com\.ph$ +(^|\.)google\.com\.pk$ +(^|\.)google\.com\.pr$ +(^|\.)google\.com\.py$ +(^|\.)google\.com\.qa$ +(^|\.)google\.com\.sa$ +(^|\.)google\.com\.sb$ +(^|\.)google\.com\.sg$ +(^|\.)google\.com\.sl$ +(^|\.)google\.com\.sv$ +(^|\.)google\.com\.tj$ +(^|\.)google\.com\.tr$ +(^|\.)google\.com\.tw$ +(^|\.)google\.com\.ua$ +(^|\.)google\.com\.uy$ +(^|\.)google\.com\.vc$ +(^|\.)google\.com\.vn$ +(^|\.)google\.co\.mz$ +(^|\.)google\.co\.nz$ +(^|\.)google\.co\.th$ +(^|\.)google\.co\.tz$ +(^|\.)google\.co\.ug$ +(^|\.)google\.co\.uk$ +(^|\.)google\.co\.uz$ +(^|\.)google\.co\.ve$ +(^|\.)google\.co\.vi$ +(^|\.)google\.co\.za$ +(^|\.)google\.co\.zm$ +(^|\.)google\.co\.zw$ +(^|\.)google\.cv$ +(^|\.)google\.cz$ +(^|\.)google\.de$ +(^|\.)google\.dev$ +(^|\.)google\.dj$ +(^|\.)google\.dk$ +(^|\.)google\.dm$ +(^|\.)googledomains\.com$ +(^|\.)googledrive\.com$ +(^|\.)google\.dz$ +(^|\.)googleearth\.com$ +(^|\.)google\.ee$ +(^|\.)google\.es$ +(^|\.)google\.fi$ +(^|\.)google\.fm$ +(^|\.)google\.fr$ +(^|\.)google\.ga$ +(^|\.)google\.ge$ +(^|\.)google\.gg$ +(^|\.)google\.gl$ +(^|\.)google\.gm$ +(^|\.)google\.gp$ +(^|\.)google\.gr$ +(^|\.)googlegroups\.com$ +(^|\.)google\.gy$ +(^|\.)google\.hn$ +(^|\.)googlehosted\.com$ +(^|\.)google\.hr$ +(^|\.)google\.ht$ +(^|\.)google\.hu$ +(^|\.)googleideas\.com$ +(^|\.)google\.ie$ +(^|\.)google\.im$ +(^|\.)googleinsidesearch\.com$ +(^|\.)google\.iq$ +(^|\.)google\.is$ +(^|\.)google\.it$ +(^|\.)google\.je$ +(^|\.)google\.jo$ +(^|\.)google\.kg$ +(^|\.)google\.ki$ +(^|\.)google\.kz$ +(^|\.)google\.la$ +(^|\.)googlelabs\.com$ +(^|\.)google\.li$ +(^|\.)google\.lk$ +(^|\.)google\.lt$ +(^|\.)google\.lu$ +(^|\.)google\.lv$ +(^|\.)googlemail\.com$ +(^|\.)googlemashups\.com$ +(^|\.)google\.md$ +(^|\.)google\.me$ +(^|\.)google\.mg$ +(^|\.)google\.mk$ +(^|\.)google\.ml$ +(^|\.)google\.mn$ +(^|\.)google\.ms$ +(^|\.)google\.mu$ +(^|\.)google\.mv$ +(^|\.)google\.mw$ +(^|\.)google\.ne$ +(^|\.)google\.nl$ +(^|\.)google\.no$ +(^|\.)google\.nr$ +(^|\.)google\.nu$ +(^|\.)googlepagecreator\.com$ +(^|\.)google\.pl$ +(^|\.)googleplay\.com$ +(^|\.)googleplus\.com$ +(^|\.)google\.pn$ +(^|\.)google\.ps$ +(^|\.)google\.pt$ +(^|\.)google\.ro$ +(^|\.)google\.rs$ +(^|\.)google\.ru$ +(^|\.)google\.rw$ +(^|\.)google\.sc$ +(^|\.)googlescholar\.com$ +(^|\.)google\.se$ +(^|\.)google\.sh$ +(^|\.)google\.si$ +(^|\.)googlesile\.com$ +(^|\.)google\.sk$ +(^|\.)google\.sm$ +(^|\.)google\.sn$ +(^|\.)google\.so$ +(^|\.)googlesource\.com$ +(^|\.)google\.sr$ +(^|\.)google\.st$ +(^|\.)google\.td$ +(^|\.)google\.tg$ +(^|\.)google\.tk$ +(^|\.)google\.tl$ +(^|\.)google\.tm$ +(^|\.)google\.tn$ +(^|\.)google\.to$ +(^|\.)google\.tt$ +(^|\.)googleusercontent\.com$ +(^|\.)google\.vg$ +(^|\.)googlevideo\.com$ +(^|\.)google\.vu$ +(^|\.)googleweblight\.com$ +(^|\.)google\.ws$ +(^|\.)googlezip\.net$ +(^|\.)gopetition\.com$ +(^|\.)go-pki\.com$ +(^|\.)goproxing\.net$ +(^|\.)goregrish\.com$ +(^|\.)gospelherald\.com$ +(^|\.)gotdns\.ch$ +(^|\.)got-game\.org$ +(^|\.)gotgeeks\.com$ +(^|\.)gotrusted\.com$ +(^|\.)gotw\.ca$ +(^|\.)gov\.taipei$ +(^|\.)gov\.tw$ +(^|\.)g-queen\.com$ +(^|\.)gr8domain\.biz$ +(^|\.)gr8name\.biz$ +(^|\.)grammaly\.com$ +(^|\.)grandtrial\.org$ +(^|\.)grangorz\.org$ +(^|\.)graphis\.ne\.jp$ +(^|\.)graphql\.org$ +(^|\.)greasespot\.net$ +(^|\.)greatfire\.org$ +(^|\.)greatfire\.us7\.list-manage\.com$ +(^|\.)greatfirewall\.biz$ +(^|\.)great-firewall\.com$ +(^|\.)greatfirewallofchina\.net$ +(^|\.)greatfirewallofchina\.org$ +(^|\.)great-roc\.org$ +(^|\.)greatroc\.org$ +(^|\.)greatroc\.tw$ +(^|\.)greatzhonghua\.org$ +(^|\.)greenfieldbookstore\.com\.hk$ +(^|\.)greenparty\.org\.tw$ +(^|\.)greenpeace\.com\.tw$ +(^|\.)greenpeace\.org$ +(^|\.)greenreadings\.com$ +(^|\.)greenvpn\.net$ +(^|\.)greenvpn\.org$ +(^|\.)grotty-monday\.com$ +(^|\.)groups\.google\.cn$ +(^|\.)grow\.google$ +(^|\.)gs-discuss\.com$ +(^|\.)gsp\.target\.com$ +(^|\.)gstatic\.com$ +(^|\.)gtricks\.com$ +(^|\.)gts-vpn\.com$ +(^|\.)guaguass\.com$ +(^|\.)guaguass\.org$ +(^|\.)guancha\.org$ +(^|\.)guaneryu\.com$ +(^|\.)guangming\.com\.my$ +(^|\.)guangnianvpn\.com$ +(^|\.)guardster\.com$ +(^|\.)gu-chu-sum\.org$ +(^|\.)guishan\.org$ +(^|\.)gumroad\.com$ +(^|\.)gunsamerica\.com$ +(^|\.)gunsandammo\.com$ +(^|\.)gun-world\.net$ +(^|\.)guo\.media$ +(^|\.)guruonline\.hk$ +(^|\.)gutteruncensored\.com$ +(^|\.)gvlib\.com$ +(^|\.)gvm\.com\.tw$ +(^|\.)gvt0\.com$ +(^|\.)gvt1\.com$ +(^|\.)gvt3\.com$ +(^|\.)gwtproject\.org$ +(^|\.)gyalwarinpoche\.com$ +(^|\.)gyatsostudio\.com$ +(^|\.)gzm\.tv$ +(^|\.)gzone-anime\.info$ +(^|\.)h1n1china\.org$ +(^|\.)h528\.com$ +(^|\.)h5dm\.com$ +(^|\.)h5galgame\.me$ +(^|\.)hacg\.club$ +(^|\.)hacg\.in$ +(^|\.)hacg\.li$ +(^|\.)hacg\.me$ +(^|\.)hacg\.red$ +(^|\.)hacken\.cc$ +(^|\.)hacker\.org$ +(^|\.)hackthatphone\.net$ +(^|\.)hahaxixi\.github\.io$ +(^|\.)hahlo\.com$ +(^|\.)hakkatv\.org\.tw$ +(^|\.)handcraftedsoftware\.org$ +(^|\.)hanime\.tv$ +(^|\.)hanunyi\.com$ +(^|\.)haoel\.github\.io$ +(^|\.)hao\.news$ +(^|\.)happy-vpn\.com$ +(^|\.)haproxy\.org$ +(^|\.)hardsextube\.com$ +(^|\.)harunyahya\.com$ +(^|\.)hautelookcdn\.com$ +(^|\.)hautelook\.com$ +(^|\.)have8\.com$ +(^|\.)hbg\.com$ +(^|\.)hbo\.com$ +(^|\.)h-china\.org$ +(^|\.)hclips\.com$ +(^|\.)hdlt\.me$ +(^|\.)hd\.stheadline\.com$ +(^|\.)hdtvb\.net$ +(^|\.)hdzog\.com$ +(^|\.)heartyit\.com$ +(^|\.)heavy-r\.com$ +(^|\.)hecaitou\.net$ +(^|\.)hechaji\.com$ +(^|\.)hec\.su$ +(^|\.)heeact\.edu\.tw$ +(^|\.)hegre-art\.com$ +(^|\.)heix\.pp\.ru$ +(^|\.)helloandroid\.com$ +(^|\.)helloqueer\.com$ +(^|\.)helloss\.pw$ +(^|\.)hellotxt\.com$ +(^|\.)hellouk\.org$ +(^|\.)helpeachpeople\.com$ +(^|\.)helplinfen\.com$ +(^|\.)help\.linksalpha\.com$ +(^|\.)helpster\.de$ +(^|\.)helpzhuling\.org$ +(^|\.)hentai\.to$ +(^|\.)hentaitube\.tv$ +(^|\.)hentaivideoworld\.com$ +(^|\.)heqinglian\.net$ +(^|\.)heungkongdiscuss\.com$ +(^|\.)hexieshe\.com$ +(^|\.)hexieshe\.xyz$ +(^|\.)hexxeh\.net$ +(^|\.)heyzo\.com$ +(^|\.)hgseav\.com$ +(^|\.)hhdcb3office\.org$ +(^|\.)hhthesakyatrizin\.org$ +(^|\.)hidden-advent\.org$ +(^|\.)hidecloud\.com$ +(^|\.)hidein\.net$ +(^|\.)hideipvpn\.com$ +(^|\.)hideman\.net$ +(^|\.)hide\.me$ +(^|\.)hideme\.nl$ +(^|\.)hidemyass\.com$ +(^|\.)hidemycomp\.com$ +(^|\.)hidemy\.name$ +(^|\.)higfw\.com$ +(^|\.)highpeakspureearth\.com$ +(^|\.)highrockmedia\.com$ +(^|\.)hihiforum\.com$ +(^|\.)hihistory\.net$ +(^|\.)hiitch\.com$ +(^|\.)hikinggfw\.org$ +(^|\.)hilive\.tv$ +(^|\.)himalayan-foundation\.org$ +(^|\.)himalayanglacier\.com$ +(^|\.)himemix\.com$ +(^|\.)himemix\.net$ +(^|\.)hi-on\.org\.tw$ +(^|\.)hitbtc\.com$ +(^|\.)hitomi\.la$ +(^|\.)hiwifi\.com$ +(^|\.)hizb-ut-tahrir\.info$ +(^|\.)hizb-ut-tahrir\.org$ +(^|\.)hizbuttahrir\.org$ +(^|\.)hjclub\.info$ +(^|\.)hk01\.com$ +(^|\.)hk32168\.com$ +(^|\.)hka8964\.wordpress\.com$ +(^|\.)hkacg\.com$ +(^|\.)hkacg\.net$ +(^|\.)hkanews\.wordpress\.com$ +(^|\.)hkatvnews\.com$ +(^|\.)hkbc\.net$ +(^|\.)hkbf\.org$ +(^|\.)hkbookcity\.com$ +(^|\.)hkchurch\.org$ +(^|\.)hkci\.org\.hk$ +(^|\.)hkcmi\.edu$ +(^|\.)hkcnews\.com$ +(^|\.)hkcoc\.com$ +(^|\.)hkcoc\.weather\.com\.hk$ +(^|\.)hkdailynews\.com\.hk$ +(^|\.)hkday\.net$ +(^|\.)hkdf\.org$ +(^|\.)hkej\.com$ +(^|\.)hkepc\.com$ +(^|\.)hkfaa\.com$ +(^|\.)hkfreezone\.com$ +(^|\.)hk\.frienddy\.com$ +(^|\.)hkfront\.org$ +(^|\.)hkgalden\.com$ +(^|\.)hk\.geocities\.com$ +(^|\.)hkgolden\.com$ +(^|\.)hk\.gradconnection\.com$ +(^|\.)hkgreenradio\.org$ +(^|\.)hk\.hao123img\.com$ +(^|\.)hkheadline\.com$ +(^|\.)hkhkhk\.com$ +(^|\.)hkhrc\.org\.hk$ +(^|\.)hkhrm\.org\.hk$ +(^|\.)hkip\.org\.uk$ +(^|\.)hkjc\.com$ +(^|\.)hk\.jiepang\.com$ +(^|\.)hkjp\.org$ +(^|\.)hk\.knowledge\.yahoo\.com$ +(^|\.)hklft\.com$ +(^|\.)hklts\.org\.hk$ +(^|\.)hk\.myblog\.yahoo\.com$ +(^|\.)hk\.news\.yahoo\.com$ +(^|\.)hkptu\.org$ +(^|\.)hk-pub\.com$ +(^|\.)hk\.rd\.yahoo\.com$ +(^|\.)hkreporter\.com$ +(^|\.)hkreporter\.loved\.hk$ +(^|\.)hk\.search\.yahoo\.com$ +(^|\.)hkupop\.hku\.hk$ +(^|\.)hkusu\.net$ +(^|\.)hk\.video\.news\.yahoo\.com$ +(^|\.)hkvwet\.com$ +(^|\.)hkwcc\.org\.hk$ +(^|\.)hk\.yahoo\.com$ +(^|\.)hkzone\.org$ +(^|\.)h-moe\.com$ +(^|\.)hmonghot\.com$ +(^|\.)hmv\.co\.jp$ +(^|\.)hmvdigital\.ca$ +(^|\.)hmvdigital\.com$ +(^|\.)hnjhj\.com$ +(^|\.)hnntube\.com$ +(^|\.)hola\.com$ +(^|\.)hola\.org$ +(^|\.)holymountaincn\.com$ +(^|\.)holyspiritspeaks\.org$ +(^|\.)homedepot\.com$ +(^|\.)homeperversion\.com$ +(^|\.)homeservershow\.com$ +(^|\.)home\.sina\.com$ +(^|\.)home\.so-net\.net\.tw$ +(^|\.)hongkongfp\.com$ +(^|\.)hongmeimei\.com$ +(^|\.)hongzhi\.li$ +(^|\.)hootsuite\.com$ +(^|\.)hoovers\.com$ +(^|\.)hopedialogue\.org$ +(^|\.)hopto\.org$ +(^|\.)hornygamer\.com$ +(^|\.)hornytrip\.com$ +(^|\.)hotav\.tv$ +(^|\.)hotels\.cn$ +(^|\.)hotfrog\.com\.tw$ +(^|\.)hotgoo\.com$ +(^|\.)hotpornshow\.com$ +(^|\.)hotpot\.hk$ +(^|\.)hotshame\.com$ +(^|\.)hotspotshield\.com$ +(^|\.)hotvpn\.com$ +(^|\.)hougaige\.com$ +(^|\.)howtoforge\.com$ +(^|\.)hoxx\.com$ +(^|\.)hpa\.gov\.tw$ +(^|\.)hqcdp\.org$ +(^|\.)hqjapanesesex\.com$ +(^|\.)hqmovies\.com$ +(^|\.)hqsbnet\.wordpress\.com$ +(^|\.)hqsbonline\.wordpress\.com$ +(^|\.)hrcchina\.org$ +(^|\.)hrcir\.com$ +(^|\.)hrea\.org$ +(^|\.)hrichina\.org$ +(^|\.)hrtsea\.com$ +(^|\.)hrweb\.org$ +(^|\.)hrw\.org$ +(^|\.)hsjp\.net$ +(^|\.)hsselite\.com$ +(^|\.)hstern\.net$ +(^|\.)hst\.net\.tw$ +(^|\.)hstt\.net$ +(^|\.)htkou\.net$ +(^|\.)htl\.li$ +(^|\.)ht\.ly$ +(^|\.)html5rocks\.com$ +(^|\.)https443\.net$ +(^|\.)https443\.org$ +(^|\.)huaglad\.com$ +(^|\.)huanghuagang\.org$ +(^|\.)huangyiyu\.com$ +(^|\.)huaren4us\.com$ +(^|\.)huaren\.us$ +(^|\.)huashangnews\.com$ +(^|\.)huaxiabao\.org$ +(^|\.)huaxia-news\.com$ +(^|\.)huaxin\.ph$ +(^|\.)hua-yue\.net$ +(^|\.)huayuworld\.org$ +(^|\.)hudatoriq\.web\.id$ +(^|\.)hudson\.org$ +(^|\.)huffingtonpost\.com$ +(^|\.)hugoroy\.eu$ +(^|\.)huhaitai\.com$ +(^|\.)huhamhire\.com$ +(^|\.)huiyi\.in$ +(^|\.)hulkshare\.com$ +(^|\.)hulu\.com$ +(^|\.)huluim\.com$ +(^|\.)humanrightsbriefing\.org$ +(^|\.)hungerstrikeforaids\.org$ +(^|\.)hung-ya\.com$ +(^|\.)huobi\.com$ +(^|\.)huobi\.pro$ +(^|\.)huobipro\.com$ +(^|\.)huping\.net$ +(^|\.)hurgokbayrak\.com$ +(^|\.)hurriyet\.com\.tr$ +(^|\.)hustlercash\.com$ +(^|\.)hut2\.ru$ +(^|\.)hutianyi\.net$ +(^|\.)hutong9\.net$ +(^|\.)huyandex\.com$ +(^|\.)hwadzan\.tw$ +(^|\.)hwayue\.org\.tw$ +(^|\.)hwinfo\.com$ +(^|\.)hxwk\.org$ +(^|\.)hxwq\.org$ +(^|\.)hybrid-analysis\.com$ +(^|\.)hyperrate\.com$ +(^|\.)i1\.hk$ +(^|\.)i2p2\.de$ +(^|\.)i2runner\.com$ +(^|\.)i818hk\.com$ +(^|\.)iam\.soy$ +(^|\.)iamtopone\.com$ +(^|\.)iask\.bz$ +(^|\.)iask\.ca$ +(^|\.)iav19\.com$ +(^|\.)ibiblio\.org$ +(^|\.)iblist\.com$ +(^|\.)iblogserv-f\.net$ +(^|\.)ibros\.org$ +(^|\.)ibvpn\.com$ +(^|\.)i-cable\.com$ +(^|\.)icams\.com$ +(^|\.)ice\.audionow\.com$ +(^|\.)icij\.org$ +(^|\.)icl-fi\.org$ +(^|\.)icoco\.com$ +(^|\.)iconpaper\.org$ +(^|\.)icu-project\.org$ +(^|\.)iddddg\.com$ +(^|\.)idemocracy\.asia$ +(^|\.)identi\.ca$ +(^|\.)id\.hao123\.com$ +(^|\.)id\.heroku\.com$ +(^|\.)idiomconnection\.com$ +(^|\.)idouga\.com$ +(^|\.)idreamx\.com$ +(^|\.)idv\.tw$ +(^|\.)ieasy5\.com$ +(^|\.)ied2k\.net$ +(^|\.)ienergy1\.com$ +(^|\.)ifan\.cz\.cc$ +(^|\.)ifanqiang\.com$ +(^|\.)ifcss\.org$ +(^|\.)ifjc\.org$ +(^|\.)ifreewares\.com$ +(^|\.)if\.ttt$ +(^|\.)ift\.tt$ +(^|\.)igcd\.net$ +(^|\.)igfw\.net$ +(^|\.)igfw\.tech$ +(^|\.)igmg\.de$ +(^|\.)ignitedetroit\.net$ +(^|\.)igoogle\.com$ +(^|\.)igotmail\.com\.tw$ +(^|\.)igvita\.com$ +(^|\.)ihakka\.net$ +(^|\.)ihao\.org$ +(^|\.)iicns\.com$ +(^|\.)iipdigital\.usembassy\.gov$ +(^|\.)ikstar\.com$ +(^|\.)ikwb\.com$ +(^|\.)i\.lithium\.com$ +(^|\.)illusionfactory\.com$ +(^|\.)ilove80\.be$ +(^|\.)ilovelongtoes\.com$ +(^|\.)im88\.tw$ +(^|\.)imageab\.com$ +(^|\.)imagefap\.com$ +(^|\.)imageflea\.com$ +(^|\.)images\.comico\.tw$ +(^|\.)images-gaytube\.com$ +(^|\.)imageshack\.us$ +(^|\.)imagevenue\.com$ +(^|\.)imagezilla\.net$ +(^|\.)imb\.org$ +(^|\.)imdb\.com$ +(^|\.)imgchili\.net$ +(^|\.)img\.dlsite\.jp$ +(^|\.)img\.ly$ +(^|\.)imgmega\.com$ +(^|\.)imgur\.com$ +(^|\.)imkev\.com$ +(^|\.)imlive\.com$ +(^|\.)immigration\.gov\.tw$ +(^|\.)immoral\.jp$ +(^|\.)impact\.org\.au$ +(^|\.)impp\.mn$ +(^|\.)im\.tv$ +(^|\.)in99\.org$ +(^|\.)incapdns\.net$ +(^|\.)incloak\.com$ +(^|\.)incredibox\.fr$ +(^|\.)indiandefensenews\.in$ +(^|\.)indiemerch\.com$ +(^|\.)in-disguise\.com$ +(^|\.)info-graf\.fr$ +(^|\.)initiativesforchina\.org$ +(^|\.)inkui\.com$ +(^|\.)inmediahk\.net$ +(^|\.)innermongolia\.org$ +(^|\.)inote\.tw$ +(^|\.)insecam\.org$ +(^|\.)insidevoa\.com$ +(^|\.)instagram\.com$ +(^|\.)instanthq\.com$ +(^|\.)institut-tibetain\.org$ +(^|\.)international-news\.newsmagazine\.asia$ +(^|\.)internetdefenseleague\.org$ +(^|\.)internetfreedom\.org$ +(^|\.)internet\.org$ +(^|\.)internetpopculture\.com$ +(^|\.)inthenameofconfuciusmovie\.com$ +(^|\.)investigating\.wordpress\.com$ +(^|\.)inxian\.com$ +(^|\.)iownyour\.biz$ +(^|\.)iownyour\.org$ +(^|\.)ipalter\.com$ +(^|\.)i-part\.com\.tw$ +(^|\.)ipfire\.org$ +(^|\.)ipfs\.io$ +(^|\.)iphone4hongkong\.com$ +(^|\.)iphonehacks\.com$ +(^|\.)iphonetaiwan\.org$ +(^|\.)iphonix\.fr$ +(^|\.)ipicture\.ru$ +(^|\.)ipjetable\.net$ +(^|\.)ipobar\.com$ +(^|\.)ipoock\.com$ +(^|\.)iportal\.me$ +(^|\.)ippotv\.com$ +(^|\.)ipredator\.se$ +(^|\.)iptvbin\.com$ +(^|\.)iptv\.com\.tw$ +(^|\.)ipvanish\.com$ +(^|\.)iredmail\.org$ +(^|\.)ironbigfools\.compython\.net$ +(^|\.)ironpython\.net$ +(^|\.)ironsocket\.com$ +(^|\.)isaacmao\.com$ +(^|\.)is-a-hunter\.com$ +(^|\.)isasecret\.com$ +(^|\.)i-scmp\.com$ +(^|\.)isc\.sans\.edu$ +(^|\.)is\.gd$ +(^|\.)isgreat\.org$ +(^|\.)islahhaber\.net$ +(^|\.)islamawareness\.net$ +(^|\.)islamhouse\.com$ +(^|\.)islamicity\.com$ +(^|\.)islamicpluralism\.org$ +(^|\.)islam\.org\.hk$ +(^|\.)islamtoday\.net$ +(^|\.)ismaelan\.com$ +(^|\.)ismalltits\.com$ +(^|\.)ismprofessional\.net$ +(^|\.)isohunt\.com$ +(^|\.)israbox\.com$ +(^|\.)issuu\.com$ +(^|\.)istars\.co\.nz$ +(^|\.)istiqlalhewer\.com$ +(^|\.)istockphoto\.com$ +(^|\.)isunaffairs\.com$ +(^|\.)isuntv\.com$ +(^|\.)itaboo\.info$ +(^|\.)itaiwan\.gov\.tw$ +(^|\.)italiatibet\.org$ +(^|\.)itasoftware\.com$ +(^|\.)itemdb\.com$ +(^|\.)ithelp\.ithome\.com\.tw$ +(^|\.)itsaol\.com$ +(^|\.)its\.caltech\.edu$ +(^|\.)itshidden\.com$ +(^|\.)itsky\.it$ +(^|\.)itweet\.net$ +(^|\.)iu45\.com$ +(^|\.)iuhrdf\.org$ +(^|\.)iuksky\.com$ +(^|\.)ivacy\.com$ +(^|\.)iverycd\.com$ +(^|\.)ivpn\.net$ +(^|\.)ixquick\.com$ +(^|\.)ixxx\.com$ +(^|\.)iyouport\.com$ +(^|\.)izaobao\.us$ +(^|\.)izlesem\.org$ +(^|\.)izles\.net$ +(^|\.)jamaat\.org$ +(^|\.)jamyangnorbu\.com$ +(^|\.)jandyx\.com$ +(^|\.)janwongphoto\.com$ +(^|\.)japanfirst\.asianfreeforum\.com$ +(^|\.)japantimes\.co\.jp$ +(^|\.)japan-whores\.com$ +(^|\.)jav101\.com$ +(^|\.)jav2be\.com$ +(^|\.)jav68\.tv$ +(^|\.)javakiba\.org$ +(^|\.)javbus\.com$ +(^|\.)jav\.com$ +(^|\.)javfor\.me$ +(^|\.)javhd\.com$ +(^|\.)javhip\.com$ +(^|\.)javhub\.net$ +(^|\.)javhuge\.com$ +(^|\.)javlibrary\.com$ +(^|\.)javmobile\.net$ +(^|\.)javmoo\.com$ +(^|\.)javmoo\.xyz$ +(^|\.)javseen\.com$ +(^|\.)javtag\.com$ +(^|\.)javzoo\.com$ +(^|\.)ja\.wikipedia\.org$ +(^|\.)jbtalks\.cc$ +(^|\.)jbtalks\.com$ +(^|\.)jbtalks\.my$ +(^|\.)jcpenney\.com$ +(^|\.)jdwsy\.com$ +(^|\.)jeanyim\.com$ +(^|\.)jetos\.com$ +(^|\.)jex\.com$ +(^|\.)jfqu36\.club$ +(^|\.)jfqu37\.xyz$ +(^|\.)jgoodies\.com$ +(^|\.)jiangweiping\.com$ +(^|\.)jiaoyou8\.com$ +(^|\.)jiehua\.cz$ +(^|\.)jieshibaobao\.com$ +(^|\.)jigglegifs\.com$ +(^|\.)jigong1024\.com$ +(^|\.)jihadintel\.meforum\.org$ +(^|\.)jihadology\.net$ +(^|\.)jiji\.com$ +(^|\.)jims\.net$ +(^|\.)jinbushe\.org$ +(^|\.)jingpin\.org$ +(^|\.)jingsim\.org$ +(^|\.)jinpianwang\.com$ +(^|\.)jinroukong\.com$ +(^|\.)jintian\.net$ +(^|\.)jinx\.com$ +(^|\.)jitouch\.com$ +(^|\.)jizzthis\.com$ +(^|\.)jjgirls\.com$ +(^|\.)jkb\.cc$ +(^|\.)jkforum\.net$ +(^|\.)jkub\.com$ +(^|\.)jma\.go\.jp$ +(^|\.)j\.mp$ +(^|\.)jmscult\.com$ +(^|\.)joachims\.org$ +(^|\.)jobnewera\.wordpress\.com$ +(^|\.)jobso\.tv$ +(^|\.)joinmastodon\.org$ +(^|\.)journalchretien\.net$ +(^|\.)journalofdemocracy\.org$ +(^|\.)joymiihub\.com$ +(^|\.)joyourself\.com$ +(^|\.)jp\.hao123\.com$ +(^|\.)jpl\.nasa\.gov$ +(^|\.)jpopforum\.net$ +(^|\.)jtvnw\.net$ +(^|\.)jubushoushen\.com$ +(^|\.)juhuaren\.com$ +(^|\.)jukujo-club\.com$ +(^|\.)juliepost\.com$ +(^|\.)juliereyc\.com$ +(^|\.)junauza\.com$ +(^|\.)june4commemoration\.org$ +(^|\.)junefourth-20\.net$ +(^|\.)jungleheart\.com$ +(^|\.)juoaa\.com$ +(^|\.)justdied\.com$ +(^|\.)justfreevpn\.com$ +(^|\.)justicefortenzin\.org$ +(^|\.)justpaste\.it$ +(^|\.)justtristan\.com$ +(^|\.)juyuange\.org$ +(^|\.)juziyue\.com$ +(^|\.)jwmusic\.org$ +(^|\.)jyxf\.net$ +(^|\.)kagyumonlam\.org$ +(^|\.)kagyunews\.com\.hk$ +(^|\.)kagyuoffice\.org$ +(^|\.)kagyuoffice\.org\.tw$ +(^|\.)kagyu\.org$ +(^|\.)kagyu\.org\.za$ +(^|\.)kaiyuan\.de$ +(^|\.)kakao\.com$ +(^|\.)kalachakralugano\.org$ +(^|\.)kankan\.today$ +(^|\.)kannewyork\.com$ +(^|\.)kanshifang\.com$ +(^|\.)kantie\.org$ +(^|\.)kanzhongguo\.com$ +(^|\.)kanzhongguo\.eu$ +(^|\.)kaotic\.com$ +(^|\.)karayou\.com$ +(^|\.)karkhung\.com$ +(^|\.)karmapa\.org$ +(^|\.)karmapa-teachings\.org$ +(^|\.)ka-wai\.com$ +(^|\.)kawaiikawaii\.jp$ +(^|\.)kawase\.com$ +(^|\.)kba-tx\.org$ +(^|\.)kb\.monitorware\.com$ +(^|\.)kcoolonline\.com$ +(^|\.)k-doujin\.net$ +(^|\.)kebrum\.com$ +(^|\.)kechara\.com$ +(^|\.)keepandshare\.com$ +(^|\.)keezmovies\.com$ +(^|\.)kendatire\.com$ +(^|\.)kendincos\.net$ +(^|\.)kenengba\.com$ +(^|\.)keontech\.net$ +(^|\.)kepard\.com$ +(^|\.)kex\.com$ +(^|\.)keycdn\.com$ +(^|\.)khabdha\.org$ +(^|\.)khatrimaza\.org$ +(^|\.)khmusic\.com\.tw$ +(^|\.)kichiku-doujinko\.com$ +(^|\.)kik\.com$ +(^|\.)killwall\.com$ +(^|\.)kindleren\.com$ +(^|\.)kineox\.free\.fr$ +(^|\.)kingdomsalvation\.org$ +(^|\.)kinghost\.com$ +(^|\.)kingstone\.com\.tw$ +(^|\.)kink\.com$ +(^|\.)kinmen\.org\.tw$ +(^|\.)kinmen\.travel$ +(^|\.)kinokuniya\.com$ +(^|\.)kir\.jp$ +(^|\.)kissbbao\.cn$ +(^|\.)kiwi\.kz$ +(^|\.)kkbox\.com$ +(^|\.)kknews\.cc$ +(^|\.)kk-whys\.co\.jp$ +(^|\.)kmuh\.org\.tw$ +(^|\.)knowledgerush\.com$ +(^|\.)kobobooks\.com$ +(^|\.)kobo\.com$ +(^|\.)kodingen\.com$ +(^|\.)kompozer\.net$ +(^|\.)konachan\.com$ +(^|\.)kone\.com$ +(^|\.)koolsolutions\.com$ +(^|\.)koornk\.com$ +(^|\.)koranmandarin\.com$ +(^|\.)korenan2\.com$ +(^|\.)ksdl\.org$ +(^|\.)ksnews\.com\.tw$ +(^|\.)kspcoin\.com$ +(^|\.)ktzhk\.com$ +(^|\.)kucoin\.com$ +(^|\.)kui\.name$ +(^|\.)kun\.im$ +(^|\.)kurashsultan\.com$ +(^|\.)kurtmunger\.com$ +(^|\.)kusocity\.com$ +(^|\.)kwcg\.ca$ +(^|\.)kwongwah\.com\.my$ +(^|\.)kxsw\.life$ +(^|\.)kyofun\.com$ +(^|\.)kyohk\.net$ +(^|\.)kyoyue\.com$ +(^|\.)kyzyhello\.com$ +(^|\.)kzeng\.info$ +(^|\.)labiennale\.org$ +(^|\.)ladbrokes\.com$ +(^|\.)la-forum\.org$ +(^|\.)lagranepoca\.com$ +(^|\.)lalulalu\.com$ +(^|\.)lama\.com\.tw$ +(^|\.)lamayeshe\.com$ +(^|\.)lamnia\.co\.uk$ +(^|\.)lamrim\.com$ +(^|\.)lanterncn\.cn$ +(^|\.)lantosfoundation\.org$ +(^|\.)laod\.cn$ +(^|\.)laogai\.org$ +(^|\.)laomiu\.com$ +(^|\.)laoyang\.info$ +(^|\.)laptoplockdown\.com$ +(^|\.)laqingdan\.net$ +(^|\.)larsgeorge\.com$ +(^|\.)lastcombat\.com$ +(^|\.)lastfm\.es$ +(^|\.)latelinenews\.com$ +(^|\.)latibet\.org$ +(^|\.)lbank\.info$ +(^|\.)ld\.hao123img\.com$ +(^|\.)leafyvpn\.net$ +(^|\.)lecloud\.net$ +(^|\.)leeao\.com\.cn$ +(^|\.)lefora\.com$ +(^|\.)left21\.hk$ +(^|\.)legalporno\.com$ +(^|\.)legaltech\.law\.com$ +(^|\.)legsjapan\.com$ +(^|\.)leirentv\.ca$ +(^|\.)leisurecafe\.ca$ +(^|\.)leisurepro\.com$ +(^|\.)lematin\.ch$ +(^|\.)lemonde\.fr$ +(^|\.)lenwhite\.com$ +(^|\.)lerosua\.org$ +(^|\.)lers\.google$ +(^|\.)lesoir\.be$ +(^|\.)letou\.com$ +(^|\.)letscorp\.net$ +(^|\.)le-vpn\.com$ +(^|\.)lflink\.com$ +(^|\.)lflinkup\.com$ +(^|\.)lflinkup\.net$ +(^|\.)lflinkup\.org$ +(^|\.)lhakar\.org$ +(^|\.)lhasocialwork\.org$ +(^|\.)liangyou\.net$ +(^|\.)liangzhichuanmei\.com$ +(^|\.)lianyue\.net$ +(^|\.)liaowangxizang\.net$ +(^|\.)liberal\.org\.hk$ +(^|\.)libertytimes\.com\.tw$ +(^|\.)library\.usc\.cuhk\.edu\.hk$ +(^|\.)lidecheng\.com$ +(^|\.)lifemiles\.com$ +(^|\.)lighten\.org\.tw$ +(^|\.)lighti\.me$ +(^|\.)lightnovel\.cn$ +(^|\.)lightyearvpn\.com$ +(^|\.)lihkg\.com$ +(^|\.)like\.com$ +(^|\.)limiao\.net$ +(^|\.)line-apps\.com$ +(^|\.)linear-abematv\.akamaized\.net$ +(^|\.)line\.me$ +(^|\.)line\.naver\.jp$ +(^|\.)line-scdn\.net$ +(^|\.)linglingfa\.com$ +(^|\.)lingvodics\.com$ +(^|\.)linkideo\.com$ +(^|\.)link-o-rama\.com$ +(^|\.)linkuswell\.com$ +(^|\.)linux\.org\.hk$ +(^|\.)linuxtoy\.org$ +(^|\.)lionsroar\.com$ +(^|\.)lipuman\.com$ +(^|\.)liquidvpn\.com$ +(^|\.)listentoyoutube\.com$ +(^|\.)listorious\.com$ +(^|\.)lists\.w3\.org$ +(^|\.)liudejun\.com$ +(^|\.)liuhanyu\.com$ +(^|\.)liujianshu\.com$ +(^|\.)liuxiaobo\.net$ +(^|\.)liu-xiaobo\.org$ +(^|\.)liuxiaotong\.com$ +(^|\.)livecoin\.net$ +(^|\.)livedoor\.jp$ +(^|\.)liveleak\.com$ +(^|\.)livestation\.com$ +(^|\.)livestream\.com$ +(^|\.)livevideo\.com$ +(^|\.)livingonline\.us$ +(^|\.)livingstream\.com$ +(^|\.)liwangyang\.com$ +(^|\.)lizhizhuangbi\.com$ +(^|\.)lkcn\.net$ +(^|\.)llss\.me$ +(^|\.)load\.to$ +(^|\.)lobsangwangyal\.com$ +(^|\.)localbitcoins\.com$ +(^|\.)localdomain\.ws$ +(^|\.)localpresshk\.com$ +(^|\.)lockestek\.com$ +(^|\.)logbot\.net$ +(^|\.)login\.target\.com$ +(^|\.)logiqx\.com$ +(^|\.)londonchinese\.ca$ +(^|\.)longhair\.hk$ +(^|\.)longmusic\.com$ +(^|\.)longtermly\.net$ +(^|\.)longtoes\.com$ +(^|\.)lookpic\.com$ +(^|\.)looktoronto\.com$ +(^|\.)lotsawahouse\.org$ +(^|\.)lotuslight\.org\.hk$ +(^|\.)lotuslight\.org\.tw$ +(^|\.)lovetvshow\.com$ +(^|\.)lpsg\.com$ +(^|\.)lrfz\.com$ +(^|\.)lrip\.org$ +(^|\.)lsd\.org\.hk$ +(^|\.)lsforum\.net$ +(^|\.)lsmchinese\.org$ +(^|\.)lsmkorean\.org$ +(^|\.)lsm\.org$ +(^|\.)lsmradio\.com$ +(^|\.)lsmwebcast\.com$ +(^|\.)lsxszzg\.com$ +(^|\.)ltn\.com\.tw$ +(^|\.)luke54\.com$ +(^|\.)luke54\.org$ +(^|\.)lupm\.org$ +(^|\.)lushstories\.com$ +(^|\.)luxebc\.com$ +(^|\.)lvhai\.org$ +(^|\.)lvv2\.com$ +(^|\.)lyfhk\.net$ +(^|\.)lzmtnews\.org$ +(^|\.)macgamestore\.com$ +(^|\.)macrovpn\.com$ +(^|\.)macts\.com\.tw$ +(^|\.)mad-ar\.ch$ +(^|\.)madewithcode\.com$ +(^|\.)madonna-av\.com$ +(^|\.)madrau\.com$ +(^|\.)madthumbs\.com$ +(^|\.)magazines\.sina\.com\.tw$ +(^|\.)magic-net\.info$ +(^|\.)mahabodhi\.org$ +(^|\.)ma\.hao123\.com$ +(^|\.)maiio\.net$ +(^|\.)mail-archive\.com$ +(^|\.)maildns\.xyz$ +(^|\.)maiplus\.com$ +(^|\.)maizhong\.org$ +(^|\.)makemymood\.com$ +(^|\.)makkahnewspaper\.com$ +(^|\.)makzhou\.warehouse333\.com$ +(^|\.)malaysiakini\.com$ +(^|\.)mamingzhe\.com$ +(^|\.)manchukuo\.net$ +(^|\.)mangafox\.com$ +(^|\.)mangafox\.me$ +(^|\.)maniash\.com$ +(^|\.)manicur4ik\.ru$ +(^|\.)mansion\.com$ +(^|\.)mansionpoker\.com$ +(^|\.)manta\.com$ +(^|\.)maplew\.com$ +(^|\.)marc\.info$ +(^|\.)marguerite\.su$ +(^|\.)martau\.com$ +(^|\.)martincartoons\.com$ +(^|\.)martsangkagyuofficial\.org$ +(^|\.)maruta\.be$ +(^|\.)marxist\.com$ +(^|\.)marxist\.net$ +(^|\.)marxists\.org$ +(^|\.)mash\.to$ +(^|\.)maskedip\.com$ +(^|\.)mastodon\.cloud$ +(^|\.)mastodon\.host$ +(^|\.)mastodon\.social$ +(^|\.)matainja\.com$ +(^|\.)material\.io$ +(^|\.)mathable\.io$ +(^|\.)mathiew-badimon\.com$ +(^|\.)matome-plus\.com$ +(^|\.)matome-plus\.net$ +(^|\.)matsushimakaede\.com$ +(^|\.)matters\.news$ +(^|\.)mattwilcox\.net$ +(^|\.)maturejp\.com$ +(^|\.)maxing\.jp$ +(^|\.)mayimayi\.com$ +(^|\.)mcadforums\.com$ +(^|\.)mcaf\.ee$ +(^|\.)mcfog\.com$ +(^|\.)mcreasite\.com$ +(^|\.)md-t\.org$ +(^|\.)meansys\.com$ +(^|\.)mediachinese\.com$ +(^|\.)mediafire\.com$ +(^|\.)mediafreakcity\.com$ +(^|\.)media\.nu\.nl$ +(^|\.)media\.org\.hk$ +(^|\.)medium\.com$ +(^|\.)meetav\.com$ +(^|\.)meetup\.com$ +(^|\.)mefeedia\.com$ +(^|\.)mefound\.com$ +(^|\.)mega\.nz$ +(^|\.)megaproxy\.com$ +(^|\.)megarotic\.com$ +(^|\.)megavideo\.com$ +(^|\.)megurineluka\.com$ +(^|\.)meirixiaochao\.com$ +(^|\.)meltoday\.com$ +(^|\.)me\.me$ +(^|\.)memehk\.com$ +(^|\.)meme\.yahoo\.com$ +(^|\.)memorybbs\.com$ +(^|\.)memrijttm\.org$ +(^|\.)memri\.org$ +(^|\.)mercatox\.com$ +(^|\.)mercyprophet\.org$ +(^|\.)mergersandinquisitions\.org$ +(^|\.)meridian-trust\.org$ +(^|\.)meripet\.biz$ +(^|\.)meripet\.com$ +(^|\.)merit-times\.com\.tw$ +(^|\.)meshrep\.com$ +(^|\.)mesotw\.com$ +(^|\.)messenger\.com$ +(^|\.)metacafe\.com$ +(^|\.)metart\.com$ +(^|\.)metarthunter\.com$ +(^|\.)meteorshowersonline\.com$ +(^|\.)metrohk\.com\.hk$ +(^|\.)metrolife\.ca$ +(^|\.)metroradio\.com\.hk$ +(^|\.)meyou\.jp$ +(^|\.)me\.youthwant\.com\.tw$ +(^|\.)meyul\.com$ +(^|\.)mfxmedia\.com$ +(^|\.)mgoon\.com$ +(^|\.)mgstage\.com$ +(^|\.)mh4u\.org$ +(^|\.)m\.hkgalden\.com$ +(^|\.)mhradio\.org$ +(^|\.)michaelanti\.com$ +(^|\.)michaelmarketl\.com$ +(^|\.)microvpn\.com$ +(^|\.)middle-way\.net$ +(^|\.)mihk\.hk$ +(^|\.)mihr\.com$ +(^|\.)mihua\.org$ +(^|\.)mike\.cz\.cc$ +(^|\.)mikesoltys\.com$ +(^|\.)milph\.net$ +(^|\.)milsurps\.com$ +(^|\.)mimiai\.net$ +(^|\.)mimivip\.com$ +(^|\.)mimivv\.com$ +(^|\.)mindrolling\.org$ +(^|\.)minghui-a\.org$ +(^|\.)minghui-b\.org$ +(^|\.)minghui\.org$ +(^|\.)minghui\.or\.kr$ +(^|\.)minghui-school\.org$ +(^|\.)minghuiyw\.wordpress\.com$ +(^|\.)mingjinglishi\.com$ +(^|\.)mingjingnews\.com$ +(^|\.)mingjingtimes\.com$ +(^|\.)mingpaocanada\.com$ +(^|\.)mingpao\.com$ +(^|\.)mingpaomonthly\.com$ +(^|\.)mingpaonews\.com$ +(^|\.)mingpaony\.com$ +(^|\.)mingpaosf\.com$ +(^|\.)mingpaotor\.com$ +(^|\.)mingpaovan\.com$ +(^|\.)mingshengbao\.com$ +(^|\.)minhhue\.net$ +(^|\.)miniforum\.org$ +(^|\.)ministrybooks\.org$ +(^|\.)minzhuhua\.net$ +(^|\.)minzhuzhanxian\.com$ +(^|\.)minzhuzhongguo\.org$ +(^|\.)miroguide\.com$ +(^|\.)mirrorbooks\.com$ +(^|\.)mist\.vip$ +(^|\.)mitao\.com\.tw$ +(^|\.)mitbbsau\.com$ +(^|\.)mitbbs\.com$ +(^|\.)mixero\.com$ +(^|\.)mixpod\.com$ +(^|\.)mixx\.com$ +(^|\.)mizzmona\.com$ +(^|\.)mjib\.gov\.tw$ +(^|\.)mjlsh\.usc\.cuhk\.edu\.hk$ +(^|\.)mk5000\.com$ +(^|\.)mlcool\.com$ +(^|\.)mlzs\.work$ +(^|\.)mmaaxx\.com$ +(^|\.)mm-cg\.com$ +(^|\.)m\.me$ +(^|\.)mmmca\.com$ +(^|\.)mnewstv\.com$ +(^|\.)mobatek\.net$ +(^|\.)mobile01\.com$ +(^|\.)mobileways\.de$ +(^|\.)mobypicture\.com$ +(^|\.)moby\.to$ +(^|\.)moeaic\.gov\.tw$ +(^|\.)moeerolibrary\.com$ +(^|\.)mofa\.gov\.tw$ +(^|\.)mofaxiehui\.com$ +(^|\.)mofos\.com$ +(^|\.)mog\.com$ +(^|\.)mohu\.club$ +(^|\.)mohu\.ml$ +(^|\.)mojim\.com$ +(^|\.)mol\.gov\.tw$ +(^|\.)molihua\.org$ +(^|\.)mondex\.org$ +(^|\.)moneyhome\.biz$ +(^|\.)money-link\.com\.tw$ +(^|\.)mo\.nightlife141\.com$ +(^|\.)monitorchina\.org$ +(^|\.)monster\.com$ +(^|\.)moodyz\.com$ +(^|\.)moonbbs\.com$ +(^|\.)moonbingo\.com$ +(^|\.)morningsun\.org$ +(^|\.)moroneta\.com$ +(^|\.)mos\.ru$ +(^|\.)motherless\.com$ +(^|\.)motiyun\.com$ +(^|\.)motor4ik\.ru$ +(^|\.)mousebreaker\.com$ +(^|\.)movements\.org$ +(^|\.)moviefap\.com$ +(^|\.)mp3buscador\.com$ +(^|\.)mp3ye\.eu$ +(^|\.)mpettis\.com$ +(^|\.)mpfinance\.com$ +(^|\.)mpinews\.com$ +(^|\.)m\.plixi\.com$ +(^|\.)mponline\.hk$ +(^|\.)mqxd\.org$ +(^|\.)mrbasic\.com$ +(^|\.)mrbonus\.com$ +(^|\.)mrface\.com$ +(^|\.)mrslove\.com$ +(^|\.)mrtweet\.com$ +(^|\.)msa-it\.org$ +(^|\.)msguancha\.com$ +(^|\.)msha\.gov$ +(^|\.)m\.slandr\.net$ +(^|\.)mswe1\.org$ +(^|\.)m-team\.cc$ +(^|\.)mthruf\.com$ +(^|\.)mtw\.tl$ +(^|\.)muchosucko\.com$ +(^|\.)mullvad\.net$ +(^|\.)multiply\.com$ +(^|\.)multiproxy\.org$ +(^|\.)multiupload\.com$ +(^|\.)mummysgold\.com$ +(^|\.)murmur\.tw$ +(^|\.)musicade\.net$ +(^|\.)muslimvideo\.com$ +(^|\.)muzi\.com$ +(^|\.)muzi\.net$ +(^|\.)muzu\.tv$ +(^|\.)mvdis\.gov\.tw$ +(^|\.)mvg\.jp$ +(^|\.)mx981\.com$ +(^|\.)mx\.hao123\.com$ +(^|\.)my03\.com$ +(^|\.)myactimes\.com$ +(^|\.)myanniu\.com$ +(^|\.)myaudiocast\.com$ +(^|\.)myav\.com\.tw$ +(^|\.)mybbs\.us$ +(^|\.)mybet\.com$ +(^|\.)myca168\.com$ +(^|\.)mycanadanow\.com$ +(^|\.)mychinamyhome\.com$ +(^|\.)mychinanet\.com$ +(^|\.)mychinanews\.com$ +(^|\.)mychinese\.news$ +(^|\.)mycnnews\.com$ +(^|\.)mycould\.com$ +(^|\.)mydad\.info$ +(^|\.)myddns\.com$ +(^|\.)myeasytv\.com$ +(^|\.)myeclipseide\.com$ +(^|\.)my-formosa\.com$ +(^|\.)myforum\.com\.hk$ +(^|\.)myforum\.com\.uk$ +(^|\.)myfreecams\.com$ +(^|\.)myfreepaysite\.com$ +(^|\.)myfreshnet\.com$ +(^|\.)myftp\.info$ +(^|\.)myftp\.name$ +(^|\.)myiphide\.com$ +(^|\.)mykomica\.org$ +(^|\.)mylftv\.com$ +(^|\.)my\.mail\.ru$ +(^|\.)mymediarom\.com$ +(^|\.)mymoe\.moe$ +(^|\.)mymom\.info$ +(^|\.)mymusic\.net\.tw$ +(^|\.)mynetav\.net$ +(^|\.)mynetav\.org$ +(^|\.)mynumber\.org$ +(^|\.)my\.opera\.com$ +(^|\.)myparagliding\.com$ +(^|\.)my\.pcloud\.com$ +(^|\.)mypicture\.info$ +(^|\.)mypop3\.net$ +(^|\.)mypop3\.org$ +(^|\.)mypopescu\.com$ +(^|\.)my-private-network\.co\.uk$ +(^|\.)my-proxy\.com$ +(^|\.)myradio\.hk$ +(^|\.)myreadingmanga\.info$ +(^|\.)mysecondarydns\.com$ +(^|\.)myshare\.url\.com\.tw$ +(^|\.)mysinablog\.com$ +(^|\.)mysite\.verizon\.net$ +(^|\.)myspacecdn\.com$ +(^|\.)myspace\.com$ +(^|\.)mytalkbox\.com$ +(^|\.)mytizi\.com$ +(^|\.)mywww\.biz$ +(^|\.)myz\.info$ +(^|\.)naacoalition\.org$ +(^|\.)naitik\.net$ +(^|\.)nakido\.com$ +(^|\.)nakuz\.com$ +(^|\.)nalandabodhi\.org$ +(^|\.)nalandawest\.org$ +(^|\.)namgyalmonastery\.org$ +(^|\.)namgyal\.org$ +(^|\.)namsisi\.com$ +(^|\.)nanyang\.com$ +(^|\.)nanyangpost\.com$ +(^|\.)nanzao\.com$ +(^|\.)naol\.ca$ +(^|\.)naol\.cc$ +(^|\.)nat\.gov\.tw$ +(^|\.)national-lottery\.co\.uk$ +(^|\.)nationsonline\.org$ +(^|\.)nationwide\.com$ +(^|\.)nat\.moe$ +(^|\.)naughtyamerica\.com$ +(^|\.)navyfamily\.navy\.mil$ +(^|\.)navyreserve\.navy\.mil$ +(^|\.)naweeklytimes\.com$ +(^|\.)nbtvpn\.com$ +(^|\.)nccwatch\.org\.tw$ +(^|\.)nch\.com\.tw$ +(^|\.)ncn\.org$ +(^|\.)nde\.de$ +(^|\.)ndr\.de$ +(^|\.)ned\.org$ +(^|\.)nekoslovakia\.net$ +(^|\.)nemesis2\.qx\.net$ +(^|\.)neo-miracle\.com$ +(^|\.)nepusoku\.com$ +(^|\.)netbirds\.com$ +(^|\.)netcolony\.com$ +(^|\.)net-fits\.pro$ +(^|\.)netflix\.com$ +(^|\.)netme\.cc$ +(^|\.)netsneak\.com$ +(^|\.)network54\.com$ +(^|\.)networkedblogs\.com$ +(^|\.)networktunnel\.net$ +(^|\.)neverforget8964\.org$ +(^|\.)new-3lunch\.net$ +(^|\.)new96\.ca$ +(^|\.)new-akiba\.com$ +(^|\.)newcenturymc\.com$ +(^|\.)newcenturynews\.com$ +(^|\.)newchen\.com$ +(^|\.)newgrounds\.com$ +(^|\.)newipnow\.com$ +(^|\.)newlandmagazine\.com\.au$ +(^|\.)newnews\.ca$ +(^|\.)news100\.com\.tw$ +(^|\.)newsancai\.com$ +(^|\.)newschinacomment\.org$ +(^|\.)newscn\.org$ +(^|\.)news\.cnyes\.com$ +(^|\.)newsdetox\.ca$ +(^|\.)newsdh\.com$ +(^|\.)news\.hk\.msn\.com$ +(^|\.)news\.hkpeanut\.com$ +(^|\.)news\.msn\.com\.tw$ +(^|\.)news\.nationalgeographic\.com$ +(^|\.)news\.now\.com$ +(^|\.)news\.omy\.sg$ +(^|\.)newspeak\.cc$ +(^|\.)news\.seehua\.com$ +(^|\.)news\.sina\.com\.hk$ +(^|\.)news\.sina\.com\.tw$ +(^|\.)news\.sinchew\.com\.my$ +(^|\.)news\.singtao\.ca$ +(^|\.)newstamago\.com$ +(^|\.)newstapa\.org$ +(^|\.)newstarnet\.com$ +(^|\.)news\.tvb\.com$ +(^|\.)news\.tvbs\.com\.tw$ +(^|\.)news\.yahoo\.com$ +(^|\.)newtaiwan\.com\.tw$ +(^|\.)newtalk\.tw$ +(^|\.)newyorktimes\.com$ +(^|\.)nexon\.com$ +(^|\.)next11\.co\.jp$ +(^|\.)nextmag\.com\.tw$ +(^|\.)nextmedia\.com$ +(^|\.)nexton-net\.jp$ +(^|\.)nexttv\.com\.tw$ +(^|\.)nf\.id\.au$ +(^|\.)nfjtyd\.com$ +(^|\.)nflxext\.com$ +(^|\.)nflximg\.com$ +(^|\.)nflximg\.net$ +(^|\.)nflxso\.net$ +(^|\.)nflxvideo\.net$ +(^|\.)nga\.mil$ +(^|\.)ngensis\.com$ +(^|\.)nhentai\.net$ +(^|\.)nhi\.gov\.tw$ +(^|\.)nhk-ondemand\.jp$ +(^|\.)nic\.cz\.cc$ +(^|\.)nic\.google$ +(^|\.)nic\.gov$ +(^|\.)nicovideo\.jp$ +(^|\.)nighost\.org$ +(^|\.)nikkei\.com$ +(^|\.)ninecommentaries\.com$ +(^|\.)ninjacloak\.com$ +(^|\.)ninjaproxy\.ninja$ +(^|\.)nintendium\.com$ +(^|\.)ninth\.biz$ +(^|\.)niu\.moe$ +(^|\.)niusnews\.com$ +(^|\.)njactb\.org$ +(^|\.)njuice\.com$ +(^|\.)nko\.navy\.mil$ +(^|\.)nlfreevpn\.com$ +(^|\.)nobelprize\.org$ +(^|\.)nobel\.se$ +(^|\.)nobodycanstop\.us$ +(^|\.)nofile\.io$ +(^|\.)no-ip\.org$ +(^|\.)nokogiri\.org$ +(^|\.)nokola\.com$ +(^|\.)noodlevpn\.com$ +(^|\.)norbulingka\.org$ +(^|\.)nordstrom\.com$ +(^|\.)nordstromimage\.com$ +(^|\.)nordstromrack\.com$ +(^|\.)nordvpn\.com$ +(^|\.)notify\.dropboxapi\.com$ +(^|\.)nottinghampost\.com$ +(^|\.)novelasia\.com$ +(^|\.)now\.com$ +(^|\.)now\.im$ +(^|\.)nownews\.com$ +(^|\.)nowtorrents\.com$ +(^|\.)noypf\.com$ +(^|\.)npa\.go\.jp$ +(^|\.)npa\.gov\.tw$ +(^|\.)npnt\.me$ +(^|\.)npsboost\.com$ +(^|\.)nps\.gov$ +(^|\.)nradio\.me$ +(^|\.)nrk\.no$ +(^|\.)ns01\.biz$ +(^|\.)ns01\.info$ +(^|\.)ns01\.us$ +(^|\.)ns02\.biz$ +(^|\.)ns02\.info$ +(^|\.)ns02\.us$ +(^|\.)ns1\.name$ +(^|\.)ns2\.name$ +(^|\.)ns3\.name$ +(^|\.)nsc\.gov\.tw$ +(^|\.)ntbk\.gov\.tw$ +(^|\.)ntbna\.gov\.tw$ +(^|\.)ntbt\.gov\.tw$ +(^|\.)ntd\.tv$ +(^|\.)ntdtv\.ca$ +(^|\.)ntdtv\.co\.kr$ +(^|\.)ntdtv\.com$ +(^|\.)ntdtv\.cz$ +(^|\.)ntdtvla\.com$ +(^|\.)ntdtv\.org$ +(^|\.)ntdtv\.ru$ +(^|\.)ntrfun\.com$ +(^|\.)ntsna\.gov\.tw$ +(^|\.)nubiles\.net$ +(^|\.)nuexpo\.com$ +(^|\.)nukistream\.com$ +(^|\.)nurgo-software\.com$ +(^|\.)nusatrip\.com$ +(^|\.)nutaku\.net$ +(^|\.)nuuvem\.com$ +(^|\.)nuvid\.com$ +(^|\.)nuzcom\.com$ +(^|\.)nvdst\.com$ +(^|\.)nvquan\.org$ +(^|\.)nvtongzhisheng\.org$ +(^|\.)nwtca\.org$ +(^|\.)nyaa\.eu$ +(^|\.)nyaa\.si$ +(^|\.)nydus\.ca$ +(^|\.)nylon-angel\.com$ +(^|\.)nylonstockingsonline\.com$ +(^|\.)ny\.stgloballink\.com$ +(^|\.)nytchina\.com$ +(^|\.)nytcn\.me$ +(^|\.)nytco\.com$ +(^|\.)nyt\.com$ +(^|\.)nytimes\.com$ +(^|\.)nytimes\.map\.fastly\.net$ +(^|\.)nytimg\.com$ +(^|\.)nyti\.ms$ +(^|\.)nytstyle\.com$ +(^|\.)ny\.visiontimes\.com$ +(^|\.)nzchinese\.com$ +(^|\.)nzchinese\.net\.nz$ +(^|\.)observechina\.net$ +(^|\.)obutu\.com$ +(^|\.)ocaspro\.com$ +(^|\.)occupytiananmen\.com$ +(^|\.)oclp\.hk$ +(^|\.)ocreampies\.com$ +(^|\.)ocry\.com$ +(^|\.)october-review\.org$ +(^|\.)oculuscdn\.com$ +(^|\.)oculus\.com$ +(^|\.)oex\.com$ +(^|\.)offbeatchina\.com$ +(^|\.)officeoftibet\.com$ +(^|\.)ofile\.org$ +(^|\.)ogaoga\.org$ +(^|\.)ogate\.org$ +(^|\.)oikos\.com\.tw$ +(^|\.)oiktv\.com$ +(^|\.)oizoblog\.com$ +(^|\.)okayfreedom\.com$ +(^|\.)okex\.com$ +(^|\.)okk\.tw$ +(^|\.)ok\.ru$ +(^|\.)old-cat\.net$ +(^|\.)old\.honeynet\.org$ +(^|\.)old\.nabble\.com$ +(^|\.)olumpo\.com$ +(^|\.)olympicwatch\.org$ +(^|\.)omgili\.com$ +(^|\.)omni7\.jp$ +(^|\.)omnitalk\.com$ +(^|\.)omnitalk\.org$ +(^|\.)on2\.com$ +(^|\.)onapp\.com$ +(^|\.)on\.cc$ +(^|\.)onedrive\.live\.com$ +(^|\.)onedumb\.com$ +(^|\.)onejav\.com$ +(^|\.)onion\.city$ +(^|\.)onlinecha\.com$ +(^|\.)online\.recoveryversion\.org$ +(^|\.)onlineyoutube\.com$ +(^|\.)onlytweets\.com$ +(^|\.)onmoon\.com$ +(^|\.)onmoon\.net$ +(^|\.)onmypc\.biz$ +(^|\.)onmypc\.info$ +(^|\.)onmypc\.net$ +(^|\.)onmypc\.org$ +(^|\.)onmypc\.us$ +(^|\.)onthehunt\.com$ +(^|\.)ontrac\.com$ +(^|\.)oopsforum\.com$ +(^|\.)openallweb\.com$ +(^|\.)open\.com\.hk$ +(^|\.)opendemocracy\.net$ +(^|\.)opendn\.xyz$ +(^|\.)openervpn\.in$ +(^|\.)openid\.net$ +(^|\.)openleaks\.org$ +(^|\.)openvpn\.net$ +(^|\.)openvpn\.org$ +(^|\.)openwebster\.com$ +(^|\.)openwrt\.org\.cn$ +(^|\.)opml\.radiotime\.com$ +(^|\.)opus-gaming\.com$ +(^|\.)organcare\.org\.tw$ +(^|\.)organharvestinvestigation\.net$ +(^|\.)organiccrap\.com$ +(^|\.)orgasm\.com$ +(^|\.)orgfree\.com$ +(^|\.)orientaldaily\.com\.my$ +(^|\.)orient-doll\.com$ +(^|\.)orn\.jp$ +(^|\.)orzistic\.org$ +(^|\.)osfoora\.com$ +(^|\.)otcbtc\.com$ +(^|\.)otnd\.org$ +(^|\.)otto\.de$ +(^|\.)otzo\.com$ +(^|\.)ourdearamy\.com$ +(^|\.)ourhobby\.com$ +(^|\.)oursogo\.com$ +(^|\.)oursteps\.com\.au$ +(^|\.)oursweb\.net$ +(^|\.)ourtv\.hk$ +(^|\.)overplay\.net$ +(^|\.)oversea\.istarshine\.com$ +(^|\.)owl\.li$ +(^|\.)ow\.ly$ +(^|\.)oyax\.com$ +(^|\.)oyghan\.com$ +(^|\.)ozchinese\.com$ +(^|\.)ozvoice\.org$ +(^|\.)ozxw\.com$ +(^|\.)ozyoyo\.com$ +(^|\.)pachosting\.com$ +(^|\.)pacificpoker\.com$ +(^|\.)packages\.debian\.org$ +(^|\.)packetix\.net$ +(^|\.)pacopacomama\.com$ +(^|\.)padmanet\.com$ +(^|\.)page2rss\.com$ +(^|\.)page\.bid\.yahoo\.com$ +(^|\.)pagodabox\.com$ +(^|\.)palacemoon\.com$ +(^|\.)paldengyal\.com$ +(^|\.)paljorpublications\.com$ +(^|\.)paltalk\.com$ +(^|\.)panamapapers\.sueddeutsche\.de$ +(^|\.)pandapow\.co$ +(^|\.)pandapow\.net$ +(^|\.)pandavpn-jp\.com$ +(^|\.)pandora\.com$ +(^|\.)pandora\.tv$ +(^|\.)panluan\.net$ +(^|\.)panoramio\.com$ +(^|\.)pao-pao\.net$ +(^|\.)paperb\.us$ +(^|\.)paper\.li$ +(^|\.)paradisehill\.cc$ +(^|\.)paradisepoker\.com$ +(^|\.)parkansky\.com$ +(^|\.)partycasino\.com$ +(^|\.)partypoker\.com$ +(^|\.)passion\.com$ +(^|\.)passiontimes\.hk$ +(^|\.)pastebin\.com$ +(^|\.)paste\.ee$ +(^|\.)pastie\.org$ +(^|\.)pbs\.org$ +(^|\.)pbwiki\.com$ +(^|\.)pbworks\.com$ +(^|\.)pbxes\.com$ +(^|\.)pbxes\.org$ +(^|\.)pcanywhere\.net$ +(^|\.)pcc\.gov\.tw$ +(^|\.)pcdvd\.com\.tw$ +(^|\.)pchome\.com\.tw$ +(^|\.)pcij\.org$ +(^|\.)pcstore\.com\.tw$ +(^|\.)pct\.org\.tw$ +(^|\.)pdetails\.com$ +(^|\.)pdproxy\.com$ +(^|\.)pds\.nasa\.gov$ +(^|\.)peace\.ca$ +(^|\.)peacefire\.org$ +(^|\.)peacehall\.com$ +(^|\.)pearlher\.org$ +(^|\.)peeasian\.com$ +(^|\.)pekingduck\.org$ +(^|\.)pemulihan\.or\.id$ +(^|\.)penchinese\.com$ +(^|\.)penchinese\.net$ +(^|\.)pengyulong\.com$ +(^|\.)pen\.io$ +(^|\.)penisbot\.com$ +(^|\.)penthouse\.com$ +(^|\.)pentoy\.hk$ +(^|\.)peoplebookcafe\.com$ +(^|\.)peoplenews\.tw$ +(^|\.)peopo\.org$ +(^|\.)percy\.in$ +(^|\.)perfectgirls\.net$ +(^|\.)perfectvpn\.net$ +(^|\.)periscope\.tv$ +(^|\.)persecutionblog\.com$ +(^|\.)persiankitty\.com$ +(^|\.)pfd\.org\.hk$ +(^|\.)phapluan\.org$ +(^|\.)phayul\.com$ +(^|\.)philborges\.com$ +(^|\.)philly\.com$ +(^|\.)phmsociety\.org$ +(^|\.)phncdn\.com$ +(^|\.)phobos\.apple\.com$ +(^|\.)phosphation13\.rssing\.com$ +(^|\.)photodharma\.net$ +(^|\.)photofocus\.com$ +(^|\.)phuquocservices\.com$ +(^|\.)picacomiccn\.com$ +(^|\.)picacomic\.com$ +(^|\.)picasaweb\.com$ +(^|\.)picidae\.net$ +(^|\.)picturedip\.com$ +(^|\.)picturesocial\.com$ +(^|\.)pictures\.playboy\.com$ +(^|\.)pimg\.tw$ +(^|\.)pin6\.com$ +(^|\.)pin-cong\.com$ +(^|\.)pincong\.rocks$ +(^|\.)ping\.fm$ +(^|\.)pinimg\.com$ +(^|\.)pinkrod\.com$ +(^|\.)pinoy-n\.com$ +(^|\.)pinterest\.at$ +(^|\.)pinterest\.ca$ +(^|\.)pinterest\.co\.kr$ +(^|\.)pinterest\.com$ +(^|\.)pinterest\.co\.uk$ +(^|\.)pinterest\.de$ +(^|\.)pinterest\.dk$ +(^|\.)pinterest\.fr$ +(^|\.)pinterest\.jp$ +(^|\.)pinterest\.nl$ +(^|\.)pinterest\.se$ +(^|\.)pioneer-worker\.forums-free\.com$ +(^|\.)pipii\.tv$ +(^|\.)piposay\.com$ +(^|\.)piraattilahti\.org$ +(^|\.)piring\.com$ +(^|\.)pixelqi\.com$ +(^|\.)pixiv\.net$ +(^|\.)pixnet\.net$ +(^|\.)pk\.com$ +(^|\.)pki\.goog$ +(^|\.)placemix\.com$ +(^|\.)playboy\.com$ +(^|\.)playboyplus\.com$ +(^|\.)player\.fm$ +(^|\.)playno1\.com$ +(^|\.)playpcesor\.com$ +(^|\.)plays\.com\.tw$ +(^|\.)plm\.org\.hk$ +(^|\.)plunder\.com$ +(^|\.)plurk\.com$ +(^|\.)plus28\.com$ +(^|\.)plusbb\.com$ +(^|\.)plus\.codes$ +(^|\.)pmatehunter\.com$ +(^|\.)pmates\.com$ +(^|\.)po2b\.com$ +(^|\.)pobieramy\.top$ +(^|\.)podictionary\.com$ +(^|\.)pokerstars\.com$ +(^|\.)pokerstars\.net$ +(^|\.)politicalchina\.org$ +(^|\.)politicalconsultation\.org$ +(^|\.)politiscales\.net$ +(^|\.)poloniex\.com$ +(^|\.)polymerhk\.com$ +(^|\.)polymer-project\.org$ +(^|\.)popo\.tw$ +(^|\.)popvote\.hk$ +(^|\.)popyard\.com$ +(^|\.)popyard\.org$ +(^|\.)porn2\.com$ +(^|\.)porn5\.com$ +(^|\.)pornbase\.org$ +(^|\.)porn\.com$ +(^|\.)pornerbros\.com$ +(^|\.)pornhd\.com$ +(^|\.)pornhost\.com$ +(^|\.)pornhub\.com$ +(^|\.)pornhubdeutsch\.net$ +(^|\.)pornmm\.net$ +(^|\.)pornoxo\.com$ +(^|\.)pornrapidshare\.com$ +(^|\.)pornsharing\.com$ +(^|\.)pornsocket\.com$ +(^|\.)pornstarclub\.com$ +(^|\.)porntube\.com$ +(^|\.)porntubenews\.com$ +(^|\.)porntvblog\.com$ +(^|\.)pornvisit\.com$ +(^|\.)port25\.biz$ +(^|\.)portablevpn\.nl$ +(^|\.)poskotanews\.com$ +(^|\.)post01\.com$ +(^|\.)post76\.com$ +(^|\.)post852\.com$ +(^|\.)postadult\.com$ +(^|\.)postimg\.org$ +(^|\.)potato\.im$ +(^|\.)potvpn\.com$ +(^|\.)powerapple\.com$ +(^|\.)power\.com$ +(^|\.)powercx\.com$ +(^|\.)powerphoto\.org$ +(^|\.)prayforchina\.net$ +(^|\.)premeforwindows7\.com$ +(^|\.)premproxy\.com$ +(^|\.)presentationzen\.com$ +(^|\.)presidentlee\.tw$ +(^|\.)prestige-av\.com$ +(^|\.)pride\.google$ +(^|\.)prism-break\.org$ +(^|\.)prisoneralert\.com$ +(^|\.)pritunl\.com$ +(^|\.)privacybox\.de$ +(^|\.)private\.com$ +(^|\.)privateinternetaccess\.com$ +(^|\.)privatepaste\.com$ +(^|\.)privatetunnel\.com$ +(^|\.)privatevpn\.com$ +(^|\.)procopytips\.com$ +(^|\.)prosiben\.de$ +(^|\.)protonvpn\.com$ +(^|\.)provideocoalition\.com$ +(^|\.)provpnaccounts\.com$ +(^|\.)proxfree\.com$ +(^|\.)proxifier\.com$ +(^|\.)proxomitron\.info$ +(^|\.)proxpn\.com$ +(^|\.)proxyanonimo\.es$ +(^|\.)proxydns\.com$ +(^|\.)proxylist\.org\.uk$ +(^|\.)proxynetwork\.org\.uk$ +(^|\.)proxypy\.net$ +(^|\.)proxyroad\.com$ +(^|\.)proxytunnel\.net$ +(^|\.)proyectoclubes\.com$ +(^|\.)prozz\.net$ +(^|\.)psblog\.name$ +(^|\.)pscp\.tv$ +(^|\.)psiphon3\.com$ +(^|\.)psiphon\.ca$ +(^|\.)psiphon\.civisec\.org$ +(^|\.)psiphontoday\.com$ +(^|\.)pts\.org\.tw$ +(^|\.)ptt\.cc$ +(^|\.)pttvan\.org$ +(^|\.)pubu\.com\.tw$ +(^|\.)puffinbrowser\.com$ +(^|\.)puffstore\.com$ +(^|\.)pullfolio\.com$ +(^|\.)pulse\.yahoo\.com$ +(^|\.)punyu\.com$ +(^|\.)pure18\.com$ +(^|\.)pureconcepts\.net$ +(^|\.)pureinsight\.org$ +(^|\.)purepdf\.com$ +(^|\.)purevpn\.com$ +(^|\.)purplelotus\.org$ +(^|\.)pursuestar\.com$ +(^|\.)pushchinawall\.com$ +(^|\.)pussyspace\.com$ +(^|\.)putihome\.org$ +(^|\.)putlocker\.com$ +(^|\.)putty\.org$ +(^|\.)puuko\.com$ +(^|\.)pwned\.com$ +(^|\.)python\.com$ +(^|\.)python\.com\.tw$ +(^|\.)pythonhackers\.com$ +(^|\.)pytorch\.org$ +(^|\.)qanote\.com$ +(^|\.)qgirl\.com\.tw$ +(^|\.)qhigh\.com$ +(^|\.)qiandao\.today$ +(^|\.)qiangyou\.org$ +(^|\.)qidian\.ca$ +(^|\.)qienkuen\.org$ +(^|\.)qi-gong\.me$ +(^|\.)qiwen\.lu$ +(^|\.)qixianglu\.cn$ +(^|\.)qkshare\.com$ +(^|\.)qoos\.com$ +(^|\.)qpoe\.com$ +(^|\.)qq\.co\.za$ +(^|\.)qstatus\.com$ +(^|\.)qtrac\.eu$ +(^|\.)qtweeter\.com$ +(^|\.)quannengshen\.org$ +(^|\.)quantumbooter\.net$ +(^|\.)questvisual\.com$ +(^|\.)quitccp\.net$ +(^|\.)quitccp\.org$ +(^|\.)quoracdn\.net$ +(^|\.)quora\.com$ +(^|\.)quran\.com$ +(^|\.)quranexplorer\.com$ +(^|\.)qusi8\.net$ +(^|\.)qvodzy\.org$ +(^|\.)qxbbs\.org$ +(^|\.)qz\.com$ +(^|\.)r18\.com$ +(^|\.)radicalparty\.org$ +(^|\.)radiko\.jp$ +(^|\.)radioaustralia\.net\.au$ +(^|\.)radiohilight\.net$ +(^|\.)radiovaticana\.org$ +(^|\.)radiovncr\.com$ +(^|\.)rael\.org$ +(^|\.)ra\.gg$ +(^|\.)raggedbanner\.com$ +(^|\.)raidcall\.com\.tw$ +(^|\.)raidtalk\.com\.tw$ +(^|\.)rainbowplan\.org$ +(^|\.)raindrop\.io$ +(^|\.)raizoji\.or\.jp$ +(^|\.)ramcity\.com\.au$ +(^|\.)rangwang\.biz$ +(^|\.)rangzen\.com$ +(^|\.)rangzen\.net$ +(^|\.)rangzen\.org$ +(^|\.)ranyunfei\.com$ +(^|\.)rapbull\.net$ +(^|\.)rapidgator\.net$ +(^|\.)rapidmoviez\.com$ +(^|\.)rapidvpn\.com$ +(^|\.)rarbgprx\.org$ +(^|\.)raremovie\.cc$ +(^|\.)raremovie\.net$ +(^|\.)rawgit\.com$ +(^|\.)rawgithub\.com$ +(^|\.)raw\.githubusercontent\.com$ +(^|\.)razyboard\.com$ +(^|\.)rcam\.target\.com$ +(^|\.)rcinet\.ca$ +(^|\.)rconversation\.blogs\.com$ +(^|\.)rd\.com$ +(^|\.)rdio\.com$ +(^|\.)read01\.com$ +(^|\.)read100\.com$ +(^|\.)readingtimes\.com\.tw$ +(^|\.)readmoo\.com$ +(^|\.)readydown\.com$ +(^|\.)realcourage\.org$ +(^|\.)realforum\.zkiz\.com$ +(^|\.)realitykings\.com$ +(^|\.)realraptalk\.com$ +(^|\.)realsexpass\.com$ +(^|\.)rebatesrule\.net$ +(^|\.)recordhistory\.org$ +(^|\.)recovery\.org\.tw$ +(^|\.)recoveryversion\.com\.tw$ +(^|\.)redballoonsolidarity\.org$ +(^|\.)redchinacn\.net$ +(^|\.)redchinacn\.org$ +(^|\.)redd\.it$ +(^|\.)reddit\.com$ +(^|\.)redditlist\.com$ +(^|\.)redditmedia\.com$ +(^|\.)redditstatic\.com$ +(^|\.)redhotlabs\.com$ +(^|\.)red-lang\.org$ +(^|\.)redtube\.com$ +(^|\.)referer\.us$ +(^|\.)reflectivecode\.com$ +(^|\.)registry\.google$ +(^|\.)relaxbbs\.com$ +(^|\.)relay\.com\.tw$ +(^|\.)releaseinternational\.org$ +(^|\.)religioustolerance\.org$ +(^|\.)renminbao\.com$ +(^|\.)renyurenquan\.org$ +(^|\.)research\.jmsc\.hku\.hk$ +(^|\.)resilio\.com$ +(^|\.)retweeteffect\.com$ +(^|\.)retweetist\.com$ +(^|\.)retweetrank\.com$ +(^|\.)reuters\.com$ +(^|\.)reutersmedia\.net$ +(^|\.)revleft\.com$ +(^|\.)revver\.com$ +(^|\.)rfachina\.com$ +(^|\.)rfalive1\.akacast\.akamaistream\.net$ +(^|\.)rfamobile\.org$ +(^|\.)rfa\.org$ +(^|\.)rfaweb\.org$ +(^|\.)rferl\.org$ +(^|\.)rfi\.fr$ +(^|\.)rfi\.my$ +(^|\.)rg3\.github\.io$ +(^|\.)rightbtc\.com$ +(^|\.)rigpa\.org$ +(^|\.)riku\.me$ +(^|\.)rileyguide\.com$ +(^|\.)riseup\.net$ +(^|\.)ritouki\.jp$ +(^|\.)ritter\.vg$ +(^|\.)rixcloud\.com$ +(^|\.)rixcloud\.us$ +(^|\.)rlwlw\.com$ +(^|\.)rmjdw132\.info$ +(^|\.)rmjdw\.com$ +(^|\.)roadshow\.hk$ +(^|\.)roboforex\.com$ +(^|\.)robustnessiskey\.com$ +(^|\.)rocket-inc\.net$ +(^|\.)rocksdb\.org$ +(^|\.)rojo\.com$ +(^|\.)rolia\.net$ +(^|\.)ronjoneswriter\.com$ +(^|\.)roodo\.com$ +(^|\.)rosechina\.net$ +(^|\.)rotten\.com$ +(^|\.)rsdlmonitor\.com$ +(^|\.)rsf-chinese\.org$ +(^|\.)rsf\.org$ +(^|\.)rsgamen\.org$ +(^|\.)rssmeme\.com$ +(^|\.)rtalabel\.org$ +(^|\.)rthk\.hk$ +(^|\.)rthklive2-lh\.akamaihd\.net$ +(^|\.)rthk\.org\.hk$ +(^|\.)rti\.org\.tw$ +(^|\.)rtycminnesota\.org$ +(^|\.)ruanyifeng\.com$ +(^|\.)rukor\.org$ +(^|\.)runbtx\.com$ +(^|\.)rushbee\.com$ +(^|\.)ruten\.com\.tw$ +(^|\.)rutube\.ru$ +(^|\.)ruyiseek\.com$ +(^|\.)rxhj\.net$ +(^|\.)s1heng\.com$ +(^|\.)s1\.nudezz\.com$ +(^|\.)s1s1s1\.com$ +(^|\.)s3\.amazonaws\.com$ +(^|\.)s3-ap-northeast-1\.amazonaws\.com$ +(^|\.)s3-ap-southeast-2\.amazonaws\.com$ +(^|\.)s8forum\.com$ +(^|\.)sacks\.com$ +(^|\.)sacom\.hk$ +(^|\.)sadistic-v\.com$ +(^|\.)sadpanda\.us$ +(^|\.)safervpn\.com$ +(^|\.)safety\.google$ +(^|\.)sa\.hao123\.com$ +(^|\.)saintyculture\.com$ +(^|\.)saiq\.me$ +(^|\.)sakuralive\.com$ +(^|\.)sakya\.org$ +(^|\.)salvation\.org\.hk$ +(^|\.)samair\.ru$ +(^|\.)sambhota\.org$ +(^|\.)sanmin\.com\.tw$ +(^|\.)sapikachu\.net$ +(^|\.)saveliuxiaobo\.com$ +(^|\.)savemedia\.com$ +(^|\.)savethedate\.foo$ +(^|\.)savethesounds\.info$ +(^|\.)savetibet\.de$ +(^|\.)savetibet\.fr$ +(^|\.)savetibet\.nl$ +(^|\.)savetibet\.org$ +(^|\.)savetibet\.ru$ +(^|\.)savetibetstore\.org$ +(^|\.)savevid\.com$ +(^|\.)say2\.info$ +(^|\.)sbme\.me$ +(^|\.)sbs\.com\.au$ +(^|\.)scache1\.vzw\.com$ +(^|\.)scache2\.vzw\.com$ +(^|\.)scache\.vzw\.com$ +(^|\.)scasino\.com$ +(^|\.)schema\.org$ +(^|\.)sciencenets\.com$ +(^|\.)scieron\.com$ +(^|\.)scmpchinese\.com$ +(^|\.)scmp\.com$ +(^|\.)scramble\.io$ +(^|\.)scribd\.com$ +(^|\.)scriptspot\.com$ +(^|\.)s-cute\.com$ +(^|\.)s-dragon\.org$ +(^|\.)seapuff\.com$ +(^|\.)search\.aol\.com$ +(^|\.)searchtruth\.com$ +(^|\.)search\.xxx$ +(^|\.)search\.yahoo\.co\.jp$ +(^|\.)search\.yahoo\.com$ +(^|\.)secretchina\.com$ +(^|\.)secretgarden\.no$ +(^|\.)secretsline\.biz$ +(^|\.)secure\.hustler\.com$ +(^|\.)secure\.logmein\.com$ +(^|\.)secure\.raxcdn\.com$ +(^|\.)securetunnel\.com$ +(^|\.)securityinabox\.org$ +(^|\.)securitykiss\.com$ +(^|\.)seed4\.me$ +(^|\.)seesmic\.com$ +(^|\.)seevpn\.com$ +(^|\.)seezone\.net$ +(^|\.)sejie\.com$ +(^|\.)sellclassics\.com$ +(^|\.)sendsmtp\.com$ +(^|\.)sendspace\.com$ +(^|\.)servehttp\.com$ +(^|\.)serveuser\.com$ +(^|\.)serveusers\.com$ +(^|\.)sesawe\.net$ +(^|\.)sesawe\.org$ +(^|\.)sethwklein\.net$ +(^|\.)setn\.com$ +(^|\.)settv\.com\.tw$ +(^|\.)sevenload\.com$ +(^|\.)sex-11\.com$ +(^|\.)sex3\.com$ +(^|\.)sex8\.cc$ +(^|\.)sexandsubmission\.com$ +(^|\.)sexbot\.com$ +(^|\.)sex\.com$ +(^|\.)sexhuang\.com$ +(^|\.)sexhu\.com$ +(^|\.)sexidude\.com$ +(^|\.)sexinsex\.net$ +(^|\.)sextvx\.com$ +(^|\.)sexxxy\.biz$ +(^|\.)sfileydy\.com$ +(^|\.)sf\.net$ +(^|\.)sfshibao\.com$ +(^|\.)sftindia\.org$ +(^|\.)sftuk\.org$ +(^|\.)shadeyouvpn\.com$ +(^|\.)shadow\.ma$ +(^|\.)shadowsky\.xyz$ +(^|\.)shadowsocks9\.com$ +(^|\.)shadowsocks\.asia$ +(^|\.)shadowsocks\.be$ +(^|\.)shadowsocks\.com$ +(^|\.)shadowsocks\.com\.hk$ +(^|\.)shadowsocks\.org$ +(^|\.)shadowsocks-r\.com$ +(^|\.)shambalapost\.com$ +(^|\.)shambhalasun\.com$ +(^|\.)shangfang\.org$ +(^|\.)shapeservices\.com$ +(^|\.)share\.america\.gov$ +(^|\.)sharebee\.com$ +(^|\.)sharecool\.org$ +(^|\.)share\.dmhy\.org$ +(^|\.)share\.ovi\.com$ +(^|\.)share\.youthwant\.com\.tw$ +(^|\.)sharpdaily\.com\.hk$ +(^|\.)sharpdaily\.hk$ +(^|\.)sharpdaily\.tw$ +(^|\.)shattered\.io$ +(^|\.)shat-tibet\.com$ +(^|\.)sheikyermami\.com$ +(^|\.)shellfire\.de$ +(^|\.)shenshou\.org$ +(^|\.)shenyun\.com$ +(^|\.)shenyunperformingarts\.org$ +(^|\.)shenzhoufilm\.com$ +(^|\.)sherabgyaltsen\.com$ +(^|\.)shiatv\.net$ +(^|\.)shicheng\.org$ +(^|\.)shiksha\.com$ +(^|\.)shinychan\.com$ +(^|\.)shipcamouflage\.com$ +(^|\.)shireyishunjian\.com$ +(^|\.)shitaotv\.org$ +(^|\.)shixiao\.org$ +(^|\.)shizhao\.org$ +(^|\.)shkspr\.mobi$ +(^|\.)shodanhq\.com$ +(^|\.)shooshtime\.com$ +(^|\.)shop2000\.com\.tw$ +(^|\.)shopping\.com$ +(^|\.)showbiz\.omy\.sg$ +(^|\.)showhaotu\.com$ +(^|\.)showtime\.jp$ +(^|\.)shutterstock\.com$ +(^|\.)shwchurch3\.com$ +(^|\.)shwchurch\.org$ +(^|\.)siddharthasintent\.org$ +(^|\.)sidelinesnews\.com$ +(^|\.)sidelinessportseatery\.com$ +(^|\.)sierrafriendsoftibet\.org$ +(^|\.)sijihuisuo\.club$ +(^|\.)sijihuisuo\.com$ +(^|\.)sikaozhe1997\.github\.io$ +(^|\.)silkbook\.com$ +(^|\.)simbolostwitter\.com$ +(^|\.)simplecd\.org$ +(^|\.)simpleproductivityblog\.com$ +(^|\.)sinchew\.com\.my$ +(^|\.)singaporepools\.com\.sg$ +(^|\.)singfortibet\.com$ +(^|\.)singpao\.com\.hk$ +(^|\.)singtao\.com$ +(^|\.)singtaousa\.com$ +(^|\.)sinoants\.com$ +(^|\.)sinocast\.com$ +(^|\.)sinocism\.com$ +(^|\.)sino-monthly\.com$ +(^|\.)sinomontreal\.ca$ +(^|\.)sinonet\.ca$ +(^|\.)sinopitt\.info$ +(^|\.)sinoquebec\.com$ +(^|\.)sipml5\.org$ +(^|\.)sis001\.com$ +(^|\.)sis001\.us$ +(^|\.)sis\.xxx$ +(^|\.)site2unblock\.com$ +(^|\.)site90\.net$ +(^|\.)sitebro\.tw$ +(^|\.)sitekreator\.com$ +(^|\.)siteks\.uk\.to$ +(^|\.)sitemaps\.org$ +(^|\.)six-degrees\.io$ +(^|\.)sixth\.biz$ +(^|\.)sjrt\.org$ +(^|\.)sjum\.cn$ +(^|\.)sketchappsources\.com$ +(^|\.)skimtube\.com$ +(^|\.)skybet\.com$ +(^|\.)skyking\.com\.tw$ +(^|\.)skyvegas\.com$ +(^|\.)skyxvpn\.com$ +(^|\.)slacker\.com$ +(^|\.)slaytizle\.com$ +(^|\.)sleazydream\.com$ +(^|\.)slheng\.com$ +(^|\.)slickvpn\.com$ +(^|\.)slideshare\.net$ +(^|\.)slinkset\.com$ +(^|\.)slutload\.com$ +(^|\.)slutmoonbeam\.com$ +(^|\.)slyip\.com$ +(^|\.)slyip\.net$ +(^|\.)smartdnsproxy\.com$ +(^|\.)smarthide\.com$ +(^|\.)smchbooks\.com$ +(^|\.)smh\.com\.au$ +(^|\.)smhric\.org$ +(^|\.)smith\.edu$ +(^|\.)sm-miracle\.com$ +(^|\.)smyxy\.org$ +(^|\.)snapchat\.com$ +(^|\.)snaptu\.com$ +(^|\.)sndcdn\.com$ +(^|\.)sneakme\.net$ +(^|\.)snowlionpub\.com$ +(^|\.)sobees\.com$ +(^|\.)socialwhale\.com$ +(^|\.)sockscap64\.com$ +(^|\.)sockslist\.net$ +(^|\.)socks-proxy\.net$ +(^|\.)soc\.mil$ +(^|\.)socrec\.org$ +(^|\.)sodatea\.github\.io$ +(^|\.)sod\.co\.jp$ +(^|\.)softether\.co\.jp$ +(^|\.)softether-download\.com$ +(^|\.)softether\.org$ +(^|\.)softfamous\.com$ +(^|\.)softsmirror\.cf$ +(^|\.)softwarebychuck\.com$ +(^|\.)softwaredownload\.gitbooks\.io$ +(^|\.)sogclub\.com$ +(^|\.)sogrady\.me$ +(^|\.)sohcradio\.com$ +(^|\.)sohfrance\.org$ +(^|\.)soh\.tw$ +(^|\.)sokamonline\.com$ +(^|\.)sokmil\.com$ +(^|\.)solarsystem\.nasa\.gov$ +(^|\.)solidaritetibet\.org$ +(^|\.)solidfiles\.com$ +(^|\.)somee\.com$ +(^|\.)songjianjun\.com$ +(^|\.)sonicbbs\.cc$ +(^|\.)sonidodelaesperanza\.org$ +(^|\.)sopcast\.com$ +(^|\.)sopcast\.org$ +(^|\.)sorazone\.net$ +(^|\.)sorting-algorithms\.com$ +(^|\.)sos\.org$ +(^|\.)sosreader\.com$ +(^|\.)sostibet\.org$ +(^|\.)soubory\.com$ +(^|\.)soulcaliburhentai\.net$ +(^|\.)soul-plus\.net$ +(^|\.)soumo\.info$ +(^|\.)soundcloud\.com$ +(^|\.)soundofhope\.kr$ +(^|\.)soundofhope\.org$ +(^|\.)soup\.io$ +(^|\.)soupofmedia\.com$ +(^|\.)sourceforge\.net$ +(^|\.)sourcewadio\.com$ +(^|\.)southnews\.com\.tw$ +(^|\.)sowers\.org\.hk$ +(^|\.)soylentnews\.org$ +(^|\.)spaces\.hightail\.com$ +(^|\.)spankbang\.com$ +(^|\.)spankingtube\.com$ +(^|\.)spankwire\.com$ +(^|\.)spb\.com$ +(^|\.)speakerdeck\.com$ +(^|\.)specxinzl\.jigsy\.com$ +(^|\.)speedify\.com$ +(^|\.)spem\.at$ +(^|\.)spencertipping\.com$ +(^|\.)spendee\.com$ +(^|\.)spicevpn\.com$ +(^|\.)spideroak\.com$ +(^|\.)spike\.com$ +(^|\.)sports\.williamhill\.com$ +(^|\.)spotflux\.com$ +(^|\.)spotify\.com$ +(^|\.)spreadshirt\.es$ +(^|\.)spring4u\.info$ +(^|\.)springboardplatform\.com$ +(^|\.)sprite\.org$ +(^|\.)sproutcore\.com$ +(^|\.)sproxy\.info$ +(^|\.)squirly\.info$ +(^|\.)srcf\.ucam\.org$ +(^|\.)srocket\.us$ +(^|\.)ss7\.vzw\.com$ +(^|\.)ss\.carryzhou\.com$ +(^|\.)ssglobal\.co$ +(^|\.)ssglobal\.me$ +(^|\.)ssh91\.com$ +(^|\.)ssl443\.org$ +(^|\.)ss\.levyhsu\.com$ +(^|\.)ss-link\.com$ +(^|\.)ssl\.webpack\.de$ +(^|\.)sspanel\.net$ +(^|\.)sspro\.ml$ +(^|\.)ss\.pythonic\.life$ +(^|\.)ssrshare\.com$ +(^|\.)ssr\.tools$ +(^|\.)sss\.camp$ +(^|\.)sstmlt\.moe$ +(^|\.)sstmlt\.net$ +(^|\.)stackoverflow\.com$ +(^|\.)stage64\.hk$ +(^|\.)standupfortibet\.org$ +(^|\.)stanford\.edu$ +(^|\.)starfishfx\.com$ +(^|\.)starp2p\.com$ +(^|\.)startpage\.com$ +(^|\.)startuplivingchina\.com$ +(^|\.)stat\.gov\.tw$ +(^|\.)static01\.nyt\.com$ +(^|\.)static\.comico\.tw$ +(^|\.)static-economist\.com$ +(^|\.)staticflickr\.com$ +(^|\.)static\.shemalez\.com$ +(^|\.)statueofdemocracy\.org$ +(^|\.)stc\.com\.sa$ +(^|\.)steamcommunity\.com$ +(^|\.)steel-storm\.com$ +(^|\.)steemit\.com$ +(^|\.)steganos\.com$ +(^|\.)steganos\.net$ +(^|\.)stepchina\.com$ +(^|\.)stephaniered\.com$ +(^|\.)sthoo\.com$ +(^|\.)stickam\.com$ +(^|\.)stickeraction\.com$ +(^|\.)stileproject\.com$ +(^|\.)sto\.cc$ +(^|\.)stoporganharvesting\.org$ +(^|\.)stoptibetcrisis\.net$ +(^|\.)storagenewsletter\.com$ +(^|\.)store\.steampowered\.com$ +(^|\.)stories\.google$ +(^|\.)storify\.com$ +(^|\.)stormmediagroup\.com$ +(^|\.)storm\.mg$ +(^|\.)stoweboyd\.com$ +(^|\.)stranabg\.com$ +(^|\.)straplessdildo\.com$ +(^|\.)streamingthe\.net$ +(^|\.)streema\.com$ +(^|\.)strikingly\.com$ +(^|\.)strongvpn\.com$ +(^|\.)strongwindpress\.com$ +(^|\.)studentsforafreetibet\.org$ +(^|\.)student\.tw$ +(^|\.)stumbleupon\.com$ +(^|\.)stupidvideos\.com$ +(^|\.)subacme\.rerouted\.org$ +(^|\.)successfn\.com$ +(^|\.)sugarsync\.com$ +(^|\.)sugobbs\.com$ +(^|\.)sugumiru18\.com$ +(^|\.)suissl\.com$ +(^|\.)sujiatun\.wordpress\.com$ +(^|\.)sukebei\.nyaa\.si$ +(^|\.)sulian\.me$ +(^|\.)summify\.com$ +(^|\.)sumrando\.com$ +(^|\.)sun1911\.com$ +(^|\.)sunmedia\.ca$ +(^|\.)sunporno\.com$ +(^|\.)sunskyforum\.com$ +(^|\.)sunta\.com\.tw$ +(^|\.)sunvpn\.net$ +(^|\.)sunwinism\.joinbbs\.net$ +(^|\.)suoluo\.org$ +(^|\.)supchina\.com$ +(^|\.)superfreevpn\.com$ +(^|\.)superokayama\.com$ +(^|\.)superpages\.com$ +(^|\.)supervpn\.net$ +(^|\.)superzooi\.com$ +(^|\.)suppig\.net$ +(^|\.)suprememastertv\.com$ +(^|\.)surfeasy\.com$ +(^|\.)surfeasy\.com\.au$ +(^|\.)suroot\.com$ +(^|\.)surrenderat20\.net$ +(^|\.)sustainability\.google$ +(^|\.)suyangg\.com$ +(^|\.)svsfx\.com$ +(^|\.)swagbucks\.com$ +(^|\.)swissinfo\.ch$ +(^|\.)swissvpn\.net$ +(^|\.)switch1\.jp$ +(^|\.)switchvpn\.net$ +(^|\.)sydneytoday\.com$ +(^|\.)sylfoundation\.org$ +(^|\.)syncback\.com$ +(^|\.)synergyse\.com$ +(^|\.)sysresccd\.org$ +(^|\.)sytes\.net$ +(^|\.)szbbs\.net$ +(^|\.)szetowah\.org\.hk$ +(^|\.)t35\.com$ +(^|\.)t66y\.com$ +(^|\.)taa-usa\.org$ +(^|\.)taaze\.tw$ +(^|\.)tabtter\.jp$ +(^|\.)tacc\.cwb\.gov\.tw$ +(^|\.)tacem\.org$ +(^|\.)taconet\.com\.tw$ +(^|\.)taedp\.org\.tw$ +(^|\.)tafm\.org$ +(^|\.)tagwalk\.com$ +(^|\.)tagwa\.org\.au$ +(^|\.)tahr\.org\.tw$ +(^|\.)taipei\.gov\.tw$ +(^|\.)taipeisociety\.org$ +(^|\.)taiwanbible\.com$ +(^|\.)taiwancon\.com$ +(^|\.)taiwandaily\.net$ +(^|\.)taiwandc\.org$ +(^|\.)taiwanjobs\.gov\.tw$ +(^|\.)taiwanjustice\.com$ +(^|\.)taiwanjustice\.net$ +(^|\.)taiwankiss\.com$ +(^|\.)taiwannation\.50webs\.com$ +(^|\.)taiwannation\.com$ +(^|\.)taiwannation\.com\.tw$ +(^|\.)taiwanncf\.org\.tw$ +(^|\.)taiwannews\.com\.tw$ +(^|\.)taiwan-sex\.com$ +(^|\.)taiwantp\.net$ +(^|\.)taiwantt\.org\.tw$ +(^|\.)taiwanus\.net$ +(^|\.)taiwanyes\.com$ +(^|\.)taiwanyes\.ning\.com$ +(^|\.)talk853\.com$ +(^|\.)talkboxapp\.com$ +(^|\.)talkcc\.com$ +(^|\.)talkonly\.net$ +(^|\.)tamiaode\.tk$ +(^|\.)tanc\.org$ +(^|\.)tangben\.com$ +(^|\.)tangren\.us$ +(^|\.)taoism\.net$ +(^|\.)taolun\.info$ +(^|\.)tapanwap\.com$ +(^|\.)tapatalk\.com$ +(^|\.)tarr\.uspto\.gov$ +(^|\.)tascn\.com\.au$ +(^|\.)taup\.net$ +(^|\.)taweet\.com$ +(^|\.)tbcollege\.org$ +(^|\.)tbicn\.org$ +(^|\.)tbi\.org\.hk$ +(^|\.)tbjyt\.org$ +(^|\.)tbpic\.info$ +(^|\.)tbrc\.org$ +(^|\.)tbsec\.org$ +(^|\.)tbskkinabalu\.page\.tl$ +(^|\.)tbsmalaysia\.org$ +(^|\.)tbsn\.org$ +(^|\.)tbs-rainbow\.org$ +(^|\.)tbsseattle\.org$ +(^|\.)tbssqh\.org$ +(^|\.)tbswd\.org$ +(^|\.)tbtemple\.org\.uk$ +(^|\.)tbthouston\.org$ +(^|\.)tccwonline\.org$ +(^|\.)tcewf\.org$ +(^|\.)tchrd\.org$ +(^|\.)tcnynj\.org$ +(^|\.)t\.co$ +(^|\.)tcpspeed\.co$ +(^|\.)tcpspeed\.com$ +(^|\.)tcsofbc\.org$ +(^|\.)tcsovi\.org$ +(^|\.)tdm\.com\.mo$ +(^|\.)teachparentstech\.org$ +(^|\.)teamamericany\.com$ +(^|\.)tech2\.in\.com$ +(^|\.)techviz\.net$ +(^|\.)teck\.in$ +(^|\.)teco-hk\.org$ +(^|\.)teco-mo\.org$ +(^|\.)teddysun\.com$ +(^|\.)teeniefuck\.net$ +(^|\.)teensinasia\.com$ +(^|\.)telecomspace\.com$ +(^|\.)telegram\.dog$ +(^|\.)telegramdownload\.com$ +(^|\.)telegram\.me$ +(^|\.)telegram\.org$ +(^|\.)telegraph\.co\.uk$ +(^|\.)telesco\.pe$ +(^|\.)tellme\.pw$ +(^|\.)tenacy\.com$ +(^|\.)tensorflow\.org$ +(^|\.)tenzinpalmo\.com$ +(^|\.)terminus2049\.github\.io$ +(^|\.)tew\.org$ +(^|\.)textnow\.me$ +(^|\.)tfhub\.dev$ +(^|\.)t-g\.com$ +(^|\.)thaicn\.com$ +(^|\.)thb\.gov\.tw$ +(^|\.)theatrum-belli\.com$ +(^|\.)thebcomplex\.com$ +(^|\.)theblemish\.com$ +(^|\.)thebobs\.com$ +(^|\.)thebodyshop-usa\.com$ +(^|\.)thecenter\.mit\.edu$ +(^|\.)thechinabeat\.org$ +(^|\.)thedalailamamovie\.com$ +(^|\.)thedw\.us$ +(^|\.)thefacebook\.com$ +(^|\.)thefrontier\.hk$ +(^|\.)thegioitinhoc\.vn$ +(^|\.)thegly\.com$ +(^|\.)thehots\.info$ +(^|\.)thehousenews\.com$ +(^|\.)thehun\.net$ +(^|\.)theinitium\.com$ +(^|\.)thenewslens\.com$ +(^|\.)thepiratebay\.org$ +(^|\.)theporndude\.com$ +(^|\.)theportalwiki\.com$ +(^|\.)thereallove\.kr$ +(^|\.)therock\.net\.nz$ +(^|\.)thespeeder\.com$ +(^|\.)thestandnews\.com$ +(^|\.)thetibetcenter\.org$ +(^|\.)thetibetconnection\.org$ +(^|\.)thetibetmuseum\.org$ +(^|\.)thetibetpost\.com$ +(^|\.)thetinhat\.com$ +(^|\.)thetrotskymovie\.com$ +(^|\.)thevivekspot\.com$ +(^|\.)thewgo\.org$ +(^|\.)theync\.com$ +(^|\.)th\.hao123\.com$ +(^|\.)thinkgeek\.com$ +(^|\.)thinkingtaiwan\.com$ +(^|\.)thinkwithgoogle\.com$ +(^|\.)thisav\.com$ +(^|\.)thlib\.org$ +(^|\.)thomasbernhard\.org$ +(^|\.)thongdreams\.com$ +(^|\.)threatchaos\.com$ +(^|\.)throughnightsfire\.com$ +(^|\.)thumbzilla\.com$ +(^|\.)thywords\.com$ +(^|\.)thywords\.com\.tw$ +(^|\.)tiananmenduizhi\.com$ +(^|\.)tiananmenmother\.org$ +(^|\.)tiananmenuniv\.com$ +(^|\.)tiananmenuniv\.net$ +(^|\.)tiandixing\.org$ +(^|\.)tianhuayuan\.com$ +(^|\.)tianlawoffice\.com$ +(^|\.)tiantibooks\.org$ +(^|\.)tianti\.io$ +(^|\.)tianyantong\.org\.cn$ +(^|\.)tianzhu\.org$ +(^|\.)tibet3rdpole\.org$ +(^|\.)tibetaction\.net$ +(^|\.)tibetaid\.org$ +(^|\.)tibetalk\.com$ +(^|\.)tibetanaidproject\.org$ +(^|\.)tibetan-alliance\.org$ +(^|\.)tibetanarts\.org$ +(^|\.)tibetanbuddhistinstitute\.org$ +(^|\.)tibetancommunity\.org$ +(^|\.)tibetancommunityuk\.net$ +(^|\.)tibetanculture\.org$ +(^|\.)tibetanfeministcollective\.org$ +(^|\.)tibetan\.fr$ +(^|\.)tibetanjournal\.com$ +(^|\.)tibetanlanguage\.org$ +(^|\.)tibetanliberation\.org$ +(^|\.)tibetanpaintings\.com$ +(^|\.)tibetanphotoproject\.com$ +(^|\.)tibetanpoliticalreview\.org$ +(^|\.)tibetanreview\.net$ +(^|\.)tibetansports\.org$ +(^|\.)tibetanwomen\.org$ +(^|\.)tibetanyouthcongress\.org$ +(^|\.)tibetanyouth\.org$ +(^|\.)tibet\.a\.se$ +(^|\.)tibet\.at$ +(^|\.)tibet\.ca$ +(^|\.)tibetcharity\.dk$ +(^|\.)tibetcharity\.in$ +(^|\.)tibetchild\.org$ +(^|\.)tibetcity\.com$ +(^|\.)tibetcollection\.com$ +(^|\.)tibet\.com$ +(^|\.)tibetcorps\.org$ +(^|\.)tibet-envoy\.eu$ +(^|\.)tibetexpress\.net$ +(^|\.)tibetfocus\.com$ +(^|\.)tibet-foundation\.org$ +(^|\.)tibet\.fr$ +(^|\.)tibetfund\.org$ +(^|\.)tibetgermany\.com$ +(^|\.)tibetgermany\.de$ +(^|\.)tibethaus\.com$ +(^|\.)tibetheritagefund\.org$ +(^|\.)tibethouse\.jp$ +(^|\.)tibethouse\.org$ +(^|\.)tibet-house-trust\.co\.uk$ +(^|\.)tibethouse\.us$ +(^|\.)tibet-info\.net$ +(^|\.)tibetinfonet\.net$ +(^|\.)tibet-initiative\.de$ +(^|\.)tibetjustice\.org$ +(^|\.)tibetkomite\.dk$ +(^|\.)tibetlibre\.free\.fr$ +(^|\.)tibet-munich\.de$ +(^|\.)tibetmuseum\.org$ +(^|\.)tibet\.net$ +(^|\.)tibetnetwork\.org$ +(^|\.)tibet\.nu$ +(^|\.)tibetoffice\.ch$ +(^|\.)tibetoffice\.com\.au$ +(^|\.)tibetoffice\.eu$ +(^|\.)tibetoffice\.org$ +(^|\.)tibetonline\.com$ +(^|\.)tibetonline\.tv$ +(^|\.)tibetoralhistory\.org$ +(^|\.)tibet\.org$ +(^|\.)tibet\.org\.tw$ +(^|\.)tibetpolicy\.eu$ +(^|\.)tibetrelieffund\.co\.uk$ +(^|\.)tibetsites\.com$ +(^|\.)tibet\.sk$ +(^|\.)tibetsociety\.com$ +(^|\.)tibetsun\.com$ +(^|\.)tibetsupportgroup\.org$ +(^|\.)tibetswiss\.ch$ +(^|\.)tibettelegraph\.com$ +(^|\.)tibettimes\.net$ +(^|\.)tibet\.to$ +(^|\.)tibetwrites\.org$ +(^|\.)ticket\.com\.tw$ +(^|\.)tigervpn\.com$ +(^|\.)tiltbrush\.com$ +(^|\.)timdir\.com$ +(^|\.)time\.com$ +(^|\.)times\.hinet\.net$ +(^|\.)timesofindia\.indiatimes\.com$ +(^|\.)timsah\.com$ +(^|\.)tinc-vpn\.org$ +(^|\.)tineye\.com$ +(^|\.)tintuc101\.com$ +(^|\.)tiny\.cc$ +(^|\.)tinychat\.com$ +(^|\.)tinypaste\.com$ +(^|\.)tipo\.gov\.tw$ +(^|\.)tistory\.com$ +(^|\.)tkcs-collins\.com$ +(^|\.)tl\.gd$ +(^|\.)tma\.co\.jp$ +(^|\.)tmagazine\.com$ +(^|\.)tmdfish\.com$ +(^|\.)t\.me$ +(^|\.)tmi\.me$ +(^|\.)tmpp\.org$ +(^|\.)tn1\.shemalez\.com$ +(^|\.)tn2\.shemalez\.com$ +(^|\.)tn3\.shemalez\.com$ +(^|\.)tnaflix\.com$ +(^|\.)tngrnow\.com$ +(^|\.)tngrnow\.net$ +(^|\.)tnp\.org$ +(^|\.)togetter\.com$ +(^|\.)toh\.info$ +(^|\.)tokyo-247\.com$ +(^|\.)tokyocn\.com$ +(^|\.)tokyo-hot\.com$ +(^|\.)tokyo-porn-tube\.com$ +(^|\.)tongil\.or\.kr$ +(^|\.)tono-oka\.jp$ +(^|\.)tonyyan\.net$ +(^|\.)toodoc\.com$ +(^|\.)toonel\.net$ +(^|\.)top10vpn\.com$ +(^|\.)top81\.ws$ +(^|\.)topbtc\.com$ +(^|\.)topic\.youthwant\.com\.tw$ +(^|\.)topnews\.in$ +(^|\.)to-porno\.com$ +(^|\.)toppornsites\.com$ +(^|\.)topshareware\.com$ +(^|\.)topsy\.com$ +(^|\.)toptip\.ca$ +(^|\.)top\.tv$ +(^|\.)tora\.to$ +(^|\.)tor\.blingblingsquad\.net$ +(^|\.)torcn\.com$ +(^|\.)tor\.cn\.uptodown\.com$ +(^|\.)torguard\.net$ +(^|\.)torproject\.org$ +(^|\.)torrentprivacy\.com$ +(^|\.)torrentproject\.se$ +(^|\.)torrenty\.org$ +(^|\.)torrentz\.eu$ +(^|\.)tor\.updatestar\.com$ +(^|\.)torvpn\.com$ +(^|\.)t\.orzdream\.com$ +(^|\.)tosh\.comedycentral\.com$ +(^|\.)totalvpn\.com$ +(^|\.)toutiaoabc\.com$ +(^|\.)toutyrater\.github\.io$ +(^|\.)towngain\.com$ +(^|\.)toypark\.in$ +(^|\.)toythieves\.com$ +(^|\.)toytractorshow\.com$ +(^|\.)tparents\.org$ +(^|\.)tpi\.org\.tw$ +(^|\.)tracfone\.com$ +(^|\.)traffichaus\.com$ +(^|\.)transparency\.org$ +(^|\.)trans\.wenweipo\.com$ +(^|\.)treemall\.com\.tw$ +(^|\.)trendsmap\.com$ +(^|\.)trialofccp\.org$ +(^|\.)trickip\.net$ +(^|\.)trickip\.org$ +(^|\.)trimondi\.de$ +(^|\.)trouw\.nl$ +(^|\.)trtc\.com\.tw$ +(^|\.)trt\.net\.tr$ +(^|\.)truebuddha-md\.org$ +(^|\.)trulyergonomic\.com$ +(^|\.)truth101\.co\.tv$ +(^|\.)truthontour\.org$ +(^|\.)truveo\.com$ +(^|\.)tryheart\.jp$ +(^|\.)tsctv\.net$ +(^|\.)tsdr\.uspto\.gov$ +(^|\.)tsemtulku\.com$ +(^|\.)tsquare\.tv$ +(^|\.)tsunagarumon\.com$ +(^|\.)tsu\.org\.tw$ +(^|\.)tt1069\.com$ +(^|\.)tttan\.com$ +(^|\.)ttvnw\.net$ +(^|\.)tu8964\.com$ +(^|\.)tubaholic\.com$ +(^|\.)tube8\.com$ +(^|\.)tube911\.com$ +(^|\.)tube\.com$ +(^|\.)tubecup\.com$ +(^|\.)tubegals\.com$ +(^|\.)tubeislam\.com$ +(^|\.)tubepornclassic\.com$ +(^|\.)tubestack\.com$ +(^|\.)tubewolf\.com$ +(^|\.)tuibeitu\.net$ +(^|\.)tuidang\.net$ +(^|\.)tuidang\.org$ +(^|\.)tuidang\.se$ +(^|\.)tui\.orzdream\.com$ +(^|\.)tuitwit\.com$ +(^|\.)tumblr\.com$ +(^|\.)tumutanzi\.com$ +(^|\.)tumview\.com$ +(^|\.)tunein\.com$ +(^|\.)tunnelbear\.com$ +(^|\.)tunnelr\.com$ +(^|\.)tuo8\.blue$ +(^|\.)tuo8\.cc$ +(^|\.)tuo8\.club$ +(^|\.)tuo8\.fit$ +(^|\.)tuo8\.hk$ +(^|\.)tuo8\.in$ +(^|\.)tuo8\.ninja$ +(^|\.)tuo8\.org$ +(^|\.)tuo8\.pw$ +(^|\.)tuo8\.red$ +(^|\.)tuo8\.space$ +(^|\.)turansam\.org$ +(^|\.)turbobit\.net$ +(^|\.)turbohide\.com$ +(^|\.)turbotwitter\.com$ +(^|\.)turntable\.fm$ +(^|\.)tushycash\.com$ +(^|\.)tuvpn\.com$ +(^|\.)tuzaijidi\.com$ +(^|\.)tvants\.com$ +(^|\.)tvboxnow\.com$ +(^|\.)tv\.com$ +(^|\.)tvider\.com$ +(^|\.)tvmost\.com\.hk$ +(^|\.)tvplayvideos\.com$ +(^|\.)tvunetworks\.com$ +(^|\.)tw01\.org$ +(^|\.)twaitter\.com$ +(^|\.)tw\.answers\.yahoo\.com$ +(^|\.)twapperkeeper\.com$ +(^|\.)twaud\.io$ +(^|\.)twavi\.com$ +(^|\.)twbbs\.net\.tw$ +(^|\.)twbbs\.org$ +(^|\.)twbbs\.tw$ +(^|\.)tw\.bid\.yahoo\.com$ +(^|\.)tw-blog\.com$ +(^|\.)twblogger\.com$ +(^|\.)tweepguide\.com$ +(^|\.)tweeplike\.me$ +(^|\.)tweepmag\.com$ +(^|\.)tweepml\.org$ +(^|\.)tweetbackup\.com$ +(^|\.)tweetboard\.com$ +(^|\.)tweetboner\.biz$ +(^|\.)tweetcs\.com$ +(^|\.)tweetdeck\.com$ +(^|\.)tweetedtimes\.com$ +(^|\.)tweetmylast\.fm$ +(^|\.)tweetphoto\.com$ +(^|\.)tweetrans\.com$ +(^|\.)tweetree\.com$ +(^|\.)tweets\.seraph\.me$ +(^|\.)tweettunnel\.com$ +(^|\.)tweetwally\.com$ +(^|\.)tweetymail\.com$ +(^|\.)tweez\.net$ +(^|\.)twelve\.today$ +(^|\.)twerkingbutt\.com$ +(^|\.)twftp\.org$ +(^|\.)tw\.gigacircle\.com$ +(^|\.)twgreatdaily\.com$ +(^|\.)tw\.hao123\.com$ +(^|\.)twibase\.com$ +(^|\.)twibble\.de$ +(^|\.)twibbon\.com$ +(^|\.)twibs\.com$ +(^|\.)twicountry\.org$ +(^|\.)twicsy\.com$ +(^|\.)twiends\.com$ +(^|\.)twifan\.com$ +(^|\.)twiffo\.com$ +(^|\.)twiggit\.org$ +(^|\.)twilightsex\.com$ +(^|\.)twilog\.org$ +(^|\.)twimbow\.com$ +(^|\.)twimg\.com$ +(^|\.)twimg\.edgesuite\.net$ +(^|\.)twindexx\.com$ +(^|\.)twip\.me$ +(^|\.)twipple\.jp$ +(^|\.)tw\.iqiyi\.com$ +(^|\.)twishort\.com$ +(^|\.)twistar\.cc$ +(^|\.)twisterio\.com$ +(^|\.)twister\.net\.co$ +(^|\.)twisternow\.com$ +(^|\.)twistory\.net$ +(^|\.)twit2d\.com$ +(^|\.)twitbrowser\.net$ +(^|\.)twitcause\.com$ +(^|\.)twitchcdn\.net$ +(^|\.)twitch\.tv$ +(^|\.)twitgether\.com$ +(^|\.)twitgoo\.com$ +(^|\.)twitiq\.com$ +(^|\.)twitlonger\.com$ +(^|\.)twitmania\.com$ +(^|\.)twitoaster\.com$ +(^|\.)twitonmsn\.com$ +(^|\.)twitpic\.com$ +(^|\.)twitstat\.com$ +(^|\.)twittbot\.net$ +(^|\.)twitter4j\.org$ +(^|\.)twitter\.com$ +(^|\.)twittercounter\.com$ +(^|\.)twitterfeed\.com$ +(^|\.)twittergadget\.com$ +(^|\.)twitter\.jp$ +(^|\.)twitterkr\.com$ +(^|\.)twittermail\.com$ +(^|\.)twitterrific\.com$ +(^|\.)twittertim\.es$ +(^|\.)twitthat\.com$ +(^|\.)twitturk\.com$ +(^|\.)twitturly\.com$ +(^|\.)twitvid\.com$ +(^|\.)twitzap\.com$ +(^|\.)twiyia\.com$ +(^|\.)tw\.jiepang\.com$ +(^|\.)tw\.knowledge\.yahoo\.com$ +(^|\.)tw\.mall\.yahoo\.com$ +(^|\.)tw\.mobi\.yahoo\.com$ +(^|\.)tw\.money\.yahoo\.com$ +(^|\.)tw\.myblog\.yahoo\.com$ +(^|\.)tw\.news\.yahoo\.com$ +(^|\.)twnorth\.org\.tw$ +(^|\.)tw-npo\.org$ +(^|\.)twskype\.com$ +(^|\.)twstar\.net$ +(^|\.)tw\.streetvoice\.com$ +(^|\.)twtkr\.com$ +(^|\.)tw\.tomonews\.net$ +(^|\.)twtr2src\.ogaoga\.org$ +(^|\.)twtrland\.com$ +(^|\.)twt\.tl$ +(^|\.)twttr\.com$ +(^|\.)twurl\.nl$ +(^|\.)tw\.voa\.mobi$ +(^|\.)twyac\.org$ +(^|\.)tw\.yahoo\.com$ +(^|\.)txxx\.com$ +(^|\.)tycool\.com$ +(^|\.)typepad\.com$ +(^|\.)u15\.info$ +(^|\.)u9un\.com$ +(^|\.)ub0\.cc$ +(^|\.)ubddns\.org$ +(^|\.)uberproxy\.net$ +(^|\.)ucdc1998\.org$ +(^|\.)uchicago\.edu$ +(^|\.)uc-japan\.org$ +(^|\.)uderzo\.it$ +(^|\.)udnbkk\.com$ +(^|\.)udn\.com$ +(^|\.)udn\.com\.tw$ +(^|\.)uforadio\.com\.tw$ +(^|\.)ufreevpn\.com$ +(^|\.)ugo\.com$ +(^|\.)uhdwallpapers\.org$ +(^|\.)uhrp\.org$ +(^|\.)uighurbiz\.net$ +(^|\.)uighur\.narod\.ru$ +(^|\.)uighur\.nl$ +(^|\.)ukcdp\.co\.uk$ +(^|\.)ukliferadio\.co\.uk$ +(^|\.)uku\.im$ +(^|\.)ulike\.net$ +(^|\.)ulop\.net$ +(^|\.)ultravpn\.fr$ +(^|\.)ultraxs\.com$ +(^|\.)umich\.edu$ +(^|\.)unblock\.cn\.com$ +(^|\.)unblockdmm\.com$ +(^|\.)unblocker\.yt$ +(^|\.)unblocksit\.es$ +(^|\.)unblock-us\.com$ +(^|\.)uncyclomedia\.org$ +(^|\.)uncyclopedia\.hk$ +(^|\.)uncyclopedia\.tw$ +(^|\.)underwoodammo\.com$ +(^|\.)unholyknight\.com$ +(^|\.)uni\.cc$ +(^|\.)unification\.net$ +(^|\.)unification\.org\.tw$ +(^|\.)unirule\.cloud$ +(^|\.)unitedsocialpress\.com$ +(^|\.)unix100\.com$ +(^|\.)unknownspace\.org$ +(^|\.)unodedos\.com$ +(^|\.)unpo\.org$ +(^|\.)unseen\.is$ +(^|\.)untraceable\.us$ +(^|\.)uocn\.org$ +(^|\.)upcoming\.yahoo\.com$ +(^|\.)updates\.tdesktop\.com$ +(^|\.)upholdjustice\.org$ +(^|\.)upload4u\.info$ +(^|\.)uploaded\.net$ +(^|\.)uploaded\.to$ +(^|\.)uploadstation\.com$ +(^|\.)upmedia\.mg$ +(^|\.)upornia\.com$ +(^|\.)uproxy\.org$ +(^|\.)upwill\.org$ +(^|\.)ur7s\.com$ +(^|\.)uraban\.me$ +(^|\.)urbansurvival\.com$ +(^|\.)urchin\.com$ +(^|\.)urlborg\.com$ +(^|\.)urlparser\.com$ +(^|\.)usacn\.com$ +(^|\.)usaip\.eu$ +(^|\.)userapi\.nytlog\.com$ +(^|\.)users\.skynet\.be$ +(^|\.)usfk\.mil$ +(^|\.)ushuarencity\.echainhost\.com$ +(^|\.)usinfo\.state\.gov$ +(^|\.)usma\.edu$ +(^|\.)usmc\.mil$ +(^|\.)usmgtcg\.ning\.com$ +(^|\.)usno\.navy\.mil$ +(^|\.)usocctn\.com$ +(^|\.)us\.to$ +(^|\.)ustream\.tv$ +(^|\.)usunitednews\.com$ +(^|\.)usus\.cc$ +(^|\.)utopianpal\.com$ +(^|\.)uu-gg\.com$ +(^|\.)uukanshu\.com$ +(^|\.)uvwxyz\.xyz$ +(^|\.)uwants\.com$ +(^|\.)uwants\.net$ +(^|\.)uyghuramerican\.org$ +(^|\.)uyghurcanadiansociety\.org$ +(^|\.)uyghurcongress\.org$ +(^|\.)uyghur\.co\.uk$ +(^|\.)uyghurensemble\.co\.uk$ +(^|\.)uyghur-j\.org$ +(^|\.)uyghurpen\.org$ +(^|\.)uyghurpress\.com$ +(^|\.)uyghurstudies\.org$ +(^|\.)uygur\.fc2web\.com$ +(^|\.)uygur\.org$ +(^|\.)uymaarip\.com$ +(^|\.)v2ex\.com$ +(^|\.)v2ray\.com$ +(^|\.)van001\.com$ +(^|\.)van698\.com$ +(^|\.)vanemu\.cn$ +(^|\.)vanilla-jp\.com$ +(^|\.)vanpeople\.com$ +(^|\.)vansky\.com$ +(^|\.)vaticannews\.va$ +(^|\.)vatn\.org$ +(^|\.)vcfbuilder\.org$ +(^|\.)vcf-online\.org$ +(^|\.)vds\.rightster\.com$ +(^|\.)vegasred\.com$ +(^|\.)vegas\.williamhill\.com$ +(^|\.)velkaepocha\.sk$ +(^|\.)venbbs\.com$ +(^|\.)venchina\.com$ +(^|\.)venetianmacao\.com$ +(^|\.)ventureswell\.com$ +(^|\.)veoh\.com$ +(^|\.)vermonttibet\.org$ +(^|\.)versavpn\.com$ +(^|\.)verybs\.com$ +(^|\.)vevo\.com$ +(^|\.)vft\.com\.tw$ +(^|\.)viber\.com$ +(^|\.)vica\.info$ +(^|\.)victimsofcommunism\.org$ +(^|\.)vidble\.com$ +(^|\.)video\.aol\.ca$ +(^|\.)video\.aol\.com$ +(^|\.)video\.aol\.co\.uk$ +(^|\.)video\.ap\.org$ +(^|\.)videobam\.com$ +(^|\.)videodetective\.com$ +(^|\.)video\.fdbox\.com$ +(^|\.)video\.foxbusiness\.com$ +(^|\.)videomega\.tv$ +(^|\.)videomo\.com$ +(^|\.)video\.pbs\.org$ +(^|\.)videopediaworld\.com$ +(^|\.)videopress\.com$ +(^|\.)video\.yahoo\.com$ +(^|\.)vidinfo\.org$ +(^|\.)vid\.me$ +(^|\.)vietdaikynguyen\.com$ +(^|\.)vijayatemple\.org$ +(^|\.)vimeo\.com$ +(^|\.)vimperator\.org$ +(^|\.)vincnd\.com$ +(^|\.)vine\.co$ +(^|\.)vinniev\.com$ +(^|\.)vip-enterprise\.com$ +(^|\.)virtualrealporn\.com$ +(^|\.)visibletweets\.com$ +(^|\.)vital247\.org$ +(^|\.)viu\.com$ +(^|\.)viu\.tv$ +(^|\.)vivahentai4u\.net$ +(^|\.)vivatube\.com$ +(^|\.)vivthomas\.com$ +(^|\.)vizvaz\.com$ +(^|\.)vjav\.com$ +(^|\.)vjmedia\.com\.hk$ +(^|\.)vllcs\.org$ +(^|\.)vlog\.xuite\.net$ +(^|\.)vmixcore\.com$ +(^|\.)vmpsoft\.com$ +(^|\.)vnet\.link$ +(^|\.)vn\.hao123\.com$ +(^|\.)voa-11\.akacast\.akamaistream\.net$ +(^|\.)voacantonese\.com$ +(^|\.)voachineseblog\.com$ +(^|\.)voachinese\.com$ +(^|\.)voagd\.com$ +(^|\.)voanews\.com$ +(^|\.)voatibetan\.com$ +(^|\.)voatibetanenglish\.com$ +(^|\.)vocativ\.com$ +(^|\.)vocn\.tv$ +(^|\.)vod-abematv\.akamaized\.net$ +(^|\.)vod\.wwe\.com$ +(^|\.)vot\.org$ +(^|\.)vovo2000\.com$ +(^|\.)voxer\.com$ +(^|\.)voy\.com$ +(^|\.)vpn4all\.com$ +(^|\.)vpn\.ac$ +(^|\.)vpnaccount\.org$ +(^|\.)vpnaccounts\.com$ +(^|\.)vpnbook\.com$ +(^|\.)vpn\.cjb\.net$ +(^|\.)vpn\.cmu\.edu$ +(^|\.)vpncomparison\.org$ +(^|\.)vpncoupons\.com$ +(^|\.)vpncup\.com$ +(^|\.)vpndada\.com$ +(^|\.)vpnfan\.com$ +(^|\.)vpnfire\.com$ +(^|\.)vpnfires\.biz$ +(^|\.)vpnforgame\.net$ +(^|\.)vpngate\.jp$ +(^|\.)vpngate\.net$ +(^|\.)vpngratis\.net$ +(^|\.)vpnhq\.com$ +(^|\.)vpninja\.net$ +(^|\.)vpnintouch\.com$ +(^|\.)vpnintouch\.net$ +(^|\.)vpnjack\.com$ +(^|\.)vpnmaster\.com$ +(^|\.)vpnmentor\.com$ +(^|\.)vpnpick\.com$ +(^|\.)vpnpop\.com$ +(^|\.)vpnpronet\.com$ +(^|\.)vpnreactor\.com$ +(^|\.)vpnreviewz\.com$ +(^|\.)vpnsecure\.me$ +(^|\.)vpnshazam\.com$ +(^|\.)vpnshieldapp\.com$ +(^|\.)vpnsp\.com$ +(^|\.)vpn\.sv\.cmu\.edu$ +(^|\.)vpntraffic\.com$ +(^|\.)vpntunnel\.com$ +(^|\.)vpnuk\.info$ +(^|\.)vpnunlimitedapp\.com$ +(^|\.)vpnvip\.com$ +(^|\.)vpnworldwide\.com$ +(^|\.)vporn\.com$ +(^|\.)vpser\.net$ +(^|\.)vraiesagesse\.net$ +(^|\.)vrmtr\.com$ +(^|\.)vrsmash\.com$ +(^|\.)vtunnel\.com$ +(^|\.)vuku\.cc$ +(^|\.)vultryhw\.com$ +(^|\.)w3schools\.com$ +(^|\.)waffle1999\.com$ +(^|\.)wahas\.com$ +(^|\.)waigaobu\.com$ +(^|\.)waikeung\.org$ +(^|\.)wailaike\.net$ +(^|\.)waiwaier\.com$ +(^|\.)wallmama\.com$ +(^|\.)wallornot\.org$ +(^|\.)wallpapercasa\.com$ +(^|\.)wallproxy\.com$ +(^|\.)waltermartin\.com$ +(^|\.)waltermartin\.org$ +(^|\.)wanderinghorse\.net$ +(^|\.)wangafu\.net$ +(^|\.)wangjinbo\.org$ +(^|\.)wanglixiong\.com$ +(^|\.)wango\.org$ +(^|\.)wangruoshui\.net$ +(^|\.)want-daily\.com$ +(^|\.)wanz-factory\.com$ +(^|\.)wapedia\.mobi$ +(^|\.)warbler\.iconfactory\.net$ +(^|\.)waselpro\.com$ +(^|\.)washeng\.net$ +(^|\.)washingtonpost\.com$ +(^|\.)watch8x\.com$ +(^|\.)watchinese\.com$ +(^|\.)watchmygf\.net$ +(^|\.)wattpad\.com$ +(^|\.)waveprotocol\.org$ +(^|\.)wav\.tv$ +(^|\.)waymo\.com$ +(^|\.)wda\.gov\.tw$ +(^|\.)wdf5\.com$ +(^|\.)wearehairy\.com$ +(^|\.)wearn\.com$ +(^|\.)web2project\.net$ +(^|\.)webbang\.net$ +(^|\.)web\.dev$ +(^|\.)webevader\.org$ +(^|\.)webfreer\.com$ +(^|\.)webjb\.org$ +(^|\.)weblagu\.com$ +(^|\.)webmproject\.org$ +(^|\.)webrtc\.org$ +(^|\.)webrush\.net$ +(^|\.)website\.informer\.com$ +(^|\.)websitepulse\.com$ +(^|\.)webs-tv\.net$ +(^|\.)webwarper\.net$ +(^|\.)webworkerdaily\.com$ +(^|\.)weekmag\.info$ +(^|\.)wefightcensorship\.org$ +(^|\.)wefong\.com$ +(^|\.)wego\.here\.com$ +(^|\.)weiboleak\.com$ +(^|\.)weiboscope\.jmsc\.hku\.hk$ +(^|\.)weihuo\.org$ +(^|\.)weijingsheng\.org$ +(^|\.)weiming\.info$ +(^|\.)weiquanwang\.org$ +(^|\.)weisuo\.ws$ +(^|\.)welovecock\.com$ +(^|\.)wemigrate\.org$ +(^|\.)wengewang\.com$ +(^|\.)wengewang\.org$ +(^|\.)wenhui\.ch$ +(^|\.)wenxuecity\.com$ +(^|\.)wenyunchao\.com$ +(^|\.)wenzhao\.ca$ +(^|\.)westca\.com$ +(^|\.)westernshugdensociety\.org$ +(^|\.)westernwolves\.com$ +(^|\.)westkit\.net$ +(^|\.)westpoint\.edu$ +(^|\.)wetplace\.com$ +(^|\.)wetpussygames\.com$ +(^|\.)wexiaobo\.org$ +(^|\.)wezhiyong\.org$ +(^|\.)wezone\.net$ +(^|\.)wforum\.com$ +(^|\.)wha\.la$ +(^|\.)whatblocked\.com$ +(^|\.)whatbrowser\.org$ +(^|\.)whatsapp\.com$ +(^|\.)whatsapp\.net$ +(^|\.)whatsonweibo\.com$ +(^|\.)wheatseeds\.org$ +(^|\.)wheelockslatin\.com$ +(^|\.)whereiswerner\.com$ +(^|\.)wheretowatch\.com$ +(^|\.)whippedass\.com$ +(^|\.)whitebear\.freebearblog\.org$ +(^|\.)whodns\.xyz$ +(^|\.)whoer\.net$ +(^|\.)whotalking\.com$ +(^|\.)whylover\.com$ +(^|\.)whyx\.org$ +(^|\.)w\.idaiwan\.com$ +(^|\.)widevine\.com$ +(^|\.)wikaba\.com$ +(^|\.)wiki\.cnitter\.com$ +(^|\.)wiki\.esu\.im$ +(^|\.)wiki\.gamerp\.jp$ +(^|\.)wiki\.jqueryui\.com$ +(^|\.)wiki\.keso\.cn$ +(^|\.)wikileaks\.ch$ +(^|\.)wikileaks\.com$ +(^|\.)wikileaks\.de$ +(^|\.)wikileaks\.eu$ +(^|\.)wikileaks-forum\.com$ +(^|\.)wikileaks\.lu$ +(^|\.)wikileaks\.org$ +(^|\.)wikileaks\.pl$ +(^|\.)wikilivres\.info$ +(^|\.)wikimapia\.org$ +(^|\.)wiki\.moegirl\.org$ +(^|\.)wiki\.oauth\.net$ +(^|\.)wikipedia\.org$ +(^|\.)wiki\.phonegap\.com$ +(^|\.)wikiwiki\.jp$ +(^|\.)wildammo\.com$ +(^|\.)williamhill\.com$ +(^|\.)willw\.net$ +(^|\.)windowsphoneme\.com$ +(^|\.)windscribe\.com$ +(^|\.)wingamestore\.com$ +(^|\.)wingy\.site$ +(^|\.)winning11\.com$ +(^|\.)winwhispers\.info$ +(^|\.)wire\.com$ +(^|\.)wiredbytes\.com$ +(^|\.)wiredpen\.com$ +(^|\.)wisdompubs\.org$ +(^|\.)wisevid\.com$ +(^|\.)withgoogle\.com$ +(^|\.)withyoutube\.com$ +(^|\.)witnessleeteaching\.com$ +(^|\.)witopia\.net$ +(^|\.)wizcrafts\.net$ +(^|\.)wjbk\.org$ +(^|\.)wlcnew\.jigsy\.com$ +(^|\.)wlx\.sowiki\.net$ +(^|\.)wnacg\.com$ +(^|\.)wnacg\.org$ +(^|\.)wn\.com$ +(^|\.)wo3ttt\.wordpress\.com$ +(^|\.)woeser\.com$ +(^|\.)woesermiddle-way\.net$ +(^|\.)wokar\.org$ +(^|\.)wolfax\.com$ +(^|\.)woolyss\.com$ +(^|\.)woopie\.jp$ +(^|\.)woopie\.tv$ +(^|\.)wordpress\.com$ +(^|\.)workatruna\.com$ +(^|\.)workerdemo\.org\.hk$ +(^|\.)workerempowerment\.org$ +(^|\.)workersthebig\.net$ +(^|\.)worldcat\.org$ +(^|\.)worldjournal\.com$ +(^|\.)worldvpn\.net$ +(^|\.)wo\.tc$ +(^|\.)wow\.com$ +(^|\.)wowgirls\.com$ +(^|\.)wowlegacy\.ml$ +(^|\.)wow-life\.net$ +(^|\.)wowporn\.com$ +(^|\.)wowrk\.com$ +(^|\.)woxinghuiguo\.com$ +(^|\.)woyaolian\.org$ +(^|\.)wozy\.in$ +(^|\.)wp\.com$ +(^|\.)wpoforum\.com$ +(^|\.)wqyd\.org$ +(^|\.)wrchina\.org$ +(^|\.)wretch\.cc$ +(^|\.)writer\.zoho\.com$ +(^|\.)wsgzao\.github\.io$ +(^|\.)wsj\.com$ +(^|\.)wsjhk\.com$ +(^|\.)wsj\.net$ +(^|\.)wtbn\.org$ +(^|\.)wtfpeople\.com$ +(^|\.)wuerkaixi\.com$ +(^|\.)wufafangwen\.com$ +(^|\.)wufi\.org\.tw$ +(^|\.)wuguoguang\.com$ +(^|\.)wujieliulan\.com$ +(^|\.)wujie\.net$ +(^|\.)wukangrui\.net$ +(^|\.)wuw\.red$ +(^|\.)wuyanblog\.com$ +(^|\.)wwitv\.com$ +(^|\.)www1\.american\.edu$ +(^|\.)www1\.biz$ +(^|\.)www2\.ohchr\.org$ +(^|\.)www2\.rocketbbs\.com$ +(^|\.)www\.abclite\.net$ +(^|\.)www\.ajsands\.com$ +(^|\.)www\.americorps\.gov$ +(^|\.)www\.antd\.org$ +(^|\.)www\.aolnews\.com$ +(^|\.)www\.businessinsider\.com\.au$ +(^|\.)www\.citizenlab\.org$ +(^|\.)www\.cmoinc\.org$ +(^|\.)www\.cool18\.com$ +(^|\.)www\.dmm\.com$ +(^|\.)www\.dwheeler\.com$ +(^|\.)www\.eastturkistan\.net$ +(^|\.)www\.gmiddle\.com$ +(^|\.)www\.gmiddle\.net$ +(^|\.)wwwhost\.biz$ +(^|\.)www\.hustlercash\.com$ +(^|\.)www\.idlcoyote\.com$ +(^|\.)www\.imdb\.com$ +(^|\.)www\.kindleren\.com$ +(^|\.)www\.klip\.me$ +(^|\.)www\.lamenhu\.com$ +(^|\.)www\.lib\.virginia\.edu$ +(^|\.)www\.linksalpha\.com$ +(^|\.)www\.metro\.taipei$ +(^|\.)www\.monlamit\.org$ +(^|\.)www\.moztw\.org$ +(^|\.)www\.m-sport\.co\.uk$ +(^|\.)www\.nbc\.com$ +(^|\.)www\.orchidbbs\.com$ +(^|\.)www\.owind\.com$ +(^|\.)www\.oxid\.it$ +(^|\.)www\.powerpointninja\.com$ +(^|\.)www\.s4miniarchive\.com$ +(^|\.)www\.sciencemag\.org$ +(^|\.)www\.shadowsocks\.com$ +(^|\.)www\.shwchurch\.org$ +(^|\.)www\.skype\.com$ +(^|\.)www\.tablesgenerator\.com$ +(^|\.)www\.taiwanonline\.cc$ +(^|\.)www\.taup\.org\.tw$ +(^|\.)www\.thechinastory\.org$ +(^|\.)www\.wangruowang\.org$ +(^|\.)www\.wan-press\.org$ +(^|\.)www\.websnapr\.com$ +(^|\.)www\.zensur\.freerk\.com$ +(^|\.)wzyboy\.im$ +(^|\.)x1949x\.com$ +(^|\.)x24hr\.com$ +(^|\.)x365x\.com$ +(^|\.)xanga\.com$ +(^|\.)x-art\.com$ +(^|\.)xa\.yimg\.com$ +(^|\.)xbabe\.com$ +(^|\.)x-berry\.com$ +(^|\.)xbookcn\.com$ +(^|\.)xbtce\.com$ +(^|\.)xcafe\.in$ +(^|\.)xcity\.jp$ +(^|\.)x\.company$ +(^|\.)xcritic\.com$ +(^|\.)xda-developers\.com$ +(^|\.)xerotica\.com$ +(^|\.)xfinity\.com$ +(^|\.)xfm\.pp\.ru$ +(^|\.)xgmyd\.com$ +(^|\.)xhamster\.com$ +(^|\.)xianba\.net$ +(^|\.)xianchawang\.net$ +(^|\.)xianjian\.tw$ +(^|\.)xianqiao\.net$ +(^|\.)xiaobaiwu\.com$ +(^|\.)xiaochuncnjp\.com$ +(^|\.)xiaod\.in$ +(^|\.)xiaohexie\.com$ +(^|\.)xiaolan\.me$ +(^|\.)xiaoma\.org$ +(^|\.)xiezhua\.com$ +(^|\.)xihua\.es$ +(^|\.)xijie\.wordpress\.com$ +(^|\.)xing\.com$ +(^|\.)xinhuanet\.org$ +(^|\.)xinmiao\.com\.hk$ +(^|\.)xinqimeng\.over-blog\.com$ +(^|\.)xinsheng\.net$ +(^|\.)xinshijue\.com$ +(^|\.)xinyubbs\.net$ +(^|\.)xiongpian\.com$ +(^|\.)xiuren\.org$ +(^|\.)xizang-zhiye\.org$ +(^|\.)xjp\.cc$ +(^|\.)xjtravelguide\.com$ +(^|\.)xkiwi\.tk$ +(^|\.)xlfmtalk\.com$ +(^|\.)xlfmwz\.info$ +(^|\.)xm\.com$ +(^|\.)xml-training-guide\.com$ +(^|\.)xmovies\.com$ +(^|\.)xn--4gq171p\.com$ +(^|\.)xn--czq75pvv1aj5c\.org$ +(^|\.)xn--i2ru8q2qg\.com$ +(^|\.)xn--ngstr-lra8j\.com$ +(^|\.)xn--oiq\.cc$ +(^|\.)xn--p8j9a0d9c9a\.xn--q9jyb4c$ +(^|\.)xnxx\.com$ +(^|\.)xpdo\.net$ +(^|\.)xpud\.org$ +(^|\.)xrentdvd\.com$ +(^|\.)xskywalker\.com$ +(^|\.)xskywalker\.net$ +(^|\.)xtube\.com$ +(^|\.)xuchao\.net$ +(^|\.)xuchao\.org$ +(^|\.)xuehua\.us$ +(^|\.)xuzhiyong\.net$ +(^|\.)xvideo\.cc$ +(^|\.)xvideos\.com$ +(^|\.)xvideos\.es$ +(^|\.)x-wall\.org$ +(^|\.)xxbbx\.com$ +(^|\.)xxlmovies\.com$ +(^|\.)xxuz\.com$ +(^|\.)xxx\.com$ +(^|\.)xxxfuckmom\.com$ +(^|\.)xxxx\.com\.au$ +(^|\.)xxx\.xxx$ +(^|\.)xxxy\.biz$ +(^|\.)xxxy\.info$ +(^|\.)xxxymovies\.com$ +(^|\.)xysblogs\.org$ +(^|\.)xys\.dxiong\.com$ +(^|\.)xys\.org$ +(^|\.)xyy69\.com$ +(^|\.)xyy69\.info$ +(^|\.)yahoo\.com\.hk$ +(^|\.)yakbutterblues\.com$ +(^|\.)yam\.com$ +(^|\.)yam\.org\.tw$ +(^|\.)yanghengjun\.com$ +(^|\.)yangjianli\.com$ +(^|\.)yasni\.co\.uk$ +(^|\.)yayabay\.com$ +(^|\.)ydy\.com$ +(^|\.)yeahteentube\.com$ +(^|\.)yecl\.net$ +(^|\.)yeelou\.com$ +(^|\.)yeeyi\.com$ +(^|\.)yegle\.net$ +(^|\.)yes123\.com\.tw$ +(^|\.)yesasia\.com$ +(^|\.)yesasia\.com\.hk$ +(^|\.)yes-news\.com$ +(^|\.)yespornplease\.com$ +(^|\.)yes\.xxx$ +(^|\.)yeyeclub\.com$ +(^|\.)ygto\.com$ +(^|\.)yhcw\.net$ +(^|\.)yibada\.com$ +(^|\.)yibaochina\.com$ +(^|\.)yidio\.com$ +(^|\.)yigeni\.com$ +(^|\.)yilubbs\.com$ +(^|\.)yingsuoss\.com$ +(^|\.)yinlei\.org$ +(^|\.)yipub\.com$ +(^|\.)yizhihongxing\.com$ +(^|\.)yobit\.net$ +(^|\.)yobt\.com$ +(^|\.)yobt\.tv$ +(^|\.)yogichen\.org$ +(^|\.)yolasite\.com$ +(^|\.)yomiuri\.co\.jp$ +(^|\.)yong\.hu$ +(^|\.)yorkbbs\.ca$ +(^|\.)youdontcare\.com$ +(^|\.)you-get\.org$ +(^|\.)youjizz\.com$ +(^|\.)youmaker\.com$ +(^|\.)youngpornvideos\.com$ +(^|\.)youngspiration\.hk$ +(^|\.)youpai\.org$ +(^|\.)youporn\.com$ +(^|\.)youporngay\.com$ +(^|\.)yourepeat\.com$ +(^|\.)your-freedom\.net$ +(^|\.)yourlisten\.com$ +(^|\.)yourlust\.com$ +(^|\.)yourprivatevpn\.com$ +(^|\.)yourtrap\.com$ +(^|\.)yousendit\.com$ +(^|\.)youshun12\.com$ +(^|\.)youthnetradio\.org$ +(^|\.)youtu\.be$ +(^|\.)youtubecn\.com$ +(^|\.)youtube\.com$ +(^|\.)youtubeeducation\.com$ +(^|\.)youtubegaming\.com$ +(^|\.)youtube-nocookie\.com$ +(^|\.)youversion\.com$ +(^|\.)youwin\.com$ +(^|\.)youxu\.info$ +(^|\.)yt\.be$ +(^|\.)ytht\.net$ +(^|\.)ytimg\.com$ +(^|\.)ytn\.co\.kr$ +(^|\.)yuanming\.net$ +(^|\.)yuanzhengtang\.org$ +(^|\.)yulghun\.com$ +(^|\.)yunchao\.net$ +(^|\.)yuntipub\.com$ +(^|\.)yuvutu\.com$ +(^|\.)yvesgeleyn\.com$ +(^|\.)ywpw\.com$ +(^|\.)yx51\.net$ +(^|\.)yyii\.org$ +(^|\.)yzzk\.com$ +(^|\.)zacebook\.com$ +(^|\.)zalmos\.com$ +(^|\.)zannel\.com$ +(^|\.)zaobao\.com$ +(^|\.)zaobao\.com\.sg$ +(^|\.)zaozon\.com$ +(^|\.)zapto\.org$ +(^|\.)zattoo\.com$ +(^|\.)zb\.com$ +(^|\.)zdnet\.com\.tw$ +(^|\.)zello\.com$ +(^|\.)zengjinyan\.org$ +(^|\.)zenmate\.com$ +(^|\.)zenmate\.com\.ru$ +(^|\.)zeronet\.io$ +(^|\.)zeutch\.com$ +(^|\.)zfreet\.com$ +(^|\.)zgsddh\.com$ +(^|\.)zgzcjj\.net$ +(^|\.)zhanbin\.net$ +(^|\.)zhangboli\.net$ +(^|\.)zhangtianliang\.com$ +(^|\.)zhanlve\.org$ +(^|\.)zhao\.1984\.city$ +(^|\.)zhao\.jinhai\.de$ +(^|\.)zh\.bitterwinter\.org$ +(^|\.)zh\.ecdm\.wikia\.com$ +(^|\.)zhenghui\.org$ +(^|\.)zhengjian\.org$ +(^|\.)zhengwunet\.org$ +(^|\.)zhenlibu1984\.com$ +(^|\.)zhenlibu\.info$ +(^|\.)zhenxiang\.biz$ +(^|\.)zhinengluyou\.com$ +(^|\.)zhongguo\.ca$ +(^|\.)zhongguorenquan\.org$ +(^|\.)zhongguotese\.net$ +(^|\.)zhongmeng\.org$ +(^|\.)zhoushuguang\.com$ +(^|\.)zh\.pokerstrategy\.com$ +(^|\.)zh\.pttpedia\.wikia\.com$ +(^|\.)zhreader\.com$ +(^|\.)zhuangbi\.me$ +(^|\.)zhuanxing\.cn$ +(^|\.)zhuatieba\.com$ +(^|\.)zhuichaguoji\.org$ +(^|\.)zh\.uncyclopedia\.wikia\.com$ +(^|\.)zh\.wikinews\.org$ +(^|\.)zh\.wikisource\.org$ +(^|\.)ziddu\.com$ +(^|\.)zillionk\.com$ +(^|\.)zim\.vn$ +(^|\.)zinio\.com$ +(^|\.)ziporn\.com$ +(^|\.)zippyshare\.com$ +(^|\.)zkaip\.com$ +(^|\.)zmw\.cn$ +(^|\.)zodgame\.us$ +(^|\.)zomobo\.net$ +(^|\.)zonaeuropa\.com$ +(^|\.)zonghexinwen\.com$ +(^|\.)zonghexinwen\.net$ +(^|\.)zoogvpn\.com$ +(^|\.)zootool\.com$ +(^|\.)zoozle\.net$ +(^|\.)zorrovpn\.com$ +(^|\.)zozotown\.com$ +(^|\.)zpn\.im$ +(^|\.)zspeeder\.me$ +(^|\.)zsrhao\.com$ +(^|\.)zuobiao\.me$ +(^|\.)zuo\.la$ +(^|\.)zuola\.com$ +(^|\.)zvereff\.com$ +(^|\.)zynaima\.com$ +(^|\.)zynamics\.com$ +(^|\.)zyns\.com$ +(^|\.)zyzc9\.com$ +(^|\.)zzcartoon\.com$ +(^|\.)zzcloud\.me$ +(^|\.)zzux\.com$ diff --git a/acl/local.acl b/acl/local.acl new file mode 100644 index 000000000..e2583f31a --- /dev/null +++ b/acl/local.acl @@ -0,0 +1,22 @@ +[reject_all] + +[white_list] +0.0.0.0/8 +10.0.0.0/8 +100.64.0.0/10 +127.0.0.0/8 +169.254.0.0/16 +172.16.0.0/12 +192.0.0.0/24 +192.0.2.0/24 +192.88.99.0/24 +192.168.0.0/16 +198.18.0.0/15 +198.51.100.0/24 +203.0.113.0/24 +224.0.0.0/4 +240.0.0.0/4 +255.255.255.255/32 +::1/128 +fc00::/7 +fe80::/10 diff --git a/acl/server_block_chn.acl b/acl/server_block_chn.acl new file mode 100644 index 000000000..157f92e29 --- /dev/null +++ b/acl/server_block_chn.acl @@ -0,0 +1,5819 @@ +# All IPs listed here will be blocked while the ss-server try to outbound. +# Only IP is allowed, *NOT* domain name. +# +# The IPs bellow are all IPs in CHN. It'll block ss-server to access all +# CHN hosts by command +# `ss-server -s:: -p 8388 -k 123456 --acl acl/server_block_chn.acl` + +[outbound_block_list] +1.0.1.0/24 +1.0.2.0/23 +1.0.8.0/21 +1.0.32.0/19 +1.1.0.0/24 +1.1.2.0/23 +1.1.4.0/22 +1.1.8.0/21 +1.1.16.0/20 +1.1.32.0/19 +1.2.0.0/23 +1.2.2.0/24 +1.2.5.0/24 +1.2.6.0/23 +1.2.8.0/21 +1.2.16.0/20 +1.2.32.0/19 +1.2.64.0/18 +1.3.0.0/16 +1.4.1.0/24 +1.4.2.0/23 +1.4.4.0/22 +1.4.8.0/21 +1.4.16.0/20 +1.4.32.0/19 +1.4.64.0/18 +1.8.0.0/18 +1.8.64.0/19 +1.8.96.0/22 +1.8.100.0/23 +1.8.112.0/20 +1.8.128.0/20 +1.8.144.0/22 +1.8.148.0/23 +1.8.154.0/23 +1.8.156.0/22 +1.8.160.0/19 +1.8.192.0/19 +1.8.224.0/20 +1.8.244.0/22 +1.8.248.0/21 +1.10.0.0/21 +1.10.8.0/23 +1.10.11.0/24 +1.10.12.0/22 +1.10.16.0/20 +1.10.32.0/19 +1.10.64.0/18 +1.12.0.0/14 +1.18.128.0/24 +1.24.0.0/13 +1.45.0.0/16 +1.48.0.0/14 +1.56.0.0/13 +1.68.0.0/14 +1.80.0.0/12 +1.116.0.0/15 +1.118.1.0/24 +1.118.2.0/23 +1.118.4.0/22 +1.118.8.0/21 +1.118.16.0/20 +1.118.32.0/19 +1.118.64.0/18 +1.118.128.0/17 +1.119.0.0/16 +1.180.0.0/14 +1.184.0.0/15 +1.188.0.0/14 +1.192.0.0/13 +1.202.0.0/15 +1.204.0.0/14 +2.20.54.23/32 +8.128.0.0/10 +8.209.36.0/22 +8.209.40.0/21 +8.209.48.0/20 +8.209.192.0/18 +8.210.0.0/15 +8.212.0.0/14 +8.216.0.0/13 +14.0.0.0/21 +14.0.12.0/22 +14.1.0.0/22 +14.1.24.0/22 +14.1.108.0/22 +14.16.0.0/12 +14.102.128.0/22 +14.102.180.0/22 +14.103.0.0/16 +14.104.0.0/13 +14.112.0.0/12 +14.130.0.0/15 +14.134.0.0/15 +14.144.0.0/12 +14.192.60.0/22 +14.192.76.0/22 +14.196.0.0/15 +14.204.0.0/15 +14.208.0.0/12 +20.81.0.0/24 +20.134.160.0/20 +20.139.160.0/20 +20.249.255.0/24 +20.251.0.0/22 +23.236.64.0/25 +23.236.64.128/26 +23.236.64.192/27 +27.0.128.0/21 +27.0.160.0/21 +27.0.188.0/22 +27.0.204.0/22 +27.0.208.0/21 +27.8.0.0/13 +27.16.0.0/12 +27.34.232.0/21 +27.36.0.0/14 +27.40.0.0/13 +27.50.40.0/21 +27.50.128.0/17 +27.54.72.0/21 +27.54.152.0/21 +27.54.192.0/18 +27.98.208.0/20 +27.98.224.0/19 +27.99.128.0/17 +27.103.0.0/16 +27.106.128.0/18 +27.106.204.0/22 +27.109.32.0/19 +27.109.124.0/22 +27.112.0.0/18 +27.112.80.0/20 +27.112.112.0/21 +27.113.128.0/18 +27.115.0.0/17 +27.116.44.0/22 +27.121.72.0/21 +27.121.120.0/21 +27.128.0.0/15 +27.131.220.0/22 +27.144.0.0/16 +27.148.0.0/14 +27.152.0.0/13 +27.184.0.0/13 +27.192.0.0/11 +27.224.0.0/14 +36.0.0.0/22 +36.0.16.0/20 +36.0.32.0/19 +36.0.64.0/18 +36.0.128.0/17 +36.1.0.0/16 +36.4.0.0/14 +36.16.0.0/12 +36.32.0.0/14 +36.36.0.0/16 +36.37.0.0/19 +36.37.36.0/23 +36.37.39.0/24 +36.37.40.0/21 +36.37.48.0/20 +36.40.0.0/13 +36.48.0.0/15 +36.51.0.0/17 +36.51.128.0/18 +36.51.192.0/19 +36.51.224.0/20 +36.51.240.0/21 +36.51.248.0/22 +36.51.252.0/23 +36.56.0.0/13 +36.96.0.0/11 +36.128.0.0/10 +36.192.0.0/11 +36.248.0.0/14 +36.254.0.0/16 +36.255.116.0/22 +36.255.128.0/22 +36.255.164.0/22 +36.255.172.0/22 +36.255.176.0/22 +38.142.239.114/32 +39.0.0.0/24 +39.0.2.0/23 +39.0.4.0/22 +39.0.8.0/21 +39.0.16.0/20 +39.0.32.0/19 +39.0.64.0/18 +39.0.128.0/17 +39.64.0.0/11 +39.96.0.0/13 +39.104.0.0/14 +39.108.0.0/16 +39.109.120.0/23 +39.128.0.0/10 +40.0.176.0/20 +40.0.247.0/24 +40.0.248.0/22 +40.0.252.0/23 +40.0.255.0/24 +40.72.0.0/15 +40.77.136.112/28 +40.77.236.224/27 +40.77.254.64/27 +40.125.128.0/17 +40.126.64.0/18 +40.198.10.0/24 +40.198.16.0/21 +40.198.24.0/23 +40.251.225.0/24 +40.251.227.0/24 +42.0.0.0/22 +42.0.8.0/21 +42.0.16.0/21 +42.0.24.0/22 +42.0.32.0/19 +42.0.128.0/17 +42.1.0.0/19 +42.1.32.0/20 +42.1.48.0/21 +42.1.56.0/22 +42.4.0.0/14 +42.48.0.0/13 +42.56.0.0/14 +42.62.0.0/17 +42.62.128.0/19 +42.62.160.0/20 +42.62.180.0/22 +42.62.184.0/21 +42.63.0.0/16 +42.80.0.0/15 +42.83.64.0/20 +42.83.80.0/22 +42.83.88.0/21 +42.83.96.0/19 +42.83.128.0/23 +42.83.134.0/24 +42.83.139.0/24 +42.83.140.0/22 +42.83.144.0/20 +42.83.160.0/19 +42.83.192.0/18 +42.84.0.0/14 +42.88.0.0/13 +42.96.64.0/19 +42.96.96.0/21 +42.96.108.0/22 +42.96.112.0/20 +42.96.128.0/17 +42.97.0.0/16 +42.99.0.0/18 +42.99.64.0/19 +42.99.96.0/20 +42.99.112.0/22 +42.99.120.0/21 +42.100.0.0/14 +42.120.0.0/15 +42.122.0.0/16 +42.123.0.0/19 +42.123.36.0/22 +42.123.40.0/21 +42.123.48.0/20 +42.123.64.0/18 +42.123.128.0/17 +42.128.0.0/12 +42.156.0.0/19 +42.156.36.0/22 +42.156.40.0/21 +42.156.48.0/20 +42.156.64.0/18 +42.156.128.0/17 +42.157.0.0/21 +42.157.8.0/22 +42.157.14.0/23 +42.157.16.0/20 +42.157.32.0/19 +42.157.64.0/18 +42.157.128.0/17 +42.158.0.0/15 +42.160.0.0/12 +42.176.0.0/13 +42.184.0.0/15 +42.186.0.0/16 +42.187.0.0/18 +42.187.64.0/19 +42.187.96.0/20 +42.187.112.0/21 +42.187.120.0/22 +42.187.128.0/17 +42.192.0.0/13 +42.201.0.0/17 +42.202.0.0/15 +42.204.0.0/14 +42.208.0.0/12 +42.224.0.0/12 +42.240.0.0/16 +42.242.0.0/15 +42.244.0.0/15 +42.246.0.0/16 +42.247.0.0/22 +42.247.4.0/24 +42.247.5.0/25 +42.247.5.128/26 +42.247.5.204/30 +42.247.5.208/28 +42.247.5.224/27 +42.247.6.0/23 +42.247.8.0/21 +42.247.16.0/20 +42.247.32.0/19 +42.247.64.0/18 +42.247.128.0/17 +42.248.0.0/13 +43.224.12.0/22 +43.224.24.0/22 +43.224.44.0/22 +43.224.52.0/22 +43.224.56.0/22 +43.224.68.0/22 +43.224.72.0/22 +43.224.80.0/22 +43.224.100.0/22 +43.224.144.0/22 +43.224.160.0/22 +43.224.176.0/22 +43.224.184.0/22 +43.224.200.0/21 +43.224.208.0/21 +43.224.216.0/22 +43.224.240.0/22 +43.225.76.0/22 +43.225.86.0/24 +43.225.120.0/22 +43.225.180.0/22 +43.225.208.0/22 +43.225.216.0/21 +43.225.224.0/20 +43.225.240.0/21 +43.225.252.0/22 +43.226.32.0/19 +43.226.64.0/19 +43.226.96.0/20 +43.226.112.0/21 +43.226.120.0/22 +43.226.128.0/19 +43.226.160.0/21 +43.226.236.0/22 +43.226.240.0/20 +43.227.0.0/21 +43.227.8.0/22 +43.227.32.0/19 +43.227.64.0/19 +43.227.104.0/22 +43.227.136.0/21 +43.227.144.0/22 +43.227.152.0/21 +43.227.160.0/20 +43.227.176.0/21 +43.227.188.0/22 +43.227.192.0/19 +43.227.232.0/22 +43.227.248.0/21 +43.228.0.0/18 +43.228.64.0/21 +43.228.76.0/22 +43.228.100.0/22 +43.228.116.0/24 +43.228.118.0/23 +43.228.132.0/22 +43.228.136.0/22 +43.228.148.0/22 +43.228.152.0/22 +43.228.188.0/22 +43.229.40.0/22 +43.229.48.0/22 +43.229.56.0/22 +43.229.96.0/22 +43.229.136.0/21 +43.229.168.0/21 +43.229.176.0/20 +43.229.192.0/21 +43.229.216.0/21 +43.229.232.0/21 +43.230.20.0/22 +43.230.32.0/22 +43.230.68.0/22 +43.230.72.0/22 +43.230.84.0/22 +43.230.124.0/22 +43.230.220.0/22 +43.230.224.0/19 +43.231.12.0/22 +43.231.32.0/20 +43.231.80.0/20 +43.231.96.0/20 +43.231.136.0/21 +43.231.144.0/20 +43.231.160.0/20 +43.231.176.0/21 +43.236.0.0/15 +43.238.0.0/16 +43.239.0.0/19 +43.239.32.0/20 +43.239.48.0/22 +43.239.116.0/22 +43.239.120.0/22 +43.239.172.0/22 +43.240.0.0/22 +43.240.56.0/21 +43.240.68.0/22 +43.240.72.0/21 +43.240.84.0/22 +43.240.124.0/22 +43.240.128.0/21 +43.240.136.0/22 +43.240.156.0/22 +43.240.160.0/19 +43.240.192.0/19 +43.240.240.0/20 +43.241.0.0/20 +43.241.16.0/21 +43.241.48.0/22 +43.241.76.0/22 +43.241.80.0/20 +43.241.112.0/22 +43.241.168.0/21 +43.241.176.0/21 +43.241.184.0/22 +43.241.208.0/20 +43.241.224.0/20 +43.241.240.0/22 +43.241.248.0/22 +43.242.8.0/21 +43.242.16.0/20 +43.242.48.0/22 +43.242.53.0/24 +43.242.54.0/23 +43.242.56.0/21 +43.242.64.0/22 +43.242.72.0/21 +43.242.80.0/20 +43.242.96.0/22 +43.242.144.0/20 +43.242.160.0/21 +43.242.180.0/22 +43.242.188.0/22 +43.242.192.0/21 +43.242.204.0/22 +43.242.216.0/21 +43.242.252.0/22 +43.243.4.0/22 +43.243.8.0/21 +43.243.16.0/22 +43.243.88.0/22 +43.243.128.0/22 +43.243.136.0/22 +43.243.144.0/21 +43.243.156.0/22 +43.243.180.0/22 +43.243.228.0/22 +43.243.232.0/22 +43.243.244.0/22 +43.246.0.0/18 +43.246.64.0/19 +43.246.96.0/22 +43.246.228.0/22 +43.247.4.0/22 +43.247.8.0/22 +43.247.44.0/22 +43.247.48.0/22 +43.247.68.0/22 +43.247.76.0/22 +43.247.84.0/22 +43.247.88.0/21 +43.247.96.0/21 +43.247.108.0/22 +43.247.112.0/22 +43.247.148.0/22 +43.247.152.0/22 +43.247.176.0/20 +43.247.196.0/22 +43.247.200.0/21 +43.247.208.0/20 +43.247.224.0/19 +43.248.0.0/21 +43.248.20.0/22 +43.248.28.0/22 +43.248.48.0/22 +43.248.76.0/22 +43.248.80.0/20 +43.248.96.0/19 +43.248.128.0/20 +43.248.144.0/21 +43.248.176.0/20 +43.248.192.0/20 +43.248.208.0/22 +43.248.228.0/22 +43.248.232.0/22 +43.248.244.0/22 +43.249.4.0/22 +43.249.120.0/22 +43.249.132.0/22 +43.249.136.0/22 +43.249.144.0/20 +43.249.160.0/21 +43.249.168.0/22 +43.249.192.0/22 +43.249.236.0/22 +43.250.4.0/22 +43.250.12.0/22 +43.250.16.0/21 +43.250.28.0/22 +43.250.32.0/22 +43.250.96.0/21 +43.250.108.0/22 +43.250.112.0/21 +43.250.128.0/22 +43.250.144.0/21 +43.250.160.0/22 +43.250.168.0/22 +43.250.176.0/22 +43.250.200.0/22 +43.250.212.0/22 +43.250.216.0/21 +43.250.236.0/22 +43.250.244.0/22 +43.251.4.0/22 +43.251.36.0/22 +43.251.192.0/22 +43.251.232.0/22 +43.251.244.0/22 +43.252.48.0/22 +43.252.56.0/22 +43.252.224.0/22 +43.254.0.0/21 +43.254.8.0/22 +43.254.24.0/22 +43.254.36.0/22 +43.254.44.0/22 +43.254.52.0/22 +43.254.64.0/22 +43.254.72.0/22 +43.254.84.0/22 +43.254.88.0/21 +43.254.100.0/22 +43.254.104.0/22 +43.254.112.0/21 +43.254.128.0/22 +43.254.136.0/21 +43.254.144.0/20 +43.254.168.0/21 +43.254.180.0/22 +43.254.184.0/21 +43.254.192.0/22 +43.254.200.0/22 +43.254.208.0/22 +43.254.220.0/22 +43.254.224.0/20 +43.254.240.0/22 +43.254.248.0/21 +43.255.0.0/21 +43.255.8.0/22 +43.255.16.0/22 +43.255.48.0/22 +43.255.64.0/20 +43.255.84.0/22 +43.255.96.0/22 +43.255.144.0/22 +43.255.176.0/22 +43.255.184.0/22 +43.255.192.0/22 +43.255.200.0/21 +43.255.208.0/21 +43.255.224.0/21 +43.255.232.0/22 +43.255.244.0/22 +45.40.192.0/20 +45.40.208.0/21 +45.40.224.0/19 +45.65.16.0/20 +45.112.132.0/22 +45.112.188.0/22 +45.112.208.0/22 +45.112.216.0/21 +45.112.228.0/22 +45.112.232.0/21 +45.113.12.0/22 +45.113.16.0/20 +45.113.40.0/22 +45.113.52.0/22 +45.113.72.0/22 +45.113.144.0/21 +45.113.168.0/22 +45.113.184.0/22 +45.113.200.0/21 +45.113.208.0/20 +45.113.240.0/22 +45.113.252.0/22 +45.114.0.0/22 +45.114.32.0/22 +45.114.52.0/22 +45.114.96.0/22 +45.114.136.0/22 +45.114.196.0/22 +45.114.200.0/22 +45.114.228.0/22 +45.114.237.0/24 +45.114.238.0/23 +45.114.252.0/22 +45.115.44.0/22 +45.115.100.0/22 +45.115.120.0/22 +45.115.132.0/22 +45.115.144.0/22 +45.115.156.0/22 +45.115.164.0/22 +45.115.200.0/22 +45.115.212.0/22 +45.115.244.0/22 +45.115.248.0/22 +45.116.16.0/22 +45.116.24.0/22 +45.116.32.0/21 +45.116.52.0/22 +45.116.96.0/21 +45.116.140.0/22 +45.116.152.0/22 +45.116.208.0/22 +45.117.8.0/22 +45.117.20.0/22 +45.117.68.0/22 +45.117.124.0/22 +45.117.252.0/22 +45.119.60.0/22 +45.119.64.0/21 +45.119.72.0/22 +45.119.104.0/22 +45.119.232.0/22 +45.120.100.0/22 +45.120.140.0/22 +45.120.164.0/22 +45.120.180.128/27 +45.120.240.0/22 +45.121.52.0/22 +45.121.64.0/21 +45.121.72.0/22 +45.121.92.0/22 +45.121.96.0/22 +45.121.172.0/22 +45.121.176.0/22 +45.121.240.0/20 +45.122.0.0/19 +45.122.32.0/21 +45.122.40.0/22 +45.122.60.0/22 +45.122.64.0/19 +45.122.96.0/20 +45.122.112.0/21 +45.122.160.0/19 +45.122.192.0/20 +45.122.208.0/21 +45.122.216.0/22 +45.123.28.0/22 +45.123.32.0/21 +45.123.44.0/22 +45.123.48.0/20 +45.123.64.0/20 +45.123.80.0/21 +45.123.120.0/22 +45.123.128.0/21 +45.123.136.0/22 +45.123.148.0/22 +45.123.152.0/21 +45.123.164.0/22 +45.123.168.0/21 +45.123.176.0/21 +45.123.184.0/22 +45.123.204.0/22 +45.123.212.0/22 +45.123.224.0/19 +45.124.0.0/22 +45.124.20.0/22 +45.124.28.0/22 +45.124.32.0/21 +45.124.44.0/22 +45.124.68.0/22 +45.124.76.0/22 +45.124.80.0/22 +45.124.100.0/22 +45.124.124.0/22 +45.124.172.0/22 +45.124.176.0/22 +45.124.208.0/22 +45.124.248.0/22 +45.125.24.0/22 +45.125.44.0/22 +45.125.52.0/22 +45.125.56.0/22 +45.125.76.0/22 +45.125.80.0/20 +45.125.96.0/21 +45.125.136.0/22 +45.126.48.0/21 +45.126.108.0/22 +45.126.112.0/21 +45.126.120.0/22 +45.126.220.0/22 +45.127.8.0/21 +45.127.128.0/22 +45.127.144.0/21 +45.127.156.0/22 +45.248.8.0/22 +45.248.80.0/22 +45.248.88.0/22 +45.248.96.0/20 +45.248.128.0/21 +45.248.204.0/22 +45.248.208.0/20 +45.248.224.0/19 +45.249.0.0/21 +45.249.12.0/22 +45.249.16.0/20 +45.249.32.0/21 +45.249.112.0/22 +45.249.188.0/22 +45.249.192.0/20 +45.249.208.0/21 +45.250.12.0/22 +45.250.16.0/22 +45.250.28.0/22 +45.250.32.0/21 +45.250.40.0/22 +45.250.76.0/22 +45.250.80.0/20 +45.250.96.0/22 +45.250.104.0/21 +45.250.112.0/20 +45.250.128.0/20 +45.250.144.0/21 +45.250.152.0/22 +45.250.164.0/22 +45.250.180.0/22 +45.250.184.0/21 +45.250.192.0/22 +45.251.0.0/22 +45.251.8.0/22 +45.251.16.0/21 +45.251.52.0/22 +45.251.84.0/22 +45.251.88.0/21 +45.251.96.0/21 +45.251.120.0/21 +45.251.137.0/24 +45.251.138.0/23 +45.251.140.0/22 +45.251.144.0/20 +45.251.160.0/19 +45.251.192.0/19 +45.251.224.0/22 +45.252.0.0/19 +45.252.32.0/20 +45.252.48.0/22 +45.252.84.0/22 +45.252.88.0/21 +45.252.96.0/19 +45.252.128.0/19 +45.252.160.0/20 +45.252.176.0/22 +45.252.192.0/19 +45.252.224.0/21 +45.252.232.0/22 +45.253.0.0/18 +45.253.64.0/20 +45.253.80.0/21 +45.253.92.0/22 +45.253.96.0/20 +45.253.112.0/21 +45.253.120.0/22 +45.253.130.0/23 +45.253.132.0/22 +45.253.136.0/21 +45.253.144.0/20 +45.253.160.0/19 +45.253.192.0/19 +45.253.224.0/20 +45.253.240.0/22 +45.254.0.0/20 +45.254.16.0/21 +45.254.28.0/22 +45.254.40.0/22 +45.254.48.0/20 +45.254.64.0/18 +45.254.128.0/18 +45.254.192.0/19 +45.254.224.0/21 +45.254.236.0/22 +45.254.240.0/22 +45.254.248.0/22 +45.255.0.0/18 +45.255.64.0/19 +45.255.96.0/20 +45.255.112.0/21 +45.255.120.0/22 +45.255.136.0/21 +45.255.144.0/20 +45.255.160.0/19 +45.255.192.0/19 +45.255.224.0/20 +45.255.240.0/21 +45.255.248.0/22 +46.248.24.0/23 +47.92.0.0/14 +47.96.0.0/11 +49.4.0.0/14 +49.51.56.0/22 +49.51.60.0/23 +49.51.110.0/23 +49.51.112.0/20 +49.52.0.0/14 +49.64.0.0/11 +49.112.0.0/13 +49.120.0.0/14 +49.128.0.0/24 +49.128.2.0/23 +49.128.4.0/22 +49.140.0.0/15 +49.152.0.0/14 +49.208.0.0/14 +49.220.0.0/14 +49.232.0.0/14 +49.239.0.0/18 +49.239.192.0/18 +52.80.0.0/14 +52.94.249.0/27 +52.130.0.0/15 +54.222.0.0/15 +54.231.208.0/20 +54.240.224.0/24 +57.92.96.0/20 +58.14.0.0/15 +58.16.0.0/13 +58.24.0.0/15 +58.30.0.0/15 +58.32.0.0/11 +58.65.232.0/21 +58.66.0.0/15 +58.68.128.0/19 +58.68.160.0/23 +58.68.163.0/24 +58.68.164.0/22 +58.68.179.0/24 +58.68.180.0/24 +58.68.200.0/21 +58.68.208.0/20 +58.68.224.0/19 +58.82.0.0/17 +58.83.0.0/16 +58.87.64.0/18 +58.99.128.0/17 +58.100.0.0/15 +58.116.0.0/14 +58.128.0.0/13 +58.144.0.0/16 +58.154.0.0/15 +58.192.0.0/11 +58.240.0.0/12 +59.32.0.0/11 +59.64.0.0/12 +59.80.0.0/15 +59.82.0.0/16 +59.83.0.0/18 +59.83.132.0/22 +59.83.136.0/21 +59.83.144.0/20 +59.83.160.0/19 +59.83.192.0/19 +59.83.224.0/20 +59.83.240.0/21 +59.83.248.0/22 +59.83.252.0/23 +59.83.254.0/24 +59.107.0.0/16 +59.108.0.0/14 +59.151.0.0/17 +59.152.16.0/20 +59.152.36.0/22 +59.152.64.0/20 +59.152.112.0/21 +59.153.4.0/22 +59.153.32.0/22 +59.153.64.0/21 +59.153.72.0/22 +59.153.92.0/22 +59.153.136.0/22 +59.153.152.0/21 +59.153.164.0/22 +59.153.168.0/21 +59.153.176.0/20 +59.153.192.0/22 +59.155.0.0/16 +59.172.0.0/14 +59.191.0.0/17 +59.192.0.0/10 +60.0.0.0/11 +60.55.0.0/16 +60.63.0.0/16 +60.160.0.0/11 +60.194.0.0/15 +60.200.0.0/13 +60.208.0.0/12 +60.232.0.0/15 +60.235.0.0/16 +60.245.128.0/17 +60.247.0.0/16 +60.252.0.0/16 +60.253.128.0/17 +60.255.0.0/16 +61.4.81.0/24 +61.4.82.0/23 +61.4.84.0/22 +61.4.88.0/21 +61.4.176.0/20 +61.8.160.0/20 +61.14.212.0/22 +61.14.216.0/21 +61.14.240.0/21 +61.28.0.0/17 +61.29.128.0/18 +61.29.192.0/19 +61.29.224.0/20 +61.45.128.0/18 +61.45.224.0/20 +61.47.128.0/18 +61.48.0.0/13 +61.87.192.0/18 +61.128.0.0/10 +61.232.0.0/14 +61.236.0.0/15 +61.240.0.0/14 +62.234.0.0/16 +68.79.0.0/18 +69.230.192.0/18 +69.231.128.0/18 +69.234.192.0/18 +69.235.128.0/18 +71.131.192.0/18 +71.132.0.0/18 +71.136.64.0/18 +71.137.0.0/18 +72.163.240.0/23 +72.163.248.0/22 +81.68.0.0/14 +81.161.63.0/24 +82.156.0.0/15 +87.254.207.0/24 +91.223.53.0/24 +91.239.190.0/24 +93.183.14.0/24 +93.183.18.0/24 +94.191.0.0/17 +101.0.0.0/22 +101.1.0.0/22 +101.2.172.0/22 +101.4.0.0/14 +101.16.0.0/12 +101.32.0.0/14 +101.36.0.0/18 +101.36.64.0/20 +101.36.88.0/21 +101.36.96.0/19 +101.36.128.0/17 +101.37.0.0/16 +101.38.0.0/15 +101.40.0.0/13 +101.48.0.0/15 +101.50.8.0/21 +101.50.56.0/22 +101.52.0.0/16 +101.53.100.0/22 +101.54.0.0/16 +101.55.224.0/21 +101.64.0.0/13 +101.72.0.0/14 +101.76.0.0/15 +101.78.0.0/22 +101.78.32.0/19 +101.80.0.0/12 +101.96.0.0/21 +101.96.8.0/22 +101.96.16.0/20 +101.96.128.0/17 +101.99.96.0/19 +101.101.64.0/19 +101.101.100.0/24 +101.101.102.0/23 +101.101.104.0/21 +101.101.112.0/20 +101.102.64.0/19 +101.102.100.0/23 +101.102.102.0/24 +101.102.104.0/21 +101.102.112.0/20 +101.104.0.0/14 +101.110.64.0/19 +101.110.96.0/20 +101.110.116.0/22 +101.110.120.0/21 +101.120.0.0/14 +101.124.0.0/15 +101.126.0.0/16 +101.128.0.0/22 +101.128.8.0/21 +101.128.16.0/20 +101.128.32.0/19 +101.129.0.0/16 +101.130.0.0/15 +101.132.0.0/15 +101.134.0.0/17 +101.134.128.0/19 +101.134.160.0/20 +101.134.176.0/21 +101.134.184.0/22 +101.134.189.0/24 +101.134.190.0/23 +101.134.192.0/18 +101.135.0.0/16 +101.144.0.0/12 +101.192.0.0/14 +101.196.0.0/16 +101.198.128.0/18 +101.198.194.0/24 +101.198.196.0/23 +101.198.200.0/22 +101.198.224.0/19 +101.199.0.0/19 +101.199.48.0/20 +101.199.64.0/18 +101.199.128.0/17 +101.200.0.0/15 +101.203.128.0/19 +101.203.160.0/21 +101.203.172.0/22 +101.203.176.0/20 +101.204.0.0/14 +101.224.0.0/13 +101.232.0.0/15 +101.234.64.0/21 +101.234.76.0/22 +101.234.80.0/20 +101.234.96.0/19 +101.236.0.0/14 +101.240.0.0/13 +101.248.0.0/15 +101.251.0.0/22 +101.251.8.0/21 +101.251.16.0/20 +101.251.32.0/19 +101.251.64.0/18 +101.251.128.0/17 +101.252.0.0/15 +101.254.0.0/16 +102.176.130.0/24 +103.1.8.0/22 +103.1.20.0/22 +103.1.24.0/22 +103.1.88.0/22 +103.1.168.0/22 +103.2.108.0/22 +103.2.156.0/22 +103.2.164.0/22 +103.2.200.0/21 +103.2.208.0/21 +103.3.84.0/22 +103.3.88.0/21 +103.3.96.0/19 +103.3.128.0/20 +103.3.148.0/22 +103.3.152.0/21 +103.4.56.0/22 +103.4.168.0/22 +103.4.184.0/22 +103.5.36.0/22 +103.5.52.0/23 +103.5.56.0/22 +103.5.152.0/22 +103.5.168.0/22 +103.5.192.0/22 +103.5.252.0/22 +103.6.76.0/22 +103.6.108.0/22 +103.6.120.0/22 +103.6.220.0/22 +103.6.228.0/22 +103.7.140.0/22 +103.7.212.0/22 +103.7.216.0/21 +103.8.0.0/21 +103.8.8.0/22 +103.8.32.0/22 +103.8.52.0/22 +103.8.68.0/22 +103.8.108.0/22 +103.8.156.0/22 +103.8.200.0/21 +103.8.220.0/22 +103.9.8.0/22 +103.9.24.0/22 +103.9.108.0/22 +103.9.152.0/22 +103.9.248.0/21 +103.10.0.0/22 +103.10.16.0/22 +103.10.84.0/22 +103.10.111.0/24 +103.10.140.0/22 +103.11.16.0/22 +103.11.168.0/22 +103.11.180.0/22 +103.12.32.0/22 +103.12.136.0/22 +103.12.184.0/22 +103.12.232.0/22 +103.13.12.0/22 +103.13.124.0/22 +103.13.144.0/22 +103.13.196.0/22 +103.13.244.0/22 +103.14.84.0/22 +103.14.132.0/22 +103.14.136.0/22 +103.14.156.0/22 +103.14.240.0/22 +103.15.4.0/22 +103.15.8.0/22 +103.15.16.0/22 +103.15.96.0/22 +103.15.200.0/22 +103.16.52.0/22 +103.16.80.0/21 +103.16.88.0/22 +103.16.108.0/22 +103.16.124.0/22 +103.17.40.0/22 +103.17.64.0/22 +103.17.120.0/23 +103.17.136.0/22 +103.17.160.0/22 +103.17.204.0/22 +103.17.228.0/22 +103.18.192.0/22 +103.18.208.0/21 +103.18.224.0/22 +103.19.12.0/22 +103.19.40.0/21 +103.19.64.0/21 +103.19.72.0/22 +103.19.232.0/22 +103.20.12.0/22 +103.20.32.0/23 +103.20.34.0/24 +103.20.68.0/22 +103.20.112.0/22 +103.20.128.0/22 +103.20.160.0/22 +103.20.248.0/22 +103.21.112.0/21 +103.21.140.0/22 +103.21.176.0/22 +103.21.240.0/22 +103.22.0.0/18 +103.22.64.0/19 +103.22.100.0/22 +103.22.104.0/21 +103.22.112.0/20 +103.22.188.0/22 +103.22.228.0/22 +103.22.252.0/22 +103.23.8.0/22 +103.23.56.0/22 +103.23.160.0/21 +103.23.176.0/22 +103.23.228.0/22 +103.24.24.0/22 +103.24.116.0/22 +103.24.128.0/22 +103.24.144.0/22 +103.24.176.0/22 +103.24.184.0/22 +103.24.228.0/22 +103.24.252.0/22 +103.25.20.0/22 +103.25.24.0/21 +103.25.32.0/21 +103.25.40.0/22 +103.25.48.0/22 +103.25.64.0/21 +103.25.148.0/22 +103.25.156.0/22 +103.25.216.0/22 +103.26.0.0/22 +103.26.64.0/22 +103.26.76.0/22 +103.26.116.0/22 +103.26.156.0/22 +103.26.160.0/22 +103.26.228.0/22 +103.26.240.0/22 +103.27.4.0/22 +103.27.12.0/22 +103.27.24.0/22 +103.27.56.0/22 +103.27.96.0/22 +103.27.240.0/22 +103.28.4.0/22 +103.28.8.0/22 +103.28.184.0/22 +103.28.204.0/22 +103.28.212.0/22 +103.29.16.0/22 +103.29.128.0/21 +103.29.136.0/22 +103.30.20.0/22 +103.30.96.0/22 +103.30.148.0/22 +103.30.202.0/23 +103.30.228.0/22 +103.30.236.0/22 +103.31.0.0/22 +103.31.48.0/21 +103.31.60.0/22 +103.31.64.0/21 +103.31.72.0/24 +103.31.148.0/22 +103.31.160.0/22 +103.31.168.0/22 +103.31.200.0/22 +103.31.236.0/22 +103.32.0.0/15 +103.34.0.0/16 +103.35.0.0/19 +103.35.32.0/20 +103.35.48.0/22 +103.35.104.0/22 +103.35.220.0/22 +103.36.28.0/22 +103.36.36.0/22 +103.36.56.0/21 +103.36.64.0/22 +103.36.72.0/22 +103.36.96.0/22 +103.36.132.0/22 +103.36.136.0/22 +103.36.160.0/19 +103.36.192.0/19 +103.36.224.0/20 +103.36.240.0/21 +103.37.12.0/22 +103.37.16.0/22 +103.37.24.0/22 +103.37.44.0/22 +103.37.52.0/22 +103.37.56.0/22 +103.37.72.0/22 +103.37.100.0/22 +103.37.104.0/22 +103.37.136.0/21 +103.37.144.0/20 +103.37.160.0/21 +103.37.172.0/22 +103.37.176.0/22 +103.37.188.0/22 +103.37.208.0/20 +103.37.252.0/22 +103.38.0.0/22 +103.38.32.0/22 +103.38.40.0/21 +103.38.76.0/22 +103.38.84.0/22 +103.38.92.0/22 +103.38.96.0/22 +103.38.116.0/22 +103.38.132.0/22 +103.38.140.0/22 +103.38.220.0/22 +103.38.224.0/21 +103.38.232.0/22 +103.38.252.0/23 +103.39.64.0/22 +103.39.88.0/22 +103.39.100.0/22 +103.39.104.0/22 +103.39.160.0/19 +103.39.200.0/21 +103.39.208.0/20 +103.39.224.0/21 +103.39.232.0/22 +103.40.12.0/22 +103.40.16.0/20 +103.40.32.0/20 +103.40.88.0/22 +103.40.192.0/22 +103.40.212.0/22 +103.40.220.0/22 +103.40.228.0/22 +103.40.232.0/21 +103.40.240.0/20 +103.41.0.0/22 +103.41.52.0/22 +103.41.140.0/22 +103.41.148.0/22 +103.41.152.0/22 +103.41.160.0/21 +103.41.220.0/22 +103.41.224.0/21 +103.41.232.0/22 +103.42.8.0/22 +103.42.24.0/22 +103.42.32.0/22 +103.42.64.0/21 +103.42.76.0/22 +103.42.232.0/22 +103.43.26.0/23 +103.43.96.0/21 +103.43.104.0/22 +103.43.124.0/22 +103.43.184.0/22 +103.43.192.0/21 +103.43.208.0/22 +103.43.220.0/22 +103.43.224.0/22 +103.43.240.0/22 +103.44.58.0/23 +103.44.80.0/22 +103.44.120.0/21 +103.44.144.0/22 +103.44.152.0/22 +103.44.168.0/22 +103.44.176.0/20 +103.44.192.0/20 +103.44.224.0/22 +103.44.236.0/22 +103.44.240.0/20 +103.45.0.0/18 +103.45.72.0/21 +103.45.80.0/20 +103.45.96.0/19 +103.45.128.0/18 +103.45.192.0/19 +103.45.224.0/22 +103.45.248.0/22 +103.46.0.0/22 +103.46.12.0/22 +103.46.16.0/20 +103.46.32.0/19 +103.46.64.0/18 +103.46.128.0/21 +103.46.136.0/22 +103.46.152.0/21 +103.46.160.0/20 +103.46.176.0/21 +103.46.244.0/22 +103.46.248.0/22 +103.47.4.0/22 +103.47.20.0/22 +103.47.36.0/22 +103.47.40.0/22 +103.47.48.0/22 +103.47.80.0/22 +103.47.96.0/22 +103.47.116.0/22 +103.47.120.0/22 +103.47.136.0/21 +103.47.212.0/22 +103.48.52.0/22 +103.48.92.0/22 +103.48.148.0/22 +103.48.152.0/22 +103.48.202.0/23 +103.48.216.0/21 +103.48.224.0/20 +103.48.240.0/21 +103.49.12.0/22 +103.49.20.0/22 +103.49.72.0/21 +103.49.96.0/22 +103.49.108.0/22 +103.49.128.0/22 +103.49.176.0/21 +103.50.36.0/22 +103.50.44.0/22 +103.50.48.0/20 +103.50.64.0/21 +103.50.72.0/22 +103.50.92.0/22 +103.50.108.0/22 +103.50.112.0/20 +103.50.132.0/22 +103.50.136.0/21 +103.50.172.0/22 +103.50.176.0/20 +103.50.192.0/21 +103.50.200.0/22 +103.50.220.0/22 +103.50.224.0/20 +103.50.240.0/21 +103.50.248.0/22 +103.52.40.0/22 +103.52.72.0/21 +103.52.80.0/21 +103.52.96.0/21 +103.52.104.0/22 +103.52.160.0/21 +103.52.172.0/22 +103.52.176.0/22 +103.52.184.0/22 +103.52.196.0/22 +103.53.64.0/21 +103.53.92.0/22 +103.53.124.0/22 +103.53.128.0/20 +103.53.144.0/22 +103.53.160.0/22 +103.53.180.0/22 +103.53.204.0/22 +103.53.208.0/21 +103.53.236.0/22 +103.53.248.0/22 +103.54.8.0/22 +103.54.48.0/22 +103.54.160.0/21 +103.54.212.0/22 +103.54.228.0/22 +103.54.240.0/22 +103.55.80.0/22 +103.55.120.0/22 +103.55.152.0/22 +103.55.172.0/22 +103.55.204.0/22 +103.55.208.0/22 +103.55.228.0/22 +103.55.236.0/22 +103.55.240.0/22 +103.56.20.0/22 +103.56.32.0/22 +103.56.56.0/21 +103.56.72.0/21 +103.56.140.0/22 +103.56.152.0/22 +103.56.184.0/22 +103.56.200.0/22 +103.57.12.0/22 +103.57.52.0/22 +103.57.56.0/22 +103.57.76.0/22 +103.57.136.0/22 +103.57.196.0/22 +103.58.24.0/22 +103.59.76.0/22 +103.59.112.0/21 +103.59.120.0/24 +103.59.123.0/24 +103.59.124.0/22 +103.59.128.0/22 +103.59.148.0/22 +103.60.32.0/22 +103.60.44.0/22 +103.60.164.0/22 +103.60.228.0/22 +103.60.236.0/22 +103.61.60.0/24 +103.61.104.0/22 +103.61.140.0/22 +103.61.152.0/21 +103.61.160.0/22 +103.61.172.0/22 +103.61.176.0/22 +103.62.24.0/22 +103.62.72.0/21 +103.62.80.0/21 +103.62.88.0/22 +103.62.96.0/19 +103.62.128.0/21 +103.62.156.0/22 +103.62.160.0/19 +103.62.192.0/22 +103.62.204.0/22 +103.62.208.0/20 +103.62.224.0/22 +103.63.32.0/19 +103.63.64.0/20 +103.63.80.0/21 +103.63.88.0/22 +103.63.140.0/22 +103.63.144.0/22 +103.63.152.0/22 +103.63.160.0/20 +103.63.176.0/21 +103.63.184.0/22 +103.63.192.0/20 +103.63.208.0/22 +103.63.240.0/20 +103.64.0.0/21 +103.64.24.0/21 +103.64.32.0/19 +103.64.64.0/18 +103.64.140.0/22 +103.64.144.0/22 +103.64.152.0/21 +103.64.160.0/19 +103.64.192.0/18 +103.65.0.0/21 +103.65.12.0/22 +103.65.16.0/22 +103.65.48.0/20 +103.65.64.0/19 +103.65.100.0/22 +103.65.104.0/21 +103.65.112.0/20 +103.65.128.0/21 +103.65.136.0/22 +103.65.144.0/20 +103.65.160.0/20 +103.66.32.0/22 +103.66.40.0/22 +103.66.108.0/22 +103.66.200.0/22 +103.66.240.0/20 +103.67.0.0/21 +103.67.8.0/22 +103.67.40.0/21 +103.67.48.0/20 +103.67.64.0/18 +103.67.128.0/20 +103.67.144.0/21 +103.67.172.0/24 +103.67.175.0/24 +103.67.192.0/22 +103.67.212.0/22 +103.68.88.0/22 +103.68.100.0/22 +103.68.128.0/22 +103.69.16.0/22 +103.69.212.0/23 +103.70.8.0/22 +103.70.148.0/22 +103.70.236.0/22 +103.70.252.0/22 +103.71.0.0/22 +103.71.68.0/22 +103.71.72.0/22 +103.71.80.0/21 +103.71.88.0/22 +103.71.120.0/21 +103.71.128.0/22 +103.71.196.0/22 +103.71.200.0/22 +103.71.232.0/22 +103.72.12.0/22 +103.72.16.0/20 +103.72.32.0/20 +103.72.48.0/21 +103.72.112.0/21 +103.72.124.0/22 +103.72.128.0/21 +103.72.149.0/24 +103.72.150.0/23 +103.72.172.0/22 +103.72.180.0/22 +103.72.224.0/19 +103.73.0.0/19 +103.73.48.0/22 +103.73.116.0/22 +103.73.120.0/22 +103.73.128.0/20 +103.73.168.0/22 +103.73.176.0/22 +103.73.204.0/22 +103.73.208.0/22 +103.73.240.0/23 +103.73.244.0/22 +103.73.248.0/22 +103.74.24.0/21 +103.74.32.0/20 +103.74.48.0/22 +103.74.56.0/21 +103.74.80.0/22 +103.74.124.0/22 +103.74.148.0/22 +103.74.152.0/21 +103.74.204.0/22 +103.74.232.0/22 +103.75.87.0/24 +103.75.88.0/21 +103.75.104.0/21 +103.75.112.0/22 +103.75.120.0/22 +103.75.128.0/22 +103.75.144.0/22 +103.75.152.0/22 +103.76.60.0/22 +103.76.64.0/21 +103.76.72.0/22 +103.76.92.0/22 +103.76.216.0/21 +103.76.224.0/22 +103.77.28.0/22 +103.77.52.0/22 +103.77.56.0/22 +103.77.88.0/22 +103.77.132.0/22 +103.77.148.0/22 +103.77.220.0/22 +103.78.56.0/21 +103.78.64.0/22 +103.78.124.0/22 +103.78.172.0/22 +103.78.176.0/22 +103.78.196.0/22 +103.78.228.0/22 +103.79.24.0/21 +103.79.36.0/22 +103.79.40.0/21 +103.79.56.0/21 +103.79.64.0/21 +103.79.80.0/21 +103.79.136.0/22 +103.79.188.0/22 +103.79.192.0/20 +103.79.208.0/21 +103.79.243.0/24 +103.80.44.0/22 +103.80.72.0/22 +103.80.176.0/21 +103.80.184.0/22 +103.80.192.0/22 +103.80.200.0/22 +103.80.232.0/22 +103.81.4.0/22 +103.81.44.0/22 +103.81.48.0/22 +103.81.96.0/22 +103.81.120.0/22 +103.81.148.0/22 +103.81.164.0/22 +103.81.200.0/22 +103.81.232.0/22 +103.82.60.0/22 +103.82.68.0/22 +103.82.84.0/22 +103.82.104.0/22 +103.82.224.0/22 +103.82.236.0/22 +103.83.44.0/22 +103.83.52.0/22 +103.83.60.0/22 +103.83.72.0/22 +103.83.112.0/22 +103.83.132.0/22 +103.83.180.0/22 +103.84.0.0/22 +103.84.12.0/22 +103.84.20.0/22 +103.84.24.0/21 +103.84.48.0/22 +103.84.56.0/22 +103.84.64.0/22 +103.84.72.0/22 +103.85.44.0/22 +103.85.48.0/21 +103.85.56.0/22 +103.85.84.0/22 +103.85.136.0/22 +103.85.144.0/22 +103.85.164.0/22 +103.85.168.0/21 +103.85.176.0/22 +103.86.28.0/22 +103.86.32.0/22 +103.86.60.0/22 +103.86.129.0/24 +103.86.204.0/22 +103.86.208.0/20 +103.86.224.0/19 +103.87.0.0/21 +103.87.20.0/22 +103.87.32.0/22 +103.87.96.0/22 +103.87.132.0/22 +103.87.180.0/22 +103.87.224.0/22 +103.88.4.0/22 +103.88.8.0/21 +103.88.16.0/21 +103.88.32.0/21 +103.88.60.0/22 +103.88.64.0/22 +103.88.72.0/22 +103.88.96.0/21 +103.88.152.0/23 +103.88.164.0/22 +103.88.212.0/22 +103.89.28.0/22 +103.89.96.0/20 +103.89.112.0/22 +103.89.148.0/22 +103.89.172.0/22 +103.89.184.0/21 +103.89.192.0/19 +103.89.224.0/21 +103.90.52.0/22 +103.90.92.0/22 +103.90.100.0/22 +103.90.104.0/21 +103.90.112.0/20 +103.90.128.0/21 +103.90.152.0/22 +103.90.168.0/22 +103.90.173.0/24 +103.90.176.0/22 +103.90.188.0/22 +103.90.192.0/22 +103.91.36.0/22 +103.91.40.0/22 +103.91.108.0/22 +103.91.152.0/22 +103.91.176.0/22 +103.91.200.0/22 +103.91.208.0/21 +103.91.236.0/22 +103.92.48.0/20 +103.92.64.0/20 +103.92.80.0/22 +103.92.88.0/22 +103.92.108.0/22 +103.92.124.0/22 +103.92.132.0/22 +103.92.156.0/22 +103.92.164.0/22 +103.92.168.0/21 +103.92.176.0/20 +103.92.192.0/22 +103.92.236.0/22 +103.92.240.0/20 +103.93.0.0/21 +103.93.28.0/22 +103.93.84.0/22 +103.93.152.0/22 +103.93.180.0/22 +103.93.204.0/22 +103.94.12.0/22 +103.94.20.0/22 +103.94.28.0/22 +103.94.32.0/20 +103.94.72.0/22 +103.94.88.0/22 +103.94.116.0/22 +103.94.160.0/22 +103.94.182.0/24 +103.94.200.0/22 +103.95.31.0/24 +103.95.52.0/22 +103.95.70.0/23 +103.95.88.0/21 +103.95.136.0/21 +103.95.144.0/22 +103.95.152.0/22 +103.95.216.0/21 +103.95.224.0/22 +103.95.236.0/22 +103.95.240.0/20 +103.96.8.0/22 +103.96.124.0/22 +103.96.136.0/22 +103.96.152.0/21 +103.96.160.0/19 +103.96.192.0/20 +103.96.208.0/21 +103.96.216.0/22 +103.97.40.0/22 +103.97.60.0/23 +103.97.112.0/21 +103.97.148.0/22 +103.97.188.0/22 +103.97.192.0/22 +103.98.40.0/21 +103.98.48.0/22 +103.98.56.0/22 +103.98.80.0/22 +103.98.88.0/22 +103.98.100.0/22 +103.98.124.0/24 +103.98.126.0/23 +103.98.136.0/21 +103.98.144.0/22 +103.98.164.0/22 +103.98.168.0/22 +103.98.180.0/22 +103.98.196.0/22 +103.98.216.0/21 +103.98.224.0/21 +103.98.232.0/22 +103.98.240.0/21 +103.98.248.0/23 +103.98.250.0/24 +103.98.252.0/22 +103.99.56.0/22 +103.99.104.0/22 +103.99.116.0/22 +103.99.120.0/22 +103.99.132.0/22 +103.99.136.0/21 +103.99.144.0/22 +103.99.152.0/22 +103.99.220.0/22 +103.99.232.0/21 +103.100.0.0/22 +103.100.32.0/22 +103.100.40.0/22 +103.100.48.0/22 +103.100.56.0/22 +103.100.64.0/22 +103.100.88.0/22 +103.100.116.0/22 +103.100.144.0/22 +103.100.240.0/22 +103.100.248.0/21 +103.101.4.0/22 +103.101.8.0/21 +103.101.60.0/22 +103.101.121.0/24 +103.101.122.0/23 +103.101.124.0/24 +103.101.126.0/23 +103.101.144.0/21 +103.101.180.0/22 +103.101.184.0/22 +103.102.76.0/22 +103.102.80.0/22 +103.102.168.0/21 +103.102.180.0/22 +103.102.184.0/21 +103.102.192.0/22 +103.102.196.0/24 +103.102.200.0/22 +103.102.208.0/21 +103.103.12.0/22 +103.103.16.0/22 +103.103.36.0/22 +103.103.72.0/22 +103.103.188.0/22 +103.103.204.0/22 +103.104.36.0/22 +103.104.40.0/22 +103.104.64.0/22 +103.104.152.0/22 +103.104.252.0/22 +103.105.0.0/21 +103.105.12.0/22 +103.105.16.0/22 +103.105.60.0/22 +103.105.116.0/22 +103.105.180.0/22 +103.105.184.0/22 +103.105.200.0/21 +103.105.220.0/22 +103.106.36.0/22 +103.106.40.0/21 +103.106.60.0/22 +103.106.68.0/22 +103.106.96.0/22 +103.106.120.0/22 +103.106.128.0/21 +103.106.190.0/23 +103.106.196.0/22 +103.106.212.0/22 +103.106.252.0/22 +103.107.0.0/22 +103.107.28.0/22 +103.107.32.0/22 +103.107.44.0/22 +103.107.72.0/22 +103.107.164.0/22 +103.107.168.0/22 +103.107.188.0/22 +103.107.192.0/22 +103.107.208.0/20 +103.108.52.0/22 +103.108.160.0/21 +103.108.194.0/24 +103.108.196.0/22 +103.108.208.0/21 +103.108.224.0/22 +103.108.244.0/22 +103.108.251.0/24 +103.109.20.0/22 +103.109.48.0/22 +103.109.88.0/22 +103.109.106.0/23 +103.109.248.0/22 +103.110.32.0/22 +103.110.92.0/22 +103.110.119.0/24 +103.110.127.0/24 +103.110.128.0/23 +103.110.131.0/24 +103.110.132.0/22 +103.110.136.0/22 +103.110.156.0/22 +103.110.188.0/22 +103.110.204.0/22 +103.111.64.0/22 +103.111.172.0/22 +103.111.252.0/22 +103.112.72.0/22 +103.112.88.0/21 +103.112.108.0/22 +103.112.112.0/22 +103.112.140.0/22 +103.113.4.0/22 +103.113.144.0/22 +103.113.220.0/22 +103.113.232.0/21 +103.114.4.0/22 +103.114.68.0/22 +103.114.100.0/22 +103.114.148.0/22 +103.114.156.0/23 +103.114.159.0/24 +103.114.212.0/22 +103.114.236.0/22 +103.114.240.0/22 +103.115.52.0/22 +103.115.68.0/22 +103.115.92.0/22 +103.115.120.0/22 +103.115.148.0/22 +103.115.248.0/22 +103.116.76.0/22 +103.116.92.0/22 +103.116.120.0/22 +103.116.128.0/22 +103.116.150.0/23 +103.116.184.0/22 +103.116.220.0/22 +103.116.224.0/21 +103.117.16.0/22 +103.117.88.0/22 +103.117.188.0/22 +103.117.220.0/22 +103.118.19.0/24 +103.118.52.0/22 +103.118.56.0/21 +103.118.64.0/21 +103.118.72.0/22 +103.118.88.0/22 +103.118.173.0/24 +103.119.115.0/24 +103.119.156.0/22 +103.119.180.0/22 +103.119.200.0/22 +103.119.224.0/22 +103.120.52.0/22 +103.120.72.0/22 +103.120.76.0/24 +103.120.88.0/22 +103.120.96.0/22 +103.120.140.0/22 +103.120.196.0/22 +103.120.224.0/22 +103.121.52.0/22 +103.121.160.0/21 +103.121.250.0/24 +103.121.252.0/22 +103.122.48.0/22 +103.122.178.0/23 +103.122.192.0/22 +103.122.240.0/23 +103.122.242.0/24 +103.123.4.0/22 +103.123.56.0/22 +103.123.88.0/21 +103.123.116.0/22 +103.123.176.0/22 +103.123.200.0/21 +103.123.208.0/21 +103.124.24.0/22 +103.124.48.0/22 +103.124.64.0/22 +103.124.212.0/22 +103.124.216.0/22 +103.125.20.0/22 +103.125.44.0/22 +103.125.132.0/22 +103.125.164.0/22 +103.125.196.0/22 +103.125.236.0/22 +103.126.0.0/22 +103.126.16.0/23 +103.126.44.0/22 +103.126.124.0/22 +103.126.128.0/22 +103.129.53.0/24 +103.129.54.0/23 +103.129.148.0/22 +103.130.132.0/22 +103.130.160.0/22 +103.130.228.0/22 +103.131.20.0/22 +103.131.36.0/22 +103.131.152.0/22 +103.131.168.0/22 +103.131.224.0/21 +103.131.240.0/22 +103.132.60.0/22 +103.132.64.0/20 +103.132.80.0/22 +103.132.104.0/21 +103.132.112.0/21 +103.132.120.0/22 +103.132.188.0/22 +103.132.208.0/21 +103.133.12.0/22 +103.133.40.0/22 +103.133.128.0/22 +103.133.232.0/22 +103.134.196.0/22 +103.135.80.0/22 +103.135.124.0/22 +103.135.148.0/22 +103.135.156.0/22 +103.135.160.0/21 +103.135.176.0/22 +103.135.184.0/22 +103.135.192.0/21 +103.135.236.0/22 +103.136.128.0/22 +103.136.232.0/22 +103.137.58.0/23 +103.137.60.0/24 +103.137.136.0/23 +103.137.149.0/24 +103.137.180.0/22 +103.137.236.0/22 +103.138.2.0/23 +103.138.134.0/23 +103.138.208.0/23 +103.138.220.0/23 +103.138.248.0/23 +103.139.22.0/23 +103.139.134.0/23 +103.139.136.0/23 +103.139.172.0/23 +103.139.204.0/23 +103.139.212.0/23 +103.140.14.0/23 +103.140.46.0/23 +103.140.140.0/23 +103.140.144.0/23 +103.140.192.0/23 +103.141.10.0/23 +103.141.58.0/23 +103.141.128.0/23 +103.141.186.0/23 +103.141.242.0/23 +103.142.0.0/23 +103.142.28.0/23 +103.142.58.0/23 +103.142.82.0/23 +103.142.96.0/23 +103.142.122.0/23 +103.142.128.0/23 +103.142.154.0/23 +103.142.156.0/23 +103.142.180.0/23 +103.142.186.0/23 +103.142.220.0/23 +103.142.230.0/24 +103.142.234.0/23 +103.142.238.0/23 +103.143.16.0/22 +103.143.31.0/24 +103.143.74.0/23 +103.143.124.0/23 +103.143.132.0/22 +103.143.174.0/23 +103.143.228.0/23 +103.144.66.0/23 +103.144.70.0/23 +103.144.72.0/23 +103.144.136.0/23 +103.144.158.0/23 +103.145.40.0/22 +103.145.73.0/24 +103.145.80.0/23 +103.145.90.0/23 +103.145.92.0/22 +103.145.98.0/23 +103.145.107.0/24 +103.145.188.0/23 +103.146.6.0/23 +103.146.72.0/23 +103.146.90.0/23 +103.146.126.0/23 +103.146.138.0/23 +103.146.236.0/23 +103.146.252.0/23 +103.147.124.0/23 +103.147.198.0/23 +103.147.206.0/23 +103.148.174.0/23 +103.192.0.0/19 +103.192.48.0/21 +103.192.56.0/22 +103.192.84.0/22 +103.192.88.0/21 +103.192.96.0/20 +103.192.112.0/22 +103.192.128.0/20 +103.192.144.0/22 +103.192.164.0/22 +103.192.188.0/22 +103.192.208.0/21 +103.192.216.0/22 +103.192.252.0/22 +103.193.40.0/21 +103.193.120.0/22 +103.193.140.0/22 +103.193.160.0/22 +103.193.188.0/22 +103.193.192.0/22 +103.193.212.0/22 +103.193.216.0/21 +103.193.224.0/20 +103.194.16.0/22 +103.194.230.0/23 +103.195.112.0/22 +103.195.152.0/22 +103.195.160.0/22 +103.196.64.0/22 +103.196.72.0/22 +103.196.88.0/21 +103.196.96.0/22 +103.196.168.0/22 +103.196.185.0/24 +103.196.186.0/23 +103.197.181.0/24 +103.197.183.0/24 +103.197.228.0/22 +103.197.253.0/24 +103.197.254.0/23 +103.198.20.0/22 +103.198.60.0/22 +103.198.64.0/22 +103.198.72.0/22 +103.198.124.0/22 +103.198.156.0/22 +103.198.180.0/22 +103.198.196.0/22 +103.198.200.0/22 +103.198.216.0/21 +103.198.224.0/20 +103.198.240.0/21 +103.199.164.0/22 +103.199.196.0/22 +103.199.228.0/22 +103.199.252.0/22 +103.200.52.0/22 +103.200.64.0/21 +103.200.136.0/21 +103.200.144.0/20 +103.200.160.0/19 +103.200.192.0/22 +103.200.220.0/22 +103.200.224.0/19 +103.201.0.0/20 +103.201.16.0/21 +103.201.28.0/22 +103.201.32.0/19 +103.201.64.0/22 +103.201.76.0/22 +103.201.80.0/20 +103.201.96.0/20 +103.201.112.0/21 +103.201.120.0/22 +103.201.152.0/21 +103.201.160.0/19 +103.201.192.0/18 +103.202.0.0/19 +103.202.32.0/20 +103.202.56.0/21 +103.202.64.0/18 +103.202.128.0/20 +103.202.144.0/22 +103.202.152.0/21 +103.202.160.0/19 +103.202.192.0/20 +103.202.212.0/22 +103.202.228.0/22 +103.202.236.0/22 +103.202.240.0/20 +103.203.0.0/19 +103.203.32.0/22 +103.203.96.0/19 +103.203.128.0/22 +103.203.140.0/22 +103.203.164.0/22 +103.203.168.0/22 +103.203.192.0/22 +103.203.200.0/22 +103.203.212.0/22 +103.203.216.0/22 +103.204.24.0/22 +103.204.88.0/22 +103.204.112.0/22 +103.204.136.0/21 +103.204.144.0/21 +103.204.152.0/22 +103.204.196.0/22 +103.204.232.0/21 +103.205.4.0/22 +103.205.40.0/21 +103.205.52.0/22 +103.205.108.0/22 +103.205.116.0/22 +103.205.120.0/24 +103.205.136.0/22 +103.205.162.0/24 +103.205.188.0/22 +103.205.192.0/21 +103.205.200.0/22 +103.205.236.0/22 +103.205.248.0/21 +103.206.0.0/22 +103.206.44.0/22 +103.206.148.0/22 +103.207.104.0/22 +103.207.184.0/21 +103.207.192.0/20 +103.207.208.0/21 +103.207.220.0/22 +103.207.228.0/22 +103.207.232.0/22 +103.208.12.0/22 +103.208.16.0/22 +103.208.28.0/22 +103.208.48.0/22 +103.208.148.0/22 +103.209.112.0/22 +103.209.136.0/22 +103.209.200.0/22 +103.209.208.0/22 +103.209.216.0/22 +103.210.0.0/22 +103.210.96.0/22 +103.210.156.0/22 +103.210.160.0/19 +103.210.217.0/24 +103.210.218.0/23 +103.211.44.0/22 +103.211.96.0/23 +103.211.98.0/24 +103.211.100.0/22 +103.211.156.0/22 +103.211.165.0/24 +103.211.168.0/22 +103.211.220.0/22 +103.211.248.0/22 +103.212.0.0/20 +103.212.44.0/22 +103.212.48.0/22 +103.212.84.0/22 +103.212.100.0/22 +103.212.148.0/22 +103.212.164.0/22 +103.212.196.0/22 +103.212.200.0/22 +103.212.252.0/22 +103.213.40.0/21 +103.213.48.0/20 +103.213.64.0/19 +103.213.96.0/22 +103.213.132.0/22 +103.213.136.0/21 +103.213.144.0/20 +103.213.160.0/19 +103.213.252.0/22 +103.214.48.0/22 +103.214.84.0/22 +103.214.212.0/22 +103.214.240.0/21 +103.215.28.0/22 +103.215.32.0/21 +103.215.44.0/22 +103.215.100.0/23 +103.215.108.0/22 +103.215.116.0/22 +103.215.120.0/22 +103.215.140.0/22 +103.216.4.0/22 +103.216.8.0/21 +103.216.16.0/20 +103.216.32.0/20 +103.216.64.0/22 +103.216.108.0/22 +103.216.136.0/22 +103.216.152.0/22 +103.216.224.0/21 +103.216.240.0/20 +103.217.0.0/18 +103.217.168.0/22 +103.217.180.0/22 +103.217.184.0/21 +103.217.192.0/20 +103.218.8.0/21 +103.218.16.0/21 +103.218.29.0/24 +103.218.30.0/23 +103.218.32.0/19 +103.218.64.0/19 +103.218.192.0/20 +103.218.208.0/21 +103.218.216.0/22 +103.219.24.0/21 +103.219.32.0/21 +103.219.64.0/22 +103.219.84.0/22 +103.219.88.0/21 +103.219.96.0/21 +103.219.176.0/22 +103.219.184.0/22 +103.220.48.0/20 +103.220.64.0/22 +103.220.92.0/22 +103.220.96.0/22 +103.220.104.0/21 +103.220.116.0/22 +103.220.120.0/21 +103.220.128.0/20 +103.220.144.0/21 +103.220.152.0/22 +103.220.160.0/19 +103.220.192.0/21 +103.220.200.0/22 +103.220.240.0/20 +103.221.0.0/19 +103.221.32.0/21 +103.221.88.0/21 +103.221.96.0/19 +103.221.128.0/18 +103.221.192.0/20 +103.222.0.0/20 +103.222.16.0/22 +103.222.24.0/21 +103.222.33.0/24 +103.222.34.0/23 +103.222.36.0/22 +103.222.40.0/21 +103.222.48.0/20 +103.222.64.0/18 +103.222.128.0/18 +103.222.192.0/19 +103.222.224.0/21 +103.222.232.0/22 +103.222.240.0/21 +103.223.16.0/20 +103.223.32.0/19 +103.223.64.0/19 +103.223.96.0/20 +103.223.112.0/21 +103.223.124.0/22 +103.223.128.0/21 +103.223.140.0/22 +103.223.144.0/20 +103.223.160.0/20 +103.223.176.0/21 +103.223.188.0/22 +103.223.192.0/18 +103.224.0.0/22 +103.224.40.0/21 +103.224.60.0/22 +103.224.220.0/22 +103.224.224.0/21 +103.224.232.0/22 +103.226.40.0/22 +103.226.56.0/21 +103.226.80.0/22 +103.226.116.0/22 +103.226.132.0/22 +103.226.156.0/22 +103.226.180.0/22 +103.226.196.0/22 +103.227.48.0/22 +103.227.72.0/21 +103.227.80.0/22 +103.227.100.0/22 +103.227.120.0/22 +103.227.132.0/22 +103.227.136.0/22 +103.227.196.0/22 +103.227.204.0/23 +103.227.206.0/24 +103.227.212.0/22 +103.227.228.0/22 +103.228.12.0/22 +103.228.88.0/22 +103.228.136.0/22 +103.228.160.0/22 +103.228.176.0/22 +103.228.204.0/22 +103.228.208.0/22 +103.228.228.0/22 +103.228.232.0/22 +103.229.20.0/22 +103.229.136.0/22 +103.229.148.0/22 +103.229.172.0/22 +103.229.212.0/22 +103.229.216.0/21 +103.229.228.0/22 +103.229.236.0/22 +103.229.240.0/22 +103.230.0.0/22 +103.230.28.0/22 +103.230.40.0/21 +103.230.96.0/22 +103.230.196.0/22 +103.230.200.0/21 +103.230.212.0/22 +103.230.236.0/22 +103.231.16.0/21 +103.231.64.0/21 +103.231.144.0/22 +103.231.180.0/22 +103.231.244.0/22 +103.232.4.0/22 +103.232.17.168/29 +103.232.144.0/22 +103.233.4.0/22 +103.233.44.0/22 +103.233.52.0/22 +103.233.104.0/22 +103.233.128.0/22 +103.233.136.0/22 +103.233.228.0/22 +103.234.0.0/22 +103.234.20.0/22 +103.234.56.0/22 +103.234.124.0/22 +103.234.128.0/22 +103.234.172.0/22 +103.234.180.0/22 +103.235.56.0/21 +103.235.80.0/22 +103.235.85.0/24 +103.235.86.0/23 +103.235.128.0/20 +103.235.144.0/21 +103.235.184.0/22 +103.235.192.0/22 +103.235.200.0/22 +103.235.220.0/22 +103.235.224.0/19 +103.236.0.0/18 +103.236.64.0/19 +103.236.96.0/22 +103.236.120.0/22 +103.236.184.0/22 +103.236.240.0/20 +103.237.0.0/20 +103.237.24.0/21 +103.237.68.0/22 +103.237.88.0/22 +103.237.152.0/22 +103.237.176.0/20 +103.237.192.0/18 +103.238.0.0/21 +103.238.18.0/23 +103.238.20.0/22 +103.238.24.0/21 +103.238.32.0/20 +103.238.48.0/21 +103.238.56.0/22 +103.238.88.0/21 +103.238.96.0/22 +103.238.132.0/22 +103.238.140.0/22 +103.238.144.0/22 +103.238.160.0/22 +103.238.165.0/24 +103.238.166.0/23 +103.238.168.0/21 +103.238.176.0/20 +103.238.196.0/22 +103.238.204.0/22 +103.238.252.0/22 +103.239.0.0/22 +103.239.44.0/22 +103.239.68.0/22 +103.239.152.0/21 +103.239.180.0/22 +103.239.184.0/22 +103.239.192.0/21 +103.239.204.0/22 +103.239.208.0/22 +103.239.224.0/22 +103.239.244.0/22 +103.240.16.0/22 +103.240.36.0/22 +103.240.72.0/22 +103.240.84.0/22 +103.240.124.0/22 +103.240.172.0/22 +103.240.188.0/22 +103.240.244.0/22 +103.241.12.0/22 +103.241.92.0/22 +103.241.96.0/22 +103.241.160.0/22 +103.241.184.0/21 +103.241.220.0/22 +103.242.64.0/23 +103.242.128.0/23 +103.242.160.0/22 +103.242.168.0/21 +103.242.176.0/22 +103.242.200.0/22 +103.242.212.0/22 +103.242.220.0/22 +103.242.240.0/22 +103.243.136.0/22 +103.243.252.0/22 +103.244.16.0/22 +103.244.58.0/23 +103.244.60.0/22 +103.244.64.0/20 +103.244.80.0/21 +103.244.116.0/22 +103.244.164.0/22 +103.244.232.0/22 +103.244.252.0/22 +103.245.23.0/24 +103.245.52.0/22 +103.245.60.0/22 +103.245.80.0/22 +103.245.124.0/22 +103.245.128.0/22 +103.246.8.0/21 +103.246.120.0/21 +103.246.132.0/22 +103.246.152.0/22 +103.247.168.0/21 +103.247.176.0/22 +103.247.200.0/22 +103.247.212.0/22 +103.248.64.0/23 +103.248.100.0/22 +103.248.124.0/22 +103.248.152.0/22 +103.248.168.0/22 +103.248.192.0/22 +103.248.212.0/22 +103.248.224.0/21 +103.249.8.0/21 +103.249.52.0/22 +103.249.128.0/22 +103.249.136.0/22 +103.249.144.0/22 +103.249.164.0/22 +103.249.168.0/21 +103.249.176.0/22 +103.249.188.0/22 +103.249.192.0/22 +103.249.244.0/22 +103.249.252.0/22 +103.250.32.0/22 +103.250.104.0/22 +103.250.124.0/22 +103.250.180.0/22 +103.250.192.0/22 +103.250.216.0/22 +103.250.224.0/22 +103.250.236.0/22 +103.250.248.0/21 +103.251.32.0/22 +103.251.84.0/22 +103.251.96.0/22 +103.251.124.0/22 +103.251.160.0/22 +103.251.192.0/22 +103.251.204.0/22 +103.251.240.0/22 +103.252.28.0/22 +103.252.36.0/22 +103.252.64.0/22 +103.252.96.0/22 +103.252.104.0/22 +103.252.172.0/22 +103.252.204.0/22 +103.252.208.0/22 +103.252.232.0/22 +103.252.248.0/22 +103.253.4.0/22 +103.253.60.0/22 +103.253.204.0/22 +103.253.220.0/22 +103.253.224.0/22 +103.253.232.0/22 +103.254.8.0/22 +103.254.20.0/22 +103.254.64.0/21 +103.254.76.0/22 +103.254.112.0/22 +103.254.176.0/22 +103.254.188.0/22 +103.255.68.0/22 +103.255.88.0/21 +103.255.136.0/21 +103.255.184.0/22 +103.255.200.0/22 +103.255.208.0/22 +103.255.228.0/22 +104.222.196.0/24 +106.0.0.0/24 +106.0.2.0/23 +106.0.4.0/22 +106.0.8.0/21 +106.0.16.0/20 +106.0.44.0/22 +106.0.64.0/18 +106.2.0.0/23 +106.2.3.0/24 +106.2.4.0/22 +106.2.8.0/21 +106.2.16.0/20 +106.2.32.0/19 +106.2.64.0/18 +106.2.128.0/17 +106.3.16.0/20 +106.3.32.0/19 +106.3.64.0/20 +106.3.80.0/22 +106.3.88.0/21 +106.3.96.0/19 +106.3.128.0/19 +106.3.164.0/22 +106.3.168.0/21 +106.3.176.0/20 +106.3.192.0/18 +106.4.0.0/14 +106.8.0.0/15 +106.11.0.0/16 +106.12.0.0/14 +106.16.0.0/12 +106.32.0.0/12 +106.48.0.0/21 +106.48.8.0/22 +106.48.16.0/20 +106.48.32.0/20 +106.48.57.0/24 +106.48.60.0/24 +106.48.63.0/24 +106.48.64.0/18 +106.48.128.0/17 +106.49.1.0/24 +106.49.2.0/23 +106.49.4.0/22 +106.49.8.0/21 +106.49.16.0/20 +106.49.32.0/19 +106.49.64.0/19 +106.49.96.0/24 +106.49.98.0/23 +106.49.100.0/22 +106.49.104.0/21 +106.49.112.0/20 +106.49.128.0/17 +106.50.0.0/16 +106.52.0.0/14 +106.56.0.0/13 +106.74.0.0/16 +106.75.0.0/17 +106.75.128.0/18 +106.75.201.0/24 +106.75.204.0/22 +106.75.208.0/20 +106.75.224.0/19 +106.80.0.0/12 +106.108.0.0/14 +106.112.0.0/12 +106.224.0.0/12 +109.71.4.0/24 +109.244.0.0/16 +110.6.0.0/15 +110.16.0.0/14 +110.34.40.0/21 +110.40.0.0/15 +110.42.0.0/16 +110.43.0.0/18 +110.43.64.0/21 +110.43.72.0/22 +110.43.76.0/23 +110.43.80.0/20 +110.43.96.0/19 +110.43.128.0/17 +110.44.12.0/22 +110.44.144.0/20 +110.48.0.0/16 +110.51.0.0/16 +110.52.0.0/15 +110.56.0.0/13 +110.64.0.0/15 +110.72.0.0/15 +110.75.0.0/16 +110.76.0.0/20 +110.76.16.0/22 +110.76.20.0/24 +110.76.22.0/24 +110.76.24.0/21 +110.76.32.0/19 +110.76.132.0/22 +110.76.156.0/22 +110.76.184.0/22 +110.76.192.0/18 +110.77.0.0/17 +110.80.0.0/13 +110.88.0.0/14 +110.92.68.0/22 +110.93.32.0/19 +110.94.0.0/15 +110.96.0.0/11 +110.152.0.0/14 +110.156.0.0/15 +110.166.0.0/15 +110.172.192.0/18 +110.173.0.0/19 +110.173.32.0/20 +110.173.64.0/19 +110.173.192.0/19 +110.176.0.0/12 +110.192.0.0/11 +110.228.0.0/14 +110.232.32.0/19 +110.236.0.0/15 +110.240.0.0/12 +111.0.0.0/10 +111.66.0.0/16 +111.67.192.0/20 +111.68.64.0/19 +111.72.0.0/13 +111.85.0.0/16 +111.91.192.0/19 +111.92.248.0/21 +111.112.0.0/14 +111.116.0.0/15 +111.118.200.0/21 +111.119.64.0/18 +111.119.128.0/19 +111.120.0.0/14 +111.124.0.0/16 +111.126.0.0/15 +111.128.0.0/11 +111.160.0.0/13 +111.170.0.0/16 +111.172.0.0/14 +111.176.0.0/13 +111.186.0.0/15 +111.192.0.0/12 +111.208.0.0/13 +111.221.28.0/24 +111.221.128.0/17 +111.222.0.0/16 +111.223.4.0/22 +111.223.8.0/21 +111.223.16.0/22 +111.223.240.0/22 +111.223.249.0/24 +111.223.250.0/23 +111.224.0.0/13 +111.235.96.0/19 +111.235.156.0/22 +111.235.160.0/21 +111.235.170.0/23 +111.235.172.0/22 +111.235.176.0/20 +112.0.0.0/10 +112.64.0.0/14 +112.73.64.0/18 +112.74.0.0/16 +112.80.0.0/12 +112.96.0.0/13 +112.109.128.0/17 +112.111.0.0/16 +112.112.0.0/14 +112.116.0.0/15 +112.122.0.0/15 +112.124.0.0/14 +112.128.0.0/14 +112.132.0.0/16 +112.137.48.0/21 +112.192.0.0/14 +112.224.0.0/11 +113.0.0.0/13 +113.8.0.0/15 +113.11.192.0/19 +113.12.0.0/14 +113.16.0.0/15 +113.18.0.0/16 +113.21.232.0/21 +113.24.0.0/14 +113.31.0.0/16 +113.44.0.0/14 +113.48.0.0/14 +113.52.160.0/19 +113.52.228.0/22 +113.54.0.0/15 +113.56.0.0/15 +113.58.0.0/16 +113.59.0.0/17 +113.59.224.0/22 +113.62.0.0/15 +113.64.0.0/10 +113.128.0.0/15 +113.130.96.0/20 +113.130.112.0/21 +113.132.0.0/14 +113.136.0.0/13 +113.194.0.0/15 +113.197.100.0/23 +113.197.102.0/24 +113.197.104.0/22 +113.200.0.0/15 +113.202.0.0/16 +113.204.0.0/14 +113.208.96.0/19 +113.208.128.0/17 +113.209.0.0/16 +113.212.0.0/18 +113.212.100.0/22 +113.212.184.0/21 +113.213.0.0/17 +113.214.0.0/15 +113.218.0.0/15 +113.220.0.0/14 +113.224.0.0/12 +113.240.0.0/13 +113.248.0.0/14 +114.28.0.0/17 +114.28.128.0/18 +114.28.192.0/19 +114.28.232.0/22 +114.28.236.0/23 +114.28.240.0/20 +114.31.64.0/21 +114.54.0.0/15 +114.60.0.0/14 +114.64.0.0/14 +114.68.0.0/16 +114.79.64.0/18 +114.80.0.0/12 +114.96.0.0/13 +114.104.0.0/14 +114.110.0.0/20 +114.110.64.0/18 +114.111.0.0/19 +114.111.160.0/19 +114.112.4.0/22 +114.112.8.0/22 +114.112.24.0/21 +114.112.32.0/19 +114.112.64.0/19 +114.112.96.0/20 +114.112.116.0/22 +114.112.120.0/21 +114.112.136.0/21 +114.112.144.0/20 +114.112.160.0/19 +114.112.192.0/19 +114.113.0.0/17 +114.113.128.0/21 +114.113.140.0/22 +114.113.144.0/20 +114.113.160.0/19 +114.113.196.0/22 +114.113.200.0/21 +114.113.208.0/20 +114.113.224.0/20 +114.114.0.0/15 +114.116.0.0/15 +114.118.0.0/16 +114.119.0.0/17 +114.119.192.0/18 +114.132.0.0/16 +114.135.0.0/16 +114.138.0.0/15 +114.141.64.0/21 +114.141.80.0/21 +114.141.128.0/18 +114.196.0.0/15 +114.198.248.0/21 +114.208.0.0/12 +114.224.0.0/11 +115.24.0.0/14 +115.28.0.0/15 +115.31.64.0/20 +115.32.0.0/14 +115.42.56.0/22 +115.44.0.0/14 +115.48.0.0/12 +115.69.64.0/20 +115.84.0.0/18 +115.84.192.0/19 +115.85.192.0/18 +115.100.0.0/14 +115.104.0.0/14 +115.120.0.0/14 +115.124.16.0/20 +115.148.0.0/14 +115.152.0.0/13 +115.166.64.0/19 +115.168.0.0/16 +115.169.0.0/23 +115.169.3.0/24 +115.169.6.0/24 +115.169.9.0/24 +115.169.14.0/23 +115.169.16.0/20 +115.169.39.0/24 +115.169.42.0/23 +115.169.44.0/22 +115.169.48.0/20 +115.169.64.0/18 +115.169.128.0/17 +115.170.0.0/15 +115.172.0.0/14 +115.180.0.0/14 +115.187.0.0/20 +115.190.0.0/15 +115.192.0.0/11 +115.224.0.0/12 +116.0.8.0/21 +116.0.24.0/21 +116.1.0.0/16 +116.2.0.0/15 +116.4.0.0/14 +116.8.0.0/14 +116.13.0.0/16 +116.16.0.0/12 +116.50.0.0/20 +116.52.0.0/14 +116.56.0.0/15 +116.58.128.0/20 +116.58.208.0/20 +116.60.0.0/14 +116.66.0.0/18 +116.66.64.0/19 +116.66.96.0/20 +116.66.120.0/22 +116.68.136.0/21 +116.68.176.0/21 +116.69.0.0/16 +116.70.0.0/17 +116.76.0.0/14 +116.85.0.0/17 +116.85.128.0/18 +116.85.192.0/19 +116.85.224.0/20 +116.85.240.0/21 +116.85.248.0/23 +116.85.250.0/24 +116.85.252.0/22 +116.89.144.0/20 +116.90.80.0/20 +116.90.184.0/21 +116.95.0.0/16 +116.112.0.0/14 +116.116.0.0/15 +116.128.0.0/10 +116.192.0.0/16 +116.193.16.0/20 +116.193.32.0/19 +116.193.176.0/21 +116.194.0.0/15 +116.196.0.0/21 +116.196.8.0/22 +116.196.12.0/23 +116.196.16.0/20 +116.196.32.0/19 +116.196.64.0/18 +116.196.128.0/18 +116.196.192.0/21 +116.196.200.0/23 +116.196.203.0/24 +116.196.204.0/22 +116.196.208.0/20 +116.196.224.0/19 +116.197.160.0/21 +116.197.180.0/23 +116.198.0.0/16 +116.199.0.0/17 +116.199.128.0/19 +116.204.0.0/17 +116.204.232.0/22 +116.205.0.0/16 +116.207.0.0/16 +116.208.0.0/14 +116.212.160.0/20 +116.213.64.0/18 +116.213.128.0/17 +116.214.32.0/19 +116.214.64.0/20 +116.214.128.0/17 +116.215.0.0/16 +116.216.0.0/14 +116.224.0.0/12 +116.242.0.0/15 +116.244.0.0/14 +116.248.0.0/15 +116.252.0.0/15 +116.254.104.0/21 +116.254.129.0/24 +116.254.130.0/23 +116.254.132.0/22 +116.254.136.0/21 +116.254.144.0/20 +116.254.160.0/19 +116.254.192.0/18 +116.255.128.0/17 +117.8.0.0/13 +117.21.0.0/16 +117.22.0.0/15 +117.24.0.0/13 +117.32.0.0/13 +117.40.0.0/14 +117.44.0.0/15 +117.48.0.0/15 +117.50.0.0/16 +117.51.128.0/23 +117.51.131.0/24 +117.51.132.0/22 +117.51.136.0/21 +117.51.144.0/20 +117.51.160.0/19 +117.51.192.0/18 +117.53.48.0/20 +117.53.176.0/20 +117.57.0.0/16 +117.58.0.0/18 +117.59.0.0/16 +117.60.0.0/14 +117.64.0.0/13 +117.72.0.0/15 +117.74.64.0/19 +117.74.128.0/17 +117.75.0.0/16 +117.76.0.0/14 +117.80.0.0/12 +117.100.0.0/15 +117.103.16.0/20 +117.103.40.0/21 +117.103.72.0/21 +117.103.128.0/20 +117.104.168.0/21 +117.106.0.0/15 +117.112.0.0/13 +117.120.64.0/18 +117.120.128.0/17 +117.121.0.0/19 +117.121.32.0/21 +117.121.40.0/22 +117.121.44.0/23 +117.121.46.0/24 +117.121.48.0/20 +117.121.64.0/18 +117.121.128.0/20 +117.121.148.0/22 +117.121.152.0/21 +117.121.160.0/19 +117.121.192.0/21 +117.122.128.0/17 +117.124.0.0/14 +117.128.0.0/10 +118.24.0.0/15 +118.26.0.0/19 +118.26.36.0/22 +118.26.40.0/21 +118.26.48.0/20 +118.26.64.0/19 +118.26.104.0/21 +118.26.112.0/20 +118.26.128.0/17 +118.28.0.0/15 +118.30.0.0/20 +118.30.16.0/21 +118.30.24.0/22 +118.30.32.0/19 +118.30.64.0/18 +118.30.128.0/17 +118.31.0.0/16 +118.64.0.0/15 +118.66.0.0/16 +118.67.112.0/20 +118.72.0.0/13 +118.80.0.0/15 +118.84.0.0/15 +118.88.32.0/19 +118.88.64.0/18 +118.88.128.0/17 +118.89.0.0/16 +118.102.16.0/20 +118.102.32.0/21 +118.103.164.0/22 +118.103.168.0/21 +118.103.176.0/22 +118.103.245.0/24 +118.103.246.0/23 +118.112.0.0/13 +118.120.0.0/14 +118.124.0.0/15 +118.126.1.0/24 +118.126.2.0/23 +118.126.4.0/22 +118.126.8.0/21 +118.126.16.0/23 +118.126.18.0/24 +118.126.32.0/19 +118.126.64.0/18 +118.126.128.0/17 +118.127.128.0/19 +118.132.0.0/14 +118.144.0.0/14 +118.178.0.0/16 +118.180.0.0/14 +118.184.5.0/24 +118.184.10.0/24 +118.184.115.0/24 +118.184.116.0/22 +118.184.120.0/23 +118.184.122.0/24 +118.184.128.0/18 +118.184.192.0/19 +118.184.240.0/20 +118.186.0.0/15 +118.188.0.0/16 +118.190.0.0/16 +118.191.0.0/20 +118.191.24.0/21 +118.191.32.0/19 +118.191.64.0/18 +118.191.144.0/21 +118.191.153.0/24 +118.191.154.0/23 +118.191.156.0/22 +118.191.160.0/19 +118.191.192.0/20 +118.191.209.0/24 +118.191.210.0/23 +118.191.212.0/22 +118.191.248.0/21 +118.192.0.0/16 +118.193.0.0/22 +118.193.32.0/20 +118.193.56.0/21 +118.193.68.0/22 +118.193.72.0/24 +118.193.77.0/24 +118.193.96.0/19 +118.194.0.0/17 +118.194.128.0/18 +118.194.192.0/19 +118.194.232.0/21 +118.194.240.0/20 +118.195.0.0/16 +118.196.0.0/14 +118.202.0.0/15 +118.204.0.0/14 +118.212.0.0/15 +118.215.192.0/18 +118.224.0.0/14 +118.228.0.0/17 +118.228.128.0/20 +118.228.144.0/21 +118.228.156.0/22 +118.228.160.0/19 +118.228.192.0/18 +118.229.0.0/16 +118.230.0.0/16 +118.239.0.0/16 +118.242.0.0/16 +118.244.0.0/14 +118.248.0.0/13 +119.0.0.0/15 +119.2.0.0/19 +119.2.128.0/17 +119.3.0.0/16 +119.4.0.0/14 +119.10.0.0/17 +119.15.136.0/21 +119.16.0.0/16 +119.18.192.0/20 +119.18.208.0/21 +119.18.224.0/19 +119.19.0.0/16 +119.20.0.0/14 +119.27.64.0/18 +119.27.128.0/17 +119.28.28.0/24 +119.29.0.0/16 +119.30.48.0/20 +119.31.192.0/19 +119.32.0.0/14 +119.36.0.0/15 +119.38.0.0/17 +119.38.128.0/18 +119.38.192.0/20 +119.38.208.0/22 +119.38.212.0/23 +119.38.214.0/27 +119.38.214.56/29 +119.38.214.64/26 +119.38.214.128/25 +119.38.215.0/24 +119.38.216.0/21 +119.39.0.0/16 +119.40.0.0/18 +119.40.64.0/20 +119.40.128.0/17 +119.41.0.0/16 +119.42.0.0/19 +119.42.52.0/22 +119.42.128.0/20 +119.42.224.0/19 +119.44.0.0/15 +119.48.0.0/13 +119.57.0.0/16 +119.58.0.0/16 +119.59.128.0/17 +119.60.0.0/15 +119.62.0.0/16 +119.63.32.0/19 +119.75.208.0/20 +119.78.0.0/15 +119.80.0.0/16 +119.82.208.0/20 +119.84.0.0/14 +119.88.0.0/16 +119.89.0.0/17 +119.89.128.0/21 +119.89.136.0/23 +119.89.139.0/24 +119.89.140.0/22 +119.89.144.0/20 +119.89.160.0/20 +119.89.176.0/22 +119.89.180.0/23 +119.89.183.0/24 +119.89.184.0/21 +119.89.192.0/23 +119.89.194.0/24 +119.89.196.0/22 +119.89.200.0/21 +119.89.208.0/21 +119.89.217.0/24 +119.89.218.0/23 +119.89.220.0/22 +119.89.224.0/19 +119.90.0.0/15 +119.96.0.0/13 +119.108.0.0/15 +119.112.0.0/12 +119.128.0.0/12 +119.144.0.0/14 +119.148.160.0/19 +119.151.192.0/18 +119.160.200.0/21 +119.161.120.0/21 +119.161.128.0/21 +119.161.160.0/19 +119.161.192.0/18 +119.162.0.0/15 +119.164.0.0/14 +119.176.0.0/12 +119.232.0.0/15 +119.235.128.0/19 +119.235.160.0/20 +119.235.184.0/22 +119.248.0.0/14 +119.252.96.0/21 +119.252.240.0/21 +119.252.249.0/24 +119.252.252.0/23 +119.253.0.0/16 +119.254.0.0/15 +120.0.0.0/12 +120.24.0.0/14 +120.30.0.0/15 +120.32.0.0/12 +120.48.0.0/15 +120.52.0.0/14 +120.64.0.0/13 +120.72.32.0/19 +120.72.128.0/17 +120.76.0.0/14 +120.80.0.0/13 +120.88.8.0/21 +120.90.0.0/15 +120.92.0.0/17 +120.92.128.0/18 +120.92.192.0/22 +120.92.198.0/23 +120.92.200.0/21 +120.92.208.0/20 +120.92.224.0/19 +120.94.0.0/15 +120.128.0.0/13 +120.136.16.0/21 +120.136.128.0/18 +120.137.0.0/17 +120.143.128.0/19 +120.192.0.0/10 +121.0.8.0/21 +121.0.16.0/20 +121.4.0.0/15 +121.8.0.0/13 +121.16.0.0/12 +121.32.0.0/13 +121.40.0.0/14 +121.46.0.0/18 +121.46.76.0/22 +121.46.128.0/17 +121.47.0.0/16 +121.48.0.0/15 +121.50.8.0/21 +121.51.0.0/16 +121.52.160.0/19 +121.52.208.0/20 +121.52.224.0/19 +121.54.176.0/21 +121.55.0.0/18 +121.56.0.0/15 +121.58.0.0/17 +121.58.136.0/21 +121.58.144.0/20 +121.58.160.0/21 +121.59.0.0/16 +121.60.0.0/14 +121.68.0.0/14 +121.76.0.0/15 +121.79.128.0/18 +121.89.0.0/16 +121.100.128.0/17 +121.101.0.0/18 +121.101.208.0/20 +121.192.0.0/13 +121.200.192.0/21 +121.201.0.0/16 +121.204.0.0/14 +121.224.0.0/12 +121.248.0.0/14 +121.255.0.0/16 +122.0.64.0/18 +122.0.128.0/17 +122.4.0.0/14 +122.10.132.0/23 +122.10.136.0/23 +122.10.196.0/23 +122.10.216.0/22 +122.10.228.0/22 +122.10.232.0/21 +122.10.240.0/21 +122.10.248.0/22 +122.11.0.0/17 +122.12.0.0/15 +122.14.0.0/17 +122.14.192.0/18 +122.48.0.0/16 +122.49.0.0/18 +122.51.0.0/16 +122.64.0.0/11 +122.96.0.0/15 +122.98.144.0/20 +122.98.160.0/21 +122.98.172.0/22 +122.98.176.0/20 +122.98.192.0/21 +122.98.232.0/21 +122.98.240.0/20 +122.102.0.0/20 +122.102.64.0/19 +122.112.0.0/18 +122.112.64.0/19 +122.112.96.0/22 +122.112.107.0/24 +122.112.118.0/24 +122.112.122.0/24 +122.112.125.0/24 +122.112.128.0/17 +122.113.0.0/16 +122.114.0.0/16 +122.115.0.0/18 +122.115.80.0/20 +122.115.96.0/19 +122.115.128.0/17 +122.119.0.0/16 +122.128.100.0/22 +122.128.120.0/21 +122.136.0.0/13 +122.144.128.0/17 +122.152.192.0/18 +122.156.0.0/14 +122.188.0.0/14 +122.192.0.0/14 +122.198.0.0/16 +122.200.40.0/21 +122.200.64.0/18 +122.201.48.0/20 +122.204.0.0/14 +122.224.0.0/12 +122.240.0.0/13 +122.248.24.0/21 +122.248.48.0/20 +122.255.64.0/21 +123.0.128.0/21 +123.0.136.0/23 +123.0.139.0/24 +123.0.140.0/22 +123.0.144.0/20 +123.0.160.0/19 +123.4.0.0/14 +123.8.0.0/13 +123.49.130.0/23 +123.49.132.0/22 +123.49.136.0/22 +123.49.152.0/21 +123.49.160.0/19 +123.49.192.0/18 +123.50.160.0/19 +123.52.0.0/14 +123.56.0.0/15 +123.58.0.0/18 +123.58.64.0/20 +123.58.80.0/21 +123.58.88.0/22 +123.58.96.0/19 +123.58.128.0/17 +123.59.0.0/16 +123.61.0.0/16 +123.62.0.0/16 +123.64.0.0/11 +123.96.0.0/15 +123.98.0.0/17 +123.99.128.0/17 +123.100.0.0/19 +123.100.232.0/24 +123.101.0.0/16 +123.103.0.0/20 +123.103.16.0/21 +123.103.24.0/22 +123.103.28.0/23 +123.103.30.0/24 +123.103.32.0/19 +123.103.64.0/18 +123.108.134.0/24 +123.108.138.0/23 +123.108.140.0/24 +123.108.142.0/24 +123.108.208.0/20 +123.112.0.0/12 +123.128.0.0/13 +123.137.0.0/16 +123.138.0.0/15 +123.144.0.0/12 +123.160.0.0/12 +123.176.60.0/22 +123.176.80.0/20 +123.177.0.0/16 +123.178.0.0/15 +123.180.0.0/14 +123.184.0.0/13 +123.196.0.0/15 +123.199.128.0/17 +123.206.0.0/15 +123.232.0.0/14 +123.242.0.0/17 +123.242.192.0/21 +123.244.0.0/14 +123.249.0.0/16 +123.253.109.0/24 +123.253.110.0/24 +123.253.240.0/22 +123.254.96.0/21 +124.6.64.0/18 +124.14.0.0/15 +124.16.0.0/15 +124.20.0.0/14 +124.28.192.0/18 +124.29.0.0/17 +124.31.0.0/16 +124.40.112.0/20 +124.40.128.0/18 +124.40.192.0/19 +124.40.240.0/22 +124.42.0.0/16 +124.47.0.0/18 +124.64.0.0/15 +124.66.0.0/17 +124.67.0.0/16 +124.68.0.0/17 +124.68.128.0/18 +124.68.192.0/19 +124.68.224.0/20 +124.68.240.0/23 +124.68.242.0/24 +124.68.244.0/23 +124.68.254.0/23 +124.69.0.0/16 +124.70.0.0/15 +124.72.0.0/13 +124.88.0.0/13 +124.108.8.0/21 +124.108.40.0/21 +124.109.96.0/21 +124.112.0.0/14 +124.116.0.0/15 +124.118.0.0/16 +124.119.0.0/17 +124.119.128.0/18 +124.119.192.0/19 +124.119.224.0/20 +124.119.240.0/22 +124.119.244.0/23 +124.119.246.0/25 +124.119.246.128/26 +124.119.246.192/27 +124.119.246.224/28 +124.119.246.240/29 +124.119.246.248/30 +124.119.246.254/31 +124.119.247.0/24 +124.119.248.0/21 +124.126.0.0/15 +124.128.0.0/13 +124.147.128.0/17 +124.150.137.0/24 +124.151.0.0/16 +124.152.0.0/16 +124.160.0.0/13 +124.172.0.0/14 +124.192.0.0/15 +124.196.0.0/16 +124.200.0.0/13 +124.220.0.0/14 +124.224.0.0/12 +124.240.0.0/17 +124.240.128.0/18 +124.242.0.0/16 +124.243.192.0/18 +124.248.0.0/17 +124.249.0.0/16 +124.250.0.0/15 +124.254.0.0/18 +125.31.192.0/18 +125.32.0.0/12 +125.58.128.0/17 +125.61.128.0/17 +125.62.0.0/18 +125.64.0.0/11 +125.96.0.0/15 +125.98.0.0/16 +125.104.0.0/13 +125.112.0.0/12 +125.169.0.0/16 +125.171.0.0/16 +125.208.0.0/19 +125.208.37.0/24 +125.208.40.0/24 +125.208.45.0/24 +125.208.46.0/23 +125.208.48.0/20 +125.210.0.0/15 +125.213.0.0/17 +125.214.96.0/19 +125.215.0.0/18 +125.216.0.0/13 +125.254.128.0/17 +128.108.0.0/16 +129.28.0.0/16 +129.204.0.0/16 +129.211.0.0/16 +129.223.254.0/24 +129.227.99.0/24 +130.36.146.0/23 +130.214.218.0/23 +131.228.96.0/24 +131.253.12.0/29 +131.253.12.80/28 +131.253.12.240/29 +132.232.0.0/16 +132.237.134.0/24 +132.237.150.0/24 +134.175.0.0/16 +135.159.208.0/20 +135.244.80.0/20 +137.59.59.0/24 +137.59.88.0/22 +138.32.244.0/22 +139.5.56.0/21 +139.5.80.0/22 +139.5.92.0/22 +139.5.128.0/22 +139.5.160.0/22 +139.5.192.0/22 +139.5.204.0/22 +139.5.244.0/22 +139.9.0.0/16 +139.129.0.0/16 +139.138.238.0/28 +139.148.0.0/16 +139.155.0.0/16 +139.159.0.0/19 +139.159.32.0/21 +139.159.40.0/22 +139.159.52.0/22 +139.159.56.0/21 +139.159.64.0/19 +139.159.96.0/20 +139.159.112.0/22 +139.159.116.0/23 +139.159.120.0/21 +139.159.128.0/17 +139.170.0.0/16 +139.176.0.0/16 +139.183.0.0/16 +139.186.0.0/16 +139.189.0.0/16 +139.196.0.0/15 +139.198.0.0/21 +139.198.8.0/23 +139.198.11.0/24 +139.198.12.0/22 +139.198.16.0/20 +139.198.32.0/19 +139.198.66.0/23 +139.198.68.0/22 +139.198.72.0/21 +139.198.80.0/20 +139.198.96.0/20 +139.198.113.0/24 +139.198.114.0/23 +139.198.116.0/22 +139.198.122.0/23 +139.198.124.0/22 +139.198.128.0/17 +139.199.0.0/16 +139.200.0.0/13 +139.208.0.0/13 +139.217.0.0/16 +139.219.0.0/16 +139.220.0.0/17 +139.220.128.0/18 +139.220.192.0/22 +139.220.196.0/23 +139.220.200.0/21 +139.220.208.0/23 +139.220.212.0/22 +139.220.216.0/21 +139.220.224.0/19 +139.221.0.0/16 +139.224.0.0/16 +139.226.0.0/15 +140.75.0.0/16 +140.101.208.0/24 +140.143.0.0/16 +140.179.0.0/16 +140.205.0.0/18 +140.205.64.0/19 +140.205.96.0/20 +140.205.112.0/21 +140.205.120.0/23 +140.205.123.0/24 +140.205.124.0/22 +140.205.128.0/17 +140.206.0.0/15 +140.210.0.0/16 +140.224.0.0/16 +140.237.0.0/16 +140.240.0.0/16 +140.242.223.0/24 +140.242.224.0/24 +140.243.0.0/16 +140.246.0.0/16 +140.249.0.0/16 +140.250.0.0/16 +140.255.0.0/16 +144.0.0.0/16 +144.7.0.0/16 +144.12.0.0/16 +144.36.146.0/23 +144.48.64.0/22 +144.48.88.0/22 +144.48.156.0/22 +144.48.180.0/22 +144.48.184.0/22 +144.48.204.0/22 +144.48.208.0/21 +144.52.0.0/16 +144.123.0.0/16 +144.211.80.0/24 +144.211.138.0/24 +144.255.0.0/16 +146.56.192.0/18 +146.196.56.0/22 +146.196.68.0/22 +146.196.92.0/22 +146.196.112.0/21 +146.196.124.0/22 +146.217.137.0/24 +146.222.79.0/24 +146.222.81.0/24 +146.222.94.0/24 +147.243.13.32/27 +147.243.13.64/27 +147.243.14.32/27 +148.70.0.0/16 +150.0.0.0/16 +150.115.0.0/16 +150.121.0.0/16 +150.122.0.0/16 +150.129.136.0/22 +150.129.192.0/22 +150.129.252.0/22 +150.138.0.0/15 +150.158.0.0/16 +150.222.88.0/23 +150.223.0.0/16 +150.242.0.0/21 +150.242.8.0/22 +150.242.28.0/22 +150.242.44.0/22 +150.242.48.0/21 +150.242.56.0/22 +150.242.76.0/22 +150.242.80.0/22 +150.242.92.0/22 +150.242.96.0/22 +150.242.112.0/21 +150.242.120.0/22 +150.242.152.0/22 +150.242.158.0/24 +150.242.160.0/21 +150.242.168.0/22 +150.242.184.0/21 +150.242.192.0/22 +150.242.224.0/22 +150.242.232.0/21 +150.242.240.0/21 +150.242.248.0/22 +150.255.0.0/16 +152.32.178.0/23 +152.104.128.0/17 +152.136.0.0/16 +153.0.0.0/16 +153.3.0.0/16 +153.34.0.0/15 +153.36.0.0/15 +153.99.0.0/16 +153.101.0.0/16 +153.118.0.0/15 +154.8.128.0/17 +155.126.176.0/23 +156.107.160.0/24 +156.107.170.0/24 +156.107.179.0/24 +156.107.181.0/24 +156.154.62.0/23 +157.0.0.0/16 +157.18.0.0/16 +157.61.0.0/16 +157.119.8.0/21 +157.119.16.0/22 +157.119.28.0/22 +157.119.132.0/22 +157.119.136.0/21 +157.119.144.0/20 +157.119.160.0/21 +157.119.172.0/22 +157.119.192.0/21 +157.119.240.0/22 +157.119.252.0/22 +157.122.0.0/16 +157.133.186.0/23 +157.133.192.0/21 +157.133.212.0/24 +157.133.236.0/24 +157.148.0.0/16 +157.156.0.0/16 +157.255.0.0/16 +159.75.0.0/16 +159.221.232.0/22 +159.226.0.0/16 +160.19.208.0/21 +160.19.216.0/22 +160.20.48.0/22 +160.62.10.0/24 +160.83.109.0/24 +160.83.110.0/23 +160.202.60.0/23 +160.202.62.0/24 +160.202.148.0/22 +160.202.152.0/22 +160.202.212.0/22 +160.202.216.0/21 +160.202.224.0/19 +160.238.64.0/22 +161.163.0.0/21 +161.163.28.0/23 +161.163.176.0/24 +161.163.178.0/23 +161.163.180.0/22 +161.189.0.0/16 +161.207.0.0/16 +162.14.0.0/16 +162.105.0.0/16 +163.0.0.0/16 +163.47.4.0/22 +163.53.0.0/20 +163.53.36.0/22 +163.53.40.0/22 +163.53.48.0/20 +163.53.64.0/22 +163.53.88.0/21 +163.53.96.0/19 +163.53.128.0/21 +163.53.136.0/22 +163.53.160.0/20 +163.53.188.0/22 +163.53.220.0/22 +163.53.236.0/22 +163.53.240.0/22 +163.116.202.0/23 +163.125.0.0/16 +163.142.0.0/16 +163.177.0.0/16 +163.179.0.0/16 +163.204.0.0/16 +163.244.246.0/24 +164.52.80.0/24 +165.156.30.0/24 +166.111.0.0/16 +167.139.0.0/16 +167.189.0.0/16 +167.220.244.0/22 +168.159.144.0/21 +168.159.152.0/22 +168.159.156.0/23 +168.159.158.0/24 +168.160.0.0/16 +168.230.0.0/24 +170.179.0.0/16 +170.225.224.0/23 +170.252.152.0/21 +171.8.0.0/13 +171.22.147.0/24 +171.34.0.0/15 +171.36.0.0/14 +171.40.0.0/13 +171.80.0.0/12 +171.104.0.0/13 +171.112.0.0/12 +171.208.0.0/12 +172.60.2.0/24 +172.81.192.0/18 +173.39.200.0/23 +175.0.0.0/12 +175.16.0.0/13 +175.24.0.0/14 +175.30.0.0/15 +175.42.0.0/15 +175.44.0.0/16 +175.46.0.0/15 +175.48.0.0/12 +175.64.0.0/11 +175.102.0.0/16 +175.106.128.0/17 +175.111.144.0/20 +175.111.160.0/20 +175.111.184.0/22 +175.146.0.0/15 +175.148.0.0/14 +175.152.0.0/14 +175.158.96.0/22 +175.160.0.0/12 +175.176.156.0/22 +175.176.188.0/22 +175.178.0.0/16 +175.184.128.0/18 +175.185.0.0/16 +175.186.0.0/15 +175.188.0.0/14 +180.76.16.0/20 +180.76.32.0/19 +180.76.64.0/18 +180.76.128.0/18 +180.76.192.0/19 +180.76.224.0/20 +180.76.240.0/24 +180.76.242.0/23 +180.76.244.0/22 +180.76.248.0/22 +180.76.252.0/23 +180.76.255.0/24 +180.77.0.0/16 +180.78.0.0/15 +180.84.0.0/15 +180.86.0.0/16 +180.88.0.0/14 +180.94.56.0/21 +180.94.96.0/20 +180.94.120.0/21 +180.95.128.0/17 +180.96.0.0/11 +180.129.128.0/17 +180.130.0.0/16 +180.136.0.0/13 +180.148.16.0/21 +180.148.152.0/21 +180.148.216.0/21 +180.148.224.0/19 +180.149.128.0/19 +180.150.160.0/21 +180.150.176.0/20 +180.152.0.0/13 +180.160.0.0/12 +180.178.112.0/21 +180.178.192.0/18 +180.184.0.0/14 +180.188.0.0/17 +180.189.148.0/22 +180.200.252.0/22 +180.201.0.0/16 +180.202.0.0/15 +180.208.0.0/15 +180.210.212.0/22 +180.210.233.0/24 +180.210.236.0/22 +180.212.0.0/15 +180.222.224.0/19 +180.223.0.0/19 +180.223.32.0/20 +180.223.48.0/21 +180.223.57.0/24 +180.223.58.0/23 +180.223.60.0/22 +180.223.80.0/20 +180.223.96.0/19 +180.223.128.0/17 +180.233.0.0/18 +180.233.64.0/19 +180.233.144.0/22 +180.235.64.0/19 +180.235.112.0/22 +182.16.144.0/21 +182.16.192.0/19 +182.18.0.0/17 +182.23.184.0/21 +182.23.200.0/21 +182.32.0.0/12 +182.48.96.0/19 +182.49.0.0/16 +182.50.0.0/22 +182.50.8.0/21 +182.50.112.0/20 +182.51.0.0/16 +182.54.0.0/17 +182.61.0.0/18 +182.61.128.0/19 +182.61.192.0/18 +182.80.0.0/13 +182.88.0.0/14 +182.92.0.0/16 +182.96.0.0/11 +182.128.0.0/12 +182.144.0.0/13 +182.157.0.0/16 +182.160.64.0/19 +182.174.0.0/15 +182.200.0.0/13 +182.236.128.0/17 +182.237.24.0/21 +182.238.0.0/16 +182.239.0.0/19 +182.240.0.0/13 +182.254.0.0/17 +182.254.128.0/18 +182.254.192.0/19 +182.254.224.0/20 +182.254.240.0/21 +182.254.248.0/23 +182.254.251.0/24 +182.254.252.0/22 +183.0.0.0/10 +183.64.0.0/13 +183.78.160.0/21 +183.78.180.0/22 +183.81.180.0/22 +183.84.0.0/15 +183.91.128.0/22 +183.91.136.0/21 +183.91.144.0/20 +183.92.0.0/14 +183.128.0.0/11 +183.160.0.0/13 +183.168.0.0/15 +183.170.0.0/16 +183.172.0.0/14 +183.184.0.0/13 +183.192.0.0/10 +185.109.236.0/24 +185.216.118.0/24 +188.131.128.0/17 +192.11.23.0/24 +192.11.26.0/24 +192.11.39.0/24 +192.11.236.0/24 +192.23.191.0/24 +192.55.10.0/23 +192.55.40.0/24 +192.55.46.0/24 +192.55.68.0/22 +192.102.204.0/22 +192.124.154.0/24 +192.137.31.0/24 +192.139.136.0/24 +192.140.128.0/21 +192.140.136.0/22 +192.140.156.0/22 +192.140.160.0/19 +192.140.192.0/20 +192.140.208.0/21 +192.144.128.0/17 +192.163.11.0/24 +192.232.97.0/24 +193.9.22.0/24 +193.17.120.0/22 +193.20.64.0/22 +193.112.0.0/16 +193.200.196.0/24 +193.200.222.160/28 +194.138.136.0/24 +194.138.202.0/23 +194.138.245.0/24 +198.175.100.0/22 +198.208.17.0/24 +198.208.19.0/24 +199.7.72.0/24 +199.65.192.0/21 +199.244.144.0/24 +202.0.100.0/23 +202.0.122.0/23 +202.1.105.0/24 +202.1.106.0/24 +202.3.128.0/23 +202.4.128.0/19 +202.4.252.0/22 +202.5.208.0/21 +202.5.216.0/22 +202.6.6.0/23 +202.6.66.0/23 +202.6.72.0/23 +202.6.87.0/24 +202.6.88.0/23 +202.6.92.0/23 +202.6.103.0/24 +202.6.108.0/24 +202.6.110.0/23 +202.6.114.0/24 +202.6.176.0/20 +202.8.0.0/24 +202.8.2.0/23 +202.8.4.0/23 +202.8.12.0/24 +202.8.24.0/24 +202.8.77.0/24 +202.8.128.0/19 +202.8.192.0/20 +202.9.32.0/24 +202.9.34.0/23 +202.9.48.0/23 +202.9.51.0/24 +202.9.52.0/23 +202.9.54.0/24 +202.9.57.0/24 +202.9.58.0/23 +202.10.64.0/21 +202.10.74.0/23 +202.10.76.0/22 +202.10.112.0/20 +202.12.1.0/24 +202.12.2.0/24 +202.12.17.0/24 +202.12.18.0/23 +202.12.72.0/24 +202.12.84.0/23 +202.12.96.0/24 +202.12.98.0/23 +202.12.106.0/24 +202.12.111.0/24 +202.12.116.0/24 +202.14.64.0/23 +202.14.69.0/24 +202.14.73.0/24 +202.14.74.0/23 +202.14.76.0/24 +202.14.78.0/23 +202.14.88.0/24 +202.14.97.0/24 +202.14.104.0/23 +202.14.108.0/23 +202.14.111.0/24 +202.14.114.0/23 +202.14.118.0/23 +202.14.124.0/23 +202.14.127.0/24 +202.14.129.0/24 +202.14.135.0/24 +202.14.136.0/24 +202.14.149.0/24 +202.14.151.0/24 +202.14.157.0/24 +202.14.158.0/23 +202.14.169.0/24 +202.14.170.0/23 +202.14.172.0/22 +202.14.176.0/24 +202.14.184.0/23 +202.14.208.0/23 +202.14.213.0/24 +202.14.219.0/24 +202.14.220.0/24 +202.14.222.0/23 +202.14.225.0/24 +202.14.226.0/23 +202.14.231.0/24 +202.14.235.0/24 +202.14.236.0/22 +202.14.246.0/24 +202.14.251.0/24 +202.20.66.0/24 +202.20.79.0/24 +202.20.87.0/24 +202.20.88.0/23 +202.20.90.0/24 +202.20.94.0/23 +202.20.114.0/24 +202.20.117.0/24 +202.20.120.0/24 +202.20.125.0/24 +202.20.126.0/23 +202.21.48.0/20 +202.21.131.0/24 +202.21.132.0/24 +202.21.141.0/24 +202.21.142.0/24 +202.21.147.0/24 +202.21.148.0/24 +202.21.150.0/23 +202.21.152.0/23 +202.21.154.0/24 +202.21.156.0/24 +202.21.208.0/24 +202.22.248.0/21 +202.27.12.0/24 +202.27.14.0/24 +202.27.136.0/23 +202.36.226.0/24 +202.38.0.0/22 +202.38.8.0/21 +202.38.48.0/20 +202.38.64.0/18 +202.38.128.0/21 +202.38.136.0/23 +202.38.138.0/24 +202.38.140.0/22 +202.38.146.0/23 +202.38.149.0/24 +202.38.150.0/23 +202.38.152.0/22 +202.38.156.0/24 +202.38.158.0/23 +202.38.160.0/23 +202.38.164.0/22 +202.38.168.0/22 +202.38.176.0/23 +202.38.184.0/21 +202.38.192.0/18 +202.40.4.0/23 +202.40.7.0/24 +202.40.15.0/24 +202.40.135.0/24 +202.40.136.0/24 +202.40.140.0/24 +202.40.143.0/24 +202.40.144.0/23 +202.40.150.0/24 +202.40.155.0/24 +202.40.156.0/24 +202.40.158.0/23 +202.40.162.0/24 +202.41.8.0/23 +202.41.11.0/24 +202.41.12.0/23 +202.41.128.0/24 +202.41.130.0/23 +202.41.142.0/24 +202.41.152.0/21 +202.41.192.0/24 +202.41.196.0/22 +202.41.200.0/22 +202.41.240.0/20 +202.43.76.0/22 +202.43.144.0/20 +202.44.16.0/20 +202.44.48.0/22 +202.44.67.0/24 +202.44.74.0/24 +202.44.97.0/24 +202.44.129.0/24 +202.44.132.0/23 +202.44.146.0/23 +202.45.0.0/23 +202.45.2.0/24 +202.45.15.0/24 +202.45.16.0/20 +202.46.16.0/23 +202.46.18.0/24 +202.46.20.0/23 +202.46.128.0/24 +202.46.224.0/20 +202.47.82.0/23 +202.47.96.0/20 +202.47.126.0/24 +202.47.128.0/24 +202.47.130.0/23 +202.52.34.0/24 +202.52.143.0/24 +202.53.140.0/24 +202.53.143.0/24 +202.53.202.0/24 +202.57.212.0/22 +202.57.216.0/22 +202.57.240.0/20 +202.58.0.0/24 +202.58.112.0/22 +202.59.0.0/23 +202.59.212.0/22 +202.59.236.0/24 +202.59.240.0/24 +202.60.48.0/21 +202.60.96.0/21 +202.60.112.0/20 +202.60.132.0/22 +202.60.136.0/21 +202.60.144.0/20 +202.61.68.0/22 +202.61.76.0/22 +202.61.88.0/22 +202.61.123.0/24 +202.61.127.0/24 +202.62.112.0/22 +202.62.248.0/22 +202.62.252.0/24 +202.62.255.0/24 +202.63.80.0/20 +202.63.160.0/19 +202.63.248.0/22 +202.63.253.0/24 +202.65.0.0/21 +202.65.8.0/23 +202.67.0.0/22 +202.69.4.0/23 +202.69.16.0/20 +202.70.0.0/19 +202.70.96.0/20 +202.70.192.0/20 +202.71.32.0/20 +202.72.40.0/21 +202.72.80.0/20 +202.72.112.0/20 +202.73.128.0/22 +202.73.240.0/20 +202.74.8.0/21 +202.74.36.0/24 +202.74.42.0/24 +202.74.52.0/24 +202.74.80.0/20 +202.74.254.0/23 +202.75.208.0/20 +202.75.252.0/22 +202.76.247.0/24 +202.76.252.0/22 +202.77.80.0/21 +202.77.92.0/22 +202.78.8.0/21 +202.79.224.0/21 +202.79.248.0/22 +202.80.192.0/20 +202.81.0.0/22 +202.81.176.0/20 +202.83.252.0/22 +202.84.0.0/20 +202.84.16.0/23 +202.84.22.0/24 +202.84.24.0/21 +202.85.208.0/20 +202.86.249.0/24 +202.87.80.0/20 +202.88.32.0/22 +202.89.8.0/21 +202.89.96.0/22 +202.89.108.0/22 +202.89.119.0/24 +202.89.232.0/21 +202.90.0.0/22 +202.90.16.0/20 +202.90.37.0/24 +202.90.96.0/19 +202.90.193.0/24 +202.90.196.0/24 +202.90.205.0/24 +202.90.224.0/20 +202.91.0.0/22 +202.91.96.0/20 +202.91.128.0/22 +202.91.176.0/20 +202.91.224.0/19 +202.92.0.0/22 +202.92.8.0/21 +202.92.48.0/20 +202.92.252.0/22 +202.93.0.0/22 +202.93.252.0/22 +202.94.0.0/19 +202.94.74.0/24 +202.94.81.0/24 +202.94.92.0/22 +202.95.240.0/21 +202.95.252.0/22 +202.96.0.0/12 +202.112.0.0/13 +202.120.0.0/15 +202.122.0.0/21 +202.122.32.0/21 +202.122.64.0/19 +202.122.112.0/20 +202.122.128.0/24 +202.122.132.0/24 +202.123.96.0/20 +202.123.116.0/22 +202.123.120.0/22 +202.124.16.0/21 +202.124.24.0/22 +202.125.107.0/24 +202.125.109.0/24 +202.125.112.0/20 +202.125.176.0/20 +202.127.0.0/21 +202.127.12.0/22 +202.127.16.0/20 +202.127.40.0/21 +202.127.48.0/20 +202.127.112.0/20 +202.127.128.0/19 +202.127.160.0/21 +202.127.192.0/20 +202.127.208.0/23 +202.127.212.0/22 +202.127.216.0/21 +202.127.224.0/19 +202.129.208.0/24 +202.130.0.0/19 +202.130.39.0/24 +202.130.224.0/19 +202.131.16.0/21 +202.131.59.0/24 +202.131.208.0/20 +202.133.32.0/20 +202.134.58.0/24 +202.134.128.0/20 +202.134.208.0/20 +202.136.48.0/20 +202.136.208.0/20 +202.136.224.0/20 +202.136.248.0/22 +202.136.254.0/23 +202.137.231.0/24 +202.140.140.0/22 +202.140.144.0/20 +202.141.160.0/19 +202.142.16.0/20 +202.143.4.0/22 +202.143.16.0/20 +202.143.32.0/20 +202.143.56.0/21 +202.143.100.0/22 +202.143.104.0/22 +202.146.160.0/20 +202.146.186.0/24 +202.146.188.0/22 +202.146.196.0/22 +202.146.200.0/21 +202.147.144.0/20 +202.148.32.0/20 +202.148.64.0/18 +202.149.32.0/19 +202.149.160.0/19 +202.149.224.0/19 +202.150.16.0/20 +202.150.32.0/20 +202.150.56.0/22 +202.150.192.0/20 +202.150.224.0/19 +202.151.0.0/22 +202.151.128.0/19 +202.152.176.0/20 +202.153.0.0/22 +202.153.7.0/24 +202.153.48.0/20 +202.157.192.0/19 +202.158.160.0/19 +202.158.242.0/24 +202.160.140.0/22 +202.160.156.0/22 +202.160.176.0/20 +202.162.67.0/24 +202.162.75.0/24 +202.164.0.0/20 +202.164.96.0/19 +202.165.176.0/20 +202.165.208.0/20 +202.165.239.0/24 +202.165.240.0/23 +202.165.243.0/24 +202.165.245.0/24 +202.165.251.0/24 +202.165.252.0/22 +202.166.224.0/19 +202.168.80.0/22 +202.168.128.0/20 +202.168.160.0/19 +202.170.128.0/19 +202.170.216.0/21 +202.170.224.0/19 +202.171.216.0/21 +202.171.232.0/24 +202.171.235.0/24 +202.172.0.0/22 +202.172.7.0/24 +202.173.0.0/22 +202.173.6.0/24 +202.173.8.0/21 +202.173.112.0/22 +202.173.224.0/19 +202.174.64.0/20 +202.174.124.0/22 +202.176.224.0/19 +202.179.160.0/20 +202.179.240.0/20 +202.180.128.0/19 +202.180.208.0/21 +202.181.8.0/22 +202.181.28.0/22 +202.181.112.0/20 +202.182.32.0/20 +202.182.192.0/19 +202.189.0.0/18 +202.189.80.0/20 +202.189.184.0/21 +202.191.0.0/24 +202.191.68.0/22 +202.191.72.0/21 +202.191.80.0/20 +202.192.0.0/12 +203.0.4.0/22 +203.0.10.0/23 +203.0.18.0/24 +203.0.24.0/24 +203.0.42.0/23 +203.0.45.0/24 +203.0.46.0/23 +203.0.81.0/24 +203.0.82.0/23 +203.0.90.0/23 +203.0.96.0/23 +203.0.104.0/21 +203.0.114.0/23 +203.0.122.0/24 +203.0.128.0/24 +203.0.130.0/23 +203.0.132.0/22 +203.0.137.0/24 +203.0.142.0/24 +203.0.144.0/24 +203.0.146.0/24 +203.0.148.0/24 +203.0.150.0/23 +203.0.152.0/24 +203.0.177.0/24 +203.0.224.0/24 +203.1.4.0/22 +203.1.18.0/24 +203.1.26.0/23 +203.1.65.0/24 +203.1.66.0/23 +203.1.70.0/23 +203.1.76.0/23 +203.1.90.0/24 +203.1.97.0/24 +203.1.98.0/23 +203.1.100.0/22 +203.1.108.0/24 +203.1.253.0/24 +203.1.254.0/24 +203.2.64.0/21 +203.2.73.0/24 +203.2.112.0/21 +203.2.126.0/23 +203.2.140.0/24 +203.2.150.0/24 +203.2.152.0/22 +203.2.156.0/23 +203.2.160.0/21 +203.2.180.0/23 +203.2.196.0/23 +203.2.209.0/24 +203.2.214.0/23 +203.2.226.0/23 +203.2.229.0/24 +203.2.236.0/23 +203.3.68.0/24 +203.3.72.0/23 +203.3.75.0/24 +203.3.80.0/21 +203.3.96.0/22 +203.3.105.0/24 +203.3.112.0/21 +203.3.120.0/24 +203.3.123.0/24 +203.3.135.0/24 +203.3.139.0/24 +203.3.143.0/24 +203.4.132.0/23 +203.4.134.0/24 +203.4.151.0/24 +203.4.152.0/22 +203.4.174.0/23 +203.4.180.0/24 +203.4.186.0/24 +203.4.205.0/24 +203.4.208.0/22 +203.4.227.0/24 +203.4.230.0/23 +203.5.4.0/23 +203.5.7.0/24 +203.5.8.0/23 +203.5.11.0/24 +203.5.21.0/24 +203.5.22.0/24 +203.5.44.0/24 +203.5.46.0/23 +203.5.52.0/22 +203.5.56.0/23 +203.5.60.0/23 +203.5.114.0/23 +203.5.118.0/24 +203.5.120.0/24 +203.5.172.0/24 +203.5.180.0/23 +203.5.182.0/24 +203.5.185.0/24 +203.5.186.0/24 +203.5.188.0/23 +203.5.190.0/24 +203.5.195.0/24 +203.5.214.0/23 +203.5.218.0/23 +203.6.131.0/24 +203.6.136.0/24 +203.6.138.0/23 +203.6.142.0/24 +203.6.150.0/23 +203.6.157.0/24 +203.6.159.0/24 +203.6.224.0/20 +203.6.248.0/23 +203.7.129.0/24 +203.7.138.0/23 +203.7.147.0/24 +203.7.150.0/23 +203.7.158.0/24 +203.7.192.0/23 +203.7.200.0/24 +203.8.0.0/24 +203.8.8.0/24 +203.8.23.0/24 +203.8.70.0/24 +203.8.82.0/24 +203.8.86.0/23 +203.8.91.0/24 +203.8.110.0/23 +203.8.115.0/24 +203.8.166.0/23 +203.8.169.0/24 +203.8.173.0/24 +203.8.184.0/24 +203.8.186.0/23 +203.8.190.0/23 +203.8.192.0/24 +203.8.197.0/24 +203.8.198.0/23 +203.8.203.0/24 +203.8.209.0/24 +203.8.210.0/23 +203.8.212.0/22 +203.8.217.0/24 +203.8.220.0/24 +203.9.32.0/24 +203.9.36.0/23 +203.9.57.0/24 +203.9.63.0/24 +203.9.65.0/24 +203.9.70.0/23 +203.9.72.0/24 +203.9.75.0/24 +203.9.76.0/23 +203.9.96.0/22 +203.9.100.0/23 +203.9.108.0/24 +203.9.158.0/24 +203.10.34.0/24 +203.10.56.0/24 +203.10.74.0/23 +203.10.84.0/22 +203.10.88.0/24 +203.10.95.0/24 +203.10.125.0/24 +203.11.70.0/24 +203.11.76.0/22 +203.11.82.0/24 +203.11.84.0/22 +203.11.100.0/22 +203.11.109.0/24 +203.11.117.0/24 +203.11.122.0/24 +203.11.126.0/24 +203.11.136.0/22 +203.11.141.0/24 +203.11.142.0/23 +203.11.180.0/22 +203.11.208.0/22 +203.12.16.0/24 +203.12.19.0/24 +203.12.24.0/24 +203.12.57.0/24 +203.12.65.0/24 +203.12.66.0/24 +203.12.70.0/23 +203.12.87.0/24 +203.12.90.0/24 +203.12.92.0/22 +203.12.100.0/23 +203.12.103.0/24 +203.12.114.0/24 +203.12.118.0/24 +203.12.130.0/24 +203.12.137.0/24 +203.12.196.0/22 +203.12.211.0/24 +203.12.219.0/24 +203.12.226.0/24 +203.12.240.0/22 +203.13.18.0/24 +203.13.24.0/24 +203.13.44.0/23 +203.13.88.0/23 +203.13.92.0/22 +203.13.173.0/24 +203.13.224.0/23 +203.13.227.0/24 +203.13.233.0/24 +203.14.24.0/22 +203.14.33.0/24 +203.14.56.0/24 +203.14.61.0/24 +203.14.62.0/24 +203.14.104.0/24 +203.14.114.0/23 +203.14.118.0/24 +203.14.162.0/24 +203.14.184.0/21 +203.14.192.0/24 +203.14.194.0/23 +203.14.214.0/24 +203.14.231.0/24 +203.14.246.0/24 +203.15.0.0/20 +203.15.20.0/23 +203.15.22.0/24 +203.15.87.0/24 +203.15.88.0/23 +203.15.105.0/24 +203.15.112.0/21 +203.15.130.0/23 +203.15.149.0/24 +203.15.151.0/24 +203.15.156.0/22 +203.15.174.0/24 +203.15.227.0/24 +203.15.232.0/22 +203.15.238.0/23 +203.15.240.0/23 +203.15.246.0/24 +203.16.10.0/24 +203.16.12.0/23 +203.16.16.0/21 +203.16.27.0/24 +203.16.38.0/24 +203.16.49.0/24 +203.16.50.0/23 +203.16.58.0/24 +203.16.63.0/24 +203.16.133.0/24 +203.16.161.0/24 +203.16.162.0/24 +203.16.186.0/23 +203.16.228.0/24 +203.16.238.0/24 +203.16.240.0/24 +203.16.245.0/24 +203.17.2.0/24 +203.17.18.0/24 +203.17.28.0/24 +203.17.39.0/24 +203.17.56.0/24 +203.17.74.0/23 +203.17.88.0/23 +203.17.136.0/24 +203.17.164.0/24 +203.17.187.0/24 +203.17.190.0/23 +203.17.231.0/24 +203.17.233.0/24 +203.17.248.0/23 +203.17.255.0/24 +203.18.2.0/23 +203.18.4.0/24 +203.18.7.0/24 +203.18.31.0/24 +203.18.37.0/24 +203.18.48.0/23 +203.18.52.0/24 +203.18.72.0/22 +203.18.80.0/23 +203.18.87.0/24 +203.18.100.0/23 +203.18.105.0/24 +203.18.107.0/24 +203.18.110.0/24 +203.18.129.0/24 +203.18.131.0/24 +203.18.132.0/23 +203.18.144.0/24 +203.18.153.0/24 +203.18.199.0/24 +203.18.208.0/24 +203.18.211.0/24 +203.18.215.0/24 +203.19.1.0/24 +203.19.18.0/24 +203.19.24.0/24 +203.19.30.0/24 +203.19.41.0/24 +203.19.44.0/23 +203.19.46.0/24 +203.19.58.0/24 +203.19.60.0/23 +203.19.64.0/24 +203.19.68.0/24 +203.19.72.0/24 +203.19.101.0/24 +203.19.111.0/24 +203.19.131.0/24 +203.19.133.0/24 +203.19.144.0/24 +203.19.147.0/24 +203.19.149.0/24 +203.19.156.0/24 +203.19.176.0/24 +203.19.178.0/23 +203.19.208.0/24 +203.19.228.0/22 +203.19.233.0/24 +203.19.242.0/24 +203.19.248.0/23 +203.19.255.0/24 +203.20.17.0/24 +203.20.40.0/23 +203.20.44.0/24 +203.20.48.0/24 +203.20.61.0/24 +203.20.65.0/24 +203.20.84.0/23 +203.20.89.0/24 +203.20.106.0/23 +203.20.115.0/24 +203.20.117.0/24 +203.20.118.0/23 +203.20.122.0/24 +203.20.126.0/23 +203.20.135.0/24 +203.20.140.0/22 +203.20.150.0/24 +203.20.230.0/24 +203.20.232.0/24 +203.20.236.0/24 +203.21.0.0/23 +203.21.2.0/24 +203.21.8.0/24 +203.21.10.0/24 +203.21.18.0/24 +203.21.33.0/24 +203.21.34.0/24 +203.21.41.0/24 +203.21.44.0/24 +203.21.68.0/24 +203.21.82.0/24 +203.21.96.0/22 +203.21.124.0/24 +203.21.136.0/23 +203.21.145.0/24 +203.21.206.0/24 +203.22.24.0/24 +203.22.28.0/23 +203.22.31.0/24 +203.22.68.0/24 +203.22.76.0/24 +203.22.84.0/24 +203.22.87.0/24 +203.22.92.0/22 +203.22.99.0/24 +203.22.106.0/24 +203.22.122.0/23 +203.22.131.0/24 +203.22.163.0/24 +203.22.166.0/24 +203.22.170.0/24 +203.22.176.0/21 +203.22.194.0/24 +203.22.242.0/23 +203.22.245.0/24 +203.22.246.0/24 +203.22.252.0/23 +203.23.0.0/24 +203.23.47.0/24 +203.23.61.0/24 +203.23.62.0/23 +203.23.73.0/24 +203.23.85.0/24 +203.23.92.0/22 +203.23.98.0/24 +203.23.107.0/24 +203.23.112.0/24 +203.23.130.0/24 +203.23.140.0/23 +203.23.172.0/24 +203.23.182.0/24 +203.23.186.0/23 +203.23.192.0/24 +203.23.197.0/24 +203.23.198.0/24 +203.23.204.0/22 +203.23.224.0/24 +203.23.226.0/23 +203.23.228.0/22 +203.23.249.0/24 +203.23.251.0/24 +203.24.13.0/24 +203.24.18.0/24 +203.24.27.0/24 +203.24.43.0/24 +203.24.56.0/24 +203.24.58.0/24 +203.24.67.0/24 +203.24.74.0/24 +203.24.79.0/24 +203.24.80.0/23 +203.24.84.0/23 +203.24.86.0/24 +203.24.90.0/24 +203.24.111.0/24 +203.24.112.0/24 +203.24.116.0/24 +203.24.122.0/23 +203.24.145.0/24 +203.24.152.0/23 +203.24.157.0/24 +203.24.161.0/24 +203.24.167.0/24 +203.24.186.0/23 +203.24.199.0/24 +203.24.202.0/24 +203.24.212.0/23 +203.24.217.0/24 +203.24.219.0/24 +203.24.244.0/24 +203.25.19.0/24 +203.25.20.0/23 +203.25.46.0/24 +203.25.64.0/23 +203.25.91.0/24 +203.25.99.0/24 +203.25.100.0/24 +203.25.106.0/24 +203.25.131.0/24 +203.25.135.0/24 +203.25.138.0/24 +203.25.147.0/24 +203.25.153.0/24 +203.25.154.0/23 +203.25.164.0/24 +203.25.166.0/24 +203.25.174.0/23 +203.25.180.0/24 +203.25.182.0/24 +203.25.191.0/24 +203.25.199.0/24 +203.25.200.0/24 +203.25.202.0/23 +203.25.208.0/20 +203.25.229.0/24 +203.25.235.0/24 +203.25.236.0/24 +203.25.242.0/24 +203.26.12.0/24 +203.26.34.0/24 +203.26.49.0/24 +203.26.50.0/24 +203.26.55.0/24 +203.26.56.0/23 +203.26.60.0/24 +203.26.65.0/24 +203.26.68.0/24 +203.26.76.0/24 +203.26.80.0/24 +203.26.84.0/24 +203.26.97.0/24 +203.26.102.0/23 +203.26.115.0/24 +203.26.116.0/24 +203.26.129.0/24 +203.26.143.0/24 +203.26.144.0/24 +203.26.148.0/23 +203.26.154.0/24 +203.26.158.0/23 +203.26.161.0/24 +203.26.170.0/24 +203.26.173.0/24 +203.26.176.0/24 +203.26.185.0/24 +203.26.202.0/23 +203.26.210.0/24 +203.26.214.0/24 +203.26.222.0/24 +203.26.224.0/24 +203.26.228.0/24 +203.26.232.0/24 +203.27.0.0/24 +203.27.10.0/24 +203.27.15.0/24 +203.27.16.0/24 +203.27.20.0/24 +203.27.22.0/23 +203.27.40.0/24 +203.27.45.0/24 +203.27.53.0/24 +203.27.65.0/24 +203.27.66.0/24 +203.27.81.0/24 +203.27.88.0/24 +203.27.102.0/24 +203.27.109.0/24 +203.27.117.0/24 +203.27.121.0/24 +203.27.122.0/23 +203.27.125.0/24 +203.27.200.0/24 +203.27.202.0/24 +203.27.233.0/24 +203.27.241.0/24 +203.27.250.0/24 +203.28.10.0/24 +203.28.12.0/24 +203.28.33.0/24 +203.28.34.0/23 +203.28.43.0/24 +203.28.44.0/24 +203.28.54.0/24 +203.28.56.0/24 +203.28.73.0/24 +203.28.74.0/24 +203.28.76.0/24 +203.28.86.0/24 +203.28.88.0/24 +203.28.112.0/24 +203.28.131.0/24 +203.28.136.0/24 +203.28.140.0/24 +203.28.145.0/24 +203.28.165.0/24 +203.28.169.0/24 +203.28.170.0/24 +203.28.178.0/23 +203.28.185.0/24 +203.28.187.0/24 +203.28.196.0/24 +203.28.226.0/23 +203.28.239.0/24 +203.29.2.0/24 +203.29.8.0/23 +203.29.13.0/24 +203.29.14.0/24 +203.29.28.0/24 +203.29.46.0/24 +203.29.57.0/24 +203.29.61.0/24 +203.29.63.0/24 +203.29.69.0/24 +203.29.73.0/24 +203.29.81.0/24 +203.29.90.0/24 +203.29.95.0/24 +203.29.100.0/24 +203.29.103.0/24 +203.29.112.0/24 +203.29.120.0/22 +203.29.182.0/23 +203.29.187.0/24 +203.29.189.0/24 +203.29.190.0/24 +203.29.205.0/24 +203.29.210.0/24 +203.29.217.0/24 +203.29.227.0/24 +203.29.231.0/24 +203.29.233.0/24 +203.29.234.0/24 +203.29.248.0/24 +203.29.254.0/23 +203.30.16.0/23 +203.30.25.0/24 +203.30.29.0/24 +203.30.66.0/24 +203.30.81.0/24 +203.30.87.0/24 +203.30.111.0/24 +203.30.121.0/24 +203.30.123.0/24 +203.30.152.0/24 +203.30.156.0/24 +203.30.162.0/24 +203.30.173.0/24 +203.30.175.0/24 +203.30.187.0/24 +203.30.194.0/24 +203.30.217.0/24 +203.30.220.0/24 +203.30.222.0/24 +203.30.232.0/23 +203.30.235.0/24 +203.30.240.0/23 +203.30.246.0/24 +203.30.250.0/23 +203.31.45.0/24 +203.31.46.0/24 +203.31.49.0/24 +203.31.51.0/24 +203.31.54.0/23 +203.31.69.0/24 +203.31.72.0/24 +203.31.80.0/24 +203.31.85.0/24 +203.31.97.0/24 +203.31.105.0/24 +203.31.106.0/24 +203.31.108.0/23 +203.31.124.0/24 +203.31.162.0/24 +203.31.174.0/24 +203.31.177.0/24 +203.31.181.0/24 +203.31.187.0/24 +203.31.189.0/24 +203.31.204.0/24 +203.31.220.0/24 +203.31.222.0/23 +203.31.225.0/24 +203.31.229.0/24 +203.31.248.0/23 +203.31.253.0/24 +203.32.20.0/24 +203.32.48.0/23 +203.32.56.0/24 +203.32.60.0/24 +203.32.62.0/24 +203.32.68.0/23 +203.32.76.0/24 +203.32.81.0/24 +203.32.84.0/23 +203.32.95.0/24 +203.32.102.0/24 +203.32.105.0/24 +203.32.130.0/24 +203.32.133.0/24 +203.32.140.0/24 +203.32.152.0/24 +203.32.186.0/23 +203.32.192.0/24 +203.32.196.0/24 +203.32.203.0/24 +203.32.204.0/23 +203.32.212.0/24 +203.33.4.0/24 +203.33.7.0/24 +203.33.12.0/23 +203.33.21.0/24 +203.33.26.0/24 +203.33.32.0/24 +203.33.63.0/24 +203.33.64.0/24 +203.33.67.0/24 +203.33.68.0/24 +203.33.73.0/24 +203.33.79.0/24 +203.33.100.0/24 +203.33.122.0/24 +203.33.129.0/24 +203.33.131.0/24 +203.33.145.0/24 +203.33.156.0/24 +203.33.158.0/23 +203.33.174.0/24 +203.33.185.0/24 +203.33.200.0/24 +203.33.202.0/23 +203.33.204.0/24 +203.33.206.0/23 +203.33.214.0/23 +203.33.224.0/23 +203.33.226.0/24 +203.33.233.0/24 +203.33.243.0/24 +203.33.250.0/24 +203.34.4.0/24 +203.34.21.0/24 +203.34.27.0/24 +203.34.39.0/24 +203.34.48.0/23 +203.34.54.0/24 +203.34.56.0/23 +203.34.67.0/24 +203.34.69.0/24 +203.34.76.0/24 +203.34.92.0/24 +203.34.106.0/24 +203.34.113.0/24 +203.34.147.0/24 +203.34.150.0/24 +203.34.152.0/23 +203.34.161.0/24 +203.34.162.0/24 +203.34.187.0/24 +203.34.192.0/21 +203.34.204.0/22 +203.34.232.0/24 +203.34.240.0/24 +203.34.242.0/24 +203.34.245.0/24 +203.34.251.0/24 +203.55.2.0/23 +203.55.4.0/24 +203.55.10.0/24 +203.55.13.0/24 +203.55.22.0/24 +203.55.30.0/24 +203.55.93.0/24 +203.55.101.0/24 +203.55.109.0/24 +203.55.110.0/24 +203.55.116.0/23 +203.55.119.0/24 +203.55.128.0/23 +203.55.146.0/23 +203.55.192.0/24 +203.55.196.0/24 +203.55.218.0/23 +203.55.221.0/24 +203.55.224.0/24 +203.56.1.0/24 +203.56.4.0/24 +203.56.12.0/24 +203.56.24.0/24 +203.56.38.0/24 +203.56.40.0/24 +203.56.46.0/24 +203.56.50.0/23 +203.56.52.0/22 +203.56.68.0/23 +203.56.82.0/23 +203.56.84.0/23 +203.56.95.0/24 +203.56.110.0/24 +203.56.121.0/24 +203.56.161.0/24 +203.56.169.0/24 +203.56.172.0/23 +203.56.175.0/24 +203.56.183.0/24 +203.56.185.0/24 +203.56.187.0/24 +203.56.192.0/24 +203.56.198.0/24 +203.56.201.0/24 +203.56.208.0/23 +203.56.210.0/24 +203.56.214.0/24 +203.56.216.0/24 +203.56.227.0/24 +203.56.228.0/24 +203.56.232.0/24 +203.56.240.0/24 +203.56.252.0/24 +203.56.254.0/24 +203.57.5.0/24 +203.57.6.0/24 +203.57.12.0/23 +203.57.28.0/24 +203.57.39.0/24 +203.57.46.0/24 +203.57.58.0/24 +203.57.61.0/24 +203.57.66.0/24 +203.57.69.0/24 +203.57.70.0/23 +203.57.73.0/24 +203.57.90.0/24 +203.57.101.0/24 +203.57.109.0/24 +203.57.123.0/24 +203.57.157.0/24 +203.57.200.0/24 +203.57.202.0/24 +203.57.206.0/24 +203.57.222.0/24 +203.57.224.0/20 +203.57.246.0/23 +203.57.249.0/24 +203.57.253.0/24 +203.57.254.0/23 +203.62.2.0/24 +203.62.131.0/24 +203.62.139.0/24 +203.62.161.0/24 +203.62.197.0/24 +203.62.228.0/22 +203.62.234.0/24 +203.62.246.0/24 +203.65.240.0/22 +203.76.160.0/22 +203.76.168.0/22 +203.76.208.0/21 +203.76.216.0/22 +203.76.240.0/22 +203.77.180.0/22 +203.78.48.0/20 +203.78.156.0/22 +203.79.0.0/20 +203.80.4.0/23 +203.80.32.0/20 +203.80.57.0/24 +203.80.129.0/24 +203.80.132.0/22 +203.80.140.0/22 +203.80.144.0/20 +203.81.0.0/21 +203.81.16.0/20 +203.81.244.0/22 +203.82.0.0/23 +203.82.16.0/21 +203.82.112.0/20 +203.82.224.0/20 +203.83.0.0/22 +203.83.12.0/22 +203.83.56.0/21 +203.83.224.0/20 +203.86.0.0/18 +203.86.64.0/19 +203.86.250.0/24 +203.86.254.0/23 +203.88.32.0/19 +203.88.100.0/22 +203.88.192.0/19 +203.89.0.0/22 +203.89.100.0/22 +203.89.136.0/22 +203.89.144.0/24 +203.90.0.0/22 +203.90.8.0/21 +203.90.128.0/18 +203.90.192.0/19 +203.91.32.0/19 +203.91.96.0/20 +203.91.120.0/21 +203.92.0.0/22 +203.92.6.0/24 +203.92.160.0/19 +203.93.0.0/16 +203.94.0.0/19 +203.95.0.0/21 +203.95.96.0/19 +203.95.128.0/18 +203.95.200.0/21 +203.95.208.0/22 +203.95.224.0/19 +203.99.8.0/21 +203.99.16.0/22 +203.99.30.0/23 +203.99.80.0/20 +203.100.32.0/20 +203.100.58.0/24 +203.100.60.0/24 +203.100.63.0/24 +203.100.80.0/20 +203.100.96.0/19 +203.100.192.0/20 +203.104.32.0/20 +203.105.96.0/19 +203.105.128.0/19 +203.107.0.0/19 +203.107.32.0/20 +203.107.52.0/22 +203.107.56.0/21 +203.107.69.0/24 +203.107.70.0/23 +203.107.72.0/21 +203.107.80.0/20 +203.107.96.0/19 +203.110.160.0/19 +203.110.208.0/20 +203.110.232.0/23 +203.110.234.0/24 +203.114.80.0/20 +203.114.244.0/22 +203.118.192.0/19 +203.118.241.0/24 +203.118.248.0/22 +203.119.24.0/23 +203.119.32.0/24 +203.119.34.0/23 +203.119.80.0/22 +203.119.85.0/24 +203.119.113.0/24 +203.119.114.0/23 +203.119.116.0/22 +203.119.120.0/21 +203.119.128.0/17 +203.123.58.0/24 +203.128.32.0/19 +203.128.96.0/19 +203.128.128.0/24 +203.128.224.0/21 +203.130.32.0/20 +203.132.32.0/19 +203.134.240.0/22 +203.134.246.0/23 +203.135.96.0/19 +203.135.160.0/20 +203.142.12.0/23 +203.142.219.0/24 +203.142.224.0/19 +203.145.0.0/19 +203.148.0.0/18 +203.148.64.0/20 +203.148.80.0/22 +203.148.86.0/23 +203.149.92.0/22 +203.152.64.0/19 +203.152.128.0/19 +203.153.0.0/22 +203.156.192.0/18 +203.158.16.0/21 +203.160.129.0/24 +203.160.192.0/19 +203.161.0.0/22 +203.161.180.0/24 +203.161.183.0/24 +203.161.192.0/19 +203.166.160.0/19 +203.167.28.0/22 +203.168.0.0/19 +203.170.58.0/23 +203.171.0.0/22 +203.171.208.0/24 +203.171.224.0/20 +203.174.4.0/24 +203.174.6.0/24 +203.174.96.0/20 +203.175.128.0/19 +203.175.192.0/18 +203.176.0.0/18 +203.176.64.0/19 +203.176.168.0/21 +203.184.80.0/20 +203.187.160.0/19 +203.189.0.0/23 +203.189.6.0/23 +203.189.112.0/22 +203.189.192.0/19 +203.189.240.0/22 +203.190.96.0/20 +203.190.249.0/24 +203.191.0.0/23 +203.191.2.0/24 +203.191.5.0/24 +203.191.7.0/24 +203.191.29.0/24 +203.191.31.0/24 +203.191.64.0/18 +203.191.133.0/24 +203.191.144.0/20 +203.192.0.0/19 +203.193.224.0/19 +203.195.64.0/19 +203.195.128.0/17 +203.196.0.0/20 +203.196.28.0/22 +203.201.181.0/24 +203.201.182.0/24 +203.202.236.0/22 +203.205.64.0/19 +203.207.64.0/18 +203.207.128.0/17 +203.208.0.0/20 +203.208.16.0/22 +203.208.32.0/19 +203.209.224.0/19 +203.212.0.0/20 +203.212.80.0/20 +203.217.164.0/22 +203.223.0.0/20 +203.223.16.0/24 +203.223.22.0/24 +204.55.160.0/24 +204.74.96.0/24 +204.114.176.0/23 +206.219.44.0/23 +206.219.50.0/23 +206.219.52.0/23 +207.89.20.0/24 +210.2.0.0/23 +210.2.2.0/24 +210.2.5.0/24 +210.2.6.0/23 +210.2.8.0/21 +210.2.24.0/21 +210.5.0.0/19 +210.5.56.0/24 +210.5.60.0/24 +210.5.128.0/19 +210.7.56.0/21 +210.12.0.0/15 +210.14.64.0/19 +210.14.112.0/20 +210.14.128.0/17 +210.15.0.0/17 +210.15.128.0/18 +210.16.128.0/21 +210.16.136.0/22 +210.16.156.0/22 +210.16.160.0/19 +210.21.0.0/16 +210.22.0.0/16 +210.23.32.0/19 +210.25.0.0/16 +210.26.0.0/15 +210.28.0.0/14 +210.32.0.0/12 +210.51.0.0/16 +210.52.0.0/18 +210.52.64.0/23 +210.52.66.0/24 +210.52.68.0/22 +210.52.72.0/21 +210.52.80.0/20 +210.52.96.0/21 +210.52.104.0/22 +210.52.108.0/24 +210.52.110.0/23 +210.52.112.0/20 +210.52.128.0/17 +210.53.0.0/16 +210.56.192.0/19 +210.72.0.0/14 +210.76.0.0/15 +210.78.0.0/16 +210.79.64.0/18 +210.79.224.0/19 +210.82.0.0/15 +210.87.128.0/18 +210.185.192.0/18 +210.192.96.0/19 +211.64.0.0/13 +211.80.0.0/12 +211.96.0.0/14 +211.100.0.0/17 +211.100.128.0/19 +211.100.160.0/20 +211.100.184.0/21 +211.100.192.0/18 +211.101.0.0/16 +211.102.0.0/15 +211.136.0.0/13 +211.144.0.0/13 +211.152.0.0/17 +211.152.134.0/23 +211.152.138.0/23 +211.152.140.0/22 +211.152.150.0/23 +211.152.157.0/24 +211.152.158.0/23 +211.152.160.0/19 +211.152.192.0/18 +211.153.0.0/16 +211.154.0.0/19 +211.154.32.0/20 +211.154.48.0/21 +211.154.64.0/18 +211.154.128.0/17 +211.155.0.0/18 +211.155.67.0/24 +211.155.68.0/24 +211.155.72.0/21 +211.155.80.0/20 +211.155.97.0/24 +211.155.98.0/23 +211.155.100.0/22 +211.155.104.0/21 +211.155.113.0/24 +211.155.117.0/24 +211.155.118.0/23 +211.155.120.0/21 +211.155.128.0/17 +211.156.0.0/18 +211.156.64.0/19 +211.156.96.0/21 +211.156.104.0/22 +211.156.108.0/23 +211.156.112.0/20 +211.156.128.0/17 +211.157.0.0/16 +211.158.0.0/15 +211.160.0.0/13 +212.64.0.0/17 +212.129.128.0/17 +218.0.0.0/12 +218.16.0.0/13 +218.24.0.0/14 +218.28.0.0/15 +218.30.0.0/19 +218.30.64.0/18 +218.30.128.0/18 +218.30.192.0/19 +218.30.224.0/20 +218.30.240.0/21 +218.30.248.0/22 +218.30.252.0/25 +218.30.252.128/26 +218.30.252.194/31 +218.30.252.196/30 +218.30.252.200/29 +218.30.252.208/28 +218.30.252.224/27 +218.30.253.0/24 +218.30.254.0/23 +218.31.0.0/16 +218.56.0.0/13 +218.64.0.0/11 +218.96.0.0/15 +218.98.0.0/18 +218.98.96.0/21 +218.98.104.0/22 +218.98.108.0/23 +218.98.110.0/24 +218.98.112.0/20 +218.98.128.0/19 +218.98.192.0/18 +218.99.0.0/16 +218.100.96.0/19 +218.100.128.0/17 +218.104.0.0/14 +218.108.0.0/15 +218.185.192.0/19 +218.192.0.0/12 +218.240.0.0/14 +218.244.0.0/15 +218.246.0.0/17 +218.246.129.0/24 +218.246.131.0/24 +218.246.132.0/23 +218.246.134.0/24 +218.246.139.0/24 +218.246.144.0/20 +218.246.160.0/19 +218.246.192.0/18 +218.247.0.0/18 +218.247.96.0/19 +218.247.128.0/17 +218.249.0.0/16 +219.72.0.0/16 +219.82.0.0/16 +219.83.128.0/17 +219.90.68.0/22 +219.90.72.0/21 +219.128.0.0/11 +219.216.0.0/13 +219.224.0.0/13 +219.232.0.0/15 +219.234.0.0/21 +219.234.9.0/24 +219.234.10.0/23 +219.234.12.0/22 +219.234.32.0/19 +219.234.64.0/18 +219.234.128.0/17 +219.235.0.0/16 +219.236.0.0/14 +219.242.0.0/15 +219.244.0.0/14 +220.101.192.0/18 +220.112.0.0/14 +220.152.128.0/17 +220.154.0.0/16 +220.155.0.0/21 +220.155.9.0/24 +220.155.10.0/23 +220.155.12.0/22 +220.155.16.0/21 +220.155.24.0/22 +220.155.28.0/23 +220.155.31.0/24 +220.155.32.0/19 +220.155.64.0/18 +220.155.128.0/17 +220.158.241.0/24 +220.158.243.0/24 +220.160.0.0/11 +220.192.0.0/12 +220.231.0.0/18 +220.231.128.0/17 +220.232.64.0/18 +220.234.0.0/16 +220.242.0.0/24 +220.242.12.0/23 +220.242.14.0/24 +220.242.17.0/24 +220.242.18.0/23 +220.242.20.0/24 +220.242.32.0/20 +220.242.48.0/23 +220.242.53.0/24 +220.242.55.0/24 +220.242.56.0/22 +220.242.60.0/23 +220.242.62.0/24 +220.242.64.0/19 +220.242.96.0/20 +220.242.112.0/21 +220.242.120.0/22 +220.242.124.0/23 +220.242.126.0/24 +220.242.173.0/24 +220.242.197.0/24 +220.242.205.0/24 +220.242.207.0/24 +220.242.215.0/24 +220.242.216.0/21 +220.242.224.0/19 +220.243.0.0/17 +220.243.128.0/18 +220.243.204.0/24 +220.243.214.0/24 +220.243.217.0/24 +220.243.218.0/24 +220.243.238.0/24 +220.247.136.0/21 +220.248.0.0/14 +220.252.0.0/16 +221.0.0.0/13 +221.8.0.0/14 +221.12.0.0/17 +221.12.128.0/18 +221.13.0.0/16 +221.14.0.0/15 +221.122.0.0/15 +221.128.128.0/17 +221.129.0.0/16 +221.130.0.0/15 +221.133.224.0/19 +221.136.0.0/15 +221.172.0.0/14 +221.176.0.0/19 +221.176.32.0/20 +221.176.48.0/21 +221.176.56.0/24 +221.176.58.0/23 +221.176.60.0/22 +221.176.64.0/18 +221.176.128.0/17 +221.177.0.0/16 +221.178.0.0/15 +221.180.0.0/14 +221.192.0.0/14 +221.196.0.0/15 +221.198.0.0/16 +221.199.0.0/17 +221.199.128.0/18 +221.199.192.0/20 +221.199.224.0/19 +221.200.0.0/13 +221.208.0.0/12 +221.224.0.0/12 +222.16.0.0/12 +222.32.0.0/11 +222.64.0.0/11 +222.125.0.0/16 +222.126.128.0/19 +222.126.160.0/21 +222.126.168.0/22 +222.126.172.0/23 +222.126.174.40/29 +222.126.174.76/30 +222.126.174.88/29 +222.126.174.144/28 +222.126.178.0/23 +222.126.180.0/22 +222.126.184.0/21 +222.126.192.0/21 +222.126.200.104/29 +222.126.206.0/23 +222.126.208.0/22 +222.126.212.0/26 +222.126.212.64/27 +222.126.212.96/28 +222.126.212.112/29 +222.126.212.128/25 +222.126.213.0/24 +222.126.214.0/23 +222.126.216.0/21 +222.126.224.0/19 +222.128.0.0/12 +222.160.0.0/14 +222.168.0.0/13 +222.176.0.0/12 +222.192.0.0/11 +222.240.0.0/13 +222.248.0.0/15 +223.0.0.0/12 +223.20.0.0/15 +223.27.184.0/22 +223.29.208.0/22 +223.29.252.0/22 +223.64.0.0/11 +223.96.0.0/12 +223.112.0.0/14 +223.116.0.0/15 +223.120.0.0/13 +223.128.0.0/15 +223.144.0.0/12 +223.160.0.0/14 +223.166.0.0/15 +223.192.0.0/15 +223.198.0.0/15 +223.201.4.0/22 +223.201.8.0/21 +223.201.16.0/20 +223.201.32.0/19 +223.201.64.0/18 +223.201.128.0/17 +223.202.0.0/15 +223.208.0.0/13 +223.220.0.0/15 +223.223.176.0/20 +223.223.192.0/20 +223.240.0.0/13 +223.248.0.0/14 +223.252.128.0/19 +223.252.192.0/18 +223.254.0.0/16 +223.255.0.0/17 +223.255.236.0/22 +223.255.252.0/23 diff --git a/acl/server_block_local.acl b/acl/server_block_local.acl new file mode 100644 index 000000000..dc98773e1 --- /dev/null +++ b/acl/server_block_local.acl @@ -0,0 +1,25 @@ +# All IPs listed here will be blocked while the ss-server try to outbound. +# Only IP is allowed, *NOT* domain name. +# + +[outbound_block_list] +0.0.0.0/8 +10.0.0.0/8 +100.64.0.0/10 +127.0.0.0/8 +169.254.0.0/16 +172.16.0.0/12 +192.0.0.0/24 +192.0.2.0/24 +192.88.99.0/24 +192.168.0.0/16 +198.18.0.0/15 +198.51.100.0/24 +203.0.113.0/24 +224.0.0.0/4 +240.0.0.0/4 +255.255.255.255/32 +::1/128 +::ffff:127.0.0.1/104 +fc00::/7 +fe80::/10 diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 153869f11..000000000 --- a/aclocal.m4 +++ /dev/null @@ -1,1076 +0,0 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.6], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.6])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# Copyright (C) 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_AR([ACT-IF-FAIL]) -# ------------------------- -# Try to determine the archiver interface, and trigger the ar-lib wrapper -# if it is needed. If the detection of archiver interface fails, run -# ACT-IF-FAIL (default is to abort configure with a proper error message). -AC_DEFUN([AM_PROG_AR], -[AC_BEFORE([$0], [LT_INIT])dnl -AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([ar-lib])dnl -AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) -: ${AR=ar} - -AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [am_cv_ar_interface=ar - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], - [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([am_ar_try]) - if test "$ac_status" -eq 0; then - am_cv_ar_interface=ar - else - am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([am_ar_try]) - if test "$ac_status" -eq 0; then - am_cv_ar_interface=lib - else - am_cv_ar_interface=unknown - fi - fi - rm -f conftest.lib libconftest.a - ]) - ]) - -case $am_cv_ar_interface in -ar) - ;; -lib) - # Microsoft lib, so override with the ar-lib wrapper script. - # FIXME: It is wrong to rewrite AR. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__AR in this case, - # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something - # similar. - AR="$am_aux_dir/ar-lib $AR" - ;; -unknown) - m4_default([$1], - [AC_MSG_ERROR([could not determine $AR interface])]) - ;; -esac -AC_SUBST([AR])dnl -]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/acx_pthread.m4]) -m4_include([m4/inet_ntop.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) -m4_include([m4/openssl.m4]) -m4_include([m4/polarssl.m4]) diff --git a/ar-lib b/ar-lib deleted file mode 100755 index 0f62c6fc3..000000000 --- a/ar-lib +++ /dev/null @@ -1,270 +0,0 @@ -#! /bin/sh -# Wrapper for Microsoft lib.exe - -me=ar-lib -scriptversion=2012-03-01.08; # UTC - -# Copyright (C) 2010, 2012 Free Software Foundation, Inc. -# Written by Peter Rosin . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - - -# 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 < header file. */ +#cmakedefine HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you + don't. */ +#cmakedefine HAVE_DECL_INET_NTOP 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_EV_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FCNTL_H 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 header file. */ +#cmakedefine HAVE_INTTYPES_H 1 + +/* Enable IPv6 support in libudns */ +#cmakedefine HAVE_IPv6 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LANGINFO_H 1 + +/* Compiling with pcre support */ +#cmakedefine HAVE_LIBPCRE 1 + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#cmakedefine HAVE_LIBSOCKET 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_IF_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_TCP_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETINET_TCP_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_NETFILTER_IPV4_H 1 + +/* Define to 1 if you have the header + file. */ +#cmakedefine HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H 1 + +/* Define to 1 if you have the 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 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 header file. */ +#cmakedefine HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_PCRE_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_PCRE_PCRE_H 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#cmakedefine HAVE_PTHREAD_PRIO_INHERIT 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 `socket' function. */ +#cmakedefine HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H 1 + +/* Define to 1 if you have the 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 header file. */ +#cmakedefine HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#cmakedefine HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UDNS_H 1 + +/* Define to 1 if you have the 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 header file. */ +#cmakedefine HAVE_VFORK_H 1 + +/* Define to 1 if `fork' works. */ +#cmakedefine HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#cmakedefine HAVE_WORKING_VFORK 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#cmakedefine LT_OBJDIR "@LT_OBJDIR@" + +/* Define to 1 if assertions should be disabled. */ +#cmakedefine NDEBUG 1 + +/* Name of package */ +#define PACKAGE "@PROJECT_NAME@" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "@PROJECT_NAME@" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "@PROJECT_NAME@ @PROJECT_VERSION@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "@PROJECT_NAME@" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "@PACKAGE_URL@" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@PROJECT_VERSION@" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +#cmakedefine PTHREAD_CREATE_JOINABLE 1 + +/* Define as the return type of signal handlers (`int' or `void'). */ +#cmakedefine RETSIGTYPE @RETSIGTYPE@ + +/* Define to the type of arg 1 for `select'. */ +#cmakedefine SELECT_TYPE_ARG1 @SELECT_TYPE_ARG1@ + +/* Define to the type of args 2, 3 and 4 for `select'. */ +#cmakedefine SELECT_TYPE_ARG234 @SELECT_TYPE_ARG234@ + +/* Define to the type of arg 5 for `select'. */ +#cmakedefine SELECT_TYPE_ARG5 @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 and . */ +#cmakedefine TIME_WITH_SYS_TIME 1 + +/* If the compiler supports a TLS storage class define it to that here */ +#cmakedefine TLS @TLS@ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +#cmakedefine _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +#cmakedefine _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +#cmakedefine _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +#cmakedefine _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +#cmakedefine __EXTENSIONS__ 1 +#endif + + +/* Define if use system shared lib. */ +#cmakedefine USE_SYSTEM_SHARED_LIB 1 + +/* Version number of package */ +#define VERSION "@PROJECT_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 +#cmakedefine WORDS_BIGENDIAN 1 +# 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 1 + +/* 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 , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +#cmakedefine _UINT8_T 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +#cmakedefine const 1 + +/* 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 +#cmakedefine inline 1 +#endif + +/* Define to `int' if does not define. */ +#cmakedefine pid_t @pid_t@ + +/* Define to `unsigned int' if does not define. */ +#cmakedefine size_t unsigned int + +/* Define to `int' if does not define. */ +#cmakedefine ssize_t int + +/* 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. */ +#cmakedefine uint16_t @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. */ +#cmakedefine uint8_t @uint8_t@ + +/* Define as `fork' if `vfork' does not work. */ +#cmakedefine vfork + +#endif diff --git a/cmake/configure.cmake b/cmake/configure.cmake new file mode 100644 index 000000000..17049a988 --- /dev/null +++ b/cmake/configure.cmake @@ -0,0 +1,199 @@ + +# ------------------------------------------------------------- +# config.h + +# If we generate config.h by automake +#include_directories(.) + +# Use cmake to generate config.h +include(CheckIncludeFiles) +include(CheckFunctionExists) +include(CheckSymbolExists) +include(CheckLibraryExists) +include(CheckTypeSize) +include(CheckCSourceCompiles) + +# Define if building universal (internal helper macro) +# AC_APPLE_UNIVERSAL_BUILD +set(CONNECT_IN_PROGRESS "EINPROGRESS") +set(CONNECT_IN_PROGRESS "EINPROGRESS" CACHE STRING "") + +if (CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(CMAKE_REQUIRED_INCLUDES "/usr/local/include" "/usr/include") +endif () + +check_include_files(dlfcn.h HAVE_DLFCN_H) +check_include_files(ev.h HAVE_EV_H) +check_include_files(fcntl.h HAVE_FCNTL_H) +check_function_exists(fork HAVE_FORK) +check_function_exists(getpwnam_r HAVE_GETPWNAM_R) +check_function_exists(inet_ntop HAVE_INET_NTOP) +check_include_files(inttypes.h HAVE_INTTYPES_H) +set(HAVE_IPv6 1) +check_include_files(langinfo.h HAVE_LANGINFO_H) +set(HAVE_LIBPCRE 1) +check_library_exists(socket socket "" HAVE_LIBSOCKET) +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_function_exists(malloc HAVE_MALLOC) +check_include_files(memory.h HAVE_MEMORY_H) +check_function_exists(memset HAVE_MEMSET) + +check_include_files(netdb.h HAVE_NETDB_H) +check_include_files(netinet/in.h HAVE_NETINET_IN_H) +if (CYGWIN) + check_include_files("sys/types.h;netinet/tcp.h" HAVE_NETINET_TCP_H) +else () + check_include_files(netinet/tcp.h HAVE_NETINET_TCP_H) +endif () +check_include_files(linux/tcp.h HAVE_LINUX_TCP_H) +check_include_files(net/if.h HAVE_NET_IF_H) +check_include_files(pcre.h HAVE_PCRE_H) +check_include_files(pcre/pcre.h HAVE_PCRE_PCRE_H) +check_symbol_exists(PTHREAD_PRIO_INHERIT pthread.h HAVE_PTHREAD_PRIO_INHERIT) + +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(socket HAVE_SOCKET) + +check_include_files(stdint.h HAVE_STDINT_H) +check_include_files(stdlib.h HAVE_STDLIB_H) + +check_function_exists(strerror HAVE_STRERROR) + +check_include_files(strings.h HAVE_STRINGS_H) +check_include_files(string.h HAVE_STRING_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/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(ares.h HAVE_ARES_H) +check_include_files(unistd.h HAVE_UNISTD_H) + +check_function_exists(fork HAVE_FORK) +check_function_exists(vfork HAVE_VFORK) +check_include_files(vfork.h HAVE_VFORK_H) +if (HAVE_VFORK) + set(HAVE_WORKING_VFORK 1) +endif () +if (HAVE_FORK) + set(HAVE_WORKING_FORK 1) +endif () + + +# Define to the sub-directory where libtool stores uninstalled libraries. +set(LT_OBJDIR ".libs/") +set(NDEBUG 1) +set(PACKAGE ${PROJECT_NAME}) +set(PACKAGE_BUGREPORT max.c.lv@gmail.com) +set(PACKAGE_NAME ${PROJECT_NAME}) +set(PACKAGE_VERSION ${PROJECT_VERSION}) +set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}") +set(PACKAGE_TARNAME ${PROJECT_NAME}) +set(PACKAGE_URL "") + +#message(${PACKAGE_NAME} - v${PACKAGE_VERSION} - v${PROJECT_VERSION}) + +# PTHREAD_CREATE_JOINABLE + +# Define as the return type of signal handlers (`int' or `void'). +set(RETSIGTYPE void) + +# Define to the type of arg 1 for `select'. +set(SELECT_TYPE_ARG1 int) + +# Define to the type of args 2, 3 and 4 for `select'. +set(SELECT_TYPE_ARG234 "(fd_set *)") + +# Define to the type of arg 5 for `select'. +set(SELECT_TYPE_ARG5 "(struct timeval *)") + +# Define to 1 if you have the ANSI C header files. +set(STDC_HEADERS 1) + + +check_include_files("sys/time.h;time.h" TIME_WITH_SYS_TIME) + + +# If the compiler supports a TLS storage class define it to that here +check_c_source_compiles(" + __thread int tls; + int main(void) { return 0; }" + HAVE_GCC_THREAD_LOCAL_STORAGE) +if (HAVE_GCC_THREAD_LOCAL_STORAGE) + set(TLS __thread) +endif () + +set(_ALL_SOURCE 1) +set(_GNU_SOURCE 1) +set(_POSIX_PTHREAD_SEMANTICS 1) +set(_TANDEM_SOURCE 1) +set(__EXTENSIONS__ 1) +# USE_SYSTEM_SHARED_LIB +set(VERSION ${PACKAGE_VERSION}) +# TODO WORDS_BIGENDIAN +# _MINIX +# _POSIX_1_SOURCE +# _POSIX_SOURCE +# _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 +# TODO Assume we got inline support +# https://cmake.org/Wiki/CMakeTestInline + +# Define to `int' if does not define. +# undef pid_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 +set(CMAKE_EXTRA_INCLUDE_FILES sys/types.h) +check_type_size(pid_t PID_T) +check_type_size(size_t SIZE_T) +check_type_size(ssize_t SSIZE_T) +set(CMAKE_EXTRA_INCLUDE_FILES) + +check_type_size(uint16_t UINT16_T) +check_type_size(uint8_t UINT8_T) + +## Inverse +if (NOT HAVE_PID_T) + set(pid_t int) +endif () +if (NOT HAVE_SIZE_T) + set(size_t "unsigned int") +endif () +if (NOT HAVE_SSIZE_T) + set(ssize_t int) +endif () + +if (NOT HAVE_UINT8_T) + set(uint8_t "unsigned char") +endif () +if (NOT HAVE_UINT16_T) + set(uint16_t "unsigned short") +endif () + + +# Define as `fork' if `vfork' does not work. +if (NOT HAVE_WORKING_VFORK) + set(vfork fork) +endif () diff --git a/cmake/shadowsocks-libev.pc.cmake b/cmake/shadowsocks-libev.pc.cmake new file mode 100644 index 000000000..a8f6f1bd6 --- /dev/null +++ b/cmake/shadowsocks-libev.pc.cmake @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=${prefix}/@CMAKE_INSTALL_BINDIR@ +libdir=${exec_prefix}/@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +sharedir=${prefix}/@CMAKE_INSTALL_DATAROOTDIR@ +mandir=${prefix}/@CMAKE_INSTALL_MANDIR@ + +Name: @PROJECT_NAME@ +Description: @PROJECT_DESC@ +URL: @PROJECT_URL@ +Version: @PROJECT_VERSION@ +Requires: +Cflags: -I${includedir} +Libs: -L${libdir} -lshadowsocks-libev -lcrypto diff --git a/compile b/compile deleted file mode 100755 index 862a14e8c..000000000 --- a/compile +++ /dev/null @@ -1,343 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2012-03-05.13; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free -# Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -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 - 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 . -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: diff --git a/completions/bash/ss-local b/completions/bash/ss-local new file mode 100644 index 000000000..2d1f80851 --- /dev/null +++ b/completions/bash/ss-local @@ -0,0 +1,33 @@ +_ss_local() +{ + local cur prev opts ciphers + opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -v -h --reuse-port --fast-open --acl --mtu --mptcp --no-delay --key --plugin --plugin-opts --help' + ciphers='rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf' + cur=${COMP_WORDS[COMP_CWORD]} + prev="${COMP_WORDS[COMP_CWORD-1]}" + case "$prev" in + -f|-c|--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|-l|-k|-t|-n|--mtu|--key|--plugin|--plugin-opts) + ;; + -i) + _available_interfaces -a || true + ;; + *) + COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) ) + ;; + esac + return 0 +} + +complete -F _ss_local ss-local diff --git a/completions/bash/ss-manager b/completions/bash/ss-manager new file mode 100644 index 000000000..ebc8e7bea --- /dev/null +++ b/completions/bash/ss-manager @@ -0,0 +1,37 @@ +_ss_manager() +{ + local cur prev opts ciphers + opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -v -h --reuse-port --manager-address --executable --mtu --mptcp --plugin --plugin-opts --help' + ciphers='rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf' + cur=${COMP_WORDS[COMP_CWORD]} + prev="${COMP_WORDS[COMP_CWORD-1]}" + case "$prev" in + -f|-c|--executable) + _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|-l|-k|-t|-n|--mtu|--plugin|--plugin-opts) + ;; + -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 diff --git a/completions/bash/ss-redir b/completions/bash/ss-redir new file mode 100644 index 000000000..3fbf9bb8e --- /dev/null +++ b/completions/bash/ss-redir @@ -0,0 +1,30 @@ +_ss_redir() +{ + local cur prev opts ciphers + opts='-s -p -l -k -m -a -f -t -c -n -b -u -U -T -v -h --reuse-port --mtu --mptcp --key --plugin --plugin-opts --help' + ciphers='rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf' + cur=${COMP_WORDS[COMP_CWORD]} + prev="${COMP_WORDS[COMP_CWORD-1]}" + case "$prev" in + -f|-c) + _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|-l|-k|-t|-n|--mtu|--key|--plugin|--plugin-opts) + ;; + *) + COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) ) + ;; + esac + return 0 +} + +complete -F _ss_redir ss-redir diff --git a/completions/bash/ss-server b/completions/bash/ss-server new file mode 100644 index 000000000..535987fbf --- /dev/null +++ b/completions/bash/ss-server @@ -0,0 +1,37 @@ +_ss_server() +{ + local cur prev opts ciphers + opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -6 -d -v -h --reuse-port --fast-open --acl --manager-address --mtu --mptcp --no-delay --key --plugin --plugin-opts --help' + ciphers='rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf' + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev="${COMP_WORDS[COMP_CWORD-1]}" + case "$prev" in + -f|-c|--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|-l|-k|-t|-n|-d|--mtu|--key|--plugin|--plugin-opts) + ;; + --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 diff --git a/completions/bash/ss-tunnel b/completions/bash/ss-tunnel new file mode 100644 index 000000000..6c3304681 --- /dev/null +++ b/completions/bash/ss-tunnel @@ -0,0 +1,38 @@ +_ss_tunnel() +{ + local cur prev opts ciphers + opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -L -v -h --reuse-port --mtu --mptcp --key --plugin --plugin-opts --help' + ciphers='rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf' + cur=${COMP_WORDS[COMP_CWORD]} + prev="${COMP_WORDS[COMP_CWORD-1]}" + compopt +o nospace + case "$prev" in + -f|-c) + _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|-l|-k|-t|-n|--mtu|--key|--plugin|--plugin-opts) + ;; + -i) + _available_interfaces -a || true + ;; + *) + COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) ) + ;; + esac + return 0 +} + +complete -F _ss_tunnel ss-tunnel diff --git a/completions/zsh/_ss-local b/completions/zsh/_ss-local new file mode 100644 index 000000000..4b8265479 --- /dev/null +++ b/completions/zsh/_ss-local @@ -0,0 +1,32 @@ +#compdef ss-local + +local ciphers +ciphers='(rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf)' + +_arguments "-h::" \ + "-s:server host:_hosts" \ + "-p:server port:" \ + "-l:local port:" \ + "-k:password:" \ + "-m:encrypt method:$ciphers" \ + "-a:run as user:_users" \ + "-f:pid file:_files" \ + "-t:timeout:" \ + "-c:configure file:_files" \ + "-n:max number of open files:" \ + "-i:bind interface:_net_interfaces" \ + "-b:local address:(127.0.0.1 \:\:1 0.0.0.0 \:\:)" \ + "-u:enable udp:" \ + "-U:udp only:" \ + "-v:verbose mode:" \ + "--reuse-port::" \ + "--fast-open::" \ + "--acl:acl file:_files" \ + "--mtu::" \ + "--mptcp::" \ + "--no-delay::" \ + "--key:key in base64:" \ + "--plugin:plugin name:" \ + "--plugin-opts:plugin options:" \ + "--help::" + diff --git a/completions/zsh/_ss-manager b/completions/zsh/_ss-manager new file mode 100644 index 000000000..c6891e939 --- /dev/null +++ b/completions/zsh/_ss-manager @@ -0,0 +1,31 @@ +#compdef ss-manager + +local ciphers +ciphers='(rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf)' + +_arguments "-h::" \ + "-s:server host:_hosts" \ + "-p:server port:" \ + "-l:local port:" \ + "-k:password:" \ + "-m:encrypt method:$ciphers" \ + "-a:run as user:_users" \ + "-f:pid file:_files" \ + "-t:timeout:" \ + "-c:configure file:_files" \ + "-n:max number of open files:" \ + "-i:bind interface:_net_interfaces" \ + "-b:local address:(127.0.0.1 \:\:1 0.0.0.0 \:\:)" \ + "-u:enable udp:" \ + "-U:udp only:" \ + "-v:verbose mode:" \ + "--executable:path to ss-server:_files" \ + "--manager-address:manager address:" \ + "--reuse-port::" \ + "--acl:acl file:_files" \ + "--mtu::" \ + "--key:key in base64:" \ + "--plugin:plugin name:" \ + "--plugin-opts:plugin options:" \ + "--help::" + diff --git a/completions/zsh/_ss-redir b/completions/zsh/_ss-redir new file mode 100644 index 000000000..9e6684a41 --- /dev/null +++ b/completions/zsh/_ss-redir @@ -0,0 +1,32 @@ +#compdef ss-redir + +local ciphers +ciphers='(rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf)' + +_arguments "-h::" \ + "-s:server host:_hosts" \ + "-p:server port:" \ + "-l:local port:" \ + "-k:password:" \ + "-m:encrypt method:$ciphers" \ + "-a:run as user:_users" \ + "-f:pid file:_files" \ + "-t:timeout:" \ + "-c:configure file:_files" \ + "-n:nofile:" \ + "-b:local address:(127.0.0.1 \:\:1 0.0.0.0 \:\:)" \ + "-u:enable udp:" \ + "-U:udp only:" \ + "-v:verbose mode:" \ + "-T:tcp tproxy mode:" \ + "--reuse-port::" \ + "--fast-open::" \ + "--acl:acl file:_files" \ + "--mtu::" \ + "--mptcp::" \ + "--no-delay::" \ + "--key:key in base64:" \ + "--plugin:plugin name:" \ + "--plugin-opts:plugin options:" \ + "--help::" + diff --git a/completions/zsh/_ss-server b/completions/zsh/_ss-server new file mode 100644 index 000000000..94882cec4 --- /dev/null +++ b/completions/zsh/_ss-server @@ -0,0 +1,35 @@ +#compdef ss-server + +local ciphers +ciphers='(rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf)' + +_arguments "-h::" \ + "-s:server host:_hosts" \ + "-p:server port:" \ + "-l:local port:" \ + "-k:password:" \ + "-m:encrypt method:$ciphers" \ + "-a:run as user:_users" \ + "-f:pid file:_files" \ + "-t:timeout:" \ + "-c:configure file:_files" \ + "-n:max number of open files:" \ + "-i:bind interface:_net_interfaces" \ + "-b:local address:(127.0.0.1 \:\:1 0.0.0.0 \:\:)" \ + "-u:enable udp:" \ + "-U:udp only:" \ + "-v:verbose mode:" \ + "-6:ipv6 first:" \ + "-d:nameserver for internal dns:" \ + "--manager-address:manager address:" \ + "--reuse-port::" \ + "--fast-open::" \ + "--acl:acl file:_files" \ + "--mtu::" \ + "--mptcp::" \ + "--no-delay::" \ + "--key:key in base64:" \ + "--plugin:plugin name:" \ + "--plugin-opts:plugin options:" \ + "--help::" + diff --git a/completions/zsh/_ss-tunnel b/completions/zsh/_ss-tunnel new file mode 100644 index 000000000..3bcaf7f95 --- /dev/null +++ b/completions/zsh/_ss-tunnel @@ -0,0 +1,30 @@ +#compdef ss-tunnel + +local ciphers +ciphers='(rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 xchacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf)' + +_arguments "-h::" \ + "-s:server host:_hosts" \ + "-p:server port:" \ + "-l:local port:" \ + "-k:password:" \ + "-m:encrypt method:$ciphers" \ + "-a:run as user:_users" \ + "-f:pid file:_files" \ + "-t:timeout:" \ + "-c:configure file:_files" \ + "-n:nofile:" \ + "-i:bind interface:_net_interfaces" \ + "-b:local address:(127.0.0.1 \:\:1 0.0.0.0 \:\:)" \ + "-u:enable udp:" \ + "-U:udp only:" \ + "-v:verbose mode:" \ + "-L:destination server address and port:" \ + "--reuse-port::" \ + "--acl:acl file:_files" \ + "--mtu::" \ + "--key:key in base64:" \ + "--plugin:plugin name:" \ + "--plugin-opts:plugin options:" \ + "--help::" + diff --git a/config.guess b/config.guess deleted file mode 100755 index d622a44e5..000000000 --- a/config.guess +++ /dev/null @@ -1,1530 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-02-10' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.h.in b/config.h.in deleted file mode 100644 index 44721eeb0..000000000 --- a/config.h.in +++ /dev/null @@ -1,369 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* 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 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 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 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 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 header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `kqueue' function. */ -#undef HAVE_KQUEUE - -/* Define to 1 if you have the header file. */ -#undef HAVE_LANGINFO_H - -/* 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 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 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 header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ENGINE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_EVP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_PEM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RAND_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_SHA_H - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the 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 header file. */ -#undef HAVE_PORT_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* 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 header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the 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 header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EPOLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EVENTFD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EVENT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_INOTIFY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SIGNALFD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the 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 header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Define to 1 if you have the 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 header file. */ -#undef HAVE_WS2TCPIP_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 - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* 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 the 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 and . */ -#undef TIME_WITH_SYS_TIME - -/* Use Apple CommonCrypto library */ -#undef USE_CRYPTO_APPLECC - -/* Use OpenSSL library */ -#undef USE_CRYPTO_OPENSSL - -/* Use PolarSSL library */ -#undef USE_CRYPTO_POLARSSL - -/* 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 - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or 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 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 does not define. */ -#undef size_t - -/* Define to `int' if 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 diff --git a/config.sub b/config.sub deleted file mode 100755 index 6205f8423..000000000 --- a/config.sub +++ /dev/null @@ -1,1782 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-04-18' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ - | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i386-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/configure b/configure deleted file mode 100755 index 59c2a71dd..000000000 --- a/configure +++ /dev/null @@ -1,17368 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for shadowsocks 1.4.8. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and max.c.lv@gmail.com -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='shadowsocks' -PACKAGE_TARNAME='shadowsocks' -PACKAGE_VERSION='1.4.8' -PACKAGE_STRING='shadowsocks 1.4.8' -PACKAGE_BUGREPORT='max.c.lv@gmail.com' -PACKAGE_URL='' - -ac_unique_file="src/encrypt.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_header_list= -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -acx_pthread_config -BUILD_WINCOMPAT_FALSE -BUILD_WINCOMPAT_TRUE -BUILD_REDIRECTOR_FALSE -BUILD_REDIRECTOR_TRUE -INET_NTOP_LIB -BUILD_LIB_FALSE -BUILD_LIB_TRUE -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -ac_ct_AR -AR -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_dependency_tracking -with_crypto_library -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -with_sysroot -enable_libtool_lock -with_openssl -with_openssl_include -with_openssl_lib -with_polarssl -with_polarssl_include -with_polarssl_lib -enable_applecc -enable_lib -enable_assert -enable_largefile -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures shadowsocks 1.4.8 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/shadowsocks] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of shadowsocks 1.4.8:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-applecc enable Apple CommonCrypto API support - --enable-lib build a libshadowsocks - --disable-assert turn off assertions - --disable-largefile omit support for large files - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-crypto-library=library - build with the given crypto library, - TYPE=openssl|polarssl [default=openssl] - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). - --with-openssl=DIR OpenSSL base directory, or: - --with-openssl-include=DIR - OpenSSL headers directory (without trailing - /openssl) - --with-openssl-lib=DIR OpenSSL library directory - --with-polarssl=DIR PolarSSL base directory, or: - --with-polarssl-include=DIR - PolarSSL headers directory (without trailing - /polarssl) - --with-polarssl-lib=DIR PolarSSL library directory - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -shadowsocks configure 1.4.8 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## --------------------------------- ## -## Report this to max.c.lv@gmail.com ## -## --------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_find_uintX_t LINENO BITS VAR -# ------------------------------------ -# Finds an unsigned integer type with width BITS, setting cache variable VAR -# accordingly. -ac_fn_c_find_uintX_t () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 -$as_echo_n "checking for uint$2_t... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - # Order is important - never check a type that is potentially smaller - # than half of the expected target width. - for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - case $ac_type in #( - uint$2_t) : - eval "$3=yes" ;; #( - *) : - eval "$3=\$ac_type" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : - -else - break -fi - done -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_find_uintX_t -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by shadowsocks $as_me 1.4.8, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -as_fn_append ac_header_list " netdb.h" -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_config_headers="$ac_config_headers config.h" - - -am__api_version='1.11' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='shadowsocks' - VERSION='1.4.8' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar lib "link -lib" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar lib "link -lib" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 -$as_echo_n "checking the archiver ($AR) interface... " >&6; } -if ${am_cv_ar_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - am_cv_ar_interface=ar - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int some_variable = 0; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=ar - else - am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=lib - else - am_cv_ar_interface=unknown - fi - fi - rm -f conftest.lib libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 -$as_echo "$am_cv_ar_interface" >&6; } - -case $am_cv_ar_interface in -ar) - ;; -lib) - # Microsoft lib, so override with the ar-lib wrapper script. - # FIXME: It is wrong to rewrite AR. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__AR in this case, - # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something - # similar. - AR="$am_aux_dir/ar-lib $AR" - ;; -unknown) - as_fn_error $? "could not determine $AR interface" "$LINENO" 5 - ;; -esac - - - -# Check whether --with-crypto-library was given. -if test "${with_crypto_library+set}" = set; then : - withval=$with_crypto_library; - case "${withval}" in - openssl|polarssl) ;; - *) as_fn_error $? "bad value ${withval} for --with-crypto-library" "$LINENO" 5 ;; - esac - -else - with_crypto_library="openssl" - -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - - - -for ac_header in sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -for ac_func in clock_gettime -do : - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CLOCK_GETTIME 1 -_ACEOF - -else - - if test $(uname) = Linux; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5 -$as_echo_n "checking for clock_gettime syscall... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main () -{ -struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_have_clock_syscall=1 - -$as_echo "#define HAVE_CLOCK_SYSCALL 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if ${ac_cv_lib_rt_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_clock_gettime=yes -else - ac_cv_lib_rt_clock_gettime=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRT 1 -_ACEOF - - LIBS="-lrt $LIBS" - -fi - - unset ac_cv_func_clock_gettime - for ac_func in clock_gettime -do : - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CLOCK_GETTIME 1 -_ACEOF - -fi -done - - fi - -fi -done - - -for ac_func in nanosleep -do : - ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" -if test "x$ac_cv_func_nanosleep" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NANOSLEEP 1 -_ACEOF - -else - - if test -z "$LIBEV_M4_AVOID_LIBRT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 -$as_echo_n "checking for nanosleep in -lrt... " >&6; } -if ${ac_cv_lib_rt_nanosleep+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char nanosleep (); -int -main () -{ -return nanosleep (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_nanosleep=yes -else - ac_cv_lib_rt_nanosleep=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 -$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } -if test "x$ac_cv_lib_rt_nanosleep" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRT 1 -_ACEOF - - LIBS="-lrt $LIBS" - -fi - - unset ac_cv_func_nanosleep - for ac_func in nanosleep -do : - ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" -if test "x$ac_cv_func_nanosleep" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NANOSLEEP 1 -_ACEOF - -fi -done - - fi - -fi -done - - -if test -z "$LIBEV_M4_AVOID_LIBM"; then - LIBM=m -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 -$as_echo_n "checking for library containing floor... " >&6; } -if ${ac_cv_search_floor+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char floor (); -int -main () -{ -return floor (); - ; - return 0; -} -_ACEOF -for ac_lib in '' $LIBM; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_floor=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_floor+:} false; then : - break -fi -done -if ${ac_cv_search_floor+:} false; then : - -else - ac_cv_search_floor=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 -$as_echo "$ac_cv_search_floor" >&6; } -ac_res=$ac_cv_search_floor -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -$as_echo "#define HAVE_FLOOR 1" >>confdefs.h - -fi - - - - -case $host in - *-mingw*) - LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" - ;; - *) - ;; -esac - -case "${with_crypto_library}" in - openssl) - - - -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; openssl="$withval" - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - -fi - - - -# Check whether --with-openssl-include was given. -if test "${with_openssl_include+set}" = set; then : - withval=$with_openssl_include; openssl_include="$withval" - CFLAGS="$CFLAGS -I$withval" - -fi - - - -# Check whether --with-openssl-lib was given. -if test "${with_openssl_lib+set}" = set; then : - withval=$with_openssl_lib; openssl_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval" - -fi - - - for ac_header in openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h openssl/engine.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - as_fn_error $? "OpenSSL header files not found." "$LINENO" 5; break - -fi - -done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_EncryptInit_ex in -lcrypto" >&5 -$as_echo_n "checking for EVP_EncryptInit_ex in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_EncryptInit_ex+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char EVP_EncryptInit_ex (); -int -main () -{ -return EVP_EncryptInit_ex (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_EVP_EncryptInit_ex=yes -else - ac_cv_lib_crypto_EVP_EncryptInit_ex=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_EncryptInit_ex" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_EncryptInit_ex" >&6; } -if test "x$ac_cv_lib_crypto_EVP_EncryptInit_ex" = xyes; then : - LIBS="-lcrypto $LIBS" -else - as_fn_error $? "OpenSSL libraries not found." "$LINENO" 5 - -fi - - - for ac_func in RAND_pseudo_bytes EVP_EncryptInit_ex -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - as_fn_error $? "Missing OpenSSL functionality, make sure you have installed the latest version." "$LINENO" 5; break -fi -done - - - ac_fn_c_check_decl "$LINENO" "OpenSSL_add_all_algorithms" "ac_cv_have_decl_OpenSSL_add_all_algorithms" "#include - -" -if test "x$ac_cv_have_decl_OpenSSL_add_all_algorithms" = xyes; then : - -else - as_fn_error $? "Missing OpenSSL functionality, make sure you have installed the latest version." "$LINENO" 5; break -fi - - - -$as_echo "#define USE_CRYPTO_OPENSSL 1" >>confdefs.h - - ;; - polarssl) - - - -# Check whether --with-polarssl was given. -if test "${with_polarssl+set}" = set; then : - withval=$with_polarssl; polarssl="$withval" - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - -fi - - - -# Check whether --with-polarssl-include was given. -if test "${with_polarssl_include+set}" = set; then : - withval=$with_polarssl_include; polarssl_include="$withval" - CFLAGS="$CFLAGS -I$withval" - -fi - - - -# Check whether --with-polarssl-lib was given. -if test "${with_polarssl_lib+set}" = set; then : - withval=$with_polarssl_lib; polarssl_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval" - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cipher_init_ctx in -lpolarssl" >&5 -$as_echo_n "checking for cipher_init_ctx in -lpolarssl... " >&6; } -if ${ac_cv_lib_polarssl_cipher_init_ctx+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpolarssl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cipher_init_ctx (); -int -main () -{ -return cipher_init_ctx (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_polarssl_cipher_init_ctx=yes -else - ac_cv_lib_polarssl_cipher_init_ctx=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_polarssl_cipher_init_ctx" >&5 -$as_echo "$ac_cv_lib_polarssl_cipher_init_ctx" >&6; } -if test "x$ac_cv_lib_polarssl_cipher_init_ctx" = xyes; then : - LIBS="-lpolarssl $LIBS" -else - as_fn_error $? "PolarSSL libraries not found." "$LINENO" 5 - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking polarssl version" >&5 -$as_echo_n "checking polarssl version... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int -main () -{ - -#if POLARSSL_VERSION_NUMBER < 0x01020500 -#error invalid version -#endif - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -else - as_fn_error $? "PolarSSL 1.2.5 or newer required" "$LINENO" 5 - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -$as_echo "#define USE_CRYPTO_POLARSSL 1" >>confdefs.h - - ;; -esac - -# Check whether --enable-applecc was given. -if test "${enable_applecc+set}" = set; then : - enableval=$enable_applecc; - for ac_header in CommonCrypto/CommonCrypto.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonCrypto.h" "ac_cv_header_CommonCrypto_CommonCrypto_h" "$ac_includes_default" -if test "x$ac_cv_header_CommonCrypto_CommonCrypto_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_COMMONCRYPTO_COMMONCRYPTO_H 1 -_ACEOF - -else - as_fn_error $? "CommonCrypto header files not found." "$LINENO" 5; break - -fi - -done - - for ac_func in CCCryptorCreateWithMode -do : - ac_fn_c_check_func "$LINENO" "CCCryptorCreateWithMode" "ac_cv_func_CCCryptorCreateWithMode" -if test "x$ac_cv_func_CCCryptorCreateWithMode" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CCCRYPTORCREATEWITHMODE 1 -_ACEOF - -else - as_fn_error $? "CommonCrypto API needs OS X (>= 10.7) and iOS (>= 5.0)." "$LINENO" 5; break - -fi -done - - -$as_echo "#define USE_CRYPTO_APPLECC 1" >>confdefs.h - - - -fi - - -# Check whether --enable-lib was given. -if test "${enable_lib+set}" = set; then : - enableval=$enable_lib; - if test "x$enableval" = "xyes"; then : - enable_lib="yes" -else - enable_lib="no" -fi - -else - - enable_lib="no" - - -fi - - if test x$enable_lib = xyes; then - BUILD_LIB_TRUE= - BUILD_LIB_FALSE='#' -else - BUILD_LIB_TRUE='#' - BUILD_LIB_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - - - - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - HAVE_INET_NTOP=1 - INET_NTOP_LIB= - ss_save_LIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 -$as_echo_n "checking for library containing inet_ntop... " >&6; } -if ${ac_cv_search_inet_ntop+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inet_ntop (); -int -main () -{ -return inet_ntop (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl resolv; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_inet_ntop=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_inet_ntop+:} false; then : - break -fi -done -if ${ac_cv_search_inet_ntop+:} false; then : - -else - ac_cv_search_inet_ntop=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 -$as_echo "$ac_cv_search_inet_ntop" >&6; } -ac_res=$ac_cv_search_inet_ntop -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - for ac_func in inet_ntop -do : - ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INET_NTOP 1 -_ACEOF - -fi -done - - if test $ac_cv_func_inet_ntop = no; then - HAVE_INET_NTOP=0 - fi - -fi - - LIBS=$ss_save_LIBS - - if test "$ac_cv_search_inet_ntop" != "no" \ - && test "$ac_cv_search_inet_ntop" != "none required"; then - INET_NTOP_LIB="$ac_cv_search_inet_ntop" - fi - - - ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include - #if HAVE_NETDB_H - # include - #endif - -" -if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_INET_NTOP $ac_have_decl -_ACEOF - - if test $ac_cv_have_decl_inet_ntop = no; then - HAVE_DECL_INET_NTOP=0 - fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for what kind of host" >&5 -$as_echo_n "checking for what kind of host... " >&6; } -case $host in - *-linux*) - os_support=linux - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 -$as_echo "Linux" >&6; } - ;; - *-mingw*) - -$as_echo "#define FD_SETSIZE 2048" >>confdefs.h - - -$as_echo "#define EV_FD_TO_WIN32_HANDLE(fd) (fd)" >>confdefs.h - - -$as_echo "#define EV_WIN32_HANDLE_TO_FD(handle) (handle)" >>confdefs.h - - -$as_echo "#define EV_WIN32_CLOSE_FD(fd) closesocket(fd)" >>confdefs.h - - - os_support=mingw - { $as_echo "$as_me:${as_lineno-$LINENO}: result: MinGW" >&5 -$as_echo "MinGW" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: transparent proxy does not support for $host" >&5 -$as_echo "transparent proxy does not support for $host" >&6; } - ;; -esac - - if test "$os_support" = "linux"; then - BUILD_REDIRECTOR_TRUE= - BUILD_REDIRECTOR_FALSE='#' -else - BUILD_REDIRECTOR_TRUE='#' - BUILD_REDIRECTOR_FALSE= -fi - - if test "$os_support" = "mingw"; then - BUILD_WINCOMPAT_TRUE= - BUILD_WINCOMPAT_FALSE='#' -else - BUILD_WINCOMPAT_TRUE='#' - BUILD_WINCOMPAT_FALSE= -fi - - -for ac_header in 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 -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -case $host in - *-mingw*) - for ac_header in windows.h winsock2.h ws2tcpip.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - as_fn_error $? "Missing MinGW headers" "$LINENO" 5 -fi - -done - - ;; - *) - # These are POSIX-like systems using BSD-like sockets API. - ;; -esac - -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKET_H 1 -_ACEOF - -fi - -done - -for ac_header in net/if.h -do : - ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " -#include -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - -" -if test "x$ac_cv_header_net_if_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_H 1 -_ACEOF - -fi - -done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t int -_ACEOF - -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 -$as_echo_n "checking whether to enable assertions... " >&6; } - # Check whether --enable-assert was given. -if test "${enable_assert+set}" = set; then : - enableval=$enable_assert; ac_enable_assert=$enableval - if test "x$enableval" = xno; then : - -$as_echo "#define NDEBUG 1" >>confdefs.h - -elif test "x$enableval" != xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5 -$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;} - ac_enable_assert=yes -fi -else - ac_enable_assert=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_assert" >&5 -$as_echo "$ac_enable_assert" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if ${ac_cv_header_sys_wait_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t int -_ACEOF - -fi - -ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" -case $ac_cv_c_uint16_t in #( - no|yes) ;; #( - *) - - -cat >>confdefs.h <<_ACEOF -#define uint16_t $ac_cv_c_uint16_t -_ACEOF -;; - esac - -ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" -case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) - -$as_echo "#define _UINT8_T 1" >>confdefs.h - - -cat >>confdefs.h <<_ACEOF -#define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - -for ac_header in vfork.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VFORK_H 1 -_ACEOF - -fi - -done - -for ac_func in fork vfork -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if ${ac_cv_func_fork_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_fork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_fork_works=yes -else - ac_cv_func_fork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } - -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if ${ac_cv_func_vfork_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_vfork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} - -int -main () -{ - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_vfork_works=yes -else - ac_cv_func_vfork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } - -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h - -else - -$as_echo "#define vfork fork" >>confdefs.h - -fi -if test "x$ac_cv_func_fork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h - -fi - -for ac_header in sys/select.h sys/socket.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 -$as_echo_n "checking types of arguments for select... " >&6; } -if ${ac_cv_func_select_args+:} false; then : - $as_echo_n "(cached) " >&6 -else - for ac_arg234 in 'fd_set *' 'int *' 'void *'; do - for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do - for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - -int -main () -{ -extern int select ($ac_arg1, - $ac_arg234, $ac_arg234, $ac_arg234, - $ac_arg5); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done -done -# Provide a safe default value. -: "${ac_cv_func_select_args=int,int *,struct timeval *}" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 -$as_echo "$ac_cv_func_select_args" >&6; } -ac_save_IFS=$IFS; IFS=',' -set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` -IFS=$ac_save_IFS -shift - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG1 $1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG234 ($2) -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG5 ($3) -_ACEOF - -rm -f conftest* - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - -for ac_func in memset select setresuid setreuid strerror getpwnam_r setrlimit -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$ac_cv_func_select" != "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for select in ws2_32" >&5 -$as_echo_n "checking for select in ws2_32... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_WINSOCK2_H -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include -#endif - -int -main () -{ - - select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_SELECT="1" - -cat >>confdefs.h <<_ACEOF -#define HAVE_SELECT 1 -_ACEOF - - HAVE_SYS_SELECT_H="1" - -cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SELECT_H 1 -_ACEOF - - -else - - as_fn_error $? "no" "$LINENO" 5 - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi - - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if ${ac_cv_lib_socket_connect+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_connect=yes -else - ac_cv_lib_socket_connect=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - -for ac_func in malloc memset socket -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); -int -main () -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - acx_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; - - -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -$as_echo_n "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_acx_pthread_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$acx_pthread_config"; then - ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_acx_pthread_config="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" -fi -fi -acx_pthread_config=$ac_cv_prog_acx_pthread_config -if test -n "$acx_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 -$as_echo "$acx_pthread_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -$as_echo_n "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - acx_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: threads are created detached by default - # and the JOINABLE attribute has a nonstandard name (UNDETACHED). - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int attr=PTHREAD_CREATE_JOINABLE; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ok=PTHREAD_CREATE_JOINABLE -else - ok=unknown -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test x"$ok" = xunknown; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int attr=PTHREAD_CREATE_UNDETACHED; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ok=PTHREAD_CREATE_UNDETACHED -else - ok=unknown -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then - -$as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5 -$as_echo "${ok}" >&6; } - if test x"$ok" = xunknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5 -$as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -$as_echo_n "checking if more special flags are required for pthreads... " >&6; } - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 -$as_echo "${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with cc_r - # Extract the first word of "cc_r", so it can be a program name with args. -set dummy cc_r; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PTHREAD_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="cc_r" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -else - PTHREAD_CC="$CC" -fi - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - - : -else - acx_pthread_ok=no - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - -ac_config_files="$ac_config_files Makefile libcork/Makefile libipset/Makefile libasyncns/Makefile libev/Makefile src/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_LIB_TRUE}" && test -z "${BUILD_LIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LIB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_REDIRECTOR_TRUE}" && test -z "${BUILD_REDIRECTOR_FALSE}"; then - as_fn_error $? "conditional \"BUILD_REDIRECTOR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_WINCOMPAT_TRUE}" && test -z "${BUILD_WINCOMPAT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_WINCOMPAT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by shadowsocks $as_me 1.4.8, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -shadowsocks config.status 1.4.8 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -nm_file_list_spec \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libcork/Makefile") CONFIG_FILES="$CONFIG_FILES libcork/Makefile" ;; - "libipset/Makefile") CONFIG_FILES="$CONFIG_FILES libipset/Makefile" ;; - "libasyncns/Makefile") CONFIG_FILES="$CONFIG_FILES libasyncns/Makefile" ;; - "libev/Makefile") CONFIG_FILES="$CONFIG_FILES libev/Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/configure.ac b/configure.ac index 5abda8731..134ea5f6b 100755 --- a/configure.ac +++ b/configure.ac @@ -2,85 +2,86 @@ dnl -*- Autoconf -*- dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.67]) -AC_INIT([shadowsocks], [1.4.8], [max.c.lv@gmail.com]) -AC_CONFIG_SRCDIR([src/encrypt.c]) +AC_INIT([shadowsocks-libev], [3.3.5], [max.c.lv@gmail.com]) +AC_CONFIG_SRCDIR([src/crypto.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 -Wall -Werror]) +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 crypto library -AC_ARG_WITH( - [crypto-library], - [AS_HELP_STRING([--with-crypto-library=library], [build with the given crypto library, TYPE=openssl|polarssl @<:@default=openssl@:>@])], +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 "${withval}" in - openssl|polarssl) ;; - *) AC_MSG_ERROR([bad value ${withval} for --with-crypto-library]) ;; - esac - ], - [with_crypto_library="openssl"] -) + 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]) + +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_LIBTOOL AC_PROG_LN_S AC_PROG_MAKE_SET AC_LANG_SOURCE -AM_PROG_CC_C_O - -dnl Checks for libev -m4_include([libev/libev.m4]) dnl Add library for mingw case $host in *-mingw*) - LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" + CFLAGS="$CFLAGS -mno-ms-bitfields" + LIBS="$LIBS -lws2_32 -liphlpapi" + ;; + *-cygwin*) + CFLAGS="$CFLAGS -mno-ms-bitfields" ;; *) ;; esac -dnl Checks for crypto library -case "${with_crypto_library}" in - openssl) - ss_OPENSSL - AC_DEFINE([USE_CRYPTO_OPENSSL], [1], [Use OpenSSL library]) - ;; - polarssl) - ss_POLARSSL - AC_DEFINE([USE_CRYPTO_POLARSSL], [1], [Use PolarSSL library]) - ;; -esac +dnl Checks for TLS +AX_TLS([:], [:]) -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 Enable building a libshadowsocks. Useful for Windows and OSX GUI clients -AC_ARG_ENABLE(lib, - AS_HELP_STRING([--enable-lib], [build a libshadowsocks]), - [ - AS_IF([test "x$enableval" = "xyes"], [enable_lib="yes"], [enable_lib="no"]) - ], - [ - enable_lib="no" - ] -) -AM_CONDITIONAL([BUILD_LIB], [test x$enable_lib = xyes]) +dnl Checks for crypto libraries +ss_MBEDTLS +ss_SODIUM +ss_CARES dnl Checks for inet_ntop ss_FUNC_INET_NTOP @@ -93,12 +94,6 @@ case $host in 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) ;; @@ -107,20 +102,48 @@ case $host in ;; 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([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]) - -case $host in - *-mingw*) - AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h], [], [AC_MSG_ERROR([Missing MinGW headers])], []) - ;; - *) - # These are POSIX-like systems using BSD-like sockets API. - ;; -esac +AC_CHECK_HEADERS([limits.h stdint.h inttypes.h arpa/inet.h fcntl.h langinfo.h locale.h linux/tcp.h netinet/tcp.h netdb.h netinet/in.h stdlib.h string.h strings.h unistd.h sys/ioctl.h linux/random.h]) dnl A special check required for on Darwin. See dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html. @@ -141,6 +164,38 @@ AC_CHECK_HEADERS([net/if.h], [], [], #endif ]) +case $host in + *-mingw*) + AC_DEFINE([CONNECT_IN_PROGRESS], [WSAEWOULDBLOCK], [errno for incomplete non-blocking connect(2)]) + AC_CHECK_HEADERS([winsock2.h ws2tcpip.h mswsock.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 + #endif + /* Netfilter ip(6)tables v1.4.0 has broken headers */ + #if HAVE_NETINET_IN_H + #include + #endif + #if HAVE_LINUX_IF_H + #include + #endif + #if HAVE_SYS_SOCKET_H + #include + #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. @@ -165,50 +220,92 @@ 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 -#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 header file.]) - ],[ - AC_MSG_ERROR([no]) - ]) -fi - -AC_SYS_LARGEFILE +AC_CHECK_FUNCS([memset select setresuid setreuid strerror get_current_dir_name getpwnam_r setrlimit]) AC_CHECK_LIB(socket, connect) dnl Checks for library functions. -AC_CHECK_FUNCS([malloc memset socket]) +AC_CHECK_FUNCS([malloc memset posix_memalign socket]) -ACX_PTHREAD +AC_ARG_WITH(ev, + AS_HELP_STRING([--with-ev=DIR], [use a specific libev library]), + [CFLAGS="$CFLAGS -I$withval/include" + CPPFLAGS="$CPPFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib"] +) +AC_CHECK_HEADERS([ev.h libev/ev.h], [], []) +AC_CHECK_LIB([ev], [ev_loop_destroy], [LIBS="-lev $LIBS"], [AC_MSG_ERROR([Couldn't find libev. Try installing libev-dev@<:@el@:>@.])]) -LT_INIT([dlopen]) +AC_CONFIG_FILES([shadowsocks-libev.pc + Makefile + doc/Makefile + src/Makefile]) -AC_CONFIG_MACRO_DIR([m4]) +AM_COND_IF([USE_SYSTEM_SHARED_LIB], + [AC_DEFINE([USE_SYSTEM_SHARED_LIB], [1], [Define if use system shared lib.])], + [AC_CONFIG_FILES([libbloom/Makefile libcork/Makefile libipset/Makefile])]) + +AC_ARG_ENABLE(connmarktos, +[AS_HELP_STRING(--enable-connmarktos, Enable saved connmark to IP TOS QoS feature)], +[ enable_connmarktos="$enableval" ]) + +if test x"$enable_connmarktos" = "xyes" ; then + AC_MSG_NOTICE([Linux Netfilter Conntrack support requested by --enable-connmarktos: ${enable_connmarktos}]) + if test "x$enable_connmarktos" != "xno"; then + PKG_CHECK_MODULES([NETFILTER_CONNTRACK], [libnetfilter_conntrack],, + [AC_SEARCH_LIBS([nfct_query], [netfilter_conntrack],,[ + if test x"$enable_connmarktos" = "xyes"; then + AC_MSG_ERROR([--enable-connmarktos specified but libnetfilter-conntrack library not found]) + fi + with_netfilter_conntrack=no], [-lnfnetlink]) + AC_CHECK_HEADERS([libnetfilter_conntrack/libnetfilter_conntrack.h \ + libnetfilter_conntrack/libnetfilter_conntrack_tcp.h],,[ + if test x"$enable_connmarktos" = "xyes"; then + AC_MSG_ERROR([--enable-connmarktos specified but libnetfilter-conntrack headers not found]) + fi + with_netfilter_conntrack=no])]) + # If nothing is broken; enable the libraries usage. + if test "x$with_netfilter_conntrack" != "xno"; then + with_netfilter_conntrack=yes + AC_DEFINE(USE_NFCONNTRACK_TOS, 1, [Enable support for QOS netfilter mark preservation]) + fi + fi +fi + +AC_ARG_ENABLE(nftables, +[AS_HELP_STRING(--enable-nftables, report malicious IP to nftables)], +[ enable_nftables="$enableval" ]) + +if test x"$enable_nftables" = "xyes" ; then + AC_MSG_NOTICE([Linux nftables support requested by --enable-nftables: ${enable_nftables}]) + if test "x$enable_nftables" != "xno"; then + PKG_CHECK_MODULES([NFTABLES], [libmnl libnftnl],, + [AC_SEARCH_LIBS([mnl_socket_open], [mnl],,[ + if test x"$enable_nftables" = "xyes"; then + AC_MSG_ERROR([--enable-nftables specified but libmnl library not found]) + fi + with_nftables=no], [-lmnl]) + AC_CHECK_HEADERS([libmnl/libmnl.h],,[ + if test x"$enable_nftables" = "xyes"; then + AC_MSG_ERROR([--enable-nftables specified but libmnl headers not found]) + fi + with_nftables=no]) + AC_SEARCH_LIBS([nftnl_nlmsg_build_hdr], [nftnl],,[ + if test x"$enable_nftables" = "xyes"; then + AC_MSG_ERROR([--enable-nftables specified but libnftnl library not found]) + fi + with_nftables=no], [-lnftnl]) + AC_CHECK_HEADERS([libnftnl/common.h],,[ + if test x"$enable_nftables" = "xyes"; then + AC_MSG_ERROR([--enable-nftables specified but libnftnl headers not found]) + fi + with_nftables=no])]) + # If nothing is broken; enable the libraries usage. + if test "x$with_nftables" != "xno"; then + with_nftables=yes + AC_DEFINE(USE_NFTABLES, 1, [Enable support for nftables firewall]) + fi + fi +fi -AC_CONFIG_FILES([Makefile - libcork/Makefile - libipset/Makefile - libasyncns/Makefile - libev/Makefile - src/Makefile]) AC_OUTPUT diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000..4bd3419f8 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,5 @@ +*.substvars +debhelper-build-stamp +libshadowsocks-libev*/ +libshadowsocks-libev-dev/ +tmp/ diff --git a/debian/README.Debian b/debian/README.Debian index ae2da2ef4..ba320aef9 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,6 +1,15 @@ -shadowsocks for Debian ----------------------- +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. - -- Max Lv Sat, 06 Apr 2013 16:59:15 +0800 +The systemd service templates accept one parameter to determine the +configuration json file that is used by this instance. For example, +if the user starts a service called "shadowsocks-libev-local@foobar.service", +This service instance will start the "ss-local" client and read +/etc/shadowsocks-libev/foobar.json as its configuration file. + + -- Boyuan Yang Thu, 08 Sep 2016 19:01:20 +0800 diff --git a/debian/changelog b/debian/changelog index 82c8b075b..0c5dd097a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,498 @@ +shadowsocks-libev (3.3.5-1) unstable; urgency=medium + + * Remove the SNI proxy function. + * Minor bug fixes. (#2581, #2582, #2590, #2595, #2599, + #2600, #2620, #2687, #2692) + + -- Max Lv Tue, 15 Sep 2020 10:24:43 +0800 + +shadowsocks-libev (3.3.4-1) unstable; urgency=medium + + * Minor bug fixes. (#2539, #2565, #2566, #2577) + * Security bug fixes. (CVE-2019-5163, CVE-2019-5164) + + -- Max Lv Fri, 10 Jan 2020 09:28:25 +0800 + +shadowsocks-libev (3.3.3-1) unstable; urgency=medium + + * Refine the handling of suspicious connections. + + -- Max Lv Thu, 31 Oct 2019 15:06:04 +0800 + +shadowsocks-libev (3.3.2-1) unstable; urgency=medium + + * Refine the handling of fragment request. + * Minor bug fixes. (#2463, #2481, #2508) + + -- Max Lv Sat, 12 Oct 2019 08:42:24 +0800 + +shadowsocks-libev (3.3.1-1) unstable; urgency=high + + * Fix a high CPU bug introduced in 3.3.0. (#2449) + * Fix MinGW build. (#2438) + * Minor bug fixes. (#2402, #2412, #2427, #2443) + + -- Max Lv Fri, 09 Aug 2019 15:02:34 +0800 + +shadowsocks-libev (3.3.0-1) unstable; urgency=medium + + * Enlarge the socket buffer size to 16KB. + * Fix the empty list bug in ss-manager. + * Fix the IPv6 address parser. + + -- Max Lv Sat, 08 Jun 2019 07:53:20 +0800 + +shadowsocks-libev (3.2.5-1) unstable; urgency=medium + + * Fix a bug of port parser. + + -- Max Lv Sat, 09 Mar 2019 18:54:36 +0800 + +shadowsocks-libev (3.2.4-1) unstable; urgency=medium + + * Fix a crash with MinGW. + * Refine SIP003 plugin interface. + * Remove connection timeout from all clients. + + -- Max Lv Tue, 26 Feb 2019 09:40:18 +0800 + +shadowsocks-libev (3.2.3-1) unstable; urgency=medium + + * Fix the alignment issue again. + + -- Max Lv Wed, 28 Nov 2018 00:27:40 -0800 + +shadowsocks-libev (3.2.2-1) unstable; urgency=medium + + * Fix a bug on 32-bit arch. + + -- Max Lv Mon, 26 Nov 2018 20:07:21 -0800 + +shadowsocks-libev (3.2.1-1) unstable; urgency=medium + + * Add TCP fast open support to ss-tunnel by @PantherJohn. + * Fix several security issues. + + -- Max Lv Wed, 07 Nov 2018 22:31:59 -0800 + +shadowsocks-libev (3.2.0-1) unstable; urgency=medium + + * Add MinGW support by @linusyang. + * Refine c-ares integration by @xnoreq. + * Fix building issues with GCC8 by @FlyingheartCN. + * Minor bug fixes. + + -- Max Lv Mon, 28 May 2018 19:46:21 -0700 + +shadowsocks-libev (3.1.3-1) unstable; urgency=medium + + * Fix a bug in UDP relay. + + -- Max Lv Mon, 15 Jan 2018 17:19:31 -0800 + +shadowsocks-libev (3.1.2-1) unstable; urgency=medium + + * Fix a bug in DNS resolver. + * Add new TFO API support. + + -- Max Lv Thu, 28 Dec 2017 21:01:56 -0800 + +shadowsocks-libev (3.1.1-1) unstable; urgency=high + + * Fix a security issue in ss-manager. (CVE-2017-15924) + + -- Max Lv Mon, 20 Nov 2017 12:13:04 +0800 + +shadowsocks-libev (3.1.0-1) unstable; urgency=low + + * Replace libudns with libc-ares. + + -- Max Lv Thu, 14 Sep 2017 19:27:51 -0700 + +shadowsocks-libev (3.0.8-1) unstable; urgency=medium + + * Refine the ping-pong bloom filter. + * Minor bug fixes by @vfreex, @vlolteanu and @jackyyf. + + -- Max Lv Thu, 27 Jul 2017 11:01:37 +0800 + +shadowsocks-libev (3.0.7-1) unstable; urgency=medium + + * Refine manager mode by @mengxd. + * Fix a potential memory leak by @vlolteanu. + + -- Max Lv Tue, 27 Jun 2017 14:08:27 +0800 + +shadowsocks-libev (3.0.6-1) unstable; urgency=medium + + * Fix a bug with AEAD ciphers. + * Refine ACL support by @blackgear. + + -- Max Lv Wed, 26 Apr 2017 13:48:11 +0800 + +shadowsocks-libev (3.0.5-1) unstable; urgency=medium + + * Fix a bug of TCP Fast Open in ss-redir. + + -- Max Lv Tue, 21 Mar 2017 13:49:18 +0800 + +shadowsocks-libev (3.0.4-1) unstable; urgency=medium + + * Add CMake files by @wenerme. + * Support TCP Fast Open in ss-redir by @lqs. + * Support TOS/DESCP in ss-redir by @sduponch. + * Refine MPTCP by @sduponch. + + -- Max Lv Thu, 16 Mar 2017 14:07:57 +0800 + +shadowsocks-libev (3.0.3-1) unstable; urgency=medium + + * Replace nonce cache with a ping-pong bloom filter. + + -- Max Lv Fri, 24 Feb 2017 12:08:31 +0800 + +shadowsocks-libev (3.0.2-1) unstable; urgency=high + + * Add session key for AEAD. (SIP007) + + -- Max Lv Mon, 13 Feb 2017 09:07:17 +0800 + +shadowsocks-libev (3.0.1-1) unstable; urgency=medium + + * Fix a crashe when using stream ciphers. + * Fix a protocol bug in AEAD ciphers. (SIP004) + * Allow setting keys directly. (SIP006) + + -- Max Lv Tue, 07 Feb 2017 13:18:02 +0800 + +shadowsocks-libev (3.0.0-1) unstable; urgency=medium + + * Drop dependencies of OpenSSL and PolarSSL. + * Deprecate OTA (One-Time-Auth). + * Add new ciphers for SIP004: aes-128-gcm, aes-192-gcm, aes-256-gcm, + chacha20-poly1305 and chacha20-ietf-poly1305. + * Refine SIP003 to support standalone mode of obfsproxy. + + -- Max Lv Wed, 01 Feb 2017 19:10:14 +0800 + +shadowsocks-libev (2.6.3-1) unstable; urgency=medium + + * Refine the project structure. + + -- Max Lv Tue, 24 Jan 2017 19:10:45 +0800 + +shadowsocks-libev (2.6.2-1) unstable; urgency=medium + + * Refine SIP003 plugin support. + + -- Max Lv Mon, 16 Jan 2017 10:16:12 +0800 + +shadowsocks-libev (2.6.1-1) unstable; urgency=medium + + * Deprecate HTTP/TLS obfuscating. + * Add SIP003 plugin support. + + -- Max Lv Sun, 08 Jan 2017 15:14:19 +0800 + +shadowsocks-libev (2.6.0-1) unstable; urgency=medium + + * Add HTTP/TLS obfuscating. + * Add support of aunch_activate_socket on macOS. + + -- Max Lv Tue, 27 Dec 2016 16:37:23 +0800 + +shadowsocks-libev (2.5.6-1) unstable; urgency=medium + + * Add outbound ACL for server. + * Refine log format. + + -- Max Lv Tue, 01 Nov 2016 09:51:52 +0800 + +shadowsocks-libev (2.5.5-1) unstable; urgency=medium + + * Refine attack detection. + + -- Max Lv 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 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 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 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 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 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 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 Wed, 1 Jun 2016 18:21:45 +0800 + +shadowsocks-libev (2.4.6-1) unstable; urgency=low + + * Update manual pages. + + -- Max Lv 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 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 Wed, 13 Jan 2016 11:50:12 +0800 + +shadowsocks-libev (2.4.3-1) unstable; urgency=high + + * Refine the buffer allocation. + + -- Max Lv Sat, 19 Dec 2015 12:30:21 +0900 + +shadowsocks-libev (2.4.1-1) unstable; urgency=high + + * Fix a security bug. + + -- Max Lv Thu, 29 Oct 2015 15:42:47 +0900 + +shadowsocks-libev (2.4.0-1) unstable; urgency=low + + * Update the one-time authentication + + -- Max Lv 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 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 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 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 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 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 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 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 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 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 Sun, 08 Feb 2015 10:59:44 +0900 + +shadowsocks-libev (2.1.2-1) unstable; urgency=low + + * Refine multiple port binding. + + -- Max Lv Sat, 31 Jan 2015 18:56:25 +0900 + +shadowsocks-libev (2.1.1-1) unstable; urgency=low + + * Fix a memory leak. + + -- Max Lv 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 Mon, 19 Jan 2015 09:59:52 +0900 + +shadowsocks-libev (2.0.8-1) unstable; urgency=low + + * Fix a bug of IPv6. + + -- Max Lv Fri, 16 Jan 2015 10:58:12 +0900 + +shadowsocks-libev (2.0.7-1) unstable; urgency=low + + * Fix some performance issue. + + -- Max Lv 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 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 Mon, 12 Jan 2015 12:39:05 +0800 + +shadowsocks-libev (2.0.4-1) unstable; urgency=low + + * Fix building issues with MinGW32. + + -- Max Lv Sun, 11 Jan 2015 13:33:31 +0900 + +shadowsocks-libev (2.0.3-1) unstable; urgency=high + + * Fix some issues. + + -- Max Lv Sat, 10 Jan 2015 16:27:54 +0800 + +shadowsocks-libev (2.0.2-1) unstable; urgency=low + + * Fix issues with MinGW. + + -- Max Lv 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 Sat, 10 Jan 2015 10:04:28 +0800 + +shadowsocks-libev (1.6.4-1) unstable; urgency=low + + * Update documents. + + -- Max Lv Wed, 07 Jan 2015 21:48:58 +0900 + +shadowsocks-libev (1.6.3-1) unstable; urgency=low + + * Refine ss-redir. + + -- Max Lv Sun, 04 Jan 2015 19:23:52 +0900 + +shadowsocks-libev (1.6.2-1) unstable; urgency=low + + * Fix some build issues. + + -- Max Lv Tue, 30 Dec 2014 10:30:28 +0800 + +shadowsocks-libev (1.6.1-1) unstable; urgency=high + + * Add salsa20 and chacha20 support. + + -- Max Lv 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 Mon, 17 Nov 2014 14:10:21 +0800 + +shadowsocks-libev (1.5.3-2) unstable; urgency=low + + * rename as shadowsocks-libev. + + -- Symeon Huang Sat, 15 Nov 2014 14:55:28 +0000 + +shadowsocks (1.5.3-1) unstable; urgency=low + + * Fix log on Win32. + + -- Max Lv Fri, 14 Nov 2014 09:10:06 +0800 + +shadowsocks (1.5.2-1) unstable; urgency=low + + * Handle SIGTERM and SIGKILL nicely. + + -- Max Lv 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 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 Fri, 07 Nov 2014 09:33:19 +0800 + shadowsocks (1.4.8-1) unstable; urgency=low * Fix a bug of tcp fast open. diff --git a/debian/compat b/debian/compat index 7f8f011eb..f599e28b8 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +10 diff --git a/debian/config.json b/debian/config.json index aba1bf285..c9e39ed2a 100644 --- a/debian/config.json +++ b/debian/config.json @@ -1,8 +1,9 @@ { - "server":"127.0.0.1", + "server":["::1", "127.0.0.1"], + "mode":"tcp_and_udp", "server_port":8388, "local_port":1080, "password":"barfoo!", - "timeout":60, - "method":null + "timeout":86400, + "method":"chacha20-ietf-poly1305" } diff --git a/debian/control b/debian/control index 364491dbe..5267a3fb6 100644 --- a/debian/control +++ b/debian/control @@ -1,15 +1,85 @@ -Source: shadowsocks +Source: shadowsocks-libev Section: net -Priority: extra -Maintainer: Max Lv -Build-Depends: debhelper (>= 7.0.50~), libssl-dev (>= 0.9.8), autotools-dev, mime-support, gawk -Standards-Version: 3.8.4 -Homepage: http://www.shadowsocks.org -Vcs-Git: https://github.com/madeye/shadowsocks-libev.git -Vcs-Browser: https://github.com/madeye/shadowsocks-libev +Priority: optional +Maintainer: Debian Bridges Team +Uploaders: + Max Lv , + Boyuan Yang , + Roger Shimizu +Build-Depends: + asciidoc-base | asciidoc, + debhelper (>= 10), + libc-ares-dev, + libev-dev, + libmbedtls-dev, + libpcre3-dev, + libsodium-dev (>= 1.0.12), + pkg-config, + xmlto +Standards-Version: 4.1.1 +Rules-Requires-Root: no +Homepage: https://www.shadowsocks.org +Vcs-Git: https://github.com/shadowsocks/shadowsocks-libev.git +Vcs-Browser: https://github.com/shadowsocks/shadowsocks-libev -Package: shadowsocks +Package: shadowsocks-libev +Replaces: shadowsocks (<< 1.5.3-2) +Breaks: shadowsocks (<< 1.5.3-2) Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: A lightweight secured scoks5 proxy. - Shadowsocks-libev is a lightweight secured scoks5 proxy for embedded devices and low end boxes. +Pre-Depends: ${misc:Pre-Depends} +Depends: + libcap2-bin [linux-any], + lsb-base (>= 3.0-6), + ${misc:Depends}, + ${shlibs:Depends} +Suggests: + haveged, + kcptun, + simple-obfs +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 Shadowsocks (in Python). It's rewritten + in pure C and only depends on libev, mbedTLS and a few other tiny + libraries. + +Package: libshadowsocks-libev-dev +Architecture: any +Multi-Arch: same +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 Shadowsocks (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 Shadowsocks (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. diff --git a/debian/copyright b/debian/copyright index b7ed35e2d..aa8e2484e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,23 +1,204 @@ -This work was packaged for Debian by: +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: shadowsocks-libev +Upstream-Contact: Max Lv +Source: https://github.com/shadowsocks/shadowsocks-libev - Max Lv on Sat, 06 Apr 2013 16:59:15 +0800 +Files: * +Copyright: 2013-2015, Clow Windy + 2013-2018, Max Lv + 2014, Linus Yang +License: GPL-3+ -It was downloaded from: +Files: debian/* +Copyright: 2013-2015, Max Lv + 2015-2018, Boyuan Yang <073plan@gmail.com> + 2016-2019, Roger Shimizu +License: GPL-3+ - https://github.com/madeye/shadowsocks-libev +Files: doc/* +Copyright: 2012-2018, Max Lv +License: GFDL-1.1+ -Upstream Author(s): +Files: m4/ax_pthread.m4 +Copyright: 2008 Steven G. Johnson + 2011 Daniel Richard G. +License: GPL-3+ with Autoconf exception - clowwindy +Files: m4/ax_tls.m4 +Copyright: 2008 Alan Woodland + 2010 Diego Elio Petteno` +License: GPL-3+ with Autoconf exception -Copyright: +Files: m4/pcre.m4 +Copyright: 2015 Syrone Wong +License: Apache-2.0 - Copyright (C) 2013 Max Lv +Files: m4/stack-protector.m4 +Copyright: 2007 Google Inc. +License: Apache-2.0 -License: +Files: scripts/build_deb.sh +Copyright: 2018 Roger Shimizu +License: GPL-3+ - GPLv3 +Files: src/base64.c src/base64.h +Copyright: 2006 Ryan Martell +License: LGPL-2.1+ -The Debian packaging is: +Files: src/json.c src/json.h +Copyright: 2012-2014, James McLaughlin et al. +License: BSD-2-clause - Copyright (C) 2013 Max Lv +Files: src/resolv.c src/resolv.h +Copyright: 2011-2014, Dustin Lundquist +License: BSD-2-clause + +Files: src/rule.c src/rule.h +Copyright: 2011-2012, Dustin Lundquist + 2011, Manuel Kasper +License: BSD-2-clause + +Files: src/ss-nat +Copyright: 2015, OpenWrt-dist + 2015, Jian Chang +License: GPL-3+ + +Files: src/uthash.h +Copyright: 2003-2016, Troy D. Hanson +License: BSD-1-clause + +Files: tests/test.py +Copyright: 2015, Clow Windy +License: Apache-2.0 + +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-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: 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 + . + 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 . + . + 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. + +License: LGPL-2.1+ + This file is part of FFmpeg. + . + FFmpeg is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + FFmpeg 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 + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with FFmpeg; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/debian/copyright.original b/debian/copyright.original new file mode 100644 index 000000000..b7ed35e2d --- /dev/null +++ b/debian/copyright.original @@ -0,0 +1,23 @@ +This work was packaged for Debian by: + + Max Lv on Sat, 06 Apr 2013 16:59:15 +0800 + +It was downloaded from: + + https://github.com/madeye/shadowsocks-libev + +Upstream Author(s): + + clowwindy + +Copyright: + + Copyright (C) 2013 Max Lv + +License: + + GPLv3 + +The Debian packaging is: + + Copyright (C) 2013 Max Lv diff --git a/debian/docs b/debian/docs deleted file mode 100644 index b43bf86b5..000000000 --- a/debian/docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/debian/install b/debian/install deleted file mode 100644 index 573e9ed39..000000000 --- a/debian/install +++ /dev/null @@ -1 +0,0 @@ -debian/config.json /etc/shadowsocks diff --git a/debian/libshadowsocks-libev-dev.install b/debian/libshadowsocks-libev-dev.install new file mode 100644 index 000000000..304e0ed96 --- /dev/null +++ b/debian/libshadowsocks-libev-dev.install @@ -0,0 +1,3 @@ +usr/include/ +usr/lib/*/libshadowsocks-libev.so +usr/lib/*/pkgconfig/ diff --git a/debian/libshadowsocks-libev2.install b/debian/libshadowsocks-libev2.install new file mode 100644 index 000000000..590078a3d --- /dev/null +++ b/debian/libshadowsocks-libev2.install @@ -0,0 +1 @@ +usr/lib/*/libshadowsocks-libev.so.* diff --git a/debian/rules b/debian/rules index c30bbdbb9..5d26d753b 100755 --- a/debian/rules +++ b/debian/rules @@ -1,21 +1,24 @@ #!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. -# -# Modified to make a template file for a multi-binary package with separated -# build-arch and build-indep targets by Bill Allombert 2001 +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +# Security Hardening +export DEB_BUILD_MAINT_OPTIONS = hardening=+all -# This has to be exported to make some magic below work. -export DH_OPTIONS +override_dh_auto_install: + find src/ -name '*.la' -delete + dh_auto_install +override_dh_auto_configure: + # Whether to have stack-protector is decided by dpkg-buildflags. + # So --disable-ssp here should be safe. See Bug#829498 + dh_auto_configure -- \ + --enable-shared \ + --disable-ssp + +override_dh_installchangelogs: + dh_installchangelogs -XChanges %: - dh $@ + dh $@ diff --git a/debian/shadowsocks-libev-local@.service b/debian/shadowsocks-libev-local@.service new file mode 100644 index 000000000..e64709078 --- /dev/null +++ b/debian/shadowsocks-libev-local@.service @@ -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 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-online.target + +[Service] +Type=simple +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_BIND_SERVICE +DynamicUser=true +ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json + +[Install] +WantedBy=multi-user.target diff --git a/debian/shadowsocks-libev-redir@.service b/debian/shadowsocks-libev-redir@.service new file mode 100644 index 000000000..242c6404c --- /dev/null +++ b/debian/shadowsocks-libev-redir@.service @@ -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 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-online.target + +[Service] +Type=simple +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +DynamicUser=true +ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json + +[Install] +WantedBy=multi-user.target diff --git a/debian/shadowsocks-libev-server@.service b/debian/shadowsocks-libev-server@.service new file mode 100644 index 000000000..6e333f9e0 --- /dev/null +++ b/debian/shadowsocks-libev-server@.service @@ -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 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-online.target + +[Service] +Type=simple +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_BIND_SERVICE +DynamicUser=true +ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json + +[Install] +WantedBy=multi-user.target diff --git a/debian/shadowsocks-libev-tunnel@.service b/debian/shadowsocks-libev-tunnel@.service new file mode 100644 index 000000000..68d85171c --- /dev/null +++ b/debian/shadowsocks-libev-tunnel@.service @@ -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 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-online.target + +[Service] +Type=simple +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_BIND_SERVICE +DynamicUser=true +ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks-libev/%i.json + +[Install] +WantedBy=multi-user.target diff --git a/debian/shadowsocks-libev.NEWS b/debian/shadowsocks-libev.NEWS new file mode 100644 index 000000000..6077ea9c7 --- /dev/null +++ b/debian/shadowsocks-libev.NEWS @@ -0,0 +1,20 @@ +shadowsocks-libev (3.2.0+ds-5) unstable; urgency=medium + + There is a mode setting to choose whether to enable both TCP and + UDP, or only one of them. This setting was set to "tcp_and_udp" in + /etc/default/shadowsocks-libev, /etc/init.d/shadowsocks-libev + (for init system only), and maybe also in config.json added by user, + which is quite confusing. + + So we moved this setting to config.json. Since we won't update + config.json on package upgrade, please add the following to your + /etc/shadowsocks-libev/config.json. + + "mode":"tcp_and_udp", + + Otherwise you setting will be TCP only. + For more about TCP/UDP mode, please refer the ticket upstream: + + - https://github.com/shadowsocks/shadowsocks-libev/issues/1870 + + -- Roger Shimizu Sun, 07 Oct 2018 00:48:07 +0900 diff --git a/debian/shadowsocks-libev.default b/debian/shadowsocks-libev.default new file mode 100644 index 000000000..9677384a2 --- /dev/null +++ b/debian/shadowsocks-libev.default @@ -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= + +# User and group to run the server as +USER=nobody +GROUP=nogroup + +# Number of maximum file descriptors +MAXFD=32768 diff --git a/debian/shadowsocks-libev.doc-base b/debian/shadowsocks-libev.doc-base new file mode 100644 index 000000000..714c1a034 --- /dev/null +++ b/debian/shadowsocks-libev.doc-base @@ -0,0 +1,9 @@ +Document: shadowsocks-libev +Title: shadowsocks-libev documentation +Author: Max Lv +Abstract: This is the documentation of shadowsocks-libev +Section: Network/Communication + +Format: HTML +Index: /usr/share/doc/shadowsocks-libev/shadowsocks-libev.html +Files: /usr/share/doc/shadowsocks-libev/*.html diff --git a/debian/shadowsocks-libev.docs b/debian/shadowsocks-libev.docs new file mode 100644 index 000000000..5e25092e6 --- /dev/null +++ b/debian/shadowsocks-libev.docs @@ -0,0 +1,5 @@ +AUTHORS +README.md +debian/copyright.original +scripts +doc/*.html diff --git a/debian/shadowsocks.init b/debian/shadowsocks-libev.init similarity index 86% rename from debian/shadowsocks.init rename to debian/shadowsocks-libev.init index 29322534a..0771a5dc7 100644 --- a/debian/shadowsocks.init +++ b/debian/shadowsocks-libev.init @@ -1,22 +1,21 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: shadowsocks +# 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 scoks5 proxy -# Description: Shadowsocks-libev is a lightweight secured -# scoks5 proxy for embedded devices and low end boxes. -# +# 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 # PATH should only include /usr/ if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC=shadowsocks # Introduce a short description here -NAME=shadowsocks # Introduce the short server's name here +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 @@ -30,8 +29,8 @@ SCRIPTNAME=/etc/init.d/$NAME [ "$START" = "yes" ] || exit 0 -: ${USER:="root"} -: ${GROUP:="root"} +: ${USER:="nobody"} +: ${GROUP:="nogroup"} # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh @@ -59,7 +58,7 @@ do_start() start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON -- \ - -c "$CONFFILE" -a "$USER" -u -f $PIDFILE $DAEMON_ARGS \ + -c "$CONFFILE" -f $PIDFILE $DAEMON_ARGS \ || return 2 } @@ -73,7 +72,7 @@ do_stop() # 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 --name $NAME + start-stop-daemon --stop --quiet --retry=TERM/5 --pidfile $PIDFILE --exec $DAEMON RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks diff --git a/debian/shadowsocks-libev.install b/debian/shadowsocks-libev.install new file mode 100644 index 000000000..24fa1f6d0 --- /dev/null +++ b/debian/shadowsocks-libev.install @@ -0,0 +1,7 @@ +completions/bash/* usr/share/bash-completion/completions/ +completions/zsh/* usr/share/zsh/vendor-completions/ +debian/config.json usr/share/shadowsocks-libev +debian/shadowsocks-libev-*.service lib/systemd/system +usr/bin/ +usr/share/man/ +usr/share/doc/shadowsocks-libev/ diff --git a/debian/shadowsocks-libev.lintian-overrides b/debian/shadowsocks-libev.lintian-overrides new file mode 100644 index 000000000..147b2fe26 --- /dev/null +++ b/debian/shadowsocks-libev.lintian-overrides @@ -0,0 +1,5 @@ +# False positive: systemd service templates cannot fallback to sysvinit script +package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-local@.service +package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-redir@.service +package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-server@.service +package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-tunnel@.service diff --git a/debian/shadowsocks-libev.postinst b/debian/shadowsocks-libev.postinst new file mode 100755 index 000000000..b8dfec32d --- /dev/null +++ b/debian/shadowsocks-libev.postinst @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +# POSIX-compliant maint function recommend by devref +# to check for the existence of a command +# https://www.debian.org/doc/manuals/developers-reference/ch06.html#bpp-debian-maint-scripts +pathfind() { + OLDIFS="$IFS" + IFS=: + for p in $PATH; do + if [ -x "$p/$*" ]; then + IFS="$OLDIFS" + return 0 + fi + done + IFS="$OLDIFS" + return 1 +} + +case "$1" in + configure|reconfigure) + if pathfind setcap; then + if ! setcap \ + cap_net_bind_service+ep /usr/bin/ss-local \ + cap_net_bind_service,cap_net_admin+ep /usr/bin/ss-redir \ + cap_net_bind_service+ep /usr/bin/ss-server \ + cap_net_bind_service+ep /usr/bin/ss-tunnel; then + echo "Failed to set capabilities; ss-* will only be runnable by root." + fi + else + echo "setcap not installed; ss-* will only be runnable by root." + fi + if [ ! -f /etc/shadowsocks-libev/config.json ]; then + set +e + passwd=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..12)') + set -e + 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 diff --git a/debian/shadowsocks-libev.postrm b/debian/shadowsocks-libev.postrm new file mode 100644 index 000000000..de10387bd --- /dev/null +++ b/debian/shadowsocks-libev.postrm @@ -0,0 +1,29 @@ +#!/bin/sh + +set -e + +case "$1" in + purge) + rm -f /etc/shadowsocks-libev/config.json + if test ! -e /etc/shadowsocks-libev ; then + # If the config directory does not exist, do nothing + : + else + if test -d /etc/shadowsocks-libev ; then + # If it is an empty directory, remove it + rmdir /etc/shadowsocks-libev || true + fi + fi + ;; + 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 diff --git a/debian/shadowsocks-libev.service b/debian/shadowsocks-libev.service new file mode 100644 index 000000000..0aa486208 --- /dev/null +++ b/debian/shadowsocks-libev.service @@ -0,0 +1,27 @@ +# 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-online.target +Wants=network-online.target + +[Service] +Type=simple +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_BIND_SERVICE +DynamicUser=true +EnvironmentFile=/etc/default/shadowsocks-libev +LimitNOFILE=32768 +ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS + +[Install] +WantedBy=multi-user.target diff --git a/debian/shadowsocks.default b/debian/shadowsocks.default deleted file mode 100644 index eb6e15a6f..000000000 --- a/debian/shadowsocks.default +++ /dev/null @@ -1,23 +0,0 @@ -# Defaults for redsocks initscript -# sourced by /etc/init.d/redsocks -# installed at /etc/default/redsocks by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# Enable during startup? -START=yes - -# Configuration file -CONFFILE="/etc/shadowsocks/config.json" - -# Extra command line arguments -DAEMON_ARGS="" - -# User and group to run the server as -USER=root -GROUP=root - -# Number of maximum file descriptors -MAXFD=1024 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 000000000..90d1d4079 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Test-Command: bash tests/test.sh +Depends: @, python3, curl, dnsutils +Restrictions: allow-stderr diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 000000000..fc1a3b545 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,6 @@ +Name: shadowsocks-libev +Homepage: https://shadowsocks.org +Repository: https://github.com/shadowsocks/shadowsocks-libev.git +Repository-Browse: https://github.com/shadowsocks/shadowsocks-libev +Bug-Database: https://github.com/shadowsocks/shadowsocks-libev/issues +Contact: Max Lv diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..cadc08750 --- /dev/null +++ b/debian/watch @@ -0,0 +1,7 @@ +version=4 + +opts="repack,compression=xz, \ + dversionmangle=s/\+ds\d*$//,repacksuffix=+ds, \ + filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%shadowsocks-libev_$1.orig.tar.gz%" \ + https://github.com/shadowsocks/shadowsocks-libev/tags \ + (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate diff --git a/depcomp b/depcomp deleted file mode 100755 index 25a39e6cd..000000000 --- a/depcomp +++ /dev/null @@ -1,708 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2012-03-27.16; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011, 2012 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 . - -# 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 . - -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 . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' - -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" - -# 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 informations. - 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 -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## 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). -## - 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 -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## 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. - tr ' ' "$nl" < "$tmpdepfile" | -## 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. - 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 -eq 0; then : - else - 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 - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#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. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - 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 -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependent.h'. - # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. - # However on - # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\': - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - # tcc 0.9.26 (FIXME still under development at the moment of writing) - # will emit a similar output, but also prepend the continuation lines - # with horizontal tabulation characters. - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - 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 -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$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. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - 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 -eq 0; then : - else - 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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#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. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # 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.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -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" = 0; then : - else - 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" - 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" - tr ' ' "$nl" < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - 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" - sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - 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: diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 000000000..9abd45520 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,92 @@ +find_program(XMLTO_EXECUTABLE NAMES xmlto) +find_program(ASCIIDOC_EXECUTABLE NAMES asciidoc asciidoc.py) + +# Opt-in doc build option +if (NOT XMLTO_EXECUTABLE OR NOT ASCIIDOC_EXECUTABLE) + option(WITH_DOC_MAN "Build manpage doc" OFF) +else () + option(WITH_DOC_MAN "Build manpage doc" ON) +endif () + +if (NOT ASCIIDOC_EXECUTABLE) + option(WITH_DOC_HTML "Build html doc" OFF) +else () + option(WITH_DOC_HTML "Build html doc" ON) +endif () + +# NOTE For brew user, we have to setup this env var. see `brew info asciidoc' +set(XMLTO_ENV) +set(XMLTO_CATALOG_DIR_MACOS /usr/local/etc/xml/catalog) +if (EXISTS ${XMLTO_CATALOG_DIR_MACOS}) + set(XMLTO_ENV XML_CATALOG_FILES=${XMLTO_CATALOG_DIR_MACOS}) + message(STATUS "Detect xmlto catalog dir ${XMLTO_CATALOG_DIR_MACOS}") +endif () + +set(CMAKE_MANPAGE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/man) +set(CMAKE_HTML_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/html) + +set(DOC_DIR ${PROJECT_SOURCE_DIR}/doc) +set(XMLTO_OPTS -m ${DOC_DIR}/manpage-normal.xsl -m ${DOC_DIR}/manpage-bold-literal.xsl man) +set(ASCIIDOC_XML_OPTS -b docbook -d manpage -f ${DOC_DIR}/asciidoc.conf -aversion=${PROJECT_VERSION}) +set(ASCIIDOC_HTML_OPTS -b html4 -d article -f ${DOC_DIR}/asciidoc.conf -aversion=${PROJECT_VERSION}) + + +set(MAN_NAMES ss-local.1 ss-manager.1 ss-nat.1 ss-redir.1 ss-server.1 ss-tunnel.1 shadowsocks-libev.8) +set(MAN_FILES) +set(HTML_FILES) + +foreach (manfile IN LISTS MAN_NAMES) + string(REGEX REPLACE \\.. .xml xmlfile ${manfile}) + string(REGEX REPLACE \\.. .asciidoc docfile ${manfile}) + string(REGEX REPLACE \\.. .html htmlfile ${manfile}) + + set(manfile ${CMAKE_MANPAGE_OUTPUT_DIRECTORY}/${manfile}) + set(htmlfile ${CMAKE_HTML_OUTPUT_DIRECTORY}/${htmlfile}) + set(docfile ${DOC_DIR}/${docfile}) + + add_custom_command(OUTPUT ${manfile} + COMMAND ${ASCIIDOC_EXECUTABLE} ${ASCIIDOC_XML_OPTS} -o ${xmlfile} ${docfile} + COMMAND ${CMAKE_COMMAND} -E env ${XMLTO_ENV} ${XMLTO_EXECUTABLE} ${XMLTO_OPTS} ${xmlfile} + # After we built the manpage, the xmlfile is nolongger needed + COMMAND ${CMAKE_COMMAND} -E remove ${xmlfile} + DEPENDS ${docfile} + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/man + COMMENT "Building manpage ${manfile}" + VERBATIM) + list(APPEND MAN_FILES ${manfile}) + + add_custom_command(OUTPUT ${htmlfile} + COMMAND ${ASCIIDOC_EXECUTABLE} ${ASCIIDOC_HTML_OPTS} -o ${htmlfile} ${docfile} + DEPENDS ${docfile} + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/html + COMMENT "Building htmlfile ${htmlfile}" + VERBATIM) + list(APPEND HTML_FILES ${htmlfile}) +endforeach () + +add_custom_target(doc-man ALL DEPENDS ${MAN_FILES}) +add_custom_target(doc-html ALL DEPENDS ${HTML_FILES}) + + +if (NOT WITH_DOC_MAN) + set_target_properties(doc-man PROPERTIES EXCLUDE_FROM_ALL TRUE) +else () + install(DIRECTORY ${PROJECT_BINARY_DIR}/man/ + DESTINATION share/man/man1 + FILES_MATCHING PATTERN "*.1" + ) + install(DIRECTORY ${PROJECT_BINARY_DIR}/man/ + DESTINATION share/man/man8 + FILES_MATCHING PATTERN "*.8" + ) +endif () +if (NOT WITH_DOC_HTML) + set_target_properties(doc-html PROPERTIES EXCLUDE_FROM_ALL TRUE) +else () + install(DIRECTORY ${PROJECT_BINARY_DIR}/html/ + DESTINATION share/doc/${PROJECT_NAME}) +endif () + +# This is required for custom command +file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/man) +file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/html) diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 000000000..e2cfbf6da --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,60 @@ +ASCIIDOC = @ASCIIDOC@ +ASCIIDOC_EXTRA = +MANPAGE_XSL = $(srcdir)/manpage-normal.xsl +XMLTO = @XMLTO@ +XMLTO_EXTRA = -m $(srcdir)/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 +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 + +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 $(srcdir)/asciidoc.conf \ + -aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $< + +%.html: %.asciidoc + $(AM_V_GEN)$(ASCIIDOC) -b html4 -d article -f $(srcdir)/asciidoc.conf \ + -aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $< + +doc_DATA = $(MAN_HTML) + +CLEANFILES = $(MAN_XML) $(man_MANS) $(MAN_HTML) + +EXTRA_DIST = *.asciidoc asciidoc.conf *.xsl diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf new file mode 100644 index 000000000..906f6a55e --- /dev/null +++ b/doc/asciidoc.conf @@ -0,0 +1,36 @@ +[tags] +bracket-emphasis={1?[{1}]}<|> + +[quotes] +<|>=#bracket-emphasis + +[attributes] +asterisk=* +plus=+ +caret=^ +startsb=[ +endsb=] +backslash=\ +tilde=~ +apostrophe=' +backtick=` +litdd=-- + +ifdef::doctype-manpage[] +ifdef::backend-docbook[] +[header] +template::[header-declarations] + + +{mantitle} +{manvolnum} +Shadowsocks-libev +{version} +Shadowsocks-libev Manual + + + {manname} + {manpurpose} + +endif::backend-docbook[] +endif::doctype-manpage[] diff --git a/doc/manpage-base.xsl b/doc/manpage-base.xsl new file mode 100644 index 000000000..a264fa616 --- /dev/null +++ b/doc/manpage-base.xsl @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + sp + + + + + + + + br + + + diff --git a/doc/manpage-bold-literal.xsl b/doc/manpage-bold-literal.xsl new file mode 100644 index 000000000..608eb5df6 --- /dev/null +++ b/doc/manpage-bold-literal.xsl @@ -0,0 +1,17 @@ + + + + + + + fB + + + fR + + + diff --git a/doc/manpage-normal.xsl b/doc/manpage-normal.xsl new file mode 100644 index 000000000..a48f5b11f --- /dev/null +++ b/doc/manpage-normal.xsl @@ -0,0 +1,13 @@ + + + + + + +\ +. + + diff --git a/doc/shadowsocks-libev.asciidoc b/doc/shadowsocks-libev.asciidoc new file mode 100644 index 000000000..4a283dd66 --- /dev/null +++ b/doc/shadowsocks-libev.asciidoc @@ -0,0 +1,279 @@ +shadowsocks-libev(8) +==================== + +NAME +---- +shadowsocks-libev - a lightweight and secure socks5 proxy + +SYNOPSIS +-------- +*ss-local*|*ss-redir*|*ss-server*|*ss-tunnel*|*ss-manager* + [-s ] [-p ] [-l ] [-k ] + [-m ] [-f ] [-t ] [-c ] + +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 :: +Set the server's hostname or IP. + +-l :: +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. + +--key :: +Set the key directly. The key should be encoded with URL-safe Base64. ++ +Not available in manager mode. + +-m :: +Set the cipher. ++ +*Shadowsocks-libev* accepts 19 different ciphers: ++ +aes-128-gcm, aes-192-gcm, aes-256-gcm, +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, +chacha20-ietf-poly1305, xchacha20-ietf-poly1305, +salsa20, chacha20 and chacha20-ietf. ++ +The default cipher is 'chacha20-ietf-poly1305'. ++ +If built with PolarSSL or custom OpenSSL libraries, some of +these ciphers may not work. + +-a :: +Run as a specific user. + +-f :: +Start shadowsocks as a daemon with specific pid file. + +-t :: +Set the socket timeout in seconds. The default value is 60. + +-c :: +Use a configuration file. + +-n :: +Specify max number of open files. ++ +Not available in manager mode. ++ +Only available on Linux. + +-i :: +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 :: +Specify the local address to bind. ++ +For servers: Specify the local address to use while this server is making +outbound connections to remote servers on behalf of the clients. ++ +For clients: Specify the local address to use while this client is making +outbound connections to the server. ++ +Not available in 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. + +-T:: +Use tproxy instead of redirect (for tcp). ++ +Only available in redir mode. + +-L :: +Specify destination server address and port for local port forwarding. ++ +Only available in tunnel mode. + +-d :: +Setup name servers for internal DNS resolver (libc-ares). +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. + +--reuse-port:: +Enable port reuse. ++ +Only available with Linux kernel > 3.9.0. + +--no-delay:: +Enable TCP_NODELAY. + +--acl :: +Enable ACL (Access Control List) and specify config file. ++ +Not available in redir nor tunnel mode. + +--manager-address :: +Specify UNIX domain socket address. ++ +Only available in server and manager mode. + +--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 | "server_port": "1234" +| -b 0.0.0.0 | "local_address": "0.0.0.0" +| -b 10.0.0.2 | "local_ipv4_address": "10.0.0.2" +| -b 2620:129:35::33 | "local_ipv6_address": "2620:129:35::33" +| -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" +| --acl "/path/to/acl" | "acl": "/path/to/acl" +| --fast-open | "fast_open": true +| --reuse-port | "reuse_port": true +| --no-delay | "no_delay": true +| --plugin "obfs-server" | "plugin": "obfs-server" +| --plugin-opts "obfs=http" | "plugin_opts": "obfs=http" +| -6 | "ipv6_first": 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" +| -T | "tcp_tproxy": true +| (only in ss-manager's config) | "port_password": {"1234":"PasSworD"} +|============================================================================ + +EXAMPLE +------- +`ss-redir` requires netfilter's NAT function. Here is an example: + +.... +# Create new chain +iptables -t nat -N SHADOWSOCKS +iptables -t mangle -N SHADOWSOCKS + +# Ignore your shadowsocks server's addresses +# It's very IMPORTANT, just be careful. +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. +iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN + +# Anything else should be redirected to shadowsocks's local port +iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345 + +# Add any UDP rules +ip rule add fwmark 0x01/0x01 table 100 +ip route add local 0.0.0.0/0 dev lo table 100 +iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01 + +# Apply the rules +iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS +iptables -t mangle -A PREROUTING -j SHADOWSOCKS + +# Start the shadowsocks-redir +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 diff --git a/doc/ss-local.asciidoc b/doc/ss-local.asciidoc new file mode 100644 index 000000000..46ce8c82c --- /dev/null +++ b/doc/ss-local.asciidoc @@ -0,0 +1,163 @@ +ss-local(1) +=========== + +NAME +---- +ss-local - shadowsocks client as socks5 proxy, libev port + +SYNOPSIS +-------- +*ss-local* + [-uv6] [-h|--help] + [-s ] [-p ] [-l ] + [-k ] [-m ] [-f ] + [-t ] [-c ] [-i ] + [-a ] [-b ] [-n ] + [--fast-open] [--reuse-port] [--acl ] + [--mtu ] [--no-delay] + [--plugin ] [--plugin-opts ] + [--password ] [--key ] + +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 :: +Set the server's hostname or IP. + +-p :: +Set the server's port number. + +-l :: +Set the local port number. + +-k :: +--password :: +Set the password. The server and the client should use the same password. + +--key :: +Set the key directly. The key should be encoded with URL-safe Base64. + +-m :: +Set the cipher. ++ +*Shadowsocks-libev* accepts 19 different ciphers: ++ +aes-128-gcm, aes-192-gcm, aes-256-gcm, +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, +chacha20-ietf-poly1305, xchacha20-ietf-poly1305, +salsa20, chacha20 and chacha20-ietf. ++ +The default cipher is 'chacha20-ietf-poly1305'. ++ +If built with PolarSSL or custom OpenSSL libraries, some of +these ciphers may not work. + +-a :: +Run as a specific user. + +-f :: +Start shadowsocks as a daemon with specific pid file. + +-t :: +Set the socket timeout in seconds. The default value is 60. + +-c :: +Use a configuration file. ++ +Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details. + +-n :: +Specify max number of open files. ++ +Only available on Linux. + +-i :: +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 :: +Specify the local address to use while this client is making outbound +connections to the server. + +-u:: +Enable UDP relay. + +-U:: +Enable UDP relay and disable TCP relay. + +-6:: +Resovle hostname to IPv6 address first. + +--fast-open:: +Enable TCP fast open. ++ +Only available with Linux kernel > 3.7.0. + +--reuse-port:: +Enable port reuse. ++ +Only available with Linux kernel > 3.9.0. + +--acl :: +Enable ACL (Access Control List) and specify config file. + +--mtu :: +Specify the MTU of your network interface. + +--mptcp:: +Enable Multipath TCP. ++ +Only available with MPTCP enabled Linux kernel. + +--no-delay:: +Enable TCP_NODELAY. + +--plugin :: +Enable SIP003 plugin. (Experimental) + +--plugin-opts :: +Set SIP003 plugin options. (Experimental) + +-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 + diff --git a/doc/ss-manager.asciidoc b/doc/ss-manager.asciidoc new file mode 100644 index 000000000..0c127570a --- /dev/null +++ b/doc/ss-manager.asciidoc @@ -0,0 +1,186 @@ +ss-manager(1) +============= + +NAME +---- +ss-manager - ss-server controller for multi-user management and traffic statistics + +SYNOPSIS +-------- +*ss-manager* + [-AuUv] [-h|--help] + [-s ] [-p ] [-l ] + [-k ] [-m ] [-f ] + [-t ] [-c ] [-i ] + [-b ] [-a ] [-D ] + [--manager-address ] + [--executable ] + [--fast-open] [--reuse-port] + [--plugin ] [--plugin-opts ] + +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 :: +Set the server's hostname or IP. + +-k :: +Set the password. The server and the client should use the same password. + +-m :: +Set the cipher. ++ +*Shadowsocks-libev* accepts 19 different ciphers: ++ +aes-128-gcm, aes-192-gcm, aes-256-gcm, +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, +chacha20-ietf-poly1305, xchacha20-ietf-poly1305, +salsa20, chacha20 and chacha20-ietf. ++ +The default cipher is 'chacha20-ietf-poly1305'. ++ +If built with PolarSSL or custom OpenSSL libraries, some of +these ciphers may not work. + +-a :: +Run as a specific user. + +-f :: +Start shadowsocks as a daemon with specific pid file. + +-t :: +Set the socket timeout in seconds. The default value is 60. + +-c :: +Use a configuration file. ++ +You may use "port_password" field inside this configuration file to bring up +multiple ss-server instances together. + +-i :: +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 :: +Setup name servers for internal DNS resolver (libc-ares). +The default server is fetched from `/etc/resolv.conf`. + +--fast-open:: +Enable TCP fast open. ++ +Only available with Linux kernel > 3.7.0. + +--reuse-port:: +Enable port reuse. ++ +Only available with Linux kernel > 3.9.0. + +--acl :: +Enable ACL (Access Control List) and specify config file. + +--manager-address :: +Specify UNIX domain socket address for the communication between ss-manager(1) and ss-server(1). ++ +Only available in server and manager mode. + +--executable :: +Specify the executable path of ss-server. ++ +Only available in manager mode. + +--executable :: +Specify the working directory of ss-manager. ++ +Only available in manager mode. + +--plugin :: +Enable SIP003 plugin. (Experimental) + +--plugin-opts :: +Set SIP003 plugin options. (Experimental) + +-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 the traffic statistics: :::: + ping + +The format of the traffic statistics: :::: + stat: {"8001":11370} + +There is no way to reset the traffic statistics, unless you remove the port and add it again + +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 diff --git a/doc/ss-nat.asciidoc b/doc/ss-nat.asciidoc new file mode 100644 index 000000000..355083a5e --- /dev/null +++ b/doc/ss-nat.asciidoc @@ -0,0 +1,95 @@ +ss-nat(1) +========= + +NAME +---- +ss-nat - helper script to setup NAT rules for transparent proxy + +SYNOPSIS +-------- +*ss-nat* + [-ouUfh] + [-s ] [-S ] [-l ] + [-L ] [-i ] [-a ] + [-b ] [-w ] [-e ] + +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 :: +IP address of shadowsocks remote server + +-l :: +Port number of shadowsocks local server + +-S :: +IP address of shadowsocks remote UDP server + +-L :: +Port number of shadowsocks local UDP server + +-i :: +a file whose content is bypassed ip list + +-a :: +LAN IP of access control, need a prefix to define access control mode + +-b :: +WAN IP of will be bypassed + +-w :: +WAN IP of will be forwarded + +-e :: +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 + diff --git a/doc/ss-redir.asciidoc b/doc/ss-redir.asciidoc new file mode 100644 index 000000000..ea15ef31c --- /dev/null +++ b/doc/ss-redir.asciidoc @@ -0,0 +1,181 @@ +ss-redir(1) +=========== + +NAME +---- +ss-redir - shadowsocks client as transparent proxy, libev port + +SYNOPSIS +-------- +*ss-redir* + [-uUv6] [-h|--help] + [-s ] [-p ] [-l ] + [-k ] [-m ] [-f ] + [-t ] [-c ] [-b ] + [-a ] [-n ] [--mtu ] [--no-delay] + [--plugin ] [--plugin-opts ] + [--password ] [--key ] + +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 :: +Set the server's hostname or IP. + +-p :: +Set the server's port number. + +-l :: +Set the local port number. + +-k :: +--password :: +Set the password. The server and the client should use the same password. + +--key :: +Set the key directly. The key should be encoded with URL-safe Base64. + +-m :: +Set the cipher. ++ +*Shadowsocks-libev* accepts 19 different ciphers: ++ +aes-128-gcm, aes-192-gcm, aes-256-gcm, +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, +chacha20-ietf-poly1305, xchacha20-ietf-poly1305, +salsa20, chacha20 and chacha20-ietf. ++ +The default cipher is 'chacha20-ietf-poly1305'. ++ +If built with PolarSSL or custom OpenSSL libraries, some of +these ciphers may not work. + +-a :: +Run as a specific user. + +-f :: +Start shadowsocks as a daemon with specific pid file. + +-t :: +Set the socket timeout in seconds. The default value is 60. + +-c :: +Use a configuration file. ++ +Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details. + +-n :: +Specify max number of open files. ++ +Only available on Linux. + +-b :: +Specify the local address to use while this client is making outbound +connections to the server. + +-u:: +Enable UDP relay. ++ +TPROXY is required in redir mode. You may need root permission. + +-U:: +Enable UDP relay and disable TCP relay. + +-T:: +Use tproxy instead of redirect. (for tcp) + +-6:: +Resovle hostname to IPv6 address first. + +--mtu :: +Specify the MTU of your network interface. + +--mptcp:: +Enable Multipath TCP. ++ +Only available with MPTCP enabled Linux kernel. + +--reuse-port:: +Enable port reuse. ++ +Only available with Linux kernel > 3.9.0. + +--no-delay:: +Enable TCP_NODELAY. + +--plugin :: +Enable SIP003 plugin. (Experimental) + +--plugin-opts :: +Set SIP003 plugin options. (Experimental) + +-v:: +Enable verbose mode. + +-h|--help:: +Print help message. + +EXAMPLE +------- +ss-redir requires netfilter's NAT function. Here is an example: + +.... +# Create new chain +iptables -t nat -N SHADOWSOCKS +iptables -t mangle -N SHADOWSOCKS + +# Ignore your shadowsocks server's addresses +# It's very IMPORTANT, just be careful. +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. +iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN +iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN + +# Anything else should be redirected to shadowsocks's local port +iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345 + +# Add any UDP rules +ip route add local default dev lo table 100 +ip rule add fwmark 1 lookup 100 +iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01 + +# Apply the rules +iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS +iptables -t mangle -A PREROUTING -j SHADOWSOCKS + +# Start the shadowsocks-redir +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 diff --git a/doc/ss-server.asciidoc b/doc/ss-server.asciidoc new file mode 100644 index 000000000..d06cd1910 --- /dev/null +++ b/doc/ss-server.asciidoc @@ -0,0 +1,187 @@ +ss-server(1) +============ + +NAME +---- +ss-server - shadowsocks server, libev port + +SYNOPSIS +-------- +*ss-server* + [-uUv] [-h|--help] + [-s ] [-p ] [-l ] + [-k ] [-m ] [-f ] + [-t ] [-c ] [-i ] + [-a ] [-d ] [-n ] + [-b ] [--fast-open] [--reuse-port] + [--mptcp] [--acl ] [--mtu ] [--no-delay] + [--manager-address ] + [--plugin ] [--plugin-opts ] + [--password ] [--key ] + +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 :: +Set the server's hostname or IP. + +-p :: +Set the server's port number. + +-k :: +--password :: +Set the password. The server and the client should use the same password. + +--key :: +Set the key directly. The key should be encoded with URL-safe Base64. + +-m :: +Set the cipher. ++ +*Shadowsocks-libev* accepts 19 different ciphers: ++ +aes-128-gcm, aes-192-gcm, aes-256-gcm, +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, +chacha20-ietf-poly1305, xchacha20-ietf-poly1305, +salsa20, chacha20 and chacha20-ietf. ++ +If built with PolarSSL or custom OpenSSL libraries, some of +these ciphers may not work. + +-a :: +Run as a specific user. + +-f :: +Start shadowsocks as a daemon with specific pid file. + +-t :: +Set the socket timeout in seconds. The default value is 60. + +-c :: +Use a configuration file. ++ +Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details. + +-n :: +Specify max number of open files. ++ +Only available on Linux. + +-i :: +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 :: +Specify the local address to use while this server is making outbound +connections to remote servers on behalf of the clients. + +-u:: +Enable UDP relay. + +-U:: +Enable UDP relay and disable TCP relay. + +-6:: +Resovle hostname to IPv6 address first. + +-d :: +Setup name servers for internal DNS resolver (libc-ares). +The default server is fetched from '/etc/resolv.conf'. + +--fast-open:: +Enable TCP fast open. ++ +Only available with Linux kernel > 3.7.0. + +--reuse-port:: +Enable port reuse. ++ +Only available with Linux kernel > 3.9.0. + +--no-delay:: +Enable TCP_NODELAY. + +--acl :: +Enable ACL (Access Control List) and specify config file. + +--manager-address :: +Specify UNIX domain socket address for the communication between ss-manager(1) and ss-server(1). ++ +Only available in server and manager mode. + +--mtu :: +Specify the MTU of your network interface. + +--mptcp:: +Enable Multipath TCP. ++ +Only available with MPTCP enabled Linux kernel. + +--plugin :: +Enable SIP003 plugin. (Experimental) + +--plugin-opts :: +Set SIP003 plugin options. (Experimental) + +-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"], +... +} +.... + +`ss-server`(1) also does not understand "port_password" field in config file. +If you want to start up multiple server instances with a single config file, +please try ss-manager tool. See `ss-manager`(8) for details. + +SEE ALSO +-------- +`ss-local`(1), +`ss-tunnel`(1), +`ss-redir`(1), +`ss-manager`(1), +`shadowsocks-libev`(8), +`iptables`(8), +/etc/shadowsocks-libev/config.json diff --git a/doc/ss-tunnel.asciidoc b/doc/ss-tunnel.asciidoc new file mode 100644 index 000000000..26fabafb7 --- /dev/null +++ b/doc/ss-tunnel.asciidoc @@ -0,0 +1,149 @@ +ss-tunnel(1) +============ + +NAME +---- +ss-tunnel - shadowsocks tools for local port forwarding, libev port + +SYNOPSIS +-------- +*ss-tunnel* + [-uUv6] [-h|--help] + [-s ] [-p ] [-l ] + [-k ] [-m ] [-f ] + [-t ] [-c ] [-i ] + [-b ] [-a ] [-n ] + [-L addr:port] [--mtu ] [--mptcp] [--reuse-port] [--no-delay] + [--plugin ] [--plugin-opts ] + [--key ] + +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 :: +Set the server's hostname or IP. + +-p :: +Set the server's port number. + +-l :: +Set the local port number. + +-k :: +--password :: +Set the password. The server and the client should use the same password. + +--key :: +Set the key directly. The key should be encoded with URL-safe Base64. + +-m :: +Set the cipher. ++ +*Shadowsocks-libev* accepts 19 different ciphers: ++ +aes-128-gcm, aes-192-gcm, aes-256-gcm, +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, +chacha20-ietf-poly1305, xchacha20-ietf-poly1305, +salsa20, chacha20 and chacha20-ietf. ++ +The default cipher is 'chacha20-ietf-poly1305'. ++ +If built with PolarSSL or custom OpenSSL libraries, some of +these ciphers may not work. + +-a :: +Run as a specific user. + +-f :: +Start shadowsocks as a daemon with specific pid file. + +-t :: +Set the socket timeout in seconds. The default value is 60. + +-c :: +Use a configuration file. ++ +Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details. + +-n :: +Specify max number of open files. ++ +Only available on Linux. + +-i :: +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 :: +Specify the local address to use while this client is making outbound +connections to the server. + +-u:: +Enable UDP relay. + +-U:: +Enable UDP relay and disable TCP relay. + +-6:: +Resovle hostname to IPv6 address first. + +-L :: +Specify destination server address and port for local port forwarding. ++ +Only used and available in tunnel mode. + +--mtu :: +Specify the MTU of your network interface. + +--mptcp:: +Enable Multipath TCP. ++ +Only available with MPTCP enabled Linux kernel. + +--reuse-port:: +Enable port reuse. ++ +Only available with Linux kernel > 3.9.0. + +--no-delay:: +Enable TCP_NODELAY. + +--plugin :: +Enable SIP003 plugin. (Experimental) + +--plugin-opts :: +Set SIP003 plugin options. (Experimental) + +-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 diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile new file mode 100644 index 000000000..f6988d48a --- /dev/null +++ b/docker/alpine/Dockerfile @@ -0,0 +1,55 @@ +FROM alpine:3.16 +LABEL maintainer="kev , Sah , vndroid " + +ENV SERVER_ADDR=0.0.0.0 +ENV SERVER_PORT=8388 +ENV PASSWORD= +ENV METHOD=aes-256-gcm +ENV TIMEOUT=300 +ENV DNS_ADDRS="8.8.8.8,8.8.4.4" +ENV TZ=UTC +ENV ARGS= + +COPY . /tmp/repo +RUN set -x \ + # Build environment setup + && apk add --no-cache --virtual .build-deps \ + autoconf \ + automake \ + build-base \ + c-ares-dev \ + libcap \ + libev-dev \ + libtool \ + libsodium-dev \ + linux-headers \ + mbedtls-dev \ + pcre-dev \ + # Build & install + && cd /tmp/repo \ + && ./autogen.sh \ + && ./configure --prefix=/usr/local --disable-documentation \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + && cd /usr/local/bin \ + && ls /usr/local/bin/ss-* | xargs -n1 setcap cap_net_bind_service+ep \ + && strip $(ls /usr/local/bin | grep -Ev 'ss-nat') \ + && apk del .build-deps \ + # Runtime dependencies setup + && apk add --no-cache \ + ca-certificates \ + rng-tools \ + tzdata \ + $(scanelf --needed --nobanner /usr/local/bin/ss-* \ + | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ + | sort -u) \ + && rm -rf /tmp/repo + +COPY ./docker/alpine/entrypoint.sh /usr/local/bin/docker-entrypoint.sh +ENTRYPOINT ["docker-entrypoint.sh"] + +EXPOSE 8388 + +STOPSIGNAL SIGINT + +CMD ["ss-server"] diff --git a/docker/alpine/README.md b/docker/alpine/README.md new file mode 100644 index 000000000..e347997c0 --- /dev/null +++ b/docker/alpine/README.md @@ -0,0 +1,153 @@ +# Shadowsocks-libev Docker Image + +[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. + +Docker images are built for quick deployment in various computing cloud providers. For more information on docker and containerization technologies, refer to [official document][9]. + +## Prepare the host + +Many cloud providers offer docker-ready environments, for instance the [CoreOS Droplet in DigitalOcean][10] or the [Container-Optimized OS in Google Cloud][11]. + +If you need to install docker yourself, follow the [official installation guide][12]. + +## Pull the image + +```bash +$ docker pull shadowsocks/shadowsocks-libev +``` +This pulls the latest release of shadowsocks-libev. + +You can also choose to pull a previous release or to try the bleeding edge build: +```bash +$ docker pull shadowsocks/shadowsocks-libev: +$ docker pull shadowsocks/shadowsocks-libev:edge +``` +> A list of supported tags can be found at [Docker Hub][13]. + +## Start a container + +```bash +$ docker run -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev:latest +``` +This starts a container of the latest release with all the default settings, which is equivalent to +```bash +$ ss-server -s 0.0.0.0 -p 8388 -k "$(hostname)" -m aes-256-gcm -t 300 -d "8.8.8.8,8.8.4.4" -u +``` +> **Note**: It's the hostname in the container that is used as the password, not that of the host. + +### With custom port + +In most cases you'll want to change a thing or two, for instance the port which the server listens on. This is done by changing the `-p` arguments. + +Here's an example to start a container that listens on `28388` (both TCP and UDP): +```bash +$ docker run -p 28388:8388 -p 28388:8388/udp -d --restart always shadowsocks/shadowsocks-libev +``` + +### With custom password + +Another thing you may want to change is the password. To change that, you can pass your own password as an environment variable when starting the container. + +Here's an example to start a container with `9MLSpPmNt` as the password: +```bash +$ docker run -e PASSWORD=9MLSpPmNt -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev +``` +> :warning: Click [here][6] to generate a strong password to protect your server. + +### With password as a mounted file or a Docker secret (swarm only) + +Instead of hardcoding a password to the docker-compose file or `docker run` command, you can mount in a file that contains the password. To do so, pass the path that you mounted to the container as the `PASSWORD_FILE` environment variable. + +If you are running Docker Swarm, you can also utilize Docker secrets. To do so, pass the name of the secret as the `PASSWORD_SECRET` environment variable. If you specify both `PASSWORD_FILE` and `PASSWORD_SECRET`, the latter will take effect. + +This is a sample `docker-compose.yml` file that uses the external Docker secret named `shadowsocks` as the password. + +```yaml +shadowsocks: + image: shadowsocks/shadowsocks-libev + ports: + - "8388:8388" + environment: + - METHOD=aes-256-gcm + - PASSWORD_SECRET=shadowsocks + secrets: + - shadowsocks +``` + +This is a sample `docker service create` command that uses the external Docker secret named `shadowsocks` as the password. + +```bash +docker service create -e PASSWORD_SECRET=shadowsocks -p 8388:8388 -p 8388:8388/udp --secret shadowsocks shadowsocks/shadowsocks-libev +``` + +### With other customizations +Besides `PASSWORD`, the image also defines the following environment variables that you can customize: +* `SERVER_ADDR`: the IP/domain to bind to, defaults to `0.0.0.0` +* `SERVER_ADDR_IPV6`: the IPv6 address to bind to, defaults to `::0` +* `METHOD`: encryption method to use, defaults to `aes-256-gcm` +* `TIMEOUT`: defaults to `300` +* `DNS_ADDRS`: DNS servers to redirect NS lookup requests to, defaults to `8.8.8.8,8.8.4.4` +* `TZ`: Timezone, defaults to `UTC` + +Additional arguments supported by `ss-server` can be passed with the environment variable `ARGS`, for instance to start in verbose mode: +```bash +$ docker run -e ARGS=-v -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev:latest +``` + +## 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 . + +This is a sample `docker-compose.yml` file. + +```yaml +shadowsocks: + image: shadowsocks/shadowsocks-libev + ports: + - "8388:8388" + environment: + - METHOD=aes-256-gcm + - 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-gcm" +} +``` + +[1]: https://github.com/shadowsocks/shadowsocks-libev +[2]: https://shadowsocks.org/en/index.html +[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 +[9]: https://docs.docker.com/ +[10]: https://www.digitalocean.com/products/linux-distribution/coreos/ +[11]: https://cloud.google.com/container-optimized-os/ +[12]: https://docs.docker.com/install/ +[13]: https://hub.docker.com/r/shadowsocks/shadowsocks-libev/tags/ diff --git a/docker/alpine/docker-compose.yml b/docker/alpine/docker-compose.yml new file mode 100644 index 000000000..9f2f99447 --- /dev/null +++ b/docker/alpine/docker-compose.yml @@ -0,0 +1,9 @@ +shadowsocks: + image: shadowsocks/shadowsocks-libev + ports: + - "8388:8388/tcp" + - "8388:8388/udp" + environment: + - METHOD=aes-256-gcm + - PASSWORD=9MLSpPmNt + restart: always diff --git a/docker/alpine/entrypoint.sh b/docker/alpine/entrypoint.sh new file mode 100755 index 000000000..3f62a2cd6 --- /dev/null +++ b/docker/alpine/entrypoint.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +if [ "$1" = "ss-server" ]; then + COREVER=$(uname -r | grep -Eo '[0-9].[0-9]+' | sed -n '1,1p') + CMV=$(echo $COREVER | awk -F '.' '{print $1}') + CSV=$(echo $COREVER | awk -F '.' '{print $2}') + + if [[ -f "$PASSWORD_FILE" ]]; then + PASSWORD=$(cat "$PASSWORD_FILE") + fi + + if [[ -f "/var/run/secrets/$PASSWORD_SECRET" ]]; then + PASSWORD=$(cat "/var/run/secrets/$PASSWORD_SECRET") + fi + + if [[ ! -z "$DNS_ADDRS" ]]; then + DNS="-d $DNS_ADDRS" + fi + + if [ $(echo "$CMV >= 3" | bc) ]; then + if [ $(echo "$CSV > 7" | bc) ]; then + TFO='--fast-open' + fi + fi + RT_ARGS="-s $SERVER_ADDR -p $SERVER_PORT -k ${PASSWORD:-$(hostname)} -m $METHOD -a nobody -t $TIMEOUT -u $DNS $TFO $ARGS" +fi + +exec $@ $RT_ARGS \ No newline at end of file diff --git a/docker/build/builder.Dockerfile b/docker/build/builder.Dockerfile new file mode 100644 index 000000000..a1402c573 --- /dev/null +++ b/docker/build/builder.Dockerfile @@ -0,0 +1,8 @@ +# Alpine with China mirror +FROM alpine +MAINTAINER wener + +# Better for cache and dev +RUN apk add --no-cache --virtual .build-deps \ + alpine-sdk cmake \ + linux-headers libev-dev libsodium-dev mbedtls-static mbedtls-dev pcre-dev udns-dev diff --git a/docker/build/dockerbuild.sh b/docker/build/dockerbuild.sh new file mode 100755 index 000000000..2b61cc600 --- /dev/null +++ b/docker/build/dockerbuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -e +set -o xtrace + +cmake -DBUILD_STATIC=OFF . && make && make install \ No newline at end of file diff --git a/docker/mingw/Dockerfile b/docker/mingw/Dockerfile new file mode 100644 index 000000000..176349839 --- /dev/null +++ b/docker/mingw/Dockerfile @@ -0,0 +1,48 @@ +# +# Dockerfile for building MinGW port +# +# This file is part of the 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. +# +# shadowsocks-libev 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 shadowsocks-libev; see the file COPYING. If not, see +# . +# + +FROM debian:stretch + +ARG REPO=shadowsocks +ARG REV=master + +ADD docker/mingw/apt.sh / + +RUN \ + /bin/bash -c "source /apt.sh && dk_prepare" && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /build + +ADD docker/mingw/prepare.sh / + +RUN /bin/bash -c "source /prepare.sh && dk_download" + +ADD docker/mingw/deps.sh / +RUN /bin/bash -c "source /deps.sh && dk_deps" + +ADD docker/mingw/build.sh / + +ARG REBUILD=0 + +ADD . /build/src/proj + +RUN /bin/bash -c "source /build.sh && dk_build" + +RUN /bin/bash -c "source /build.sh && dk_package" diff --git a/docker/mingw/Makefile b/docker/mingw/Makefile new file mode 100644 index 000000000..6bd35a1a8 --- /dev/null +++ b/docker/mingw/Makefile @@ -0,0 +1,40 @@ +# +# Makefile for building MinGW port +# +# This file is part of the 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. +# +# shadowsocks-libev 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 shadowsocks-libev; see the file COPYING. If not, see +# . +# + +REPO=shadowsocks +REV=master +IMAGE=ss-build-mingw +DIST=ss-libev-win-dist.tar.gz + +all: build + +build: + cd ../../ && docker build -t $(IMAGE) \ + -f docker/mingw/Dockerfile \ + --build-arg REV=$(REV) --build-arg REPO=$(REPO) \ + --build-arg REBUILD="$$(date +%Y-%m-%d-%H-%M-%S)" \ + . + docker run --rm --entrypoint cat $(IMAGE) /bin.tgz > $(DIST) + +clean: + rm -f $(DIST) + docker rmi $(IMAGE) || true + +.PHONY: all clean build diff --git a/docker/mingw/apt.sh b/docker/mingw/apt.sh new file mode 100644 index 000000000..fa2780f6c --- /dev/null +++ b/docker/mingw/apt.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Functions for building MinGW port in Docker +# +# This file is part of the 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. +# +# shadowsocks-libev 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 shadowsocks-libev; see the file COPYING. If not, see +# . +# + +# Exit on error +set -e + +# Build steps + +dk_prepare() { + apt-get update -y + apt-get install --no-install-recommends -y \ + mingw-w64 aria2 git make automake autoconf libtool ca-certificates +} diff --git a/docker/mingw/build.sh b/docker/mingw/build.sh new file mode 100644 index 000000000..8ad6c001d --- /dev/null +++ b/docker/mingw/build.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# +# Functions for building MinGW port in Docker +# +# This file is part of the 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. +# +# shadowsocks-libev 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 shadowsocks-libev; see the file COPYING. If not, see +# . +# + +# Exit on error +set -e + +. /prepare.sh + +build_proj() { + arch=$1 + host=$arch-w64-mingw32 + prefix=${DIST}/$arch + dep=${PREFIX}/$arch + cpu="$(nproc --all)" + + cd "$SRC" + cd proj + + ./autogen.sh + ./configure --host=${host} --prefix=${prefix} \ + --disable-documentation \ + --with-ev="$dep" \ + --with-mbedtls="$dep" \ + --with-sodium="$dep" \ + --with-pcre="$dep" \ + --with-cares="$dep" \ + CFLAGS="-DCARES_STATICLIB -DPCRE_STATIC" + + make clean + make -j$cpu LDFLAGS="-all-static -L${dep}/lib" + make install +} + +dk_build() { + for arch in i686 x86_64; do + build_proj $arch + done +} + +dk_package() { + rm -rf "$BASE/pack" + mkdir -p "$BASE/pack" + cd "$BASE/pack" + mkdir -p ss-libev-${PROJ_REV} + cd ss-libev-${PROJ_REV} + for bin in local server tunnel; do + cp ${DIST}/i686/bin/ss-${bin}.exe ss-${bin}-x86.exe + cp ${DIST}/x86_64/bin/ss-${bin}.exe ss-${bin}-x64.exe + done + cd .. + tar zcf /bin.tgz ss-libev-${PROJ_REV} +} diff --git a/docker/mingw/deps.sh b/docker/mingw/deps.sh new file mode 100644 index 000000000..95884498e --- /dev/null +++ b/docker/mingw/deps.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# +# Functions for building MinGW port in Docker +# +# This file is part of the 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. +# +# shadowsocks-libev 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 shadowsocks-libev; see the file COPYING. If not, see +# . +# + +# Exit on error +set -e + +. /prepare.sh + +build_deps() { + arch=$1 + host=$arch-w64-mingw32 + prefix=${PREFIX}/$arch + args="--host=${host} --prefix=${prefix} --disable-shared --enable-static" + cpu="$(nproc --all)" + + # libev + cd "$SRC/$LIBEV_SRC" + ./configure $args + make clean + make -j$cpu install + + # mbedtls + cd "$SRC/$MBEDTLS_SRC" + make clean + make -j$cpu lib WINDOWS=1 CC="${host}-gcc" AR="${host}-ar" + ## "make install" command from mbedtls + DESTDIR="${prefix}" + mkdir -p "${DESTDIR}"/include/mbedtls + cp -r include/mbedtls "${DESTDIR}"/include + mkdir -p "${DESTDIR}"/lib + cp -RP library/libmbedtls.* "${DESTDIR}"/lib + cp -RP library/libmbedx509.* "${DESTDIR}"/lib + cp -RP library/libmbedcrypto.* "${DESTDIR}"/lib + unset DESTDIR + + # sodium + cd "$SRC/$SODIUM_SRC" + ./autogen.sh + ./configure $args + make clean + make -j$cpu install + + # pcre + cd "$SRC/$PCRE_SRC" + ./configure $args --disable-cpp \ + --enable-unicode-properties + make clean + make -j$cpu install + + # c-ares + cd "$SRC/$CARES_SRC" + ./configure $args + make clean + make -j$cpu install +} + +dk_deps() { + for arch in i686 x86_64; do + build_deps $arch + done +} diff --git a/docker/mingw/make.bat b/docker/mingw/make.bat new file mode 100644 index 000000000..32078473c --- /dev/null +++ b/docker/mingw/make.bat @@ -0,0 +1,13 @@ +@echo off +pushd %~dp0 +set "REPO=shadowsocks" +set "REV=master" +set "PLUGIN=true" +set "IMAGE=ss-build-mingw" +set "DIST=ss-libev-win-dist.tar.gz" +docker build --force-rm -t %IMAGE% ^ + --build-arg REV=%REV% --build-arg REPO=%REPO% ^ + --build-arg REBUILD=%RANDOM% ^ + --build-arg PLUGIN=%PLUGIN% . +docker run --rm --entrypoint cat %IMAGE% /bin.tgz > %DIST% +pause diff --git a/docker/mingw/prepare.sh b/docker/mingw/prepare.sh new file mode 100644 index 000000000..f42900e32 --- /dev/null +++ b/docker/mingw/prepare.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# +# Functions for building MinGW port in Docker +# +# This file is part of the 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. +# +# shadowsocks-libev 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 shadowsocks-libev; see the file COPYING. If not, see +# . +# + +# Exit on error +set -e + +# Build options +BASE="/build" +PREFIX="$BASE/stage" +SRC="$BASE/src" +DIST="$BASE/dist" + +# Project URL +PROJ_SITE=$REPO # Change REPO in Makefile +PROJ_REV=$REV # Change REV in Makefile +PROJ_URL=https://github.com/${PROJ_SITE}/shadowsocks-libev.git + +# Libraries from project + +## libev for MinGW +LIBEV_VER=mingw +LIBEV_SRC=libev-${LIBEV_VER} +LIBEV_URL=https://github.com/${PROJ_SITE}/libev/archive/${LIBEV_VER}.tar.gz + +# Public libraries + +## mbedTLS +MBEDTLS_VER=2.16.5 +MBEDTLS_SRC=mbedtls-${MBEDTLS_VER} +MBEDTLS_URL=https://tls.mbed.org/download/mbedtls-${MBEDTLS_VER}-apache.tgz + +## Sodium +SODIUM_VER=1.0.18 +SODIUM_SRC=libsodium-stable +SODIUM_URL=https://download.libsodium.org/libsodium/releases/libsodium-${SODIUM_VER}-stable.tar.gz + +## PCRE +PCRE_VER=8.44 +PCRE_SRC=pcre-${PCRE_VER} +PCRE_URL=https://ftp.pcre.org/pub/pcre/${PCRE_SRC}.tar.gz + +## c-ares +CARES_VER=1.16.0 +CARES_SRC=c-ares-${CARES_VER} +CARES_URL=https://c-ares.haxx.se/download/${CARES_SRC}.tar.gz + +# Build steps + +dk_download() { + mkdir -p "${SRC}" + cd "${SRC}" + DOWN="aria2c --file-allocation=trunc -s10 -x10 -j10 -c" + for pkg in LIBEV SODIUM MBEDTLS PCRE CARES; do + src=${pkg}_SRC + url=${pkg}_URL + out="${!src}".tar.gz + $DOWN ${!url} -o "${out}" + echo "Unpacking ${out}..." + tar zxf ${out} + done +} diff --git a/install-sh b/install-sh deleted file mode 100755 index a9244eb07..000000000 --- a/install-sh +++ /dev/null @@ -1,527 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2011-01-19.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - # 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-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test 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: diff --git a/libasyncns/Makefile.am b/libasyncns/Makefile.am deleted file mode 100644 index a53ca81b6..000000000 --- a/libasyncns/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# This file is part of libasyncns. -# -# Copyright 2005-2008 Lennart Poettering -# -# libasyncns is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of the -# License, or (at your option) any later version. -# -# libasyncns 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with libasyncns. If not, see -# . - -AM_CFLAGS=-D__EXTENSIONS__ $(PTHREAD_CFLAGS) - -noinst_LTLIBRARIES=libasyncns.la -libasyncns_la_CC=$(PTHREAD_CC) -libasyncns_la_SOURCES=asyncns.c asyncns.h -libasyncns_la_LDFLAGS= -static -libasyncns_la_LIBADD=$(PTHREAD_LIBS) diff --git a/libasyncns/Makefile.in b/libasyncns/Makefile.in deleted file mode 100644 index 46e045725..000000000 --- a/libasyncns/Makefile.in +++ /dev/null @@ -1,531 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ - -# This file is part of libasyncns. -# -# Copyright 2005-2008 Lennart Poettering -# -# libasyncns is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of the -# License, or (at your option) any later version. -# -# libasyncns 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with libasyncns. If not, see -# . - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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 = libasyncns -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.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/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \ - $(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libasyncns_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libasyncns_la_OBJECTS = asyncns.lo -libasyncns_la_OBJECTS = $(am_libasyncns_la_OBJECTS) -libasyncns_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libasyncns_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libasyncns_la_SOURCES) -DIST_SOURCES = $(libasyncns_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -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@ -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@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -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@ -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@ -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@ -acx_pthread_config = @acx_pthread_config@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -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@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CFLAGS = -D__EXTENSIONS__ $(PTHREAD_CFLAGS) -noinst_LTLIBRARIES = libasyncns.la -libasyncns_la_CC = $(PTHREAD_CC) -libasyncns_la_SOURCES = asyncns.c asyncns.h -libasyncns_la_LDFLAGS = -static -libasyncns_la_LIBADD = $(PTHREAD_LIBS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(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 libasyncns/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign libasyncns/Makefile -.PRECIOUS: 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: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(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)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libasyncns.la: $(libasyncns_la_OBJECTS) $(libasyncns_la_DEPENDENCIES) $(EXTRA_libasyncns_la_DEPENDENCIES) - $(libasyncns_la_LINK) $(libasyncns_la_OBJECTS) $(libasyncns_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asyncns.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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 -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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" - -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) - -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 ./$(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 ./$(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 all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags 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 uninstall uninstall-am - - -# 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: diff --git a/libasyncns/asyncns.c b/libasyncns/asyncns.c deleted file mode 100644 index afc880bc2..000000000 --- a/libasyncns/asyncns.c +++ /dev/null @@ -1,1469 +0,0 @@ -/*** - This file is part of libasyncns. - - Copyright 2005-2008 Lennart Poettering - - libasyncns is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 2.1 of the - License, or (at your option) any later version. - - libasyncns 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with libasyncns. If not, see - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* #undef HAVE_PTHREAD */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_SYS_PRCTL_H -#include -#endif - -#if HAVE_PTHREAD -#include -#endif - -#include "asyncns.h" - -#ifndef MSG_NOSIGNAL -#define MSG_NOSIGNAL 0 -#endif - -#define MAX_WORKERS 16 -#define MAX_QUERIES 256 -#define BUFSIZE (10240) - -typedef enum { - REQUEST_ADDRINFO, - RESPONSE_ADDRINFO, - REQUEST_NAMEINFO, - RESPONSE_NAMEINFO, - REQUEST_TERMINATE, - RESPONSE_DIED -} query_type_t; - -enum { - REQUEST_RECV_FD = 0, - REQUEST_SEND_FD = 1, - RESPONSE_RECV_FD = 2, - RESPONSE_SEND_FD = 3, - MESSAGE_FD_MAX = 4 -}; - -struct asyncns { - int fds[4]; - -#ifndef HAVE_PTHREAD - pid_t workers[MAX_WORKERS]; -#else - pthread_t workers[MAX_WORKERS]; -#endif - unsigned valid_workers; - - unsigned current_id, current_index; - asyncns_query_t* queries[MAX_QUERIES]; - - asyncns_query_t *done_head, *done_tail; - - int n_queries; - int dead; -}; - -struct asyncns_query { - asyncns_t *asyncns; - int done; - unsigned id; - query_type_t type; - asyncns_query_t *done_next, *done_prev; - int ret; - int _errno; - int _h_errno; - struct addrinfo *addrinfo; - char *serv, *host; - void *userdata; -}; - -typedef struct rheader { - query_type_t type; - unsigned id; - size_t length; -} rheader_t; - -typedef struct addrinfo_request { - struct rheader header; - int hints_is_null; - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t node_len, service_len; -} addrinfo_request_t; - -typedef struct addrinfo_response { - struct rheader header; - int ret; - int _errno; - int _h_errno; - /* followed by addrinfo_serialization[] */ -} addrinfo_response_t; - -typedef struct addrinfo_serialization { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - size_t canonname_len; - /* Followed by ai_addr amd ai_canonname with variable lengths */ -} addrinfo_serialization_t; - -typedef struct nameinfo_request { - struct rheader header; - int flags; - socklen_t sockaddr_len; - int gethost, getserv; -} nameinfo_request_t; - -typedef struct nameinfo_response { - struct rheader header; - size_t hostlen, servlen; - int ret; - int _errno; - int _h_errno; -} nameinfo_response_t; - -typedef struct res_request { - struct rheader header; - int class; - int type; - size_t dname_len; -} res_request_t; - -typedef struct res_response { - struct rheader header; - int ret; - int _errno; - int _h_errno; -} res_response_t; - -typedef union packet { - rheader_t rheader; - addrinfo_request_t addrinfo_request; - addrinfo_response_t addrinfo_response; - nameinfo_request_t nameinfo_request; - nameinfo_response_t nameinfo_response; - res_request_t res_request; - res_response_t res_response; -} packet_t; - -static char *asyncns_strndup(const char *s, size_t l) { - size_t a; - char *n; - - a = strlen(s); - if (a > l) - a = l; - - if (!(n = malloc(a+1))) - return NULL; - - memcpy(n, s, a); - n[a] = 0; - - return n; -} - -#ifndef HAVE_PTHREAD - -static int close_allv(const int except_fds[]) { - struct rlimit rl; - int fd, maxfd; - -#ifdef __linux__ - - DIR *d; - - assert(except_fds); - - if ((d = opendir("/proc/self/fd"))) { - - struct dirent *de; - - while ((de = readdir(d))) { - int found; - long l; - char *e = NULL; - int i; - - if (de->d_name[0] == '.') - continue; - - errno = 0; - l = strtol(de->d_name, &e, 10); - if (errno != 0 || !e || *e) { - closedir(d); - errno = EINVAL; - return -1; - } - - fd = (int) l; - - if ((long) fd != l) { - closedir(d); - errno = EINVAL; - return -1; - } - - if (fd < 3) - continue; - - if (fd == dirfd(d)) - continue; - - found = 0; - for (i = 0; except_fds[i] >= 0; i++) - if (except_fds[i] == fd) { - found = 1; - break; - } - - if (found) - continue; - - if (close(fd) < 0) { - int saved_errno; - - saved_errno = errno; - closedir(d); - errno = saved_errno; - - return -1; - } - } - - closedir(d); - return 0; - } - -#endif - - if (getrlimit(RLIMIT_NOFILE, &rl) > 0) - maxfd = (int) rl.rlim_max; - else - maxfd = sysconf(_SC_OPEN_MAX); - - for (fd = 3; fd < maxfd; fd++) { - int i, found; - - found = 0; - for (i = 0; except_fds[i] >= 0; i++) - if (except_fds[i] == fd) { - found = 1; - continue; - } - - if (found) - continue; - - if (close(fd) < 0 && errno != EBADF) - return -1; - } - - return 0; -} - -static int reset_sigsv(const int except[]) { - int sig; - assert(except); - - for (sig = 1; sig < NSIG; sig++) { - int reset = 1; - - switch (sig) { - case SIGKILL: - case SIGSTOP: - reset = 0; - break; - - default: { - int i; - - for (i = 0; except[i] > 0; i++) { - if (sig == except[i]) { - reset = 0; - break; - } - } - } - } - - if (reset) { - struct sigaction sa; - - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = SIG_DFL; - - /* On Linux the first two RT signals are reserved by - * glibc, and sigaction() will return EINVAL for them. */ - if ((sigaction(sig, &sa, NULL) < 0)) - if (errno != EINVAL) - return -1; - } - } - - return 0; -} - -static int ignore_sigsv(const int ignore[]) { - int i; - assert(ignore); - - for (i = 0; ignore[i] > 0; i++) { - struct sigaction sa; - - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = SIG_IGN; - - if ((sigaction(ignore[i], &sa, NULL) < 0)) - return -1; - } - - return 0; -} - -#endif - -static int fd_nonblock(int fd) { - int i; - assert(fd >= 0); - - if ((i = fcntl(fd, F_GETFL, 0)) < 0) - return -1; - - if (i & O_NONBLOCK) - return 0; - - return fcntl(fd, F_SETFL, i | O_NONBLOCK); -} - -static int fd_cloexec(int fd) { - int v; - assert(fd >= 0); - - if ((v = fcntl(fd, F_GETFD, 0)) < 0) - return -1; - - if (v & FD_CLOEXEC) - return 0; - - return fcntl(fd, F_SETFD, v | FD_CLOEXEC); -} - -static ssize_t block_and_send(int socket, const void *buffer, - size_t length, int flags) { - for(;;) { - int len = send(socket, buffer, length, flags); - if (len < 0 && - (errno == EAGAIN || errno == EINTR)) { - continue; - } - return length; - } -} - -static int send_died(int out_fd) { - rheader_t rh; - assert(out_fd > 0); - - memset(&rh, 0, sizeof(rh)); - rh.type = RESPONSE_DIED; - rh.id = 0; - rh.length = sizeof(rh); - - return block_and_send(out_fd, &rh, rh.length, MSG_NOSIGNAL); -} - -static void *serialize_addrinfo(void *p, const struct addrinfo *ai, size_t *length, size_t maxlength) { - addrinfo_serialization_t s; - size_t cnl, l; - assert(p); - assert(ai); - assert(length); - assert(*length <= maxlength); - - cnl = (ai->ai_canonname ? strlen(ai->ai_canonname)+1 : 0); - l = sizeof(addrinfo_serialization_t) + ai->ai_addrlen + cnl; - - if (*length + l > maxlength) - return NULL; - - s.ai_flags = ai->ai_flags; - s.ai_family = ai->ai_family; - s.ai_socktype = ai->ai_socktype; - s.ai_protocol = ai->ai_protocol; - s.ai_addrlen = ai->ai_addrlen; - s.canonname_len = cnl; - - memcpy((uint8_t*) p, &s, sizeof(addrinfo_serialization_t)); - memcpy((uint8_t*) p + sizeof(addrinfo_serialization_t), ai->ai_addr, ai->ai_addrlen); - - if (ai->ai_canonname) - strcpy((char*) p + sizeof(addrinfo_serialization_t) + ai->ai_addrlen, ai->ai_canonname); - - *length += l; - return (uint8_t*) p + l; -} - -static int send_addrinfo_reply(int out_fd, unsigned id, int ret, struct addrinfo *ai, int _errno, int _h_errno) { - addrinfo_response_t data[BUFSIZE/sizeof(addrinfo_response_t) + 1]; - addrinfo_response_t *resp = data; - assert(out_fd >= 0); - - memset(data, 0, sizeof(data)); - resp->header.type = RESPONSE_ADDRINFO; - resp->header.id = id; - resp->header.length = sizeof(addrinfo_response_t); - resp->ret = ret; - resp->_errno = _errno; - resp->_h_errno = _h_errno; - - if (ret == 0 && ai) { - void *p = data + 1; - struct addrinfo *k; - - for (k = ai; k; k = k->ai_next) { - - if (!(p = serialize_addrinfo(p, k, &resp->header.length, (char*) data + BUFSIZE - (char*) p))) { - resp->ret = EAI_MEMORY; - break; - } - } - } - - if (ai) - freeaddrinfo(ai); - - return block_and_send(out_fd, resp, resp->header.length, MSG_NOSIGNAL); -} - -static int send_nameinfo_reply(int out_fd, unsigned id, int ret, const char *host, const char *serv, int _errno, int _h_errno) { - nameinfo_response_t data[BUFSIZE/sizeof(nameinfo_response_t) + 1]; - size_t hl, sl; - nameinfo_response_t *resp = data; - - assert(out_fd >= 0); - - sl = serv ? strlen(serv)+1 : 0; - hl = host ? strlen(host)+1 : 0; - - memset(data, 0, sizeof(data)); - resp->header.type = RESPONSE_NAMEINFO; - resp->header.id = id; - resp->header.length = sizeof(nameinfo_response_t) + hl + sl; - resp->ret = ret; - resp->_errno = _errno; - resp->_h_errno = _h_errno; - resp->hostlen = hl; - resp->servlen = sl; - - assert(sizeof(data) >= resp->header.length); - - if (host) - memcpy((uint8_t *)data + sizeof(nameinfo_response_t), host, hl); - - if (serv) - memcpy((uint8_t *)data + sizeof(nameinfo_response_t) + hl, serv, sl); - - return block_and_send(out_fd, resp, resp->header.length, MSG_NOSIGNAL); -} - -static int handle_request(int out_fd, const packet_t *packet, size_t length) { - const rheader_t *req; - assert(out_fd >= 0); - - req = &packet->rheader; - assert(req); - assert(length >= sizeof(rheader_t)); - assert(length == req->length); - - switch (req->type) { - - case REQUEST_ADDRINFO: { - struct addrinfo ai, *result = NULL; - const addrinfo_request_t *ai_req = &packet->addrinfo_request; - const char *node, *service; - int ret; - - assert(length >= sizeof(addrinfo_request_t)); - assert(length == sizeof(addrinfo_request_t) + ai_req->node_len + ai_req->service_len); - - memset(&ai, 0, sizeof(ai)); - ai.ai_flags = ai_req->ai_flags; - ai.ai_family = ai_req->ai_family; - ai.ai_socktype = ai_req->ai_socktype; - ai.ai_protocol = ai_req->ai_protocol; - - node = ai_req->node_len ? (const char*) ai_req + sizeof(addrinfo_request_t) : NULL; - service = ai_req->service_len ? (const char*) ai_req + sizeof(addrinfo_request_t) + ai_req->node_len : NULL; - - ret = getaddrinfo(node, service, - ai_req->hints_is_null ? NULL : &ai, - &result); - - /* send_addrinfo_reply() frees result */ - return send_addrinfo_reply(out_fd, req->id, ret, result, errno, h_errno); - } - - case REQUEST_NAMEINFO: { - int ret; - const nameinfo_request_t *ni_req = &packet->nameinfo_request; - char hostbuf[NI_MAXHOST], servbuf[NI_MAXSERV]; - struct sockaddr_storage sa; - - assert(length >= sizeof(nameinfo_request_t)); - assert(length == sizeof(nameinfo_request_t) + ni_req->sockaddr_len); - - memcpy(&sa, (const uint8_t *) ni_req + sizeof(nameinfo_request_t), ni_req->sockaddr_len); - - ret = getnameinfo((struct sockaddr *)&sa, ni_req->sockaddr_len, - ni_req->gethost ? hostbuf : NULL, ni_req->gethost ? sizeof(hostbuf) : 0, - ni_req->getserv ? servbuf : NULL, ni_req->getserv ? sizeof(servbuf) : 0, - ni_req->flags); - - return send_nameinfo_reply(out_fd, req->id, ret, - ret == 0 && ni_req->gethost ? hostbuf : NULL, - ret == 0 && ni_req->getserv ? servbuf : NULL, - errno, h_errno); - } - - case REQUEST_TERMINATE: - /* Quit */ - return -1; - - default: - ; - } - - return 0; -} - -#ifndef HAVE_PTHREAD - -static int process_worker(int in_fd, int out_fd) { - int have_death_sig = 0; - int good_fds[3]; - int ret = 1; - - const int ignore_sigs[] = { - SIGINT, - SIGHUP, - SIGPIPE, - SIGUSR1, - SIGUSR2, - -1 - }; - - assert(in_fd > 2); - assert(out_fd > 2); - - close(0); - close(1); - close(2); - - if (open("/dev/null", O_RDONLY) != 0) - goto fail; - - if (open("/dev/null", O_WRONLY) != 1) - goto fail; - - if (open("/dev/null", O_WRONLY) != 2) - goto fail; - - if (chdir("/") < 0) - goto fail; - - if (geteuid() == 0) { - struct passwd *pw; - int r; - - if ((pw = getpwnam("nobody"))) { -#ifdef HAVE_SETRESUID - r = setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid); -#elif HAVE_SETREUID - r = setreuid(pw->pw_uid, pw->pw_uid); -#else - if ((r = setuid(pw->pw_uid)) >= 0) - r = seteuid(pw->pw_uid); -#endif - if (r < 0) - goto fail; - } - } - - if (reset_sigsv(ignore_sigs) < 0) - goto fail; - - if (ignore_sigsv(ignore_sigs) < 0) - goto fail; - - good_fds[0] = in_fd; good_fds[1] = out_fd; good_fds[2] = -1; - if (close_allv(good_fds) < 0) - goto fail; - -#ifdef PR_SET_PDEATHSIG - if (prctl(PR_SET_PDEATHSIG, SIGTERM) >= 0) - have_death_sig = 1; -#endif - - if (!have_death_sig) - fd_nonblock(in_fd); - - while (getppid() > 1) { /* if the parent PID is 1 our parent process died. */ - packet_t buf[BUFSIZE/sizeof(packet_t) + 1]; - ssize_t length; - - if (!have_death_sig) { - fd_set fds; - struct timeval tv; - tv.tv_usec = 500000; - tv.tv_sec = 0; - - FD_ZERO(&fds); - FD_SET(in_fd, &fds); - - if (select(in_fd+1, &fds, NULL, NULL, &tv) < 0) - break; - - if (getppid() == 1) - break; - } - - if ((length = recv(in_fd, buf, sizeof(buf), 0)) <= 0) { - - if (length < 0 && - (errno == EAGAIN || errno == EINTR)) - continue; - - break; - } - - if (handle_request(out_fd, buf, (size_t) length) < 0) - break; - } - - ret = 0; - -fail: - send_died(out_fd); - - return ret; -} - -#else - -static void* thread_worker(void *p) { - asyncns_t *asyncns = p; - sigset_t fullset; - int in_fd = asyncns->fds[REQUEST_RECV_FD]; - - /* No signals in this thread please */ - sigfillset(&fullset); - pthread_sigmask(SIG_BLOCK, &fullset, NULL); - - fd_nonblock(in_fd); - - while (!asyncns->dead) { - packet_t buf[BUFSIZE/sizeof(packet_t) + 1]; - ssize_t length; - - if ((length = recv(in_fd, buf, sizeof(buf), 0)) <= 0) { - - if (!asyncns->dead) { - fd_set fds; - struct timeval tv; - tv.tv_usec = 500000; - tv.tv_sec = 0; - - FD_ZERO(&fds); - FD_SET(in_fd, &fds); - - if (select(in_fd+1, &fds, NULL, NULL, &tv) < 0) { - if (errno == EAGAIN || errno == EINTR) { - continue; - } else { - perror("error on select"); - break; - } - } - } - - if (length < 0 && - (errno == EAGAIN || errno == EINTR)) { - continue; - } - - break; - } - - if (asyncns->dead) - break; - - if (handle_request(asyncns->fds[RESPONSE_SEND_FD], buf, (size_t) length) < 0) - break; - } - - send_died(asyncns->fds[RESPONSE_SEND_FD]); - - return NULL; -} - -#endif - -asyncns_t* asyncns_new(unsigned n_proc) { - asyncns_t *asyncns = NULL; - int i; - assert(n_proc >= 1); - - if (n_proc > MAX_WORKERS) - n_proc = MAX_WORKERS; - - if (!(asyncns = malloc(sizeof(asyncns_t)))) { - errno = ENOMEM; - goto fail; - } - - asyncns->dead = 0; - asyncns->valid_workers = 0; - - for (i = 0; i < MESSAGE_FD_MAX; i++) - asyncns->fds[i] = -1; - - memset(asyncns->queries, 0, sizeof(asyncns->queries)); - - if (socketpair(PF_UNIX, SOCK_DGRAM, 0, asyncns->fds) < 0 || - socketpair(PF_UNIX, SOCK_DGRAM, 0, asyncns->fds+2) < 0) - goto fail; - - for (i = 0; i < MESSAGE_FD_MAX; i++) - fd_cloexec(asyncns->fds[i]); - - for (asyncns->valid_workers = 0; asyncns->valid_workers < n_proc; asyncns->valid_workers++) { - -#ifndef HAVE_PTHREAD - if ((asyncns->workers[asyncns->valid_workers] = fork()) < 0) - goto fail; - else if (asyncns->workers[asyncns->valid_workers] == 0) { - int ret; - - close(asyncns->fds[REQUEST_SEND_FD]); - close(asyncns->fds[RESPONSE_RECV_FD]); - ret = process_worker(asyncns->fds[REQUEST_RECV_FD], asyncns->fds[RESPONSE_SEND_FD]); - close(asyncns->fds[REQUEST_RECV_FD]); - close(asyncns->fds[RESPONSE_SEND_FD]); - _exit(ret); - } -#else - int r; - - if ((r = pthread_create(&asyncns->workers[asyncns->valid_workers], NULL, thread_worker, asyncns)) != 0) { - errno = r; - goto fail; - } -#endif - } - -#ifndef HAVE_PTHREAD - close(asyncns->fds[REQUEST_RECV_FD]); - close(asyncns->fds[RESPONSE_SEND_FD]); - asyncns->fds[REQUEST_RECV_FD] = asyncns->fds[RESPONSE_SEND_FD] = -1; -#endif - - asyncns->current_index = asyncns->current_id = 0; - asyncns->done_head = asyncns->done_tail = NULL; - asyncns->n_queries = 0; - - fd_nonblock(asyncns->fds[RESPONSE_RECV_FD]); - - return asyncns; - -fail: - if (asyncns) - asyncns_free(asyncns); - - return NULL; -} - -void asyncns_free(asyncns_t *asyncns) { - int i; - int saved_errno = errno; - unsigned p; - - assert(asyncns); - - asyncns->dead = 1; - - if (asyncns->fds[REQUEST_SEND_FD] >= 0) { - rheader_t req; - - memset(&req, 0, sizeof(req)); - req.type = REQUEST_TERMINATE; - req.length = sizeof(req); - req.id = 0; - - /* Send one termination packet for each worker */ - for (p = 0; p < asyncns->valid_workers; p++) - send(asyncns->fds[REQUEST_SEND_FD], &req, req.length, MSG_NOSIGNAL); - } - - /* Now terminate them and wait until they are gone. */ - for (p = 0; p < asyncns->valid_workers; p++) { -#ifndef HAVE_PTHREAD - kill(asyncns->workers[p], SIGTERM); - for (;;) { - if (waitpid(asyncns->workers[p], NULL, 0) >= 0 || errno != EINTR) - break; - } -#else - for (;;) { - if (pthread_join(asyncns->workers[p], NULL) != EINTR) - break; - } -#endif - } - - /* Close all communication channels */ - for (i = 0; i < MESSAGE_FD_MAX; i++) - if (asyncns->fds[i] >= 0) - close(asyncns->fds[i]); - - for (p = 0; p < MAX_QUERIES; p++) - if (asyncns->queries[p]) - asyncns_cancel(asyncns, asyncns->queries[p]); - - free(asyncns); - - errno = saved_errno; -} - -int asyncns_fd(asyncns_t *asyncns) { - assert(asyncns); - - return asyncns->fds[RESPONSE_RECV_FD]; -} - -static asyncns_query_t *lookup_query(asyncns_t *asyncns, unsigned id) { - asyncns_query_t *q; - assert(asyncns); - - if ((q = asyncns->queries[id % MAX_QUERIES])) - if (q->id == id) - return q; - - return NULL; -} - -static void complete_query(asyncns_t *asyncns, asyncns_query_t *q) { - assert(asyncns); - assert(q); - assert(!q->done); - - q->done = 1; - - if ((q->done_prev = asyncns->done_tail)) - asyncns->done_tail->done_next = q; - else - asyncns->done_head = q; - - asyncns->done_tail = q; - q->done_next = NULL; -} - -static const void *unserialize_addrinfo(const void *p, struct addrinfo **ret_ai, size_t *length) { - addrinfo_serialization_t s; - size_t l; - struct addrinfo *ai; - assert(p); - assert(ret_ai); - assert(length); - - if (*length < sizeof(addrinfo_serialization_t)) - return NULL; - - memcpy(&s, p, sizeof(s)); - - l = sizeof(addrinfo_serialization_t) + s.ai_addrlen + s.canonname_len; - if (*length < l) - return NULL; - - if (!(ai = malloc(sizeof(struct addrinfo)))) - goto fail; - - ai->ai_addr = NULL; - ai->ai_canonname = NULL; - ai->ai_next = NULL; - - if (s.ai_addrlen && !(ai->ai_addr = malloc(s.ai_addrlen))) - goto fail; - - if (s.canonname_len && !(ai->ai_canonname = malloc(s.canonname_len))) - goto fail; - - ai->ai_flags = s.ai_flags; - ai->ai_family = s.ai_family; - ai->ai_socktype = s.ai_socktype; - ai->ai_protocol = s.ai_protocol; - ai->ai_addrlen = s.ai_addrlen; - - if (ai->ai_addr) - memcpy(ai->ai_addr, (const uint8_t*) p + sizeof(addrinfo_serialization_t), s.ai_addrlen); - - if (ai->ai_canonname) - memcpy(ai->ai_canonname, (const uint8_t*) p + sizeof(addrinfo_serialization_t) + s.ai_addrlen, s.canonname_len); - - *length -= l; - *ret_ai = ai; - - return (const uint8_t*) p + l; - - -fail: - if (ai) - asyncns_freeaddrinfo(ai); - - return NULL; -} - -static int handle_response(asyncns_t *asyncns, const packet_t *packet, size_t length) { - const rheader_t *resp; - asyncns_query_t *q; - - assert(asyncns); - - resp = &packet->rheader; - assert(resp); - assert(length >= sizeof(rheader_t)); - assert(length == resp->length); - - if (resp->type == RESPONSE_DIED) { - asyncns->dead = 1; - return 0; - } - - if (!(q = lookup_query(asyncns, resp->id))) - return 0; - - switch (resp->type) { - case RESPONSE_ADDRINFO: { - const addrinfo_response_t *ai_resp = &packet->addrinfo_response; - const void *p; - size_t l; - struct addrinfo *prev = NULL; - - assert(length >= sizeof(addrinfo_response_t)); - assert(q->type == REQUEST_ADDRINFO); - - q->ret = ai_resp->ret; - q->_errno = ai_resp->_errno; - q->_h_errno = ai_resp->_h_errno; - l = length - sizeof(addrinfo_response_t); - p = (const uint8_t*) resp + sizeof(addrinfo_response_t); - - while (l > 0 && p) { - struct addrinfo *ai = NULL; - p = unserialize_addrinfo(p, &ai, &l); - - if (!p || !ai) { - q->ret = EAI_MEMORY; - break; - } - - if (prev) - prev->ai_next = ai; - else - q->addrinfo = ai; - - prev = ai; - } - - complete_query(asyncns, q); - break; - } - - case RESPONSE_NAMEINFO: { - const nameinfo_response_t *ni_resp = &packet->nameinfo_response; - - assert(length >= sizeof(nameinfo_response_t)); - assert(q->type == REQUEST_NAMEINFO); - - q->ret = ni_resp->ret; - q->_errno = ni_resp->_errno; - q->_h_errno = ni_resp->_h_errno; - - if (ni_resp->hostlen) - if (!(q->host = asyncns_strndup((const char*) ni_resp + sizeof(nameinfo_response_t), ni_resp->hostlen-1))) - q->ret = EAI_MEMORY; - - if (ni_resp->servlen) - if (!(q->serv = asyncns_strndup((const char*) ni_resp + sizeof(nameinfo_response_t) + ni_resp->hostlen, ni_resp->servlen-1))) - q->ret = EAI_MEMORY; - - complete_query(asyncns, q); - break; - } - - default: - ; - } - - return 0; -} - -int asyncns_handle(asyncns_t *asyncns) { - assert(asyncns); - - if (asyncns->dead) { - errno = ECHILD; - return ASYNCNS_HANDLE_ERROR; - } - - packet_t buf[BUFSIZE/sizeof(packet_t) + 1]; - ssize_t l; - - if (((l = recv(asyncns->fds[RESPONSE_RECV_FD], buf, sizeof(buf), 0)) < 0)) { - if (errno != EAGAIN) - return ASYNCNS_HANDLE_ERROR; - else - return ASYNCNS_HANDLE_AGAIN; - } - - if (handle_response(asyncns, buf, (size_t) l) < 0) - return ASYNCNS_HANDLE_ERROR; - - return ASYNCNS_HANDLE_SUCCESS; -} - -int asyncns_wait(asyncns_t *asyncns, int block) { - int handled = 0; - assert(asyncns); - - for (;;) { - packet_t buf[BUFSIZE/sizeof(packet_t) + 1]; - ssize_t l; - - if (asyncns->dead) { - errno = ECHILD; - return -1; - } - - if (((l = recv(asyncns->fds[RESPONSE_RECV_FD], buf, sizeof(buf), 0)) < 0)) { - fd_set fds; - - if (errno != EAGAIN) - return -1; - - if (!block || handled) - return 0; - - FD_ZERO(&fds); - FD_SET(asyncns->fds[RESPONSE_RECV_FD], &fds); - - if (select(asyncns->fds[RESPONSE_RECV_FD]+1, &fds, NULL, NULL, NULL) < 0) - return -1; - - continue; - } - - if (handle_response(asyncns, buf, (size_t) l) < 0) - return -1; - - handled = 1; - } -} - -static asyncns_query_t *alloc_query(asyncns_t *asyncns) { - asyncns_query_t *q; - assert(asyncns); - - if (asyncns->n_queries >= MAX_QUERIES) { - errno = ENOMEM; - return NULL; - } - - while (asyncns->queries[asyncns->current_index]) { - - asyncns->current_index++; - asyncns->current_id++; - - while (asyncns->current_index >= MAX_QUERIES) - asyncns->current_index -= MAX_QUERIES; - } - - if (!(q = asyncns->queries[asyncns->current_index] = malloc(sizeof(asyncns_query_t)))) { - errno = ENOMEM; - return NULL; - } - - asyncns->n_queries++; - - q->asyncns = asyncns; - q->done = 0; - q->id = asyncns->current_id; - q->done_next = q->done_prev = NULL; - q->ret = 0; - q->_errno = 0; - q->_h_errno = 0; - q->addrinfo = NULL; - q->userdata = NULL; - q->host = q->serv = NULL; - - return q; -} - -asyncns_query_t* asyncns_getaddrinfo(asyncns_t *asyncns, const char *node, const char *service, const struct addrinfo *hints) { - addrinfo_request_t data[BUFSIZE/sizeof(addrinfo_request_t) + 1]; - addrinfo_request_t *req = data; - asyncns_query_t *q; - assert(asyncns); - assert(node || service); - - if (asyncns->dead) { - errno = ECHILD; - return NULL; - } - - if (!(q = alloc_query(asyncns))) - return NULL; - - memset(req, 0, sizeof(addrinfo_request_t)); - - req->node_len = node ? strlen(node)+1 : 0; - req->service_len = service ? strlen(service)+1 : 0; - - req->header.id = q->id; - req->header.type = q->type = REQUEST_ADDRINFO; - req->header.length = sizeof(addrinfo_request_t) + req->node_len + req->service_len; - - if (req->header.length > BUFSIZE) { - errno = ENOMEM; - goto fail; - } - - if (!(req->hints_is_null = !hints)) { - req->ai_flags = hints->ai_flags; - req->ai_family = hints->ai_family; - req->ai_socktype = hints->ai_socktype; - req->ai_protocol = hints->ai_protocol; - } - - if (node) - strcpy((char*) req + sizeof(addrinfo_request_t), node); - - if (service) - strcpy((char*) req + sizeof(addrinfo_request_t) + req->node_len, service); - - if (send(asyncns->fds[REQUEST_SEND_FD], req, req->header.length, MSG_NOSIGNAL) < 0) - goto fail; - - return q; - -fail: - if (q) - asyncns_cancel(asyncns, q); - - return NULL; -} - -int asyncns_getaddrinfo_done(asyncns_t *asyncns, asyncns_query_t* q, struct addrinfo **ret_res) { - int ret; - assert(asyncns); - assert(q); - assert(q->asyncns == asyncns); - assert(q->type == REQUEST_ADDRINFO); - - if (asyncns->dead) { - errno = ECHILD; - return EAI_SYSTEM; - } - - if (!q->done) - return EAI_AGAIN; - - *ret_res = q->addrinfo; - q->addrinfo = NULL; - - ret = q->ret; - - if (ret == EAI_SYSTEM) - errno = q->_errno; - - if (ret != 0) - h_errno = q->_h_errno; - - asyncns_cancel(asyncns, q); - - return ret; -} - -asyncns_query_t* asyncns_getnameinfo(asyncns_t *asyncns, const struct sockaddr *sa, socklen_t salen, int flags, int gethost, int getserv) { - nameinfo_request_t data[BUFSIZE/sizeof(nameinfo_request_t) + 1]; - nameinfo_request_t *req = data; - asyncns_query_t *q; - - assert(asyncns); - assert(sa); - assert(salen > 0); - - if (asyncns->dead) { - errno = ECHILD; - return NULL; - } - - if (!(q = alloc_query(asyncns))) - return NULL; - - memset(req, 0, sizeof(nameinfo_request_t)); - - req->header.id = q->id; - req->header.type = q->type = REQUEST_NAMEINFO; - req->header.length = sizeof(nameinfo_request_t) + salen; - - if (req->header.length > BUFSIZE) { - errno = ENOMEM; - goto fail; - } - - req->flags = flags; - req->sockaddr_len = salen; - req->gethost = gethost; - req->getserv = getserv; - - memcpy((uint8_t*) req + sizeof(nameinfo_request_t), sa, salen); - - if (send(asyncns->fds[REQUEST_SEND_FD], req, req->header.length, MSG_NOSIGNAL) < 0) - goto fail; - - return q; - -fail: - if (q) - asyncns_cancel(asyncns, q); - - return NULL; -} - -int asyncns_getnameinfo_done(asyncns_t *asyncns, asyncns_query_t* q, char *ret_host, size_t hostlen, char *ret_serv, size_t servlen) { - int ret; - assert(asyncns); - assert(q); - assert(q->asyncns == asyncns); - assert(q->type == REQUEST_NAMEINFO); - assert(!ret_host || hostlen); - assert(!ret_serv || servlen); - - if (asyncns->dead) { - errno = ECHILD; - return EAI_SYSTEM; - } - - if (!q->done) - return EAI_AGAIN; - - if (ret_host && q->host) { - strncpy(ret_host, q->host, hostlen); - ret_host[hostlen-1] = 0; - } - - if (ret_serv && q->serv) { - strncpy(ret_serv, q->serv, servlen); - ret_serv[servlen-1] = 0; - } - - ret = q->ret; - - if (ret == EAI_SYSTEM) - errno = q->_errno; - - if (ret != 0) - h_errno = q->_h_errno; - - asyncns_cancel(asyncns, q); - - return ret; -} - -static asyncns_query_t * asyncns_res(asyncns_t *asyncns, query_type_t qtype, const char *dname, int class, int type) { - res_request_t data[BUFSIZE/sizeof(res_request_t) + 1]; - res_request_t *req = data; - asyncns_query_t *q; - - assert(asyncns); - assert(dname); - - if (asyncns->dead) { - errno = ECHILD; - return NULL; - } - - if (!(q = alloc_query(asyncns))) - return NULL; - - memset(req, 0, sizeof(res_request_t)); - - req->dname_len = strlen(dname) + 1; - - req->header.id = q->id; - req->header.type = q->type = qtype; - req->header.length = sizeof(res_request_t) + req->dname_len; - - if (req->header.length > BUFSIZE) { - errno = ENOMEM; - goto fail; - } - - req->class = class; - req->type = type; - - strcpy((char*) req + sizeof(res_request_t), dname); - - if (send(asyncns->fds[REQUEST_SEND_FD], req, req->header.length, MSG_NOSIGNAL) < 0) - goto fail; - - return q; - -fail: - if (q) - asyncns_cancel(asyncns, q); - - return NULL; -} - -asyncns_query_t* asyncns_getnext(asyncns_t *asyncns) { - assert(asyncns); - return asyncns->done_head; -} - -int asyncns_getnqueries(asyncns_t *asyncns) { - assert(asyncns); - return asyncns->n_queries; -} - -void asyncns_cancel(asyncns_t *asyncns, asyncns_query_t* q) { - int i; - int saved_errno = errno; - - assert(asyncns); - assert(q); - assert(q->asyncns == asyncns); - assert(asyncns->n_queries > 0); - - if (q->done) { - - if (q->done_prev) - q->done_prev->done_next = q->done_next; - else - asyncns->done_head = q->done_next; - - if (q->done_next) - q->done_next->done_prev = q->done_prev; - else - asyncns->done_tail = q->done_prev; - } - - i = q->id % MAX_QUERIES; - assert(asyncns->queries[i] == q); - asyncns->queries[i] = NULL; - - asyncns_freeaddrinfo(q->addrinfo); - free(q->host); - free(q->serv); - - asyncns->n_queries--; - free(q); - - errno = saved_errno; -} - -void asyncns_freeaddrinfo(struct addrinfo *ai) { - int saved_errno = errno; - - while (ai) { - struct addrinfo *next = ai->ai_next; - - free(ai->ai_addr); - free(ai->ai_canonname); - free(ai); - - ai = next; - } - - errno = saved_errno; -} - -void asyncns_freeanswer(unsigned char *answer) { - int saved_errno = errno; - - if (!answer) - return; - - /* Please note that this function is new in libasyncns 0.4. In - * older versions you were supposed to free the answer directly - * with free(). Hence, if this function is changed to do more than - * just a simple free() this must be considered ABI/API breakage! */ - - free(answer); - - errno = saved_errno; -} - -int asyncns_isdone(asyncns_t *asyncns, asyncns_query_t*q) { - assert(asyncns); - assert(q); - assert(q->asyncns == asyncns); - - return q->done; -} - -void asyncns_setuserdata(asyncns_t *asyncns, asyncns_query_t *q, void *userdata) { - assert(q); - assert(asyncns); - assert(q->asyncns = asyncns); - - q->userdata = userdata; -} - -void* asyncns_getuserdata(asyncns_t *asyncns, asyncns_query_t *q) { - assert(q); - assert(asyncns); - assert(q->asyncns = asyncns); - - return q->userdata; -} diff --git a/libasyncns/asyncns.h b/libasyncns/asyncns.h deleted file mode 100644 index 607a7b53f..000000000 --- a/libasyncns/asyncns.h +++ /dev/null @@ -1,152 +0,0 @@ -#ifndef fooasyncnshfoo -#define fooasyncnshfoo - -/*** - This file is part of libasyncns. - - Copyright 2005-2008 Lennart Poettering - - libasyncns is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 2.1 of the - License, or (at your option) any later version. - - libasyncns 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with libasyncns. If not, see - . -***/ - -#include -#include -#include - -/** \mainpage - * - * \section moo Method of operation - * - * To use libasyncns allocate an asyncns_t object with - * asyncns_new(). This will spawn a number of worker threads (or processes, depending on what is available) which - * are subsequently used to process the queries the controlling - * program issues via asyncns_getaddrinfo() and - * asyncns_getnameinfo(). Use asyncns_free() to shut down the worker - * threads/processes. - * - * Since libasyncns may fork off new processes you have to make sure that - * your program is not irritated by spurious SIGCHLD signals. - */ - -/** \example asyncns-test.c - * An example program */ - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - ASYNCNS_HANDLE_ERROR = -1, - ASYNCNS_HANDLE_AGAIN = 0, - ASYNCNS_HANDLE_SUCCESS = 1, -}; - -/** An opaque libasyncns session structure */ -typedef struct asyncns asyncns_t; - -/** An opaque libasyncns query structure */ -typedef struct asyncns_query asyncns_query_t; - -/** Allocate a new libasyncns session with n_proc worker processes/threads */ -asyncns_t* asyncns_new(unsigned n_proc); - -/** Free a libasyncns session. This destroys all attached - * asyncns_query_t objects automatically */ -void asyncns_free(asyncns_t *asyncns); - -/** Return the UNIX file descriptor to select() for readability - * on. Use this function to integrate libasyncns with your custom main - * loop. */ -int asyncns_fd(asyncns_t *asyncns); - -/** Process pending responses. If return ASYNCNS_HANDLE_SUCCESS, you can - * get the next completed query object(s) using asyncns_getnext(). */ -int asyncns_handle(asyncns_t *asyncns); - -/** Process pending responses. After this function is called you can - * get the next completed query object(s) using asyncns_getnext(). If - * block is non-zero wait until at least one response has been - * processed. If block is zero, process all pending responses and - * return. */ -int asyncns_wait(asyncns_t *asyncns, int block); - -/** Issue a name to address query on the specified session. The - * arguments are compatible with the ones of libc's - * getaddrinfo(3). The function returns a new query object. When the - * query is completed you may retrieve the results using - * asyncns_getaddrinfo_done().*/ -asyncns_query_t* asyncns_getaddrinfo(asyncns_t *asyncns, const char *node, const char *service, const struct addrinfo *hints); - -/** Retrieve the results of a preceding asyncns_getaddrinfo() - * call. Returns a addrinfo structure and a return value compatible - * with libc's getaddrinfo(3). The query object q is destroyed by this - * call and may not be used any further. Make sure to free the - * returned addrinfo structure with asyncns_freeaddrinfo() and not - * libc's freeaddrinfo(3)! If the query is not completed yet EAI_AGAIN - * is returned.*/ -int asyncns_getaddrinfo_done(asyncns_t *asyncns, asyncns_query_t* q, struct addrinfo **ret_res); - -/** Issue an address to name query on the specified session. The - * arguments are compatible with the ones of libc's - * getnameinfo(3). The function returns a new query object. When the - * query is completed you may retrieve the results using - * asyncns_getnameinfo_done(). Set gethost (resp. getserv) to non-zero - * if you want to query the hostname (resp. the service name). */ -asyncns_query_t* asyncns_getnameinfo(asyncns_t *asyncns, const struct sockaddr *sa, socklen_t salen, int flags, int gethost, int getserv); - -/** Retrieve the results of a preceding asyncns_getnameinfo() - * call. Returns the hostname and the service name in ret_host and - * ret_serv. The query object q is destroyed by this call and may not - * be used any further. If the query is not completed yet EAI_AGAIN is - * returned. */ -int asyncns_getnameinfo_done(asyncns_t *asyncns, asyncns_query_t* q, char *ret_host, size_t hostlen, char *ret_serv, size_t servlen); - -/** Return the next completed query object. If no query has been - * completed yet, return NULL. Please note that you need to run - * asyncns_wait() before this function will return sensible data. */ -asyncns_query_t* asyncns_getnext(asyncns_t *asyncns); - -/** Return the number of query objects (completed or not) attached to - * this session */ -int asyncns_getnqueries(asyncns_t *asyncns); - -/** Cancel a currently running query. q is is destroyed by this call - * and may not be used any futher. */ -void asyncns_cancel(asyncns_t *asyncns, asyncns_query_t* q); - -/** Free the addrinfo structure as returned by - * asyncns_getaddrinfo_done(). Make sure to use this functions instead - * of the libc's freeaddrinfo()! */ -void asyncns_freeaddrinfo(struct addrinfo *ai); - -/** Free the answer data as returned by asyncns_res_done().*/ -void asyncns_freeanswer(unsigned char *answer); - -/** Returns non-zero when the query operation specified by q has been completed */ -int asyncns_isdone(asyncns_t *asyncns, asyncns_query_t*q); - -/** Assign some opaque userdata with a query object */ -void asyncns_setuserdata(asyncns_t *asyncns, asyncns_query_t *q, void *userdata); - -/** Return userdata assigned to a query object. Use - * asyncns_setuserdata() to set this data. If no data has been set - * prior to this call it returns NULL. */ -void* asyncns_getuserdata(asyncns_t *asyncns, asyncns_query_t *q); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libbloom b/libbloom new file mode 160000 index 000000000..437e1add5 --- /dev/null +++ b/libbloom @@ -0,0 +1 @@ +Subproject commit 437e1add5a2b9a87797d8c648df7cf5f3ee155a8 diff --git a/libcork b/libcork new file mode 160000 index 000000000..074e074b2 --- /dev/null +++ b/libcork @@ -0,0 +1 @@ +Subproject commit 074e074b26e9e372e90e6ade215217763c8644aa diff --git a/libcork/COPYING b/libcork/COPYING deleted file mode 100644 index fb0120303..000000000 --- a/libcork/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -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. diff --git a/libcork/Makefile.am b/libcork/Makefile.am deleted file mode 100644 index a4c45df85..000000000 --- a/libcork/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# This file is part of libasyncns. -# -# Copyright 2005-2008 Lennart Poettering -# -# libasyncns is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of the -# License, or (at your option) any later version. -# -# libasyncns 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with libasyncns. If not, see -# . - -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 diff --git a/libcork/Makefile.in b/libcork/Makefile.in deleted file mode 100644 index 7d72be2fe..000000000 --- a/libcork/Makefile.in +++ /dev/null @@ -1,904 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ - -# This file is part of libasyncns. -# -# Copyright 2005-2008 Lennart Poettering -# -# libasyncns is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 2.1 of the -# License, or (at your option) any later version. -# -# libasyncns 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with libasyncns. If not, see -# . - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.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/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \ - $(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -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) -libcork_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcork_la_CFLAGS) \ - $(CFLAGS) $(libcork_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -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 -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -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@ -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@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -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@ -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@ -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@ -acx_pthread_config = @acx_pthread_config@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -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@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -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: $(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 -.PRECIOUS: 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: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(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)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -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) - $(libcork_la_LINK) $(libcork_la_OBJECTS) $(libcork_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f cli/libcork_la-commands.$(OBJEXT) - -rm -f cli/libcork_la-commands.lo - -rm -f core/libcork_la-allocator.$(OBJEXT) - -rm -f core/libcork_la-allocator.lo - -rm -f core/libcork_la-error.$(OBJEXT) - -rm -f core/libcork_la-error.lo - -rm -f core/libcork_la-gc.$(OBJEXT) - -rm -f core/libcork_la-gc.lo - -rm -f core/libcork_la-hash.$(OBJEXT) - -rm -f core/libcork_la-hash.lo - -rm -f core/libcork_la-ip-address.$(OBJEXT) - -rm -f core/libcork_la-ip-address.lo - -rm -f core/libcork_la-mempool.$(OBJEXT) - -rm -f core/libcork_la-mempool.lo - -rm -f core/libcork_la-timestamp.$(OBJEXT) - -rm -f core/libcork_la-timestamp.lo - -rm -f core/libcork_la-u128.$(OBJEXT) - -rm -f core/libcork_la-u128.lo - -rm -f ds/libcork_la-array.$(OBJEXT) - -rm -f ds/libcork_la-array.lo - -rm -f ds/libcork_la-bitset.$(OBJEXT) - -rm -f ds/libcork_la-bitset.lo - -rm -f ds/libcork_la-buffer.$(OBJEXT) - -rm -f ds/libcork_la-buffer.lo - -rm -f ds/libcork_la-dllist.$(OBJEXT) - -rm -f ds/libcork_la-dllist.lo - -rm -f ds/libcork_la-file-stream.$(OBJEXT) - -rm -f ds/libcork_la-file-stream.lo - -rm -f ds/libcork_la-hash-table.$(OBJEXT) - -rm -f ds/libcork_la-hash-table.lo - -rm -f ds/libcork_la-managed-buffer.$(OBJEXT) - -rm -f ds/libcork_la-managed-buffer.lo - -rm -f ds/libcork_la-ring-buffer.$(OBJEXT) - -rm -f ds/libcork_la-ring-buffer.lo - -rm -f ds/libcork_la-slice.$(OBJEXT) - -rm -f ds/libcork_la-slice.lo - -rm -f posix/libcork_la-directory-walker.$(OBJEXT) - -rm -f posix/libcork_la-directory-walker.lo - -rm -f posix/libcork_la-env.$(OBJEXT) - -rm -f posix/libcork_la-env.lo - -rm -f posix/libcork_la-exec.$(OBJEXT) - -rm -f posix/libcork_la-exec.lo - -rm -f posix/libcork_la-files.$(OBJEXT) - -rm -f posix/libcork_la-files.lo - -rm -f posix/libcork_la-process.$(OBJEXT) - -rm -f posix/libcork_la-process.lo - -rm -f posix/libcork_la-subprocess.$(OBJEXT) - -rm -f posix/libcork_la-subprocess.lo - -rm -f pthreads/libcork_la-thread.$(OBJEXT) - -rm -f pthreads/libcork_la-thread.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@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -cli/libcork_la-commands.lo: cli/commands.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --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__mv) cli/$(DEPDIR)/libcork_la-commands.Tpo cli/$(DEPDIR)/libcork_la-commands.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-allocator.Tpo core/$(DEPDIR)/libcork_la-allocator.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-error.Tpo core/$(DEPDIR)/libcork_la-error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-gc.Tpo core/$(DEPDIR)/libcork_la-gc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-hash.Tpo core/$(DEPDIR)/libcork_la-hash.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-ip-address.Tpo core/$(DEPDIR)/libcork_la-ip-address.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-mempool.Tpo core/$(DEPDIR)/libcork_la-mempool.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-timestamp.Tpo core/$(DEPDIR)/libcork_la-timestamp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) core/$(DEPDIR)/libcork_la-u128.Tpo core/$(DEPDIR)/libcork_la-u128.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-array.Tpo ds/$(DEPDIR)/libcork_la-array.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-bitset.Tpo ds/$(DEPDIR)/libcork_la-bitset.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-buffer.Tpo ds/$(DEPDIR)/libcork_la-buffer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-dllist.Tpo ds/$(DEPDIR)/libcork_la-dllist.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-file-stream.Tpo ds/$(DEPDIR)/libcork_la-file-stream.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-hash-table.Tpo ds/$(DEPDIR)/libcork_la-hash-table.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-managed-buffer.Tpo ds/$(DEPDIR)/libcork_la-managed-buffer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-ring-buffer.Tpo ds/$(DEPDIR)/libcork_la-ring-buffer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) ds/$(DEPDIR)/libcork_la-slice.Tpo ds/$(DEPDIR)/libcork_la-slice.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) posix/$(DEPDIR)/libcork_la-directory-walker.Tpo posix/$(DEPDIR)/libcork_la-directory-walker.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) posix/$(DEPDIR)/libcork_la-env.Tpo posix/$(DEPDIR)/libcork_la-env.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) posix/$(DEPDIR)/libcork_la-exec.Tpo posix/$(DEPDIR)/libcork_la-exec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) posix/$(DEPDIR)/libcork_la-files.Tpo posix/$(DEPDIR)/libcork_la-files.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) posix/$(DEPDIR)/libcork_la-process.Tpo posix/$(DEPDIR)/libcork_la-process.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) posix/$(DEPDIR)/libcork_la-subprocess.Tpo posix/$(DEPDIR)/libcork_la-subprocess.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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@ $(LIBTOOL) --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__mv) pthreads/$(DEPDIR)/libcork_la-thread.Tpo pthreads/$(DEPDIR)/libcork_la-thread.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ 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@ $(LIBTOOL) --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: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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 -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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" - -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 all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags 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 uninstall uninstall-am - - -# 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: diff --git a/libcork/README.markdown b/libcork/README.markdown deleted file mode 100644 index 7942ae366..000000000 --- a/libcork/README.markdown +++ /dev/null @@ -1,65 +0,0 @@ -# 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. diff --git a/libcork/cli/commands.c b/libcork/cli/commands.c deleted file mode 100644 index f56207651..000000000 --- a/libcork/cli/commands.c +++ /dev/null @@ -1,225 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include - -#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 []\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 []\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 []\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; -} diff --git a/libcork/core/allocator.c b/libcork/core/allocator.c deleted file mode 100644 index 9bfb15d9c..000000000 --- a/libcork/core/allocator.c +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include - -#include "libcork/core/allocator.h" -#include "libcork/core/attributes.h" -#include "libcork/core/error.h" -#include "libcork/core/types.h" - - -/*----------------------------------------------------------------------- - * reallocf - */ - -#if !CORK_HAVE_REALLOCF -void * -cork_xrealloc(void *ptr, size_t new_size) -{ - void *result = realloc(ptr, new_size); - if (result == NULL) { - free(ptr); - } - return result; -} -#endif - - -/*----------------------------------------------------------------------- - * Allocating strings - */ - -static inline const char * -strndup_internal(const char *str, size_t len) -{ - size_t allocated_size = len + sizeof(size_t) + 1; - size_t *new_str = malloc(allocated_size); - if (new_str == NULL) { - return NULL; - } - - *new_str = allocated_size; - char *dest = (char *) (void *) (new_str + 1); - strncpy(dest, str, len); - dest[len] = '\0'; - return dest; -} - -const char * -cork_xstrndup(const char *str, size_t len) -{ - return strndup_internal(str, len); -} - -const char * -cork_xstrdup(const char *str) -{ - return strndup_internal(str, strlen(str)); -} - - -void -cork_strfree(const char *str) -{ - size_t *base = ((size_t *) str) - 1; - free(base); -} - - -/*----------------------------------------------------------------------- - * Abort on failure - */ - -void * -cork_malloc(size_t size) -{ - void *result = cork_xmalloc(size); - if (CORK_UNLIKELY(result == NULL)) { - abort(); - } - return result; -} - -void * -cork_calloc(size_t count, size_t size) -{ - void *result = cork_xcalloc(count, size); - if (CORK_UNLIKELY(result == NULL)) { - abort(); - } - return result; -} - -void * -cork_realloc(void *ptr, size_t new_size) -{ - void *result = cork_xrealloc(ptr, new_size); - if (CORK_UNLIKELY(result == NULL)) { - abort(); - } - return result; -} - -const char * -cork_strdup(const char *src) -{ - const char *result = cork_xstrdup(src); - if (CORK_UNLIKELY(result == NULL)) { - abort(); - } - return result; -} - -const char * -cork_strndup(const char *src, size_t size) -{ - const char *result = cork_xstrndup(src, size); - if (CORK_UNLIKELY(result == NULL)) { - abort(); - } - return result; -} diff --git a/libcork/core/error.c b/libcork/core/error.c deleted file mode 100644 index 323d28f42..000000000 --- a/libcork/core/error.c +++ /dev/null @@ -1,246 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include -#include - -#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); - free(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); -} diff --git a/libcork/core/gc.c b/libcork/core/gc.c deleted file mode 100644 index 4230685a7..000000000 --- a/libcork/core/gc.c +++ /dev/null @@ -1,407 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include - -#include "libcork/config/config.h" -#include "libcork/core/allocator.h" -#include "libcork/core/gc.h" -#include "libcork/core/types.h" -#include "libcork/ds/dllist.h" -#include "libcork/threads/basics.h" - - -#if !defined(CORK_DEBUG_GC) -#define CORK_DEBUG_GC 0 -#endif - -#if CORK_DEBUG_GC -#include -#define DEBUG(...) fprintf(stderr, __VA_ARGS__) -#else -#define DEBUG(...) /* no debug messages */ -#endif - - -/*----------------------------------------------------------------------- - * GC context life cycle - */ - -#define ROOTS_SIZE 1024 - -/* An internal structure allocated with every garbage-collected object. */ -struct cork_gc_header; - -/* A garbage collector context. */ -struct cork_gc { - /* The number of used entries in roots. */ - size_t root_count; - /* The possible roots of garbage cycles */ - struct cork_gc_header *roots[ROOTS_SIZE]; -}; - -cork_tls(struct cork_gc, cork_gc); - -static void -cork_gc_collect_cycles(struct cork_gc *gc); - - -/*----------------------------------------------------------------------- - * Garbage collection functions - */ - -struct cork_gc_header { - /* The current reference count for this object, along with its color - * during the mark/sweep process. */ - volatile int ref_count_color; - - /* The allocated size of this garbage-collected object (including - * the header). */ - size_t allocated_size; - - /* The garbage collection interface for this object. */ - struct cork_gc_obj_iface *iface; -}; - -/* - * Structure of ref_count_color: - * - * +-----+---+---+---+---+---+ - * | ... | 4 | 3 | 2 | 1 | 0 | - * +-----+---+---+---+---+---+ - * ref_count | color - * | - * buffered --/ - */ - -#define cork_gc_ref_count_color(count, buffered, color) \ - (((count) << 3) | ((buffered) << 2) | (color)) - -#define cork_gc_get_ref_count(hdr) \ - ((hdr)->ref_count_color >> 3) - -#define cork_gc_inc_ref_count(hdr) \ - do { \ - (hdr)->ref_count_color += (1 << 3); \ - } while (0) - -#define cork_gc_dec_ref_count(hdr) \ - do { \ - (hdr)->ref_count_color -= (1 << 3); \ - } while (0) - -#define cork_gc_get_color(hdr) \ - ((hdr)->ref_count_color & 0x3) - -#define cork_gc_set_color(hdr, color) \ - do { \ - (hdr)->ref_count_color = \ - ((hdr)->ref_count_color & ~0x3) | (color & 0x3); \ - } while (0) - -#define cork_gc_get_buffered(hdr) \ - (((hdr)->ref_count_color & 0x4) != 0) - -#define cork_gc_set_buffered(hdr, buffered) \ - do { \ - (hdr)->ref_count_color = \ - ((hdr)->ref_count_color & ~0x4) | (((buffered) & 1) << 2); \ - } while (0) - -#define cork_gc_free(hdr) \ - do { \ - if ((hdr)->iface->free != NULL) { \ - (hdr)->iface->free(cork_gc_get_object((hdr))); \ - } \ - free((hdr)); \ - } while (0) - -#define cork_gc_recurse(gc, hdr, recurser) \ - do { \ - if ((hdr)->iface->recurse != NULL) { \ - (hdr)->iface->recurse \ - ((gc), cork_gc_get_object((hdr)), (recurser), NULL); \ - } \ - } while (0) - -enum cork_gc_color { - /* In use or free */ - GC_BLACK = 0, - /* Possible member of garbage cycle */ - GC_GRAY = 1, - /* Member of garbage cycle */ - GC_WHITE = 2, - /* Possible root of garbage cycle */ - GC_PURPLE = 3 -}; - -#define cork_gc_get_header(obj) \ - (((struct cork_gc_header *) (obj)) - 1) - -#define cork_gc_get_object(hdr) \ - ((void *) (((struct cork_gc_header *) (hdr)) + 1)) - - -void -cork_gc_init(void) -{ - cork_gc_get(); -} - -void -cork_gc_done(void) -{ - cork_gc_collect_cycles(cork_gc_get()); -} - -void * -cork_gc_alloc(size_t instance_size, struct cork_gc_obj_iface *iface) -{ - size_t full_size = instance_size + sizeof(struct cork_gc_header); - DEBUG("Allocating %zu (%zu) bytes\n", instance_size, full_size); - struct cork_gc_header *header = cork_malloc(full_size); - DEBUG(" Result is %p[%p]\n", cork_gc_get_object(header), header); - header->ref_count_color = cork_gc_ref_count_color(1, false, GC_BLACK); - header->allocated_size = full_size; - header->iface = iface; - return cork_gc_get_object(header); -} - -void * -cork_gc_incref(void *obj) -{ - if (obj != NULL) { - struct cork_gc_header *header = cork_gc_get_header(obj); - cork_gc_inc_ref_count(header); - DEBUG("Incrementing %p -> %d\n", - obj, cork_gc_get_ref_count(header)); - cork_gc_set_color(header, GC_BLACK); - } - return obj; -} - -static void -cork_gc_decref_step(struct cork_gc *gc, void *obj, void *ud); - -static void -cork_gc_release(struct cork_gc *gc, struct cork_gc_header *header) -{ - cork_gc_recurse(gc, header, cork_gc_decref_step); - cork_gc_set_color(header, GC_BLACK); - if (!cork_gc_get_buffered(header)) { - cork_gc_free(header); - } -} - -static void -cork_gc_possible_root(struct cork_gc *gc, struct cork_gc_header *header) -{ - if (cork_gc_get_color(header) != GC_PURPLE) { - DEBUG(" Possible garbage cycle root\n"); - cork_gc_set_color(header, GC_PURPLE); - if (!cork_gc_get_buffered(header)) { - cork_gc_set_buffered(header, true); - if (gc->root_count >= ROOTS_SIZE) { - cork_gc_collect_cycles(gc); - } - gc->roots[gc->root_count++] = header; - } - } else { - DEBUG(" Already marked as possible garbage cycle root\n"); - } -} - -static void -cork_gc_decref_step(struct cork_gc *gc, void *obj, void *ud) -{ - if (obj != NULL) { - struct cork_gc_header *header = cork_gc_get_header(obj); - cork_gc_dec_ref_count(header); - DEBUG("Decrementing %p -> %d\n", - obj, cork_gc_get_ref_count(header)); - if (cork_gc_get_ref_count(header) == 0) { - DEBUG(" Releasing %p\n", header); - cork_gc_release(gc, header); - } else { - cork_gc_possible_root(gc, header); - } - } -} - -void -cork_gc_decref(void *obj) -{ - if (obj != NULL) { - struct cork_gc *gc = cork_gc_get(); - struct cork_gc_header *header = cork_gc_get_header(obj); - cork_gc_dec_ref_count(header); - DEBUG("Decrementing %p -> %d\n", - obj, cork_gc_get_ref_count(header)); - if (cork_gc_get_ref_count(header) == 0) { - DEBUG(" Releasing %p\n", header); - cork_gc_release(gc, header); - } else { - cork_gc_possible_root(gc, header); - } - } -} - - -static void -cork_gc_mark_gray_step(struct cork_gc *gc, void *obj, void *ud); - -static void -cork_gc_mark_gray(struct cork_gc *gc, struct cork_gc_header *header) -{ - if (cork_gc_get_color(header) != GC_GRAY) { - DEBUG(" Setting color to gray\n"); - cork_gc_set_color(header, GC_GRAY); - cork_gc_recurse(gc, header, cork_gc_mark_gray_step); - } -} - -static void -cork_gc_mark_gray_step(struct cork_gc *gc, void *obj, void *ud) -{ - if (obj != NULL) { - DEBUG(" cork_gc_mark_gray(%p)\n", obj); - struct cork_gc_header *header = cork_gc_get_header(obj); - cork_gc_dec_ref_count(header); - DEBUG(" Reference count now %d\n", cork_gc_get_ref_count(header)); - cork_gc_mark_gray(gc, header); - } -} - -static void -cork_gc_mark_roots(struct cork_gc *gc) -{ - size_t i; - for (i = 0; i < gc->root_count; i++) { - struct cork_gc_header *header = gc->roots[i]; - if (cork_gc_get_color(header) == GC_PURPLE) { - DEBUG(" Checking possible garbage cycle root %p\n", - cork_gc_get_object(header)); - DEBUG(" cork_gc_mark_gray(%p)\n", - cork_gc_get_object(header)); - cork_gc_mark_gray(gc, header); - } else { - DEBUG(" Possible garbage cycle root %p already checked\n", - cork_gc_get_object(header)); - cork_gc_set_buffered(header, false); - gc->roots[i] = NULL; - if (cork_gc_get_color(header) == GC_BLACK && - cork_gc_get_ref_count(header) == 0) { - DEBUG(" Freeing %p\n", header); - cork_gc_free(header); - } - } - } -} - -static void -cork_gc_scan_black_step(struct cork_gc *gc, void *obj, void *ud); - -static void -cork_gc_scan_black(struct cork_gc *gc, struct cork_gc_header *header) -{ - DEBUG(" Setting color of %p to BLACK\n", - cork_gc_get_object(header)); - cork_gc_set_color(header, GC_BLACK); - cork_gc_recurse(gc, header, cork_gc_scan_black_step); -} - -static void -cork_gc_scan_black_step(struct cork_gc *gc, void *obj, void *ud) -{ - if (obj != NULL) { - struct cork_gc_header *header = cork_gc_get_header(obj); - cork_gc_inc_ref_count(header); - DEBUG(" Increasing reference count %p -> %d\n", - obj, cork_gc_get_ref_count(header)); - if (cork_gc_get_color(header) != GC_BLACK) { - cork_gc_scan_black(gc, header); - } - } -} - -static void -cork_gc_scan(struct cork_gc *gc, void *obj, void *ud) -{ - if (obj != NULL) { - DEBUG(" Scanning possible garbage cycle entry %p\n", obj); - struct cork_gc_header *header = cork_gc_get_header(obj); - if (cork_gc_get_color(header) == GC_GRAY) { - if (cork_gc_get_ref_count(header) > 0) { - DEBUG(" Remaining references; can't be a cycle\n"); - cork_gc_scan_black(gc, header); - } else { - DEBUG(" Definitely a garbage cycle\n"); - cork_gc_set_color(header, GC_WHITE); - cork_gc_recurse(gc, header, cork_gc_scan); - } - } else { - DEBUG(" Already checked\n"); - } - } -} - -static void -cork_gc_scan_roots(struct cork_gc *gc) -{ - size_t i; - for (i = 0; i < gc->root_count; i++) { - if (gc->roots[i] != NULL) { - void *obj = cork_gc_get_object(gc->roots[i]); - cork_gc_scan(gc, obj, NULL); - } - } -} - -static void -cork_gc_collect_white(struct cork_gc *gc, void *obj, void *ud) -{ - if (obj != NULL) { - struct cork_gc_header *header = cork_gc_get_header(obj); - if (cork_gc_get_color(header) == GC_WHITE && - !cork_gc_get_buffered(header)) { - DEBUG(" Releasing %p\n", obj); - cork_gc_set_color(header, GC_BLACK); - cork_gc_recurse(gc, header, cork_gc_collect_white); - DEBUG(" Freeing %p\n", header); - cork_gc_free(header); - } - } -} - -static void -cork_gc_collect_roots(struct cork_gc *gc) -{ - size_t i; - for (i = 0; i < gc->root_count; i++) { - if (gc->roots[i] != NULL) { - struct cork_gc_header *header = gc->roots[i]; - void *obj = cork_gc_get_object(header); - cork_gc_set_buffered(header, false); - DEBUG("Collecting cycles from garbage root %p\n", obj); - cork_gc_collect_white(gc, obj, NULL); - gc->roots[i] = NULL; - } - } - gc->root_count = 0; -} - -static void -cork_gc_collect_cycles(struct cork_gc *gc) -{ - DEBUG("Collecting garbage cycles\n"); - cork_gc_mark_roots(gc); - cork_gc_scan_roots(gc); - cork_gc_collect_roots(gc); -} diff --git a/libcork/core/hash.c b/libcork/core/hash.c deleted file mode 100644 index 79b582489..000000000 --- a/libcork/core/hash.c +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#define CORK_HASH_ATTRIBUTES CORK_API - -#include "libcork/core/hash.h" -#include "libcork/core/types.h" - -/* All of the following functions will be defined for us by libcork/core/hash.h: - * cork_hash_buffer - * cork_big_hash_buffer - * cork_stable_hash_buffer - */ diff --git a/libcork/core/ip-address.c b/libcork/core/ip-address.c deleted file mode 100644 index 2e3930b93..000000000 --- a/libcork/core/ip-address.c +++ /dev/null @@ -1,529 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include -#include - -#include "libcork/core/byte-order.h" -#include "libcork/core/error.h" -#include "libcork/core/net-addresses.h" -#include "libcork/core/types.h" - -#ifndef CORK_IP_ADDRESS_DEBUG -#define CORK_IP_ADDRESS_DEBUG 0 -#endif - -#if CORK_IP_ADDRESS_DEBUG -#include -#define DEBUG(...) \ - do { \ - fprintf(stderr, __VA_ARGS__); \ - } while (0) -#else -#define DEBUG(...) /* nothing */ -#endif - - -/*----------------------------------------------------------------------- - * IP addresses - */ - -/*** IPv4 ***/ - -static inline const char * -cork_ipv4_parse(struct cork_ipv4 *addr, const char *str) -{ - const char *ch; - bool seen_digit_in_octet = false; - unsigned int octets = 0; - unsigned int digit = 0; - uint8_t result[4]; - - for (ch = str; *ch != '\0'; ch++) { - DEBUG("%2u: %c\t", (unsigned int) (ch-str), *ch); - switch (*ch) { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - seen_digit_in_octet = true; - digit *= 10; - digit += (*ch - '0'); - DEBUG("digit = %u\n", digit); - if (CORK_UNLIKELY(digit > 255)) { - DEBUG("\t"); - goto parse_error; - } - break; - - case '.': - /* If this would be the fourth octet, it can't have a trailing - * period. */ - if (CORK_UNLIKELY(octets == 3)) { - goto parse_error; - } - DEBUG("octet %u = %u\n", octets, digit); - result[octets] = digit; - digit = 0; - octets++; - seen_digit_in_octet = false; - break; - - default: - /* Any other character is a parse error. */ - goto parse_error; - } - } - - /* If we have a valid octet at the end, and that would be the fourth octet, - * then we've got a valid final parse. */ - DEBUG("%2u:\t", (unsigned int) (ch-str)); - if (CORK_LIKELY(seen_digit_in_octet && octets == 3)) { -#if CORK_IP_ADDRESS_DEBUG - char parsed_ipv4[CORK_IPV4_STRING_LENGTH]; -#endif - DEBUG("octet %u = %u\n", octets, digit); - result[octets] = digit; - cork_ipv4_copy(addr, result); -#if CORK_IP_ADDRESS_DEBUG - cork_ipv4_to_raw_string(addr, parsed_ipv4); - DEBUG("\tParsed address: %s\n", parsed_ipv4); -#endif - return ch; - } - -parse_error: - DEBUG("parse error\n"); - cork_parse_error("Invalid IPv4 address: \"%s\"", str); - return NULL; -} - -int -cork_ipv4_init(struct cork_ipv4 *addr, const char *str) -{ - return cork_ipv4_parse(addr, str) == NULL? -1: 0; -} - -bool -cork_ipv4_equal_(const struct cork_ipv4 *addr1, const struct cork_ipv4 *addr2) -{ - return cork_ipv4_equal(addr1, addr2); -} - -void -cork_ipv4_to_raw_string(const struct cork_ipv4 *addr, char *dest) -{ - snprintf(dest, CORK_IPV4_STRING_LENGTH, "%u.%u.%u.%u", - addr->_.u8[0], addr->_.u8[1], addr->_.u8[2], addr->_.u8[3]); -} - -bool -cork_ipv4_is_valid_network(const struct cork_ipv4 *addr, - unsigned int cidr_prefix) -{ - uint32_t cidr_mask; - - if (cidr_prefix > 32) { - return false; - } else if (cidr_prefix == 32) { - /* This handles undefined behavior for overflow bit shifts. */ - cidr_mask = 0; - } else { - cidr_mask = 0xffffffff >> cidr_prefix; - } - - return (CORK_UINT32_BIG_TO_HOST(addr->_.u32) & cidr_mask) == 0; -} - -/*** IPv6 ***/ - -int -cork_ipv6_init(struct cork_ipv6 *addr, const char *str) -{ - const char *ch; - - uint16_t digit = 0; - unsigned int before_count = 0; - uint16_t before_double_colon[8]; - uint16_t after_double_colon[8]; - uint16_t *dest = before_double_colon; - - unsigned int digits_seen = 0; - unsigned int hextets_seen = 0; - bool another_required = true; - bool digit_allowed = true; - bool colon_allowed = true; - bool double_colon_allowed = true; - bool just_saw_colon = false; - - for (ch = str; *ch != '\0'; ch++) { - DEBUG("%2u: %c\t", (unsigned int) (ch-str), *ch); - switch (*ch) { -#define process_digit(base) \ - /* Make sure a digit is allowed here. */ \ - if (CORK_UNLIKELY(!digit_allowed)) { \ - goto parse_error; \ - } \ - /* If we've already seen 4 digits, it's a parse error. */ \ - if (CORK_UNLIKELY(digits_seen == 4)) { \ - goto parse_error; \ - } \ - \ - digits_seen++; \ - colon_allowed = true; \ - just_saw_colon = false; \ - digit <<= 4; \ - digit |= (*ch - (base)); \ - DEBUG("digit = %04x\n", digit); - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - process_digit('0'); - break; - - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - process_digit('a'-10); - break; - - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - process_digit('A'-10); - break; - -#undef process_digit - - case ':': - /* We can only see a colon immediately after a hextet or as part - * of a double-colon. */ - if (CORK_UNLIKELY(!colon_allowed)) { - goto parse_error; - } - - /* If this is a double-colon, start parsing hextets into our - * second array. */ - if (just_saw_colon) { - DEBUG("double-colon\n"); - colon_allowed = false; - digit_allowed = true; - another_required = false; - double_colon_allowed = false; - before_count = hextets_seen; - dest = after_double_colon; - continue; - } - - /* If this would end the eighth hextet (regardless of the - * placement of a double-colon), then there can't be a trailing - * colon. */ - if (CORK_UNLIKELY(hextets_seen == 8)) { - goto parse_error; - } - - /* If this is the very beginning of the string, then we can only - * have a double-colon, not a single colon. */ - if (digits_seen == 0 && hextets_seen == 0) { - DEBUG("initial colon\n"); - colon_allowed = true; - digit_allowed = false; - just_saw_colon = true; - another_required = true; - continue; - } - - /* Otherwise this ends the current hextet. */ - DEBUG("hextet %u = %04x\n", hextets_seen, digit); - *(dest++) = CORK_UINT16_HOST_TO_BIG(digit); - digit = 0; - hextets_seen++; - digits_seen = 0; - colon_allowed = double_colon_allowed; - just_saw_colon = true; - another_required = true; - break; - - case '.': - { - /* If we see a period, then we must be in the middle of an IPv4 - * address at the end of the IPv6 address. */ - struct cork_ipv4 *ipv4 = (struct cork_ipv4 *) dest; - DEBUG("Detected IPv4 address %s\n", ch-digits_seen); - - /* Ensure that we have space for the two hextets that the IPv4 - * address will take up. */ - if (CORK_UNLIKELY(hextets_seen >= 7)) { - goto parse_error; - } - - /* Parse the IPv4 address directly into our current hextet - * buffer. */ - ch = cork_ipv4_parse(ipv4, ch - digits_seen); - if (CORK_LIKELY(ch != NULL)) { - hextets_seen += 2; - digits_seen = 0; - another_required = false; - - /* ch now points at the NUL terminator, but we're about to - * increment ch. */ - ch--; - break; - } - - /* The IPv4 parse failed, so we have an IPv6 parse error. */ - goto parse_error; - } - - default: - /* Any other character is a parse error. */ - goto parse_error; - } - } - - /* If we have a valid hextet at the end, and we've either seen a - * double-colon, or we have eight hextets in total, then we've got a valid - * final parse. */ - DEBUG("%2u:\t", (unsigned int) (ch-str)); - if (CORK_LIKELY(digits_seen > 0)) { - DEBUG("hextet %u = %04x\n\t", hextets_seen, digit); - *(dest++) = CORK_UINT16_HOST_TO_BIG(digit); - hextets_seen++; - } else if (CORK_UNLIKELY(another_required)) { - goto parse_error; - } - - if (!double_colon_allowed) { - /* We've seen a double-colon, so use 0000 for any hextets that weren't - * present. */ -#if CORK_IP_ADDRESS_DEBUG - char parsed_result[CORK_IPV6_STRING_LENGTH]; -#endif - unsigned int after_count = hextets_seen - before_count; - DEBUG("Saw double-colon; %u hextets before, %u after\n", - before_count, after_count); - memset(addr, 0, sizeof(struct cork_ipv6)); - memcpy(addr, before_double_colon, - sizeof(uint16_t) * before_count); - memcpy(&addr->_.u16[8-after_count], after_double_colon, - sizeof(uint16_t) * after_count); -#if CORK_IP_ADDRESS_DEBUG - cork_ipv6_to_raw_string(addr, parsed_result); - DEBUG("\tParsed address: %s\n", parsed_result); -#endif - return 0; - } else if (hextets_seen == 8) { - /* No double-colon, so we must have exactly eight hextets. */ -#if CORK_IP_ADDRESS_DEBUG - char parsed_result[CORK_IPV6_STRING_LENGTH]; -#endif - DEBUG("No double-colon\n"); - cork_ipv6_copy(addr, before_double_colon); -#if CORK_IP_ADDRESS_DEBUG - cork_ipv6_to_raw_string(addr, parsed_result); - DEBUG("\tParsed address: %s\n", parsed_result); -#endif - return 0; - } - -parse_error: - DEBUG("parse error\n"); - cork_parse_error("Invalid IPv6 address: \"%s\"", str); - return -1; -} - -bool -cork_ipv6_equal_(const struct cork_ipv6 *addr1, const struct cork_ipv6 *addr2) -{ - return cork_ipv6_equal(addr1, addr2); -} - -#define NS_IN6ADDRSZ 16 -#define NS_INT16SZ 2 - -void -cork_ipv6_to_raw_string(const struct cork_ipv6 *addr, char *dest) -{ - const uint8_t *src = addr->_.u8; - - /* - * Note that int32_t and int16_t need only be "at least" large enough - * to contain a value of the specified size. On some systems, like - * Crays, there is no such thing as an integer variable with 16 bits. - * Keep this in mind if you think this function should have been coded - * to use pointer overlays. All the world's not a VAX. - */ - char *tp; - struct { int base, len; } best, cur; - unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ]; - int i; - - /* - * Preprocess: - * Copy the input (bytewise) array into a wordwise array. - * Find the longest run of 0x00's in src[] for :: shorthanding. - */ - memset(words, '\0', sizeof words); - for (i = 0; i < NS_IN6ADDRSZ; i++) - words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); - best.base = -1; - best.len = 0; - cur.base = -1; - cur.len = 0; - for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { - if (words[i] == 0) { - if (cur.base == -1) - cur.base = i, cur.len = 1; - else - cur.len++; - } else { - if (cur.base != -1) { - if (best.base == -1 || cur.len > best.len) - best = cur; - cur.base = -1; - } - } - } - if (cur.base != -1) { - if (best.base == -1 || cur.len > best.len) - best = cur; - } - if (best.base != -1 && best.len < 2) - best.base = -1; - - /* - * Format the result. - */ - tp = dest; - for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { - /* Are we inside the best run of 0x00's? */ - if (best.base != -1 && i >= best.base && - i < (best.base + best.len)) { - if (i == best.base) - *tp++ = ':'; - continue; - } - /* Are we following an initial run of 0x00s or any real hex? */ - if (i != 0) - *tp++ = ':'; - /* Is this address an encapsulated IPv4? */ - if (i == 6 && best.base == 0 && - (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { - tp += sprintf(tp, "%u.%u.%u.%u", - src[12], src[13], src[14], src[15]); - break; - } - tp += sprintf(tp, "%x", words[i]); - } - /* Was it a trailing run of 0x00's? */ - if (best.base != -1 && (best.base + best.len) == - (NS_IN6ADDRSZ / NS_INT16SZ)) - *tp++ = ':'; - *tp++ = '\0'; -} - -bool -cork_ipv6_is_valid_network(const struct cork_ipv6 *addr, - unsigned int cidr_prefix) -{ - uint64_t cidr_mask[2]; - - if (cidr_prefix > 128) { - return false; - } else if (cidr_prefix == 128) { - /* This handles undefined behavior for overflow bit shifts. */ - cidr_mask[0] = cidr_mask[1] = 0; - } else if (cidr_prefix == 64) { - /* This handles undefined behavior for overflow bit shifts. */ - cidr_mask[0] = 0; - cidr_mask[1] = UINT64_C(0xffffffffffffffff); - } else if (cidr_prefix > 64) { - cidr_mask[0] = 0; - cidr_mask[1] = UINT64_C(0xffffffffffffffff) >> (cidr_prefix-64); - } else { - cidr_mask[0] = UINT64_C(0xffffffffffffffff) >> cidr_prefix; - cidr_mask[1] = UINT64_C(0xffffffffffffffff); - } - - return (CORK_UINT64_BIG_TO_HOST(addr->_.u64[0] & cidr_mask[0]) == 0) && - (CORK_UINT64_BIG_TO_HOST(addr->_.u64[1] & cidr_mask[1]) == 0); -} - - -/*** IP ***/ - -void -cork_ip_from_ipv4_(struct cork_ip *addr, const void *src) -{ - cork_ip_from_ipv4(addr, src); -} - -void -cork_ip_from_ipv6_(struct cork_ip *addr, const void *src) -{ - cork_ip_from_ipv6(addr, src); -} - -int -cork_ip_init(struct cork_ip *addr, const char *str) -{ - int rc; - - /* Try IPv4 first */ - rc = cork_ipv4_init(&addr->ip.v4, str); - if (rc == 0) { - /* successful parse */ - addr->version = 4; - return 0; - } - - /* Then try IPv6 */ - cork_error_clear(); - rc = cork_ipv6_init(&addr->ip.v6, str); - if (rc == 0) { - /* successful parse */ - addr->version = 6; - return 0; - } - - /* Parse error for both address types */ - cork_parse_error("Invalid IP address: \"%s\"", str); - return -1; -} - -bool -cork_ip_equal_(const struct cork_ip *addr1, const struct cork_ip *addr2) -{ - return cork_ip_equal(addr1, addr2); -} - -void -cork_ip_to_raw_string(const struct cork_ip *addr, char *dest) -{ - switch (addr->version) { - case 4: - cork_ipv4_to_raw_string(&addr->ip.v4, dest); - return; - - case 6: - cork_ipv6_to_raw_string(&addr->ip.v6, dest); - return; - - default: - strncpy(dest, "", CORK_IP_STRING_LENGTH); - return; - } -} - -bool -cork_ip_is_valid_network(const struct cork_ip *addr, unsigned int cidr_prefix) -{ - switch (addr->version) { - case 4: - return cork_ipv4_is_valid_network(&addr->ip.v4, cidr_prefix); - case 6: - return cork_ipv6_is_valid_network(&addr->ip.v6, cidr_prefix); - default: - return false; - } -} diff --git a/libcork/core/mempool.c b/libcork/core/mempool.c deleted file mode 100644 index 38f5d0cf7..000000000 --- a/libcork/core/mempool.c +++ /dev/null @@ -1,179 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include -#include - -#include "libcork/core/callbacks.h" -#include "libcork/core/mempool.h" -#include "libcork/core/types.h" -#include "libcork/helpers/errors.h" - - -#if !defined(CORK_DEBUG_MEMPOOL) -#define CORK_DEBUG_MEMPOOL 0 -#endif - -#if CORK_DEBUG_MEMPOOL -#include -#define DEBUG(...) fprintf(stderr, __VA_ARGS__) -#else -#define DEBUG(...) /* no debug messages */ -#endif - - - -struct cork_mempool { - size_t element_size; - size_t block_size; - struct cork_mempool_object *free_list; - /* The number of objects that have been given out by - * cork_mempool_new but not returned via cork_mempool_free. */ - size_t allocated_count; - struct cork_mempool_block *blocks; - - void *user_data; - cork_free_f free_user_data; - cork_init_f init_object; - cork_done_f done_object; -}; - -struct cork_mempool_object { - /* When this object is unclaimed, it will be in the cork_mempool - * object's free_list using this pointer. */ - struct cork_mempool_object *next_free; -}; - -struct cork_mempool_block { - struct cork_mempool_block *next_block; -}; - -#define cork_mempool_object_size(mp) \ - (sizeof(struct cork_mempool_object) + (mp)->element_size) - -#define cork_mempool_get_header(obj) \ - (((struct cork_mempool_object *) (obj)) - 1) - -#define cork_mempool_get_object(hdr) \ - ((void *) (((struct cork_mempool_object *) (hdr)) + 1)) - - -struct cork_mempool * -cork_mempool_new_size_ex(size_t element_size, size_t block_size) -{ - struct cork_mempool *mp = cork_new(struct cork_mempool); - mp->element_size = element_size; - mp->block_size = block_size; - mp->free_list = NULL; - mp->allocated_count = 0; - mp->blocks = NULL; - mp->user_data = NULL; - mp->free_user_data = NULL; - mp->init_object = NULL; - mp->done_object = NULL; - return mp; -} - -void -cork_mempool_free(struct cork_mempool *mp) -{ - struct cork_mempool_block *curr; - assert(mp->allocated_count == 0); - - if (mp->done_object != NULL) { - struct cork_mempool_object *obj; - for (obj = mp->free_list; obj != NULL; obj = obj->next_free) { - mp->done_object - (mp->user_data, cork_mempool_get_object(obj)); - } - } - - for (curr = mp->blocks; curr != NULL; ) { - struct cork_mempool_block *next = curr->next_block; - free(curr); - /* Do this here instead of in the for statement to avoid - * accessing the just-freed block. */ - curr = next; - } - - cork_free_user_data(mp); - free(mp); -} - - -void -cork_mempool_set_callbacks(struct cork_mempool *mp, - void *user_data, cork_free_f free_user_data, - cork_init_f init_object, - cork_done_f done_object) -{ - cork_free_user_data(mp); - mp->user_data = user_data; - mp->free_user_data = free_user_data; - mp->init_object = init_object; - mp->done_object = done_object; -} - - -/* If this function succeeds, then we guarantee that there will be at - * least one object in mp->free_list. */ -static void -cork_mempool_new_block(struct cork_mempool *mp) -{ - /* Allocate the new block and add it to mp's block list. */ - struct cork_mempool_block *block; - void *vblock; - DEBUG("Allocating new %zu-byte block\n", mp->block_size); - block = cork_malloc(mp->block_size); - block->next_block = mp->blocks; - mp->blocks = block; - vblock = block; - - /* Divide the block's memory region into a bunch of objects. */ - size_t index = sizeof(struct cork_mempool_block); - for (index = sizeof(struct cork_mempool_block); - (index + cork_mempool_object_size(mp)) <= mp->block_size; - index += cork_mempool_object_size(mp)) { - struct cork_mempool_object *obj = vblock + index; - DEBUG(" New object at %p[%p]\n", cork_mempool_get_object(obj), obj); - if (mp->init_object != NULL) { - mp->init_object - (mp->user_data, cork_mempool_get_object(obj)); - } - obj->next_free = mp->free_list; - mp->free_list = obj; - } -} - -void * -cork_mempool_new_object(struct cork_mempool *mp) -{ - struct cork_mempool_object *obj; - void *ptr; - - if (CORK_UNLIKELY(mp->free_list == NULL)) { - cork_mempool_new_block(mp); - } - - obj = mp->free_list; - mp->free_list = obj->next_free; - mp->allocated_count++; - ptr = cork_mempool_get_object(obj); - return ptr; -} - -void -cork_mempool_free_object(struct cork_mempool *mp, void *ptr) -{ - struct cork_mempool_object *obj = cork_mempool_get_header(ptr); - DEBUG("Returning %p[%p] to memory pool\n", ptr, obj); - obj->next_free = mp->free_list; - mp->free_list = obj; - mp->allocated_count--; -} diff --git a/libcork/core/timestamp.c b/libcork/core/timestamp.c deleted file mode 100644 index 331bca72b..000000000 --- a/libcork/core/timestamp.c +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include - -#include "libcork/core/timestamp.h" -#include "libcork/core/types.h" -#include "libcork/helpers/errors.h" - -void -cork_timestamp_init_now(cork_timestamp *ts) -{ - struct timeval tp; - gettimeofday(&tp, NULL); - cork_timestamp_init_usec(ts, tp.tv_sec, tp.tv_usec); -} - - -#define is_digit(ch) ((ch) >= '0' && (ch) <= '9') - -static uint64_t -power_of_10(unsigned int width) -{ - uint64_t accumulator = 10; - uint64_t result = 1; - while (width != 0) { - if ((width % 2) == 1) { - result *= accumulator; - width--; - } - accumulator *= accumulator; - width /= 2; - } - return result; -} - -static int -append_fractional(const cork_timestamp ts, unsigned int width, - struct cork_buffer *dest) -{ - if (CORK_UNLIKELY(width == 0 || width > 9)) { - cork_error_set_printf - (EINVAL, - "Invalid width %u for fractional cork_timestamp", width); - return -1; - } else { - uint64_t denom = power_of_10(width); - uint64_t frac = cork_timestamp_gsec_to_units(ts, denom); - cork_buffer_append_printf(dest, "%0*" PRIu64, width, frac); - return 0; - } -} - -static int -cork_timestamp_format_parts(const cork_timestamp ts, struct tm *tm, - const char *format, struct cork_buffer *dest) -{ - const char *next_percent; - - while ((next_percent = strchr(format, '%')) != NULL) { - const char *spec = next_percent + 1; - unsigned int width = 0; - - /* First append any text in between the previous format specifier and - * this one. */ - cork_buffer_append(dest, format, next_percent - format); - - /* Then parse the format specifier */ - while (is_digit(*spec)) { - width *= 10; - width += (*spec++ - '0'); - } - - switch (*spec) { - case '\0': - cork_error_set_string - (EINVAL, - "Trailing %% at end of cork_timestamp format string"); - return -1; - - case '%': - cork_buffer_append(dest, "%", 1); - break; - - case 'Y': - cork_buffer_append_printf(dest, "%04d", tm->tm_year + 1900); - break; - - case 'm': - cork_buffer_append_printf(dest, "%02d", tm->tm_mon + 1); - break; - - case 'd': - cork_buffer_append_printf(dest, "%02d", tm->tm_mday); - break; - - case 'H': - cork_buffer_append_printf(dest, "%02d", tm->tm_hour); - break; - - case 'M': - cork_buffer_append_printf(dest, "%02d", tm->tm_min); - break; - - case 'S': - cork_buffer_append_printf(dest, "%02d", tm->tm_sec); - break; - - case 's': - cork_buffer_append_printf - (dest, "%" PRIu32, cork_timestamp_sec(ts)); - break; - - case 'f': - rii_check(append_fractional(ts, width, dest)); - break; - - default: - cork_error_set_printf - (EINVAL, - "Unknown cork_timestamp format specifier %%%c", *spec); - return -1; - } - - format = spec + 1; - } - - /* When we fall through, there is some additional content after the final - * format specifier. */ - cork_buffer_append_string(dest, format); - return 0; -} - -int -cork_timestamp_format_utc(const cork_timestamp ts, const char *format, - struct cork_buffer *dest) -{ - time_t clock; - struct tm tm; - clock = cork_timestamp_sec(ts); - gmtime_r(&clock, &tm); - return cork_timestamp_format_parts(ts, &tm, format, dest); -} - -int -cork_timestamp_format_local(const cork_timestamp ts, const char *format, - struct cork_buffer *dest) -{ - time_t clock; - struct tm tm; - clock = cork_timestamp_sec(ts); - localtime_r(&clock, &tm); - return cork_timestamp_format_parts(ts, &tm, format, dest); -} diff --git a/libcork/core/u128.c b/libcork/core/u128.c deleted file mode 100644 index 90fd07745..000000000 --- a/libcork/core/u128.c +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include -#include - -#include "libcork/core/types.h" -#include "libcork/core/u128.h" - - -/* From http://stackoverflow.com/questions/8023414/how-to-convert-a-128-bit-integer-to-a-decimal-ascii-string-in-c */ - -const char * -cork_u128_to_decimal(char *dest, cork_u128 val) -{ - uint32_t n[4]; - char *s = dest; - char *p = dest; - unsigned int i; - - /* This algorithm assumes that n[3] is the MSW. */ - n[3] = cork_u128_be32(val, 0); - n[2] = cork_u128_be32(val, 1); - n[1] = cork_u128_be32(val, 2); - n[0] = cork_u128_be32(val, 3); - - memset(s, '0', CORK_U128_DECIMAL_LENGTH - 1); - s[CORK_U128_DECIMAL_LENGTH - 1] = '\0'; - - for (i = 0; i < 128; i++) { - unsigned int j; - unsigned int carry; - - carry = (n[3] >= 0x80000000); - /* Shift n[] left, doubling it */ - n[3] = ((n[3] << 1) & 0xFFFFFFFF) + (n[2] >= 0x80000000); - n[2] = ((n[2] << 1) & 0xFFFFFFFF) + (n[1] >= 0x80000000); - n[1] = ((n[1] << 1) & 0xFFFFFFFF) + (n[0] >= 0x80000000); - n[0] = ((n[0] << 1) & 0xFFFFFFFF); - - /* Add s[] to itself in decimal, doubling it */ - for (j = CORK_U128_DECIMAL_LENGTH - 1; j-- > 0; ) { - s[j] += s[j] - '0' + carry; - carry = (s[j] > '9'); - if (carry) { - s[j] -= 10; - } - } - } - - while ((p[0] == '0') && (p < &s[CORK_U128_DECIMAL_LENGTH - 2])) { - p++; - } - - return p; -} - - -const char * -cork_u128_to_hex(char *buf, cork_u128 val) -{ - uint64_t hi = val._.be64.hi; - uint64_t lo = val._.be64.lo; - if (hi == 0) { - snprintf(buf, CORK_U128_HEX_LENGTH, "%" PRIx64, lo); - } else { - snprintf(buf, CORK_U128_HEX_LENGTH, "%" PRIx64 "%016" PRIx64, hi, lo); - } - return buf; -} - -const char * -cork_u128_to_padded_hex(char *buf, cork_u128 val) -{ - uint64_t hi = val._.be64.hi; - uint64_t lo = val._.be64.lo; - snprintf(buf, CORK_U128_HEX_LENGTH, "%016" PRIx64 "%016" PRIx64, hi, lo); - return buf; -} diff --git a/libcork/ds/array.c b/libcork/ds/array.c deleted file mode 100644 index 8fa09b606..000000000 --- a/libcork/ds/array.c +++ /dev/null @@ -1,370 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include - -#include "libcork/core/types.h" -#include "libcork/ds/array.h" -#include "libcork/helpers/errors.h" - -#ifndef CORK_ARRAY_DEBUG -#define CORK_ARRAY_DEBUG 0 -#endif - -#if CORK_ARRAY_DEBUG -#include -#define DEBUG(...) \ - do { \ - fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, "\n"); \ - } while (0) -#else -#define DEBUG(...) /* nothing */ -#endif - - -/*----------------------------------------------------------------------- - * Resizable arrays - */ - -struct cork_array_priv { - size_t allocated_count; - size_t allocated_size; - size_t element_size; - size_t initialized_count; - void *user_data; - cork_free_f free_user_data; - cork_init_f init; - cork_done_f done; - cork_init_f reuse; - cork_done_f remove; -}; - -void -cork_raw_array_init(struct cork_raw_array *array, size_t element_size) -{ - array->items = NULL; - array->size = 0; - array->priv = cork_new(struct cork_array_priv); - array->priv->allocated_count = 0; - array->priv->allocated_size = 0; - array->priv->element_size = element_size; - array->priv->initialized_count = 0; - array->priv->user_data = NULL; - array->priv->free_user_data = NULL; - array->priv->init = NULL; - array->priv->done = NULL; - array->priv->reuse = NULL; - array->priv->remove = NULL; -} - -void -cork_raw_array_done(struct cork_raw_array *array) -{ - if (array->priv->done != NULL) { - size_t i; - char *element = array->items; - for (i = 0; i < array->priv->initialized_count; i++) { - array->priv->done(array->priv->user_data, element); - element += array->priv->element_size; - } - } - if (array->items != NULL) { - free(array->items); - } - cork_free_user_data(array->priv); - free(array->priv); -} - -void -cork_raw_array_set_callback_data(struct cork_raw_array *array, - void *user_data, cork_free_f free_user_data) -{ - array->priv->user_data = user_data; - array->priv->free_user_data = free_user_data; -} - -void -cork_raw_array_set_init(struct cork_raw_array *array, cork_init_f init) -{ - array->priv->init = init; -} - -void -cork_raw_array_set_done(struct cork_raw_array *array, cork_done_f done) -{ - array->priv->done = done; -} - -void -cork_raw_array_set_reuse(struct cork_raw_array *array, cork_init_f reuse) -{ - array->priv->reuse = reuse; -} - -void -cork_raw_array_set_remove(struct cork_raw_array *array, cork_done_f remove) -{ - array->priv->remove = remove; -} - -size_t -cork_raw_array_element_size(const struct cork_raw_array *array) -{ - return array->priv->element_size; -} - -void -cork_raw_array_clear(struct cork_raw_array *array) -{ - if (array->priv->remove != NULL) { - size_t i; - char *element = array->items; - for (i = 0; i < array->priv->initialized_count; i++) { - array->priv->remove(array->priv->user_data, element); - element += array->priv->element_size; - } - } - array->size = 0; -} - -void * -cork_raw_array_elements(const struct cork_raw_array *array) -{ - return array->items; -} - -void * -cork_raw_array_at(const struct cork_raw_array *array, size_t index) -{ - return ((char *) array->items) + (array->priv->element_size * index); -} - -size_t -cork_raw_array_size(const struct cork_raw_array *array) -{ - return array->size; -} - -bool -cork_raw_array_is_empty(const struct cork_raw_array *array) -{ - return (array->size == 0); -} - -void -cork_raw_array_ensure_size(struct cork_raw_array *array, size_t desired_count) -{ - size_t desired_size; - - DEBUG("--- Array %p: Ensure %zu %zu-byte elements", - array, desired_count, array->priv->element_size); - desired_size = desired_count * array->priv->element_size; - - if (desired_size > array->priv->allocated_size) { - size_t new_count = array->priv->allocated_count * 2; - size_t new_size = array->priv->allocated_size * 2; - if (desired_size > new_size) { - new_count = desired_count; - new_size = desired_size; - } - - DEBUG("--- Array %p: Reallocating %zu->%zu bytes", - array, array->priv->allocated_size, new_size); - array->items = cork_realloc(array->items, new_size); - - array->priv->allocated_count = new_count; - array->priv->allocated_size = new_size; - } -} - -void * -cork_raw_array_append(struct cork_raw_array *array) -{ - size_t index; - void *element; - index = array->size++; - cork_raw_array_ensure_size(array, array->size); - element = cork_raw_array_at(array, index); - - /* Call the init or reset callback, depending on whether this entry has been - * initialized before. */ - - /* Since we can currently only add elements by appending them one at a time, - * then this entry is either already initialized, or is the first - * uninitialized entry. */ - assert(index <= array->priv->initialized_count); - - if (index == array->priv->initialized_count) { - /* This element has not been initialized yet. */ - array->priv->initialized_count++; - if (array->priv->init != NULL) { - array->priv->init(array->priv->user_data, element); - } - } else { - /* This element has already been initialized. */ - if (array->priv->reuse != NULL) { - array->priv->reuse(array->priv->user_data, element); - } - } - - return element; -} - -int -cork_raw_array_copy(struct cork_raw_array *dest, - const struct cork_raw_array *src, - cork_copy_f copy, void *user_data) -{ - size_t i; - size_t reuse_count; - char *dest_element; - - DEBUG("--- Copying %zu elements (%zu bytes) from %p to %p", - src->size, src->size * dest->priv->element_size, src, dest); - assert(dest->priv->element_size == src->priv->element_size); - cork_array_clear(dest); - cork_array_ensure_size(dest, src->size); - - /* Initialize enough elements to hold the contents of src */ - reuse_count = dest->priv->initialized_count; - if (src->size < reuse_count) { - reuse_count = src->size; - } - - dest_element = dest->items; - if (dest->priv->reuse != NULL) { - DEBUG(" Calling reuse on elements 0-%zu", reuse_count); - for (i = 0; i < reuse_count; i++) { - dest->priv->reuse(dest->priv->user_data, dest_element); - dest_element += dest->priv->element_size; - } - } else { - dest_element += reuse_count * dest->priv->element_size; - } - - if (dest->priv->init != NULL) { - DEBUG(" Calling init on elements %zu-%zu", reuse_count, src->size); - for (i = reuse_count; i < src->size; i++) { - dest->priv->init(dest->priv->user_data, dest_element); - dest_element += dest->priv->element_size; - } - } - - if (src->size > dest->priv->initialized_count) { - dest->priv->initialized_count = src->size; - } - - /* If the caller provided a copy function, let it copy each element in turn. - * Otherwise, bulk copy everything using memcpy. */ - if (copy == NULL) { - memcpy(dest->items, src->items, src->size * dest->priv->element_size); - } else { - const char *src_element = src->items; - dest_element = dest->items; - for (i = 0; i < src->size; i++) { - rii_check(copy(user_data, dest_element, src_element)); - dest_element += dest->priv->element_size; - src_element += dest->priv->element_size; - } - } - - dest->size = src->size; - return 0; -} - - -/*----------------------------------------------------------------------- - * Pointer arrays - */ - -struct cork_pointer_array { - cork_free_f free; -}; - -static void -pointer__init(void *user_data, void *vvalue) -{ - void **value = vvalue; - *value = NULL; -} - -static void -pointer__done(void *user_data, void *vvalue) -{ - struct cork_pointer_array *ptr_array = user_data; - void **value = vvalue; - if (*value != NULL) { - ptr_array->free(*value); - } -} - -static void -pointer__remove(void *user_data, void *vvalue) -{ - struct cork_pointer_array *ptr_array = user_data; - void **value = vvalue; - if (*value != NULL) { - ptr_array->free(*value); - } - *value = NULL; -} - -void -cork_raw_pointer_array_init(struct cork_raw_array *array, cork_free_f free_ptr) -{ - struct cork_pointer_array *ptr_array = cork_new(struct cork_pointer_array); - ptr_array->free = free_ptr; - cork_raw_array_init(array, sizeof(void *)); - cork_array_set_callback_data(array, ptr_array, free); - cork_array_set_init(array, pointer__init); - cork_array_set_done(array, pointer__done); - cork_array_set_remove(array, pointer__remove); -} - - -/*----------------------------------------------------------------------- - * String arrays - */ - -void -cork_string_array_init(struct cork_string_array *array) -{ - cork_raw_pointer_array_init - ((struct cork_raw_array *) array, (cork_free_f) cork_strfree); -} - -void -cork_string_array_append(struct cork_string_array *array, const char *str) -{ - const char *copy = cork_strdup(str); - cork_array_append(array, copy); -} - -static int -string__copy(void *user_data, void *vdest, const void *vsrc) -{ - const char **dest = vdest; - const char **src = (const char **) vsrc; - *dest = cork_strdup(*src); - return 0; -} - -void -cork_string_array_copy(struct cork_string_array *dest, - const struct cork_string_array *src) -{ - CORK_ATTR_UNUSED int rc; - rc = cork_array_copy(dest, src, string__copy, NULL); - /* cork_array_copy can only fail if the copy callback fails, and ours - * doesn't! */ - assert(rc == 0); -} diff --git a/libcork/ds/bitset.c b/libcork/ds/bitset.c deleted file mode 100644 index 66d4e1f16..000000000 --- a/libcork/ds/bitset.c +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include - -#include "libcork/core/allocator.h" -#include "libcork/core/api.h" -#include "libcork/core/types.h" -#include "libcork/ds/bitset.h" - - -static size_t -bytes_needed(size_t bit_count) -{ - /* We need one byte for every bit... */ - size_t bytes_needed = bit_count / 8; - /* Plus one extra for the leftovers that don't fit into a whole byte. */ - bytes_needed += ((bit_count % 8) > 0); - return bytes_needed; -} - -struct cork_bitset * -cork_bitset_new(size_t bit_count) -{ - struct cork_bitset *set = cork_new(struct cork_bitset); - set->bit_count = bit_count; - set->byte_count = bytes_needed(bit_count); - set->bits = cork_malloc(set->byte_count); - memset(set->bits, 0, set->byte_count); - return set; -} - -void -cork_bitset_free(struct cork_bitset *set) -{ - free(set->bits); - free(set); -} - -void -cork_bitset_clear(struct cork_bitset *set) -{ - memset(set->bits, 0, set->byte_count); -} diff --git a/libcork/ds/buffer.c b/libcork/ds/buffer.c deleted file mode 100644 index 8a3ace3af..000000000 --- a/libcork/ds/buffer.c +++ /dev/null @@ -1,477 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include - -#include "libcork/core/allocator.h" -#include "libcork/core/types.h" -#include "libcork/ds/buffer.h" -#include "libcork/ds/managed-buffer.h" -#include "libcork/ds/stream.h" -#include "libcork/helpers/errors.h" - - -void -cork_buffer_init(struct cork_buffer *buffer) -{ - buffer->buf = NULL; - buffer->size = 0; - buffer->allocated_size = 0; -} - - -struct cork_buffer * -cork_buffer_new(void) -{ - struct cork_buffer *buffer = cork_new(struct cork_buffer); - cork_buffer_init(buffer); - return buffer; -} - - -void -cork_buffer_done(struct cork_buffer *buffer) -{ - if (buffer->buf != NULL) { - free(buffer->buf); - buffer->buf = NULL; - } - buffer->size = 0; - buffer->allocated_size = 0; -} - - -void -cork_buffer_free(struct cork_buffer *buffer) -{ - cork_buffer_done(buffer); - free(buffer); -} - - -bool -cork_buffer_equal(const struct cork_buffer *buffer1, - const struct cork_buffer *buffer2) -{ - if (buffer1 == buffer2) { - return true; - } - - if (buffer1->size != buffer2->size) { - return false; - } - - return (memcmp(buffer1->buf, buffer2->buf, buffer1->size) == 0); -} - - -static void -cork_buffer_ensure_size_int(struct cork_buffer *buffer, size_t desired_size) -{ - size_t new_size; - - if (CORK_LIKELY(buffer->allocated_size >= desired_size)) { - return; - } - - /* Make sure we at least double the old size when reallocating. */ - new_size = buffer->allocated_size * 2; - if (desired_size > new_size) { - new_size = desired_size; - } - - buffer->buf = cork_realloc(buffer->buf, new_size); - buffer->allocated_size = new_size; -} - -void -cork_buffer_ensure_size(struct cork_buffer *buffer, size_t desired_size) -{ - cork_buffer_ensure_size_int(buffer, desired_size); -} - - -void -cork_buffer_clear(struct cork_buffer *buffer) -{ - buffer->size = 0; - if (buffer->buf != NULL) { - ((char *) buffer->buf)[0] = '\0'; - } -} - -void -cork_buffer_truncate(struct cork_buffer *buffer, size_t length) -{ - if (buffer->size > length) { - buffer->size = length; - if (length == 0) { - if (buffer->buf != NULL) { - ((char *) buffer->buf)[0] = '\0'; - } - } else { - ((char *) buffer->buf)[length] = '\0'; - } - } -} - - -void -cork_buffer_set(struct cork_buffer *buffer, const void *src, size_t length) -{ - cork_buffer_ensure_size_int(buffer, length+1); - memcpy(buffer->buf, src, length); - ((char *) buffer->buf)[length] = '\0'; - buffer->size = length; -} - - -void -cork_buffer_append(struct cork_buffer *buffer, const void *src, size_t length) -{ - cork_buffer_ensure_size_int(buffer, buffer->size + length + 1); - memcpy(buffer->buf + buffer->size, src, length); - buffer->size += length; - ((char *) buffer->buf)[buffer->size] = '\0'; -} - - -void -cork_buffer_set_string(struct cork_buffer *buffer, const char *str) -{ - cork_buffer_set(buffer, str, strlen(str)); -} - - -void -cork_buffer_append_string(struct cork_buffer *buffer, const char *str) -{ - cork_buffer_append(buffer, str, strlen(str)); -} - - -void -cork_buffer_append_vprintf(struct cork_buffer *buffer, const char *format, - va_list args) -{ - size_t format_size; - va_list args1; - - va_copy(args1, args); - format_size = vsnprintf(buffer->buf + buffer->size, - buffer->allocated_size - buffer->size, - format, args1); - va_end(args1); - - /* If the first call works, then set buffer->size and return. */ - if (format_size < (buffer->allocated_size - buffer->size)) { - buffer->size += format_size; - return; - } - - /* If the first call fails, resize buffer and try again. */ - cork_buffer_ensure_size_int - (buffer, buffer->allocated_size + format_size + 1); - format_size = vsnprintf(buffer->buf + buffer->size, - buffer->allocated_size - buffer->size, - format, args); - buffer->size += format_size; -} - - -void -cork_buffer_vprintf(struct cork_buffer *buffer, const char *format, - va_list args) -{ - cork_buffer_clear(buffer); - cork_buffer_append_vprintf(buffer, format, args); -} - - -void -cork_buffer_append_printf(struct cork_buffer *buffer, const char *format, ...) -{ - va_list args; - va_start(args, format); - cork_buffer_append_vprintf(buffer, format, args); - va_end(args); -} - - -void -cork_buffer_printf(struct cork_buffer *buffer, const char *format, ...) -{ - va_list args; - va_start(args, format); - cork_buffer_vprintf(buffer, format, args); - va_end(args); -} - - -void -cork_buffer_append_indent(struct cork_buffer *buffer, size_t indent) -{ - cork_buffer_ensure_size_int(buffer, buffer->size + indent + 1); - memset(buffer->buf + buffer->size, ' ', indent); - buffer->size += indent; - ((char *) buffer->buf)[buffer->size] = '\0'; -} - -/* including space */ -#define is_sprint(ch) ((ch) >= 0x20 && (ch) <= 0x7e) - -/* not including space */ -#define is_print(ch) ((ch) > 0x20 && (ch) <= 0x7e) - -#define is_space(ch) \ - ((ch) == ' ' || \ - (ch) == '\f' || \ - (ch) == '\n' || \ - (ch) == '\r' || \ - (ch) == '\t' || \ - (ch) == '\v') - -#define to_hex(nybble) \ - ((nybble) < 10? '0' + (nybble): 'a' - 10 + (nybble)) - -void -cork_buffer_append_c_string(struct cork_buffer *dest, - const char *chars, size_t length) -{ - size_t i; - cork_buffer_append(dest, "\"", 1); - for (i = 0; i < length; i++) { - char ch = chars[i]; - switch (ch) { - case '\"': - cork_buffer_append_literal(dest, "\\\""); - break; - case '\\': - cork_buffer_append_literal(dest, "\\\\"); - break; - case '\f': - cork_buffer_append_literal(dest, "\\f"); - break; - case '\n': - cork_buffer_append_literal(dest, "\\n"); - break; - case '\r': - cork_buffer_append_literal(dest, "\\r"); - break; - case '\t': - cork_buffer_append_literal(dest, "\\t"); - break; - case '\v': - cork_buffer_append_literal(dest, "\\v"); - break; - default: - if (is_sprint(ch)) { - cork_buffer_append(dest, &chars[i], 1); - } else { - uint8_t byte = ch; - cork_buffer_append_printf(dest, "\\x%02" PRIx8, byte); - } - break; - } - } - cork_buffer_append(dest, "\"", 1); -} - -void -cork_buffer_append_hex_dump(struct cork_buffer *dest, size_t indent, - const char *chars, size_t length) -{ - char hex[3 * 16]; - char print[16]; - char *curr_hex = hex; - char *curr_print = print; - size_t i; - size_t column = 0; - for (i = 0; i < length; i++) { - char ch = chars[i]; - uint8_t u8 = ch; - *curr_hex++ = to_hex(u8 >> 4); - *curr_hex++ = to_hex(u8 & 0x0f); - *curr_hex++ = ' '; - *curr_print++ = is_sprint(ch)? ch: '.'; - if (column == 0 && i != 0) { - cork_buffer_append_literal(dest, "\n"); - cork_buffer_append_indent(dest, indent); - column++; - } else if (column == 15) { - cork_buffer_append_printf - (dest, "%-48.*s", (int) (curr_hex - hex), hex); - cork_buffer_append_literal(dest, " |"); - cork_buffer_append(dest, print, curr_print - print); - cork_buffer_append_literal(dest, "|"); - curr_hex = hex; - curr_print = print; - column = 0; - } else { - column++; - } - } - - if (column > 0) { - cork_buffer_append_printf(dest, "%-48.*s", (int) (curr_hex - hex), hex); - cork_buffer_append_literal(dest, " |"); - cork_buffer_append(dest, print, curr_print - print); - cork_buffer_append_literal(dest, "|"); - } -} - -void -cork_buffer_append_multiline(struct cork_buffer *dest, size_t indent, - const char *chars, size_t length) -{ - size_t i; - for (i = 0; i < length; i++) { - char ch = chars[i]; - if (ch == '\n') { - cork_buffer_append_literal(dest, "\n"); - cork_buffer_append_indent(dest, indent); - } else { - cork_buffer_append(dest, &chars[i], 1); - } - } -} - -void -cork_buffer_append_binary(struct cork_buffer *dest, size_t indent, - const char *chars, size_t length) -{ - size_t i; - bool newline = false; - - /* If there are any non-printable characters, print out a hex dump */ - for (i = 0; i < length; i++) { - if (!is_print(chars[i]) && !is_space(chars[i])) { - cork_buffer_append_literal(dest, "(hex)\n"); - cork_buffer_append_indent(dest, indent); - cork_buffer_append_hex_dump(dest, indent, chars, length); - return; - } else if (chars[i] == '\n') { - newline = true; - /* Don't immediately use the multiline format, since there might be - * a non-printable character later on that kicks us over to the hex - * dump format. */ - } - } - - if (newline) { - cork_buffer_append_literal(dest, "(multiline)\n"); - cork_buffer_append_indent(dest, indent); - cork_buffer_append_multiline(dest, indent, chars, length); - } else { - cork_buffer_append(dest, chars, length); - } -} - - -struct cork_buffer__managed_buffer { - struct cork_managed_buffer parent; - struct cork_buffer *buffer; -}; - -static void -cork_buffer__managed_free(struct cork_managed_buffer *vself) -{ - struct cork_buffer__managed_buffer *self = - cork_container_of(vself, struct cork_buffer__managed_buffer, parent); - cork_buffer_free(self->buffer); - free(self); -} - -static struct cork_managed_buffer_iface CORK_BUFFER__MANAGED_BUFFER = { - cork_buffer__managed_free -}; - -struct cork_managed_buffer * -cork_buffer_to_managed_buffer(struct cork_buffer *buffer) -{ - struct cork_buffer__managed_buffer *self = - cork_new(struct cork_buffer__managed_buffer); - self->parent.buf = buffer->buf; - self->parent.size = buffer->size; - self->parent.ref_count = 1; - self->parent.iface = &CORK_BUFFER__MANAGED_BUFFER; - self->buffer = buffer; - return &self->parent; -} - - -int -cork_buffer_to_slice(struct cork_buffer *buffer, struct cork_slice *slice) -{ - struct cork_managed_buffer *managed = - cork_buffer_to_managed_buffer(buffer); - - /* We don't have to check for NULL; cork_managed_buffer_slice_offset - * will do that for us. */ - int rc = cork_managed_buffer_slice_offset(slice, managed, 0); - - /* Before returning, drop our reference to the managed buffer. If - * the slicing succeeded, then there will be one remaining reference - * in the slice. If it didn't succeed, this will free the managed - * buffer for us. */ - cork_managed_buffer_unref(managed); - return rc; -} - - -struct cork_buffer__stream_consumer { - struct cork_stream_consumer consumer; - struct cork_buffer *buffer; -}; - -static int -cork_buffer_stream_consumer_data(struct cork_stream_consumer *consumer, - const void *buf, size_t size, - bool is_first_chunk) -{ - struct cork_buffer__stream_consumer *bconsumer = cork_container_of - (consumer, struct cork_buffer__stream_consumer, consumer); - - if (is_first_chunk) { - cork_buffer_clear(bconsumer->buffer); - } - - cork_buffer_append(bconsumer->buffer, buf, size); - return 0; -} - -static int -cork_buffer_stream_consumer_eof(struct cork_stream_consumer *consumer) -{ - return 0; -} - -static void -cork_buffer_stream_consumer_free(struct cork_stream_consumer *consumer) -{ - struct cork_buffer__stream_consumer *bconsumer = - cork_container_of - (consumer, struct cork_buffer__stream_consumer, consumer); - free(bconsumer); -} - -struct cork_stream_consumer * -cork_buffer_to_stream_consumer(struct cork_buffer *buffer) -{ - struct cork_buffer__stream_consumer *bconsumer = - cork_new(struct cork_buffer__stream_consumer); - bconsumer->consumer.data = cork_buffer_stream_consumer_data; - bconsumer->consumer.eof = cork_buffer_stream_consumer_eof; - bconsumer->consumer.free = cork_buffer_stream_consumer_free; - bconsumer->buffer = buffer; - return &bconsumer->consumer; -} diff --git a/libcork/ds/dllist.c b/libcork/ds/dllist.c deleted file mode 100644 index dbaafbc42..000000000 --- a/libcork/ds/dllist.c +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2014, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include "libcork/core/api.h" -#include "libcork/core/types.h" -#include "libcork/ds/dllist.h" - - -/* Include a linkable (but deprecated) version of this to maintain ABI - * compatibility. */ -#undef cork_dllist_init -CORK_API void -cork_dllist_init(struct cork_dllist *list) -{ - list->head.next = &list->head; - list->head.prev = &list->head; -} - - -void -cork_dllist_map(struct cork_dllist *list, - cork_dllist_map_func func, void *user_data) -{ - struct cork_dllist_item *curr; - struct cork_dllist_item *next; - cork_dllist_foreach_void(list, curr, next) { - func(curr, user_data); - } -} - -int -cork_dllist_visit(struct cork_dllist *list, void *ud, - cork_dllist_visit_f *visit) -{ - struct cork_dllist_item *curr; - struct cork_dllist_item *next; - cork_dllist_foreach_void(list, curr, next) { - int rc = visit(ud, curr); - if (rc != 0) { - return rc; - } - } - return 0; -} - - -size_t -cork_dllist_size(const struct cork_dllist *list) -{ - size_t size = 0; - struct cork_dllist_item *curr; - struct cork_dllist_item *next; - cork_dllist_foreach_void(list, curr, next) { - size++; - } - return size; -} diff --git a/libcork/ds/file-stream.c b/libcork/ds/file-stream.c deleted file mode 100644 index 70aa399df..000000000 --- a/libcork/ds/file-stream.c +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include -#include -#include - -#include "libcork/ds/stream.h" -#include "libcork/helpers/errors.h" -#include "libcork/helpers/posix.h" - -#define BUFFER_SIZE 4096 - - -/*----------------------------------------------------------------------- - * Producers - */ - -int -cork_consume_fd(struct cork_stream_consumer *consumer, int fd) -{ - char buf[BUFFER_SIZE]; - ssize_t bytes_read; - bool first = true; - - while (true) { - while ((bytes_read = read(fd, buf, BUFFER_SIZE)) > 0) { - rii_check(cork_stream_consumer_data - (consumer, buf, bytes_read, first)); - first = false; - } - - if (bytes_read == 0) { - return cork_stream_consumer_eof(consumer); - } else if (errno != EINTR) { - cork_system_error_set(); - return -1; - } - } -} - -int -cork_consume_file(struct cork_stream_consumer *consumer, FILE *fp) -{ - char buf[BUFFER_SIZE]; - size_t bytes_read; - bool first = true; - - while (true) { - while ((bytes_read = fread(buf, 1, BUFFER_SIZE, fp)) > 0) { - rii_check(cork_stream_consumer_data - (consumer, buf, bytes_read, first)); - first = false; - } - - if (feof(fp)) { - return cork_stream_consumer_eof(consumer); - } else if (errno != EINTR) { - cork_system_error_set(); - return -1; - } - } -} - -int -cork_consume_file_from_path(struct cork_stream_consumer *consumer, - const char *path, int flags) -{ - int fd; - rii_check_posix(fd = open(path, flags)); - ei_check(cork_consume_fd(consumer, fd)); - rii_check_posix(close(fd)); - return 0; - -error: - rii_check_posix(close(fd)); - return -1; -} - - -/*----------------------------------------------------------------------- - * Consumers - */ - -struct cork_file_consumer { - struct cork_stream_consumer parent; - FILE *fp; -}; - -static int -cork_file_consumer__data(struct cork_stream_consumer *vself, - const void *buf, size_t size, bool is_first) -{ - struct cork_file_consumer *self = - cork_container_of(vself, struct cork_file_consumer, parent); - size_t bytes_written = fwrite(buf, 1, size, self->fp); - /* If there was an error writing to the file, then signal this to - * the producer */ - if (bytes_written == size) { - return 0; - } else { - cork_system_error_set(); - return -1; - } -} - -static int -cork_file_consumer__eof(struct cork_stream_consumer *vself) -{ - /* We never close the file with this version of the consumer, so there's - * nothing special to do at end-of-stream. */ - return 0; -} - -static void -cork_file_consumer__free(struct cork_stream_consumer *vself) -{ - struct cork_file_consumer *self = - cork_container_of(vself, struct cork_file_consumer, parent); - free(self); -} - -struct cork_stream_consumer * -cork_file_consumer_new(FILE *fp) -{ - struct cork_file_consumer *self = cork_new(struct cork_file_consumer); - self->parent.data = cork_file_consumer__data; - self->parent.eof = cork_file_consumer__eof; - self->parent.free = cork_file_consumer__free; - self->fp = fp; - return &self->parent; -} - - -struct cork_fd_consumer { - struct cork_stream_consumer parent; - int fd; -}; - -static int -cork_fd_consumer__data(struct cork_stream_consumer *vself, - const void *buf, size_t size, bool is_first) -{ - struct cork_fd_consumer *self = - cork_container_of(vself, struct cork_fd_consumer, parent); - size_t bytes_left = size; - - while (bytes_left > 0) { - ssize_t rc = write(self->fd, buf, bytes_left); - if (rc == -1 && errno != EINTR) { - cork_system_error_set(); - return -1; - } else { - bytes_left -= rc; - buf += rc; - } - } - - return 0; -} - -static int -cork_fd_consumer__eof_close(struct cork_stream_consumer *vself) -{ - int rc; - struct cork_fd_consumer *self = - cork_container_of(vself, struct cork_fd_consumer, parent); - rii_check_posix(rc = close(self->fd)); - return 0; -} - -static void -cork_fd_consumer__free(struct cork_stream_consumer *vself) -{ - struct cork_fd_consumer *self = - cork_container_of(vself, struct cork_fd_consumer, parent); - free(self); -} - -struct cork_stream_consumer * -cork_fd_consumer_new(int fd) -{ - struct cork_fd_consumer *self = cork_new(struct cork_fd_consumer); - self->parent.data = cork_fd_consumer__data; - /* We don't want to close fd, so we reuse file_consumer's eof method */ - self->parent.eof = cork_file_consumer__eof; - self->parent.free = cork_fd_consumer__free; - self->fd = fd; - return &self->parent; -} - -struct cork_stream_consumer * -cork_file_from_path_consumer_new(const char *path, int flags) -{ - - int fd; - struct cork_fd_consumer *self; - - rpi_check_posix(fd = open(path, flags)); - self = cork_new(struct cork_fd_consumer); - self->parent.data = cork_fd_consumer__data; - self->parent.eof = cork_fd_consumer__eof_close; - self->parent.free = cork_fd_consumer__free; - self->fd = fd; - return &self->parent; -} diff --git a/libcork/ds/hash-table.c b/libcork/ds/hash-table.c deleted file mode 100644 index 079e6cc80..000000000 --- a/libcork/ds/hash-table.c +++ /dev/null @@ -1,693 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include - -#include "libcork/core/callbacks.h" -#include "libcork/core/hash.h" -#include "libcork/core/mempool.h" -#include "libcork/core/types.h" -#include "libcork/ds/dllist.h" -#include "libcork/ds/hash-table.h" -#include "libcork/helpers/errors.h" - -#ifndef CORK_HASH_TABLE_DEBUG -#define CORK_HASH_TABLE_DEBUG 0 -#endif - -#if CORK_HASH_TABLE_DEBUG -#include -#define DEBUG(...) \ - do { \ - fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, "\n"); \ - } while (0) -#else -#define DEBUG(...) /* nothing */ -#endif - - -/*----------------------------------------------------------------------- - * Hash tables - */ - -struct cork_hash_table_entry_priv { - struct cork_hash_table_entry public; - struct cork_dllist_item in_bucket; - struct cork_dllist_item insertion_order; -}; - -struct cork_hash_table { - struct cork_dllist *bins; - struct cork_dllist insertion_order; - size_t bin_count; - size_t bin_mask; - size_t entry_count; - struct cork_mempool *pool; - void *user_data; - cork_free_f free_user_data; - cork_hash_f hash; - cork_equals_f equals; - cork_free_f free_key; - cork_free_f free_value; -}; - -static cork_hash -cork_hash_table__default_hash(void *user_data, const void *key) -{ - return (cork_hash) (uintptr_t) key; -} - -static bool -cork_hash_table__default_equals(void *user_data, - const void *key1, const void *key2) -{ - return key1 == key2; -} - - -/* The default initial number of bins to allocate in a new table. */ -#define CORK_HASH_TABLE_DEFAULT_INITIAL_SIZE 8 - -/* The default number of entries per bin to allow before increasing the - * number of bins. */ -#define CORK_HASH_TABLE_MAX_DENSITY 5 - -/* Return a power-of-2 bin count that's at least as big as the given requested - * size. */ -static inline size_t -cork_hash_table_new_size(size_t desired_count) -{ - size_t v = desired_count; - size_t r = 1; - while (v >>= 1) { - r <<= 1; - } - if (r != desired_count) { - r <<= 1; - } - return r; -} - -#define bin_index(table, hash) ((hash) & (table)->bin_mask) - -/* Allocates a new bins array in a hash table. We overwrite the old - * array, so make sure to stash it away somewhere safe first. */ -static void -cork_hash_table_allocate_bins(struct cork_hash_table *table, - size_t desired_count) -{ - size_t i; - - table->bin_count = cork_hash_table_new_size(desired_count); - table->bin_mask = table->bin_count - 1; - DEBUG("Allocate %zu bins", table->bin_count); - table->bins = cork_calloc(table->bin_count, sizeof(struct cork_dllist)); - for (i = 0; i < table->bin_count; i++) { - cork_dllist_init(&table->bins[i]); - } -} - - -static struct cork_hash_table_entry_priv * -cork_hash_table_new_entry(struct cork_hash_table *table, - cork_hash hash, void *key, void *value) -{ - struct cork_hash_table_entry_priv *entry = - cork_mempool_new_object(table->pool); - cork_dllist_add(&table->insertion_order, &entry->insertion_order); - entry->public.hash = hash; - entry->public.key = key; - entry->public.value = value; - return entry; -} - -static void -cork_hash_table_free_entry(struct cork_hash_table *table, - struct cork_hash_table_entry_priv *entry) -{ - if (table->free_key != NULL) { - table->free_key(entry->public.key); - } - if (table->free_value != NULL) { - table->free_value(entry->public.value); - } - cork_dllist_remove(&entry->insertion_order); - cork_mempool_free_object(table->pool, entry); -} - - -struct cork_hash_table * -cork_hash_table_new(size_t initial_size, unsigned int flags) -{ - struct cork_hash_table *table = cork_new(struct cork_hash_table); - table->entry_count = 0; - table->user_data = NULL; - table->free_user_data = NULL; - table->hash = cork_hash_table__default_hash; - table->equals = cork_hash_table__default_equals; - table->free_key = NULL; - table->free_value = NULL; - table->pool = cork_mempool_new(struct cork_hash_table_entry_priv); - cork_dllist_init(&table->insertion_order); - if (initial_size < CORK_HASH_TABLE_DEFAULT_INITIAL_SIZE) { - initial_size = CORK_HASH_TABLE_DEFAULT_INITIAL_SIZE; - } - cork_hash_table_allocate_bins(table, initial_size); - return table; -} - -void -cork_hash_table_clear(struct cork_hash_table *table) -{ - size_t i; - struct cork_dllist_item *curr; - struct cork_dllist_item *next; - - DEBUG("(clear) Remove all entries"); - for (curr = cork_dllist_start(&table->insertion_order); - !cork_dllist_is_end(&table->insertion_order, curr); - curr = next) { - struct cork_hash_table_entry_priv *entry = - cork_container_of - (curr, struct cork_hash_table_entry_priv, insertion_order); - next = curr->next; - cork_hash_table_free_entry(table, entry); - } - cork_dllist_init(&table->insertion_order); - - DEBUG("(clear) Clear bins"); - for (i = 0; i < table->bin_count; i++) { - DEBUG(" Bin %zu", i); - cork_dllist_init(&table->bins[i]); - } - - table->entry_count = 0; -} - -void -cork_hash_table_free(struct cork_hash_table *table) -{ - cork_hash_table_clear(table); - cork_mempool_free(table->pool); - free(table->bins); - free(table); -} - -size_t -cork_hash_table_size(const struct cork_hash_table *table) -{ - return table->entry_count; -} - -void -cork_hash_table_set_user_data(struct cork_hash_table *table, - void *user_data, cork_free_f free_user_data) -{ - table->user_data = user_data; - table->free_user_data = free_user_data; -} - -void -cork_hash_table_set_hash(struct cork_hash_table *table, cork_hash_f hash) -{ - table->hash = hash; -} - -void -cork_hash_table_set_equals(struct cork_hash_table *table, cork_equals_f equals) -{ - table->equals = equals; -} - -void -cork_hash_table_set_free_key(struct cork_hash_table *table, cork_free_f free) -{ - table->free_key = free; -} - -void -cork_hash_table_set_free_value(struct cork_hash_table *table, cork_free_f free) -{ - table->free_value = free; -} - - -void -cork_hash_table_ensure_size(struct cork_hash_table *table, size_t desired_count) -{ - if (desired_count > table->bin_count) { - struct cork_dllist *old_bins = table->bins; - size_t old_bin_count = table->bin_count; - - cork_hash_table_allocate_bins(table, desired_count); - - if (old_bins != NULL) { - size_t i; - for (i = 0; i < old_bin_count; i++) { - struct cork_dllist *bin = &old_bins[i]; - struct cork_dllist_item *curr = cork_dllist_start(bin); - while (!cork_dllist_is_end(bin, curr)) { - struct cork_hash_table_entry_priv *entry = - cork_container_of - (curr, struct cork_hash_table_entry_priv, in_bucket); - struct cork_dllist_item *next = curr->next; - - size_t bin_index = bin_index(table, entry->public.hash); - DEBUG(" Rehash %p from bin %zu to bin %zu", - entry, i, bin_index); - cork_dllist_add(&table->bins[bin_index], curr); - - curr = next; - } - } - - free(old_bins); - } - } -} - - -static void -cork_hash_table_rehash(struct cork_hash_table *table) -{ - DEBUG(" Reached maximum density; rehash"); - cork_hash_table_ensure_size(table, table->bin_count + 1); -} - - -struct cork_hash_table_entry * -cork_hash_table_get_entry_hash(const struct cork_hash_table *table, - cork_hash hash, const void *key) -{ - size_t bin_index; - struct cork_dllist *bin; - struct cork_dllist_item *curr; - - if (table->bin_count == 0) { - DEBUG("(get) Empty table when searching for key %p " - "(hash 0x%08" PRIx32 ")", - key, hash); - return NULL; - } - - bin_index = bin_index(table, hash); - DEBUG("(get) Search for key %p (hash 0x%08" PRIx32 ", bin %zu)", - key, hash, bin_index); - - bin = &table->bins[bin_index]; - curr = cork_dllist_start(bin); - while (!cork_dllist_is_end(bin, curr)) { - struct cork_hash_table_entry_priv *entry = - cork_container_of - (curr, struct cork_hash_table_entry_priv, in_bucket); - - DEBUG(" Check entry %p", entry); - if (table->equals(table->user_data, key, entry->public.key)) { - DEBUG(" Match"); - return &entry->public; - } - - curr = curr->next; - } - - DEBUG(" Entry not found"); - return NULL; -} - -struct cork_hash_table_entry * -cork_hash_table_get_entry(const struct cork_hash_table *table, const void *key) -{ - cork_hash hash = table->hash(table->user_data, key); - return cork_hash_table_get_entry_hash(table, hash, key); -} - -void * -cork_hash_table_get_hash(const struct cork_hash_table *table, - cork_hash hash, const void *key) -{ - struct cork_hash_table_entry *entry = - cork_hash_table_get_entry_hash(table, hash, key); - if (entry == NULL) { - return NULL; - } else { - DEBUG(" Extract value pointer %p", entry->value); - return entry->value; - } -} - -void * -cork_hash_table_get(const struct cork_hash_table *table, const void *key) -{ - struct cork_hash_table_entry *entry = - cork_hash_table_get_entry(table, key); - if (entry == NULL) { - return NULL; - } else { - DEBUG(" Extract value pointer %p", entry->value); - return entry->value; - } -} - - -struct cork_hash_table_entry * -cork_hash_table_get_or_create_hash(struct cork_hash_table *table, - cork_hash hash, void *key, bool *is_new) -{ - struct cork_hash_table_entry_priv *entry; - size_t bin_index; - - if (table->bin_count > 0) { - struct cork_dllist *bin; - struct cork_dllist_item *curr; - - bin_index = bin_index(table, hash); - DEBUG("(get_or_create) Search for key %p " - "(hash 0x%08" PRIx32 ", bin %zu)", - key, hash, bin_index); - - bin = &table->bins[bin_index]; - curr = cork_dllist_start(bin); - while (!cork_dllist_is_end(bin, curr)) { - struct cork_hash_table_entry_priv *entry = - cork_container_of - (curr, struct cork_hash_table_entry_priv, in_bucket); - - DEBUG(" Check entry %p", entry); - if (table->equals(table->user_data, key, entry->public.key)) { - DEBUG(" Match"); - DEBUG(" Return value pointer %p", entry->public.value); - *is_new = false; - return &entry->public; - } - - curr = curr->next; - } - - /* create a new entry */ - DEBUG(" Entry not found"); - - if ((table->entry_count / table->bin_count) > - CORK_HASH_TABLE_MAX_DENSITY) { - cork_hash_table_rehash(table); - bin_index = bin_index(table, hash); - } - } else { - DEBUG("(get_or_create) Search for key %p (hash 0x%08" PRIx32 ")", - key, hash); - DEBUG(" Empty table"); - cork_hash_table_rehash(table); - bin_index = bin_index(table, hash); - } - - DEBUG(" Allocate new entry"); - entry = cork_hash_table_new_entry(table, hash, key, NULL); - DEBUG(" Created new entry %p", entry); - - DEBUG(" Add entry into bin %zu", bin_index); - cork_dllist_add(&table->bins[bin_index], &entry->in_bucket); - - table->entry_count++; - *is_new = true; - return &entry->public; -} - -struct cork_hash_table_entry * -cork_hash_table_get_or_create(struct cork_hash_table *table, - void *key, bool *is_new) -{ - cork_hash hash = table->hash(table->user_data, key); - return cork_hash_table_get_or_create_hash(table, hash, key, is_new); -} - - -void -cork_hash_table_put_hash(struct cork_hash_table *table, - cork_hash hash, void *key, void *value, - bool *is_new, void **old_key, void **old_value) -{ - struct cork_hash_table_entry_priv *entry; - size_t bin_index; - - if (table->bin_count > 0) { - struct cork_dllist *bin; - struct cork_dllist_item *curr; - - bin_index = bin_index(table, hash); - DEBUG("(put) Search for key %p (hash 0x%08" PRIx32 ", bin %zu)", - key, hash, bin_index); - - bin = &table->bins[bin_index]; - curr = cork_dllist_start(bin); - while (!cork_dllist_is_end(bin, curr)) { - struct cork_hash_table_entry_priv *entry = - cork_container_of - (curr, struct cork_hash_table_entry_priv, in_bucket); - - DEBUG(" Check entry %p", entry); - if (table->equals(table->user_data, key, entry->public.key)) { - DEBUG(" Found existing entry; overwriting"); - DEBUG(" Return old key %p", entry->public.key); - if (old_key != NULL) { - *old_key = entry->public.key; - } - DEBUG(" Return old value %p", entry->public.value); - if (old_value != NULL) { - *old_value = entry->public.value; - } - DEBUG(" Copy key %p into entry", key); - entry->public.key = key; - DEBUG(" Copy value %p into entry", value); - entry->public.value = value; - if (is_new != NULL) { - *is_new = false; - } - return; - } - - curr = curr->next; - } - - /* create a new entry */ - DEBUG(" Entry not found"); - if ((table->entry_count / table->bin_count) > - CORK_HASH_TABLE_MAX_DENSITY) { - cork_hash_table_rehash(table); - bin_index = bin_index(table, hash); - } - } else { - DEBUG("(put) Search for key %p (hash 0x%08" PRIx32 ")", - key, hash); - DEBUG(" Empty table"); - cork_hash_table_rehash(table); - bin_index = bin_index(table, hash); - } - - DEBUG(" Allocate new entry"); - entry = cork_hash_table_new_entry(table, hash, key, value); - DEBUG(" Created new entry %p", entry); - - DEBUG(" Add entry into bin %zu", bin_index); - cork_dllist_add(&table->bins[bin_index], &entry->in_bucket); - - table->entry_count++; - if (old_key != NULL) { - *old_key = NULL; - } - if (old_value != NULL) { - *old_value = NULL; - } - if (is_new != NULL) { - *is_new = true; - } -} - -void -cork_hash_table_put(struct cork_hash_table *table, - void *key, void *value, - bool *is_new, void **old_key, void **old_value) -{ - cork_hash hash = table->hash(table->user_data, key); - cork_hash_table_put_hash - (table, hash, key, value, is_new, old_key, old_value); -} - - -void -cork_hash_table_delete_entry(struct cork_hash_table *table, - struct cork_hash_table_entry *ventry) -{ - struct cork_hash_table_entry_priv *entry = - cork_container_of(ventry, struct cork_hash_table_entry_priv, public); - cork_dllist_remove(&entry->in_bucket); - table->entry_count--; - cork_hash_table_free_entry(table, entry); -} - - -bool -cork_hash_table_delete_hash(struct cork_hash_table *table, - cork_hash hash, const void *key, - void **deleted_key, void **deleted_value) -{ - size_t bin_index; - struct cork_dllist *bin; - struct cork_dllist_item *curr; - - if (table->bin_count == 0) { - DEBUG("(delete) Empty table when searching for key %p " - "(hash 0x%08" PRIx32 ")", - key, hash); - return false; - } - - bin_index = bin_index(table, hash); - DEBUG("(delete) Search for key %p (hash 0x%08" PRIx32 ", bin %zu)", - key, hash, bin_index); - - bin = &table->bins[bin_index]; - curr = cork_dllist_start(bin); - while (!cork_dllist_is_end(bin, curr)) { - struct cork_hash_table_entry_priv *entry = - cork_container_of - (curr, struct cork_hash_table_entry_priv, in_bucket); - - DEBUG(" Check entry %p", entry); - if (table->equals(table->user_data, key, entry->public.key)) { - DEBUG(" Match"); - if (deleted_key != NULL) { - *deleted_key = entry->public.key; - } - if (deleted_value != NULL) { - *deleted_value = entry->public.value; - } - - DEBUG(" Remove entry from hash bin %zu", bin_index); - cork_dllist_remove(curr); - table->entry_count--; - - DEBUG(" Free entry %p", entry); - cork_hash_table_free_entry(table, entry); - return true; - } - - curr = curr->next; - } - - DEBUG(" Entry not found"); - return false; -} - -bool -cork_hash_table_delete(struct cork_hash_table *table, const void *key, - void **deleted_key, void **deleted_value) -{ - cork_hash hash = table->hash(table->user_data, key); - return cork_hash_table_delete_hash - (table, hash, key, deleted_key, deleted_value); -} - - -void -cork_hash_table_map(struct cork_hash_table *table, void *user_data, - cork_hash_table_map_f map) -{ - struct cork_dllist_item *curr; - DEBUG("Map across hash table"); - - curr = cork_dllist_start(&table->insertion_order); - while (!cork_dllist_is_end(&table->insertion_order, curr)) { - struct cork_hash_table_entry_priv *entry = - cork_container_of - (curr, struct cork_hash_table_entry_priv, insertion_order); - struct cork_dllist_item *next = curr->next; - enum cork_hash_table_map_result result; - - DEBUG(" Apply function to entry %p", entry); - result = map(user_data, &entry->public); - - if (result == CORK_HASH_TABLE_MAP_ABORT) { - return; - } else if (result == CORK_HASH_TABLE_MAP_DELETE) { - DEBUG(" Delete requested"); - cork_dllist_remove(curr); - table->entry_count--; - cork_hash_table_free_entry(table, entry); - } - - curr = next; - } -} - - -void -cork_hash_table_iterator_init(struct cork_hash_table *table, - struct cork_hash_table_iterator *iterator) -{ - DEBUG("Iterate through hash table"); - iterator->table = table; - iterator->priv = cork_dllist_start(&table->insertion_order); -} - - -struct cork_hash_table_entry * -cork_hash_table_iterator_next(struct cork_hash_table_iterator *iterator) -{ - struct cork_hash_table *table = iterator->table; - struct cork_dllist_item *curr = iterator->priv; - struct cork_hash_table_entry_priv *entry; - - if (cork_dllist_is_end(&table->insertion_order, curr)) { - return NULL; - } - - entry = cork_container_of - (curr, struct cork_hash_table_entry_priv, insertion_order); - DEBUG(" Return entry %p", entry); - iterator->priv = curr->next; - return &entry->public; -} - - -/*----------------------------------------------------------------------- - * Built-in key types - */ - -static cork_hash -string_hash(void *user_data, const void *vk) -{ - const char *k = vk; - size_t len = strlen(k); - return cork_hash_buffer(0, k, len); -} - -static bool -string_equals(void *user_data, const void *vk1, const void *vk2) -{ - const char *k1 = vk1; - const char *k2 = vk2; - return strcmp(k1, k2) == 0; -} - -struct cork_hash_table * -cork_string_hash_table_new(size_t initial_size, unsigned int flags) -{ - struct cork_hash_table *table = cork_hash_table_new(initial_size, flags); - cork_hash_table_set_hash(table, string_hash); - cork_hash_table_set_equals(table, string_equals); - return table; -} - -struct cork_hash_table * -cork_pointer_hash_table_new(size_t initial_size, unsigned int flags) -{ - return cork_hash_table_new(initial_size, flags); -} diff --git a/libcork/ds/managed-buffer.c b/libcork/ds/managed-buffer.c deleted file mode 100644 index 6fdbe4482..000000000 --- a/libcork/ds/managed-buffer.c +++ /dev/null @@ -1,239 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include - -#include "libcork/core/error.h" -#include "libcork/core/types.h" -#include "libcork/ds/managed-buffer.h" -#include "libcork/ds/slice.h" -#include "libcork/helpers/errors.h" - - -/*----------------------------------------------------------------------- - * Error handling - */ - -static void -cork_slice_invalid_slice_set(size_t buf_size, size_t requested_offset, - size_t requested_length) -{ - cork_error_set - (CORK_SLICE_ERROR, CORK_SLICE_INVALID_SLICE, - "Cannot slice %zu-byte buffer at %zu:%zu", - buf_size, requested_offset, requested_length); -} - - -/*----------------------------------------------------------------------- - * Managed buffers - */ - -struct cork_managed_buffer_wrapped { - struct cork_managed_buffer parent; - void *buf; - size_t size; - cork_managed_buffer_freer free; -}; - -static void -cork_managed_buffer_wrapped__free(struct cork_managed_buffer *vself) -{ - struct cork_managed_buffer_wrapped *self = - cork_container_of(vself, struct cork_managed_buffer_wrapped, parent); - self->free(self->buf, self->size); - free(self); -} - -static struct cork_managed_buffer_iface CORK_MANAGED_BUFFER_WRAPPED = { - cork_managed_buffer_wrapped__free -}; - -struct cork_managed_buffer * -cork_managed_buffer_new(const void *buf, size_t size, - cork_managed_buffer_freer free) -{ - /* - DEBUG("Creating new struct cork_managed_buffer [%p:%zu], refcount now 1", - buf, size); - */ - - struct cork_managed_buffer_wrapped *self = - cork_new(struct cork_managed_buffer_wrapped); - self->parent.buf = buf; - self->parent.size = size; - self->parent.ref_count = 1; - self->parent.iface = &CORK_MANAGED_BUFFER_WRAPPED; - self->buf = (void *) buf; - self->size = size; - self->free = free; - return &self->parent; -} - - -struct cork_managed_buffer_copied { - struct cork_managed_buffer parent; -}; - -#define cork_managed_buffer_copied_data(self) \ - (((void *) (self)) + sizeof(struct cork_managed_buffer_copied)) - -#define cork_managed_buffer_copied_sizeof(sz) \ - ((sz) + sizeof(struct cork_managed_buffer_copied)) - -static void -cork_managed_buffer_copied__free(struct cork_managed_buffer *vself) -{ - struct cork_managed_buffer_copied *self = - cork_container_of(vself, struct cork_managed_buffer_copied, parent); - free(self); -} - -static struct cork_managed_buffer_iface CORK_MANAGED_BUFFER_COPIED = { - cork_managed_buffer_copied__free -}; - -struct cork_managed_buffer * -cork_managed_buffer_new_copy(const void *buf, size_t size) -{ - size_t allocated_size = cork_managed_buffer_copied_sizeof(size); - struct cork_managed_buffer_copied *self = malloc(allocated_size); - if (self == NULL) { - return NULL; - } - - self->parent.buf = cork_managed_buffer_copied_data(self); - self->parent.size = size; - self->parent.ref_count = 1; - self->parent.iface = &CORK_MANAGED_BUFFER_COPIED; - memcpy((void *) self->parent.buf, buf, size); - return &self->parent; -} - - -static void -cork_managed_buffer_free(struct cork_managed_buffer *self) -{ - /* - DEBUG("Freeing struct cork_managed_buffer [%p:%zu]", self->buf, self->size); - */ - - self->iface->free(self); -} - - -struct cork_managed_buffer * -cork_managed_buffer_ref(struct cork_managed_buffer *self) -{ - /* - int old_count = self->ref_count++; - DEBUG("Referencing struct cork_managed_buffer [%p:%zu], refcount now %d", - self->buf, self->size, old_count + 1); - */ - - self->ref_count++; - return self; -} - - -void -cork_managed_buffer_unref(struct cork_managed_buffer *self) -{ - /* - int old_count = self->ref_count--; - DEBUG("Dereferencing struct cork_managed_buffer [%p:%zu], refcount now %d", - self->buf, self->size, old_count - 1); - */ - - if (--self->ref_count == 0) { - cork_managed_buffer_free(self); - } -} - - -static struct cork_slice_iface CORK_MANAGED_BUFFER__SLICE; - -static void -cork_managed_buffer__slice_free(struct cork_slice *self) -{ - struct cork_managed_buffer *mbuf = self->user_data; - cork_managed_buffer_unref(mbuf); -} - -static int -cork_managed_buffer__slice_copy(struct cork_slice *dest, - const struct cork_slice *src, - size_t offset, size_t length) -{ - struct cork_managed_buffer *mbuf = src->user_data; - dest->buf = src->buf + offset; - dest->size = length; - dest->iface = &CORK_MANAGED_BUFFER__SLICE; - dest->user_data = cork_managed_buffer_ref(mbuf); - return 0; -} - -static struct cork_slice_iface CORK_MANAGED_BUFFER__SLICE = { - cork_managed_buffer__slice_free, - cork_managed_buffer__slice_copy, - cork_managed_buffer__slice_copy, - NULL -}; - - -int -cork_managed_buffer_slice(struct cork_slice *dest, - struct cork_managed_buffer *buffer, - size_t offset, size_t length) -{ - if ((buffer != NULL) && - (offset <= buffer->size) && - ((offset + length) <= buffer->size)) { - /* - DEBUG("Slicing [%p:%zu] at %zu:%zu, gives <%p:%zu>", - buffer->buf, buffer->size, - offset, length, - buffer->buf + offset, length); - */ - dest->buf = buffer->buf + offset; - dest->size = length; - dest->iface = &CORK_MANAGED_BUFFER__SLICE; - dest->user_data = cork_managed_buffer_ref(buffer); - return 0; - } - - else { - /* - DEBUG("Cannot slice [%p:%zu] at %zu:%zu", - buffer->buf, buffer->size, - offset, length); - */ - cork_slice_clear(dest); - cork_slice_invalid_slice_set(0, offset, 0); - return -1; - } -} - - -int -cork_managed_buffer_slice_offset(struct cork_slice *dest, - struct cork_managed_buffer *buffer, - size_t offset) -{ - if (buffer == NULL) { - cork_slice_clear(dest); - cork_slice_invalid_slice_set(0, offset, 0); - return -1; - } else { - return cork_managed_buffer_slice - (dest, buffer, offset, buffer->size - offset); - } -} diff --git a/libcork/ds/ring-buffer.c b/libcork/ds/ring-buffer.c deleted file mode 100644 index 62c2cf0b0..000000000 --- a/libcork/ds/ring-buffer.c +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include - -#include "libcork/core/allocator.h" -#include "libcork/core/types.h" -#include "libcork/ds/ring-buffer.h" - - -int -cork_ring_buffer_init(struct cork_ring_buffer *self, size_t size) -{ - self->elements = cork_calloc(size, sizeof(void *)); - self->allocated_size = size; - self->size = 0; - self->read_index = 0; - self->write_index = 0; - return 0; -} - -struct cork_ring_buffer * -cork_ring_buffer_new(size_t size) -{ - struct cork_ring_buffer *buf = cork_new(struct cork_ring_buffer); - cork_ring_buffer_init(buf, size); - return buf; -} - -void -cork_ring_buffer_done(struct cork_ring_buffer *self) -{ - free(self->elements); -} - -void -cork_ring_buffer_free(struct cork_ring_buffer *buf) -{ - cork_ring_buffer_done(buf); - free(buf); -} - -int -cork_ring_buffer_add(struct cork_ring_buffer *self, void *element) -{ - if (cork_ring_buffer_is_full(self)) { - return -1; - } - - self->elements[self->write_index++] = element; - self->size++; - if (self->write_index == self->allocated_size) { - self->write_index = 0; - } - return 0; -} - -void * -cork_ring_buffer_pop(struct cork_ring_buffer *self) -{ - if (cork_ring_buffer_is_empty(self)) { - return NULL; - } else { - void *result = self->elements[self->read_index++]; - self->size--; - if (self->read_index == self->allocated_size) { - self->read_index = 0; - } - return result; - } -} - -void * -cork_ring_buffer_peek(struct cork_ring_buffer *self) -{ - if (cork_ring_buffer_is_empty(self)) { - return NULL; - } else { - return self->elements[self->read_index]; - } -} diff --git a/libcork/ds/slice.c b/libcork/ds/slice.c deleted file mode 100644 index 68de06c88..000000000 --- a/libcork/ds/slice.c +++ /dev/null @@ -1,296 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include - -#include "libcork/core/error.h" -#include "libcork/core/types.h" -#include "libcork/ds/managed-buffer.h" -#include "libcork/ds/slice.h" -#include "libcork/helpers/errors.h" - - -/*----------------------------------------------------------------------- - * Error handling - */ - -static void -cork_slice_invalid_slice_set(size_t buf_size, size_t requested_offset, - size_t requested_length) -{ - cork_error_set - (CORK_SLICE_ERROR, CORK_SLICE_INVALID_SLICE, - "Cannot slice %zu-byte buffer at %zu:%zu", - buf_size, requested_offset, requested_length); -} - - -/*----------------------------------------------------------------------- - * Slices - */ - -void -cork_slice_clear(struct cork_slice *slice) -{ - slice->buf = NULL; - slice->size = 0; - slice->iface = NULL; - slice->user_data = NULL; -} - - -int -cork_slice_copy(struct cork_slice *dest, const struct cork_slice *slice, - size_t offset, size_t length) -{ - if ((slice != NULL) && - (offset <= slice->size) && - ((offset + length) <= slice->size)) { - /* - DEBUG("Slicing <%p:%zu> at %zu:%zu, gives <%p:%zu>", - slice->buf, slice->size, - offset, length, - slice->buf + offset, length); - */ - return slice->iface->copy(dest, slice, offset, length); - } - - else { - /* - DEBUG("Cannot slice <%p:%zu> at %zu:%zu", - slice->buf, slice->size, - offset, length); - */ - cork_slice_clear(dest); - cork_slice_invalid_slice_set - ((slice == NULL)? 0: slice->size, offset, length); - return -1; - } -} - - -int -cork_slice_copy_offset(struct cork_slice *dest, const struct cork_slice *slice, - size_t offset) -{ - if (slice == NULL) { - cork_slice_clear(dest); - cork_slice_invalid_slice_set(0, offset, 0); - return -1; - } else { - return cork_slice_copy - (dest, slice, offset, slice->size - offset); - } -} - - -int -cork_slice_light_copy(struct cork_slice *dest, const struct cork_slice *slice, - size_t offset, size_t length) -{ - if ((slice != NULL) && - (offset <= slice->size) && - ((offset + length) <= slice->size)) { - /* - DEBUG("Slicing <%p:%zu> at %zu:%zu, gives <%p:%zu>", - slice->buf, slice->size, - offset, length, - slice->buf + offset, length); - */ - return slice->iface->light_copy(dest, slice, offset, length); - } - - else { - /* - DEBUG("Cannot slice <%p:%zu> at %zu:%zu", - slice->buf, slice->size, - offset, length); - */ - cork_slice_clear(dest); - cork_slice_invalid_slice_set - ((slice == NULL)? 0: slice->size, offset, length); - return -1; - } -} - - -int -cork_slice_light_copy_offset(struct cork_slice *dest, - const struct cork_slice *slice, size_t offset) -{ - if (slice == NULL) { - cork_slice_clear(dest); - cork_slice_invalid_slice_set(0, offset, 0); - return -1; - } else { - return cork_slice_light_copy - (dest, slice, offset, slice->size - offset); - } -} - - -int -cork_slice_slice(struct cork_slice *slice, size_t offset, size_t length) -{ - if ((slice != NULL) && - (offset <= slice->size) && - ((offset + length) <= slice->size)) { - /* - DEBUG("Slicing <%p:%zu> at %zu:%zu, gives <%p:%zu>", - slice->buf, slice->size, - offset, length, - slice->buf + offset, length); - */ - if (slice->iface->slice == NULL) { - slice->buf += offset; - slice->size = length; - return 0; - } else { - return slice->iface->slice(slice, offset, length); - } - } - - else { - /* - DEBUG("Cannot slice <%p:%zu> at %zu:%zu", - slice->buf, slice->size, - offset, length); - */ - cork_slice_invalid_slice_set(slice->size, offset, length); - return -1; - } -} - - -int -cork_slice_slice_offset(struct cork_slice *slice, size_t offset) -{ - if (slice == NULL) { - cork_slice_invalid_slice_set(0, offset, 0); - return -1; - } else { - return cork_slice_slice - (slice, offset, slice->size - offset); - } -} - - -void -cork_slice_finish(struct cork_slice *slice) -{ - /* - DEBUG("Finalizing <%p:%zu>", dest->buf, dest->size); - */ - - if (slice->iface != NULL && slice->iface->free != NULL) { - slice->iface->free(slice); - } - - cork_slice_clear(slice); -} - - -bool -cork_slice_equal(const struct cork_slice *slice1, - const struct cork_slice *slice2) -{ - if (slice1 == slice2) { - return true; - } - - if (slice1->size != slice2->size) { - return false; - } - - return (memcmp(slice1->buf, slice2->buf, slice1->size) == 0); -} - - -/*----------------------------------------------------------------------- - * Slices of static content - */ - -static struct cork_slice_iface cork_static_slice; - -static int -cork_static_slice_copy(struct cork_slice *dest, const struct cork_slice *src, - size_t offset, size_t length) -{ - dest->buf = src->buf + offset; - dest->size = length; - dest->iface = &cork_static_slice; - dest->user_data = NULL; - return 0; -} - -static struct cork_slice_iface cork_static_slice = { - NULL, - cork_static_slice_copy, - cork_static_slice_copy, - NULL -}; - -void -cork_slice_init_static(struct cork_slice *dest, const void *buf, size_t size) -{ - dest->buf = buf; - dest->size = size; - dest->iface = &cork_static_slice; - dest->user_data = NULL; -} - - -/*----------------------------------------------------------------------- - * Copy-once slices - */ - -static struct cork_slice_iface cork_copy_once_slice; - -static int -cork_copy_once_slice__copy(struct cork_slice *dest, - const struct cork_slice *src, - size_t offset, size_t length) -{ - struct cork_managed_buffer *mbuf = - cork_managed_buffer_new_copy(src->buf, src->size); - rii_check(cork_managed_buffer_slice(dest, mbuf, offset, length)); - rii_check(cork_managed_buffer_slice - ((struct cork_slice *) src, mbuf, 0, src->size)); - cork_managed_buffer_unref(mbuf); - return 0; -} - -static int -cork_copy_once_slice__light_copy(struct cork_slice *dest, - const struct cork_slice *src, - size_t offset, size_t length) -{ - dest->buf = src->buf + offset; - dest->size = length; - dest->iface = &cork_copy_once_slice; - dest->user_data = NULL; - return 0; -} - -static struct cork_slice_iface cork_copy_once_slice = { - NULL, - cork_copy_once_slice__copy, - cork_copy_once_slice__light_copy, - NULL -}; - -void -cork_slice_init_copy_once(struct cork_slice *dest, const void *buf, size_t size) -{ - dest->buf = buf; - dest->size = size; - dest->iface = &cork_copy_once_slice; - dest->user_data = NULL; -} diff --git a/libcork/include/libcork/cli.h b/libcork/include/libcork/cli.h deleted file mode 100644 index b5d20c1fa..000000000 --- a/libcork/include/libcork/cli.h +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CLI_H -#define LIBCORK_CLI_H - -/*** include all of the parts ***/ - -#include - -#endif /* LIBCORK_CLI_H */ diff --git a/libcork/include/libcork/cli/commands.h b/libcork/include/libcork/cli/commands.h deleted file mode 100644 index 1569a7419..000000000 --- a/libcork/include/libcork/cli/commands.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_COMMANDS_H -#define LIBCORK_COMMANDS_H - -#include - - -typedef void -(*cork_leaf_command_run)(int argc, char **argv); - -typedef int -(*cork_option_parser)(int argc, char **argv); - -enum cork_command_type { - CORK_COMMAND_SET, - CORK_LEAF_COMMAND -}; - -struct cork_command { - enum cork_command_type type; - const char *name; - const char *short_desc; - const char *usage_suffix; - const char *full_help; - - int - (*parse_options)(int argc, char **argv); - - struct cork_command **set; - cork_leaf_command_run run; -}; - -#define cork_command_set(name, sd, parse_options, set) \ -{ \ - CORK_COMMAND_SET, name, sd, NULL, NULL, \ - parse_options, set, NULL \ -} - -#define cork_leaf_command(name, sd, us, fh, parse_options, run) \ -{ \ - CORK_LEAF_COMMAND, name, sd, us, fh, \ - parse_options, NULL, run \ -} - -CORK_API void -cork_command_show_help(struct cork_command *command, const char *message); - -CORK_API int -cork_command_main(struct cork_command *root, int argc, char **argv); - - -#endif /* LIBCORK_COMMANDS_H */ diff --git a/libcork/include/libcork/config.h b/libcork/include/libcork/config.h deleted file mode 100644 index 72eb4fb8b..000000000 --- a/libcork/include/libcork/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_H -#define LIBCORK_CONFIG_H - -/*** include all of the parts ***/ - -#include - -#endif /* LIBCORK_CONFIG_H */ diff --git a/libcork/include/libcork/config/arch.h b/libcork/include/libcork/config/arch.h deleted file mode 100644 index eaed9916b..000000000 --- a/libcork/include/libcork/config/arch.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_ARCH_H -#define LIBCORK_CONFIG_ARCH_H - - -/*----------------------------------------------------------------------- - * Platform - */ - -#if defined(__i386__) || defined(_M_IX86) -#define CORK_CONFIG_ARCH_X86 1 -#else -#define CORK_CONFIG_ARCH_X86 0 -#endif - -#if defined(__x86_64__) || defined(_M_X64) -#define CORK_CONFIG_ARCH_X64 1 -#else -#define CORK_CONFIG_ARCH_X64 0 -#endif - -#if defined(__powerpc__) || defined(__ppc__) -/* GCC-ish compiler */ -#define CORK_CONFIG_ARCH_PPC 1 -#elif defined(_M_PPC) -/* VS-ish compiler */ -#define CORK_CONFIG_ARCH_PPC 1 -#elif defined(_ARCH_PPC) -/* Something called XL C/C++? */ -#define CORK_CONFIG_ARCH_PPC 1 -#else -#define CORK_CONFIG_ARCH_PPC 0 -#endif - - -#endif /* LIBCORK_CONFIG_ARCH_H */ diff --git a/libcork/include/libcork/config/bsd.h b/libcork/include/libcork/config/bsd.h deleted file mode 100644 index 4c89c0745..000000000 --- a/libcork/include/libcork/config/bsd.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_BSD_H -#define LIBCORK_CONFIG_BSD_H - -/*----------------------------------------------------------------------- - * Endianness - */ - -#include - -#if BYTE_ORDER == BIG_ENDIAN -#define CORK_CONFIG_IS_BIG_ENDIAN 1 -#define CORK_CONFIG_IS_LITTLE_ENDIAN 0 -#elif BYTE_ORDER == LITTLE_ENDIAN -#define CORK_CONFIG_IS_BIG_ENDIAN 0 -#define CORK_CONFIG_IS_LITTLE_ENDIAN 1 -#else -#error "Cannot determine system endianness" -#endif - -#define CORK_HAVE_REALLOCF 1 -#define CORK_HAVE_PTHREADS 1 - - -#endif /* LIBCORK_CONFIG_BSD_H */ diff --git a/libcork/include/libcork/config/config.h b/libcork/include/libcork/config/config.h deleted file mode 100644 index 077be5c84..000000000 --- a/libcork/include/libcork/config/config.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_CONFIG_H -#define LIBCORK_CONFIG_CONFIG_H - - -/* If you want to skip autodetection, define this to 1, and provide a - * libcork/config/custom.h header file. */ - -#if !defined(CORK_CONFIG_SKIP_AUTODETECT) -#define CORK_CONFIG_SKIP_AUTODETECT 0 -#endif - - -#if CORK_CONFIG_SKIP_AUTODETECT -/* The user has promised that they'll define everything themselves. */ -#include - -#else -/* Otherwise autodetect! */ - - -/**** ARCHITECTURES ****/ - -#include - - -/**** PLATFORMS ****/ -#if (defined(__unix__) || defined(unix)) && !defined(USG) -/* We need this to test for BSD, but it's a good idea to have for - * any brand of Unix.*/ -#include -#endif - -#if defined(__linux) || defined(__CYGWIN__) -/* Do some Linux-specific autodetection. */ -#include - -#elif defined(__APPLE__) && defined(__MACH__) -/* Do some Mac OS X-specific autodetection. */ -#include - -#elif defined(BSD) && (BSD >= 199103) -/* Do some BSD (4.3 code base or newer)specific autodetection. */ -#include - -#elif defined(__MINGW32__) -/* Do some mingw32 autodetection. */ -#include - -#endif /* platforms */ - - -/**** COMPILERS ****/ - -#if defined(__GNUC__) -/* Do some GCC-specific autodetection. */ -#include - -#endif /* compilers */ - - -#endif /* autodetect or not */ - - -#endif /* LIBCORK_CONFIG_CONFIG_H */ diff --git a/libcork/include/libcork/config/gcc.h b/libcork/include/libcork/config/gcc.h deleted file mode 100644 index d7bbffacd..000000000 --- a/libcork/include/libcork/config/gcc.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_GCC_H -#define LIBCORK_CONFIG_GCC_H - -/* Figure out the GCC version */ - -#if defined(__GNUC_PATCHLEVEL__) -#define CORK_CONFIG_GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) -#else -#define CORK_CONFIG_GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100) -#endif - - -/*----------------------------------------------------------------------- - * Compiler attributes - */ - -/* The GCC assembly syntax has been available basically forever. */ - -#if defined(CORK_CONFIG_GCC_VERSION) -#define CORK_CONFIG_HAVE_GCC_ASM 1 -#else -#define CORK_CONFIG_HAVE_GCC_ASM 0 -#endif - -/* The GCC atomic instrinsics are available as of GCC 4.1.0. */ - -#if CORK_CONFIG_GCC_VERSION >= 40100 -#define CORK_CONFIG_HAVE_GCC_ATOMICS 1 -#else -#define CORK_CONFIG_HAVE_GCC_ATOMICS 0 -#endif - -/* The attributes we want to use are available as of GCC 2.96. */ - -#if CORK_CONFIG_GCC_VERSION >= 29600 -#define CORK_CONFIG_HAVE_GCC_ATTRIBUTES 1 -#else -#define CORK_CONFIG_HAVE_GCC_ATTRIBUTES 0 -#endif - -/* __int128 seems to be available on 64-bit platforms as of GCC 4.6. The - * attribute((mode(TI))) syntax seems to be available as of 4.1. */ - -#if CORK_CONFIG_ARCH_X64 && CORK_CONFIG_GCC_VERSION >= 40600 -#define CORK_CONFIG_HAVE_GCC_INT128 1 -#else -#define CORK_CONFIG_HAVE_GCC_INT128 0 -#endif - -#if CORK_CONFIG_ARCH_X64 && CORK_CONFIG_GCC_VERSION >= 40100 -#define CORK_CONFIG_HAVE_GCC_MODE_ATTRIBUTE 1 -#else -#define CORK_CONFIG_HAVE_GCC_MODE_ATTRIBUTE 0 -#endif - -/* Statement expressions have been available since GCC 3.1. */ - -#if CORK_CONFIG_GCC_VERSION >= 30100 -#define CORK_CONFIG_HAVE_GCC_STATEMENT_EXPRS 1 -#else -#define CORK_CONFIG_HAVE_GCC_STATEMENT_EXPRS 0 -#endif - -/* Thread-local storage has been available since GCC 3.3, but not on Mac - * OS X. */ - -#if !(defined(__APPLE__) && defined(__MACH__)) -#if CORK_CONFIG_GCC_VERSION >= 30300 -#define CORK_CONFIG_HAVE_THREAD_STORAGE_CLASS 1 -#else -#define CORK_CONFIG_HAVE_THREAD_STORAGE_CLASS 0 -#endif -#else -#define CORK_CONFIG_HAVE_THREAD_STORAGE_CLASS 0 -#endif - - -#endif /* LIBCORK_CONFIG_GCC_H */ diff --git a/libcork/include/libcork/config/linux.h b/libcork/include/libcork/config/linux.h deleted file mode 100644 index 535924d1f..000000000 --- a/libcork/include/libcork/config/linux.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_LINUX_H -#define LIBCORK_CONFIG_LINUX_H - -/*----------------------------------------------------------------------- - * Endianness - */ - -#include - -#if __BYTE_ORDER == __BIG_ENDIAN -#define CORK_CONFIG_IS_BIG_ENDIAN 1 -#define CORK_CONFIG_IS_LITTLE_ENDIAN 0 -#elif __BYTE_ORDER == __LITTLE_ENDIAN -#define CORK_CONFIG_IS_BIG_ENDIAN 0 -#define CORK_CONFIG_IS_LITTLE_ENDIAN 1 -#else -#error "Cannot determine system endianness" -#endif - -#define CORK_HAVE_REALLOCF 0 -#define CORK_HAVE_PTHREADS 1 - - -#endif /* LIBCORK_CONFIG_LINUX_H */ diff --git a/libcork/include/libcork/config/macosx.h b/libcork/include/libcork/config/macosx.h deleted file mode 100644 index aa507556a..000000000 --- a/libcork/include/libcork/config/macosx.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_MACOSX_H -#define LIBCORK_CONFIG_MACOSX_H - -/*----------------------------------------------------------------------- - * Endianness - */ - -#include - -#if BYTE_ORDER == BIG_ENDIAN -#define CORK_CONFIG_IS_BIG_ENDIAN 1 -#define CORK_CONFIG_IS_LITTLE_ENDIAN 0 -#elif BYTE_ORDER == LITTLE_ENDIAN -#define CORK_CONFIG_IS_BIG_ENDIAN 0 -#define CORK_CONFIG_IS_LITTLE_ENDIAN 1 -#else -#error "Cannot determine system endianness" -#endif - -#define CORK_HAVE_REALLOCF 1 -#define CORK_HAVE_PTHREADS 1 - - -#endif /* LIBCORK_CONFIG_MACOSX_H */ diff --git a/libcork/include/libcork/config/mingw32.h b/libcork/include/libcork/config/mingw32.h deleted file mode 100644 index c62cbc520..000000000 --- a/libcork/include/libcork/config/mingw32.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CONFIG_MINGW32_H -#define LIBCORK_CONFIG_MINGW32_H - -#include - -/*----------------------------------------------------------------------- - * Endianness - */ - -/* Assume MinGW32 only works on x86 platform */ - -#define CORK_CONFIG_IS_BIG_ENDIAN 0 -#define CORK_CONFIG_IS_LITTLE_ENDIAN 1 - -#define CORK_HAVE_REALLOCF 0 -#define CORK_HAVE_PTHREADS 1 - -/* - * File io stuff. Odd that this is not defined by MinGW. - * Maybe there is an M$ish way to do it. - */ -#define F_SETFL 4 -#define O_NONBLOCK 0x4000 /* non blocking I/O (POSIX style) */ - -#define F_GETFD 1 -#define F_SETFD 2 -#define FD_CLOEXEC 0x1 - -#define WNOHANG 1 - -/* - * simple adaptors - */ - -static inline int mingw_mkdir(const char *path, int mode) -{ - return mkdir(path); -} -#define mkdir mingw_mkdir - - -#endif /* LIBCORK_CONFIG_MINGW32_H */ diff --git a/libcork/include/libcork/core.h b/libcork/include/libcork/core.h deleted file mode 100644 index 083e18fcd..000000000 --- a/libcork/include/libcork/core.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_H -#define LIBCORK_CORE_H - -/*** include all of the parts ***/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* LIBCORK_CORE_H */ diff --git a/libcork/include/libcork/core/allocator.h b/libcork/include/libcork/core/allocator.h deleted file mode 100644 index 5a6b4aa9e..000000000 --- a/libcork/include/libcork/core/allocator.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_ALLOCATOR_H -#define LIBCORK_CORE_ALLOCATOR_H - -#include - -#include -#include -#include -#include - - -/*----------------------------------------------------------------------- - * Recoverable - */ - -#define cork_xmalloc malloc -#define cork_xcalloc calloc -#define cork_xfree free - -#if CORK_HAVE_REALLOCF -#define cork_xrealloc reallocf -#else -CORK_API void * -cork_xrealloc(void *ptr, size_t new_size) CORK_ATTR_MALLOC; -#endif - -/* type-based macros */ -#define cork_xnew(type) ((type *) cork_xmalloc(sizeof(type))) - -/* string-related functions */ - -CORK_API const char * -cork_xstrdup(const char *str); - -CORK_API const char * -cork_xstrndup(const char *str, size_t size); - -CORK_API void -cork_strfree(const char *str); - - -/*----------------------------------------------------------------------- - * Abort on failure - */ - -CORK_API void * -cork_malloc(size_t size) CORK_ATTR_MALLOC; - -CORK_API void * -cork_calloc(size_t count, size_t size) CORK_ATTR_MALLOC; - -CORK_API void * -cork_realloc(void *ptr, size_t new_size) CORK_ATTR_MALLOC; - -CORK_API const char * -cork_strdup(const char *src) CORK_ATTR_MALLOC; - -CORK_API const char * -cork_strndup(const char *src, size_t size) CORK_ATTR_MALLOC; - -#define cork_new(type) \ - cork_malloc(sizeof(type)) - - -#endif /* LIBCORK_CORE_ALLOCATOR_H */ diff --git a/libcork/include/libcork/core/api.h b/libcork/include/libcork/core/api.h deleted file mode 100644 index 3dfda9152..000000000 --- a/libcork/include/libcork/core/api.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_API_H -#define LIBCORK_CORE_API_H - -#include - -/* If you're using libcork as a shared library, you don't need to do anything - * special; the following will automatically set things up so that libcork's - * public symbols are imported from the library. When we build the shared - * library, we define this ourselves to export the symbols. */ - -#if !defined(CORK_API) -#define CORK_API CORK_IMPORT -#endif - -#endif /* LIBCORK_CORE_API_H */ diff --git a/libcork/include/libcork/core/attributes.h b/libcork/include/libcork/core/attributes.h deleted file mode 100644 index 60caa3cf9..000000000 --- a/libcork/include/libcork/core/attributes.h +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_ATTRIBUTES_H -#define LIBCORK_CORE_ATTRIBUTES_H - -#include - - -/* - * Declare a “const” function. - * - * A const function is one whose return value depends only on its - * parameters. This is slightly more strict than a “pure” function; a - * const function is not allowed to read from global variables, whereas - * a pure function is. - * - * int square(int x) CORK_ATTR_CONST; - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_ATTR_CONST __attribute__((const)) -#else -#define CORK_ATTR_CONST -#endif - - -/* - * Declare a “pure” function. - * - * A pure function is one whose return value depends only on its - * parameters, and global variables. - * - * int square(int x) CORK_ATTR_PURE; - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_ATTR_PURE __attribute__((pure)) -#else -#define CORK_ATTR_PURE -#endif - - -/* - * Declare that a function returns a newly allocated pointer. - * - * The compiler can use this information to generate more accurate - * aliasing information, since it can infer that the result of the - * function cannot alias any other existing pointer. - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_ATTR_MALLOC __attribute__((malloc)) -#else -#define CORK_ATTR_MALLOC -#endif - - -/* - * Declare that a function shouldn't be inlined. - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_ATTR_NOINLINE __attribute__((noinline)) -#else -#define CORK_ATTR_NOINLINE -#endif - - -/* - * Declare an entity that isn't used. - * - * This lets you keep -Wall activated in several cases where you're - * obligated to define something that you don't intend to use. - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_ATTR_UNUSED __attribute__((unused)) -#else -#define CORK_ATTR_UNUSED -#endif - - -/* - * Declare a function that takes in printf-like parameters. - * - * When the compiler supports this attribute, it will check the format - * string, and the following arguments, to make sure that they match. - * format_index and args_index are 1-based. - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_ATTR_PRINTF(format_index, args_index) \ - __attribute__((format(printf, format_index, args_index))) -#else -#define CORK_ATTR_PRINTF(format_index, args_index) -#endif - - -/* - * Declare a var-arg function whose last parameter must be a NULL - * sentinel value. - * - * When the compiler supports this attribute, it will check the actual - * parameters whenever this function is called, and ensure that the last - * parameter is a @c NULL. - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_ATTR_SENTINEL __attribute__((sentinel)) -#else -#define CORK_ATTR_SENTINEL -#endif - - -/* - * Declare that a boolean expression is likely to be true or false. - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_LIKELY(expr) __builtin_expect((expr), 1) -#define CORK_UNLIKELY(expr) __builtin_expect((expr), 0) -#else -#define CORK_LIKELY(expr) (expr) -#define CORK_UNLIKELY(expr) (expr) -#endif - -/* - * Declare that a function is part of the current library's public API, or that - * it's internal to the current library. - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_EXPORT __attribute__((visibility("default"))) -#define CORK_IMPORT __attribute__((visibility("default"))) -#define CORK_LOCAL __attribute__((visibility("hidden"))) -#else -#define CORK_EXPORT -#define CORK_IMPORT -#define CORK_LOCAL -#endif - - -/* - * Declare a static function that should automatically be called at program - * startup. - */ - -/* TODO: When we implement a full Windows port, [1] describes how best to - * implement an initialization function under Visual Studio. - * - * [1] http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc - */ - -#if CORK_CONFIG_HAVE_GCC_ATTRIBUTES -#define CORK_INITIALIZER(name) \ -__attribute__((constructor)) \ -static void \ -name(void) -#else -#error "Don't know how to implement initialization functions of this platform" -#endif - - -#endif /* LIBCORK_CORE_ATTRIBUTES_H */ diff --git a/libcork/include/libcork/core/byte-order.h b/libcork/include/libcork/core/byte-order.h deleted file mode 100644 index 6761faaf5..000000000 --- a/libcork/include/libcork/core/byte-order.h +++ /dev/null @@ -1,186 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_BYTE_ORDER_H -#define LIBCORK_CORE_BYTE_ORDER_H - - -#include -#include - - -/* Constants to represent big endianness and little endianness */ -#define CORK_BIG_ENDIAN 4321 -#define CORK_LITTLE_ENDIAN 1234 - -/* Whether the current host is big- or little-endian. HOST gives us the - * current system's endianness; OTHER gives the opposite endianness. - * The _NAME macros can be used in debugging messages and other - * human-readable output. - * - * Note that we actually detect the endianness in the various header - * files in the libcork/config directory, since we want to keep - * everything detection-related separated out from what we define based - * on that detection. */ - -#if CORK_CONFIG_IS_BIG_ENDIAN -#define CORK_HOST_ENDIANNESS CORK_BIG_ENDIAN -#define CORK_OTHER_ENDIANNESS CORK_LITTLE_ENDIAN -#define CORK_HOST_ENDIANNESS_NAME "big" -#define CORK_OTHER_ENDIANNESS_NAME "little" - -#elif CORK_CONFIG_IS_LITTLE_ENDIAN -#define CORK_HOST_ENDIANNESS CORK_LITTLE_ENDIAN -#define CORK_OTHER_ENDIANNESS CORK_BIG_ENDIAN -#define CORK_HOST_ENDIANNESS_NAME "little" -#define CORK_OTHER_ENDIANNESS_NAME "big" - -#else -#error "Unknown endianness" -#endif - - -/* Returns the byte-swapped version an integer, regardless of the - * underlying endianness. - * - * These macros only require an rvalue as their parameter (which can - * therefore be any arbitrary expression), and they don't modify the - * original contents if it happens to be a variable. */ - -#define CORK_SWAP_UINT16(__u16) \ - (((((uint16_t) __u16) & 0xff00u) >> 8) | \ - ((((uint16_t) __u16) & 0x00ffu) << 8)) - -#define CORK_SWAP_UINT32(__u32) \ - (((((uint32_t) __u32) & 0xff000000u) >> 24) | \ - ((((uint32_t) __u32) & 0x00ff0000u) >> 8) | \ - ((((uint32_t) __u32) & 0x0000ff00u) << 8) | \ - ((((uint32_t) __u32) & 0x000000ffu) << 24)) - -#define CORK_SWAP_UINT64(__u64) \ - (((((uint64_t) __u64) & UINT64_C(0xff00000000000000)) >> 56) | \ - ((((uint64_t) __u64) & UINT64_C(0x00ff000000000000)) >> 40) | \ - ((((uint64_t) __u64) & UINT64_C(0x0000ff0000000000)) >> 24) | \ - ((((uint64_t) __u64) & UINT64_C(0x000000ff00000000)) >> 8) | \ - ((((uint64_t) __u64) & UINT64_C(0x00000000ff000000)) << 8) | \ - ((((uint64_t) __u64) & UINT64_C(0x0000000000ff0000)) << 24) | \ - ((((uint64_t) __u64) & UINT64_C(0x000000000000ff00)) << 40) | \ - ((((uint64_t) __u64) & UINT64_C(0x00000000000000ff)) << 56)) - -/* Bytes-swaps an integer variable in place. - * - * These macros require an lvalue as their parameter; the contents of - * this variable will be modified by the macro. */ - -#define CORK_SWAP_IN_PLACE_UINT16(__u16) \ - do { \ - (__u16) = CORK_SWAP_UINT16(__u16); \ - } while (0) - -#define CORK_SWAP_IN_PLACE_UINT32(__u32) \ - do { \ - (__u32) = CORK_SWAP_UINT32(__u32); \ - } while (0) - -#define CORK_SWAP_IN_PLACE_UINT64(__u64) \ - do { \ - (__u64) = CORK_SWAP_UINT64(__u64); \ - } while (0) - - -/* - * A slew of swapping macros whose operation depends on the endianness - * of the current system: - * - * uint16_t CORK_UINT16_BIG_TO_HOST(u16) - * uint32_t CORK_UINT32_BIG_TO_HOST(u32) - * uint64_t CORK_UINT64_BIG_TO_HOST(u64) - * uint16_t CORK_UINT16_LITTLE_TO_HOST(u16) - * uint32_t CORK_UINT32_LITTLE_TO_HOST(u32) - * uint64_t CORK_UINT64_LITTLE_TO_HOST(u64) - * void CORK_UINT16_BIG_TO_HOST_IN_PLACE(&u16) - * void CORK_UINT32_BIG_TO_HOST_IN_PLACE(&u32) - * void CORK_UINT64_BIG_TO_HOST_IN_PLACE(&u64) - * void CORK_UINT16_LITTLE_TO_HOST_IN_PLACE(&u16) - * void CORK_UINT32_LITTLE_TO_HOST_IN_PLACE(&u32) - * void CORK_UINT64_LITTLE_TO_HOST_IN_PLACE(&u64) - * - * uint16_t CORK_UINT16_HOST_TO_BIG(u16) - * uint32_t CORK_UINT32_HOST_TO_BIG(u32) - * uint64_t CORK_UINT64_HOST_TO_BIG(u64) - * uint16_t CORK_UINT16_HOST_TO_LITTLE(u16) - * uint32_t CORK_UINT32_HOST_TO_LITTLE(u32) - * uint64_t CORK_UINT64_HOST_TO_LITTLE(u64) - * void CORK_UINT16_HOST_TO_BIG_IN_PLACE(&u16) - * void CORK_UINT32_HOST_TO_BIG_IN_PLACE(&u32) - * void CORK_UINT64_HOST_TO_BIG_IN_PLACE(&u64) - * void CORK_UINT16_HOST_TO_LITTLE_IN_PLACE(&u16) - * void CORK_UINT32_HOST_TO_LITTLE_IN_PLACE(&u32) - * void CORK_UINT64_HOST_TO_LITTLE_IN_PLACE(&u64) - */ - -#if CORK_HOST_ENDIANNESS == CORK_BIG_ENDIAN - -#define CORK_UINT16_BIG_TO_HOST(__u16) (__u16) /* nothing to do */ -#define CORK_UINT16_LITTLE_TO_HOST(__u16) CORK_SWAP_UINT16(__u16) - -#define CORK_UINT32_BIG_TO_HOST(__u32) (__u32) /* nothing to do */ -#define CORK_UINT32_LITTLE_TO_HOST(__u32) CORK_SWAP_UINT32(__u32) - -#define CORK_UINT64_BIG_TO_HOST(__u64) (__u64) /* nothing to do */ -#define CORK_UINT64_LITTLE_TO_HOST(__u64) CORK_SWAP_UINT64(__u64) - -#define CORK_UINT16_BIG_TO_HOST_IN_PLACE(__u16) /* nothing to do */ -#define CORK_UINT16_LITTLE_TO_HOST_IN_PLACE(__u16) CORK_SWAP_IN_PLACE_UINT16(__u16) - -#define CORK_UINT32_BIG_TO_HOST_IN_PLACE(__u32) /* nothing to do */ -#define CORK_UINT32_LITTLE_TO_HOST_IN_PLACE(__u32) CORK_SWAP_IN_PLACE_UINT32(__u32) - -#define CORK_UINT64_BIG_TO_HOST_IN_PLACE(__u64) /* nothing to do */ -#define CORK_UINT64_LITTLE_TO_HOST_IN_PLACE(__u64) CORK_SWAP_IN_PLACE_UINT64(__u64) - -#elif CORK_HOST_ENDIANNESS == CORK_LITTLE_ENDIAN - -#define CORK_UINT16_BIG_TO_HOST(__u16) CORK_SWAP_UINT16(__u16) -#define CORK_UINT16_LITTLE_TO_HOST(__u16) (__u16) /* nothing to do */ - -#define CORK_UINT32_BIG_TO_HOST(__u32) CORK_SWAP_UINT32(__u32) -#define CORK_UINT32_LITTLE_TO_HOST(__u32) (__u32) /* nothing to do */ - -#define CORK_UINT64_BIG_TO_HOST(__u64) CORK_SWAP_UINT64(__u64) -#define CORK_UINT64_LITTLE_TO_HOST(__u64) (__u64) /* nothing to do */ - -#define CORK_UINT16_BIG_TO_HOST_IN_PLACE(__u16) CORK_SWAP_IN_PLACE_UINT16(__u16) -#define CORK_UINT16_LITTLE_TO_HOST_IN_PLACE(__u16) /* nothing to do */ - -#define CORK_UINT32_BIG_TO_HOST_IN_PLACE(__u32) CORK_SWAP_IN_PLACE_UINT32(__u32) -#define CORK_UINT32_LITTLE_TO_HOST_IN_PLACE(__u32) /* nothing to do */ - -#define CORK_UINT64_BIG_TO_HOST_IN_PLACE(__u64) CORK_SWAP_IN_PLACE_UINT64(__u64) -#define CORK_UINT64_LITTLE_TO_HOST_IN_PLACE(__u64) /* nothing to do */ - -#endif - - -#define CORK_UINT16_HOST_TO_BIG(__u16) CORK_UINT16_BIG_TO_HOST(__u16) -#define CORK_UINT32_HOST_TO_BIG(__u32) CORK_UINT32_BIG_TO_HOST(__u32) -#define CORK_UINT64_HOST_TO_BIG(__u64) CORK_UINT64_BIG_TO_HOST(__u64) -#define CORK_UINT16_HOST_TO_LITTLE(__u16) CORK_UINT16_LITTLE_TO_HOST(__u16) -#define CORK_UINT32_HOST_TO_LITTLE(__u32) CORK_UINT32_LITTLE_TO_HOST(__u32) -#define CORK_UINT64_HOST_TO_LITTLE(__u64) CORK_UINT64_LITTLE_TO_HOST(__u64) -#define CORK_UINT16_HOST_TO_BIG_IN_PLACE(__u16) CORK_UINT16_BIG_TO_HOST_IN_PLACE(__u16) -#define CORK_UINT32_HOST_TO_BIG_IN_PLACE(__u32) CORK_UINT32_BIG_TO_HOST_IN_PLACE(__u32) -#define CORK_UINT64_HOST_TO_BIG_IN_PLACE(__u64) CORK_UINT64_BIG_TO_HOST_IN_PLACE(__u64) -#define CORK_UINT16_HOST_TO_LITTLE_IN_PLACE(__u16) CORK_UINT16_LITTLE_TO_HOST_IN_PLACE(__u16) -#define CORK_UINT32_HOST_TO_LITTLE_IN_PLACE(__u32) CORK_UINT32_LITTLE_TO_HOST_IN_PLACE(__u32) -#define CORK_UINT64_HOST_TO_LITTLE_IN_PLACE(__u64) CORK_UINT64_LITTLE_TO_HOST_IN_PLACE(__u64) - - -#endif /* LIBCORK_CORE_BYTE_ORDER_H */ diff --git a/libcork/include/libcork/core/callbacks.h b/libcork/include/libcork/core/callbacks.h deleted file mode 100644 index ce9543cc3..000000000 --- a/libcork/include/libcork/core/callbacks.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_CALLBACKS_H -#define LIBCORK_CORE_CALLBACKS_H - - -#include - - -typedef int -(*cork_copy_f)(void *user_data, void *dest, const void *src); - -typedef void -(*cork_done_f)(void *user_data, void *value); - -typedef void -(*cork_free_f)(void *value); - -typedef cork_hash -(*cork_hash_f)(void *user_data, const void *value); - -typedef bool -(*cork_equals_f)(void *user_data, const void *value1, const void *value2); - -typedef void -(*cork_init_f)(void *user_data, void *value); - -#define cork_free_user_data(parent) \ - ((parent)->free_user_data == NULL? (void) 0: \ - (parent)->free_user_data((parent)->user_data)) - -typedef void * -(*cork_new_f)(void *user_data); - - -#endif /* LIBCORK_CORE_CALLBACKS_H */ diff --git a/libcork/include/libcork/core/error.h b/libcork/include/libcork/core/error.h deleted file mode 100644 index 67b731e97..000000000 --- a/libcork/include/libcork/core/error.h +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_ERROR_H -#define LIBCORK_CORE_ERROR_H - -#include -#include -#include -#include - -#include -#include -#include - - -/* Should be a hash of a string representing the error code. */ -typedef uint32_t cork_error; - -/* An error code that represents “no error”. */ -#define CORK_ERROR_NONE ((cork_error) 0) - -CORK_API bool -cork_error_occurred(void); - -CORK_API cork_error -cork_error_code(void); - -CORK_API const char * -cork_error_message(void); - - -CORK_API void -cork_error_clear(void); - -CORK_API void -cork_error_set_printf(cork_error code, const char *format, ...) - CORK_ATTR_PRINTF(2,3); - -CORK_API void -cork_error_set_string(cork_error code, const char *str); - -CORK_API void -cork_error_set_vprintf(cork_error code, const char *format, va_list args) - CORK_ATTR_PRINTF(2,0); - -CORK_API void -cork_error_prefix_printf(const char *format, ...) - CORK_ATTR_PRINTF(1,2); - -CORK_API void -cork_error_prefix_string(const char *str); - -CORK_API void -cork_error_prefix_vprintf(const char *format, va_list arg) - CORK_ATTR_PRINTF(1,0); - - -/* deprecated */ -CORK_API void -cork_error_set(uint32_t error_class, unsigned int error_code, - const char *format, ...) - CORK_ATTR_PRINTF(3,4); - -/* deprecated */ -CORK_API void -cork_error_prefix(const char *format, ...) - CORK_ATTR_PRINTF(1,2); - - -/*----------------------------------------------------------------------- - * Built-in errors - */ - -#define CORK_PARSE_ERROR 0x95dfd3c8 -#define CORK_REDEFINED 0x171629cb -#define CORK_UNDEFINED 0xedc3d7d9 -#define CORK_UNKNOWN_ERROR 0x8cb0880d - -#define cork_parse_error(...) \ - cork_error_set_printf(CORK_PARSE_ERROR, __VA_ARGS__) -#define cork_redefined(...) \ - cork_error_set_printf(CORK_REDEFINED, __VA_ARGS__) -#define cork_undefined(...) \ - cork_error_set_printf(CORK_UNDEFINED, __VA_ARGS__) - -CORK_API void -cork_system_error_set(void); - -CORK_API void -cork_system_error_set_explicit(int err); - -CORK_API void -cork_unknown_error_set_(const char *location); - -#define cork_unknown_error() \ - cork_unknown_error_set_(__func__) - - -/*----------------------------------------------------------------------- - * Abort on failure - */ - -#define cork_abort_(func, file, line, fmt, ...) \ - do { \ - fprintf(stderr, fmt "\n in %s (%s:%u)\n", \ - __VA_ARGS__, (func), (file), (unsigned int) (line)); \ - abort(); \ - } while (0) - -#define cork_abort(fmt, ...) \ - cork_abort_(__func__, __FILE__, __LINE__, fmt, __VA_ARGS__) - -CORK_ATTR_UNUSED -static void * -cork_abort_if_null_(void *ptr, const char *msg, const char *func, - const char *file, unsigned int line) -{ - if (CORK_UNLIKELY(ptr == NULL)) { - cork_abort_(func, file, line, "%s", msg); - } else { - return ptr; - } -} - -#define cork_abort_if_null(ptr, msg) \ - (cork_abort_if_null_(ptr, msg, __func__, __FILE__, __LINE__)) - -#define cork_unreachable() \ - cork_abort("%s", "Code should not be reachable") - - -#endif /* LIBCORK_CORE_ERROR_H */ diff --git a/libcork/include/libcork/core/gc.h b/libcork/include/libcork/core/gc.h deleted file mode 100644 index bc251ead1..000000000 --- a/libcork/include/libcork/core/gc.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_GC_REFCOUNT_H -#define LIBCORK_GC_REFCOUNT_H - - -#include -#include - - -struct cork_gc; - -/* A callback for recursing through the children of a garbage-collected - * object. */ -typedef void -(*cork_gc_recurser)(struct cork_gc *gc, void *obj, void *ud); - -typedef void -(*cork_gc_free_func)(void *obj); - -typedef void -(*cork_gc_recurse_func)(struct cork_gc *gc, void *self, - cork_gc_recurser recurser, void *ud); - -/* An interface that each garbage-collected object must implement. */ -struct cork_gc_obj_iface { - /* Perform additional cleanup; does *NOT* need to deallocate the - * object itself, or release any child references */ - cork_gc_free_func free; - cork_gc_recurse_func recurse; -}; - - -CORK_API void -cork_gc_init(void); - -CORK_API void -cork_gc_done(void); - - -CORK_API void * -cork_gc_alloc(size_t instance_size, struct cork_gc_obj_iface *iface); - -#define cork_gc_new_iface(obj_type, iface) \ - ((obj_type *) \ - (cork_gc_alloc(sizeof(obj_type), (iface)))) - -#define cork_gc_new(struct_name) \ - (cork_gc_new_iface(struct struct_name, &struct_name##__gc)) - - -CORK_API void * -cork_gc_incref(void *obj); - -CORK_API void -cork_gc_decref(void *obj); - - -#endif /* LIBCORK_GC_REFCOUNT_H */ diff --git a/libcork/include/libcork/core/hash.h b/libcork/include/libcork/core/hash.h deleted file mode 100644 index 824eb8285..000000000 --- a/libcork/include/libcork/core/hash.h +++ /dev/null @@ -1,356 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_HASH_H -#define LIBCORK_CORE_HASH_H - - -#include -#include -#include -#include -#include - - -#ifndef CORK_HASH_ATTRIBUTES -#define CORK_HASH_ATTRIBUTES CORK_ATTR_UNUSED static inline -#endif - - -typedef uint32_t cork_hash; - -typedef struct { - cork_u128 u128; -} cork_big_hash; - -#define cork_big_hash_equal(h1, h2) (cork_u128_eq((h1).u128, (h2).u128)) - -#define CORK_BIG_HASH_INIT() {{{{0}}}} - -/* We currently use MurmurHash3 [1], which is public domain, as our hash - * implementation. - * - * [1] http://code.google.com/p/smhasher/ - */ - -#define CORK_ROTL32(a,b) (((a) << ((b) & 0x1f)) | ((a) >> (32 - ((b) & 0x1f)))) -#define CORK_ROTL64(a,b) (((a) << ((b) & 0x3f)) | ((a) >> (64 - ((b) & 0x3f)))) - -CORK_ATTR_UNUSED -static inline -uint32_t cork_fmix32(uint32_t h) -{ - h ^= h >> 16; - h *= 0x85ebca6b; - h ^= h >> 13; - h *= 0xc2b2ae35; - h ^= h >> 16; - return h; -} - -CORK_ATTR_UNUSED -static inline -uint64_t cork_fmix64(uint64_t k) -{ - k ^= k >> 33; - k *= UINT64_C(0xff51afd7ed558ccd); - k ^= k >> 33; - k *= UINT64_C(0xc4ceb9fe1a85ec53); - k ^= k >> 33; - return k; -} - -CORK_HASH_ATTRIBUTES -cork_hash -cork_stable_hash_buffer(cork_hash seed, const void *src, size_t len) -{ - typedef uint32_t __attribute__((__may_alias__)) cork_aliased_uint32_t; - - /* This is exactly the same as cork_murmur_hash_x86_32, but with a byte swap - * to make sure that we always process the uint32s little-endian. */ - const unsigned int nblocks = len / 4; - const cork_aliased_uint32_t *blocks = (const cork_aliased_uint32_t *) src; - const cork_aliased_uint32_t *end = blocks + nblocks; - const cork_aliased_uint32_t *curr; - const uint8_t *tail = (const uint8_t *) end; - - uint32_t h1 = seed; - uint32_t c1 = 0xcc9e2d51; - uint32_t c2 = 0x1b873593; - uint32_t k1 = 0; - - /* body */ - for (curr = blocks; curr != end; curr++) { - uint32_t k1 = CORK_UINT32_HOST_TO_LITTLE(*curr); - - k1 *= c1; - k1 = CORK_ROTL32(k1,15); - k1 *= c2; - - h1 ^= k1; - h1 = CORK_ROTL32(h1,13); - h1 = h1*5+0xe6546b64; - } - - /* tail */ - switch (len & 3) { - case 3: k1 ^= tail[2] << 16; - case 2: k1 ^= tail[1] << 8; - case 1: k1 ^= tail[0]; - k1 *= c1; k1 = CORK_ROTL32(k1,15); k1 *= c2; h1 ^= k1; - }; - - /* finalization */ - h1 ^= len; - h1 = cork_fmix32(h1); - return h1; -} - -#define cork_murmur_hash_x86_32(seed, src, len, dest) \ -do { \ - typedef uint32_t __attribute__((__may_alias__)) cork_aliased_uint32_t; \ - \ - const unsigned int nblocks = len / 4; \ - const cork_aliased_uint32_t *blocks = (const cork_aliased_uint32_t *) src; \ - const cork_aliased_uint32_t *end = blocks + nblocks; \ - const cork_aliased_uint32_t *curr; \ - const uint8_t *tail = (const uint8_t *) end; \ - \ - uint32_t h1 = seed; \ - uint32_t c1 = 0xcc9e2d51; \ - uint32_t c2 = 0x1b873593; \ - uint32_t k1 = 0; \ - \ - /* body */ \ - for (curr = blocks; curr != end; curr++) { \ - uint32_t k1 = *curr; \ - \ - k1 *= c1; \ - k1 = CORK_ROTL32(k1,15); \ - k1 *= c2; \ - \ - h1 ^= k1; \ - h1 = CORK_ROTL32(h1,13); \ - h1 = h1*5+0xe6546b64; \ - } \ - \ - /* tail */ \ - switch (len & 3) { \ - case 3: k1 ^= tail[2] << 16; \ - case 2: k1 ^= tail[1] << 8; \ - case 1: k1 ^= tail[0]; \ - k1 *= c1; k1 = CORK_ROTL32(k1,15); k1 *= c2; h1 ^= k1; \ - }; \ - \ - /* finalization */ \ - h1 ^= len; \ - h1 = cork_fmix32(h1); \ - *(dest) = h1; \ -} while (0) - -#define cork_murmur_hash_x86_128(seed, src, len, dest) \ -do { \ - typedef uint32_t __attribute__((__may_alias__)) cork_aliased_uint32_t; \ - \ - const unsigned int nblocks = len / 16; \ - const cork_aliased_uint32_t *blocks = (const cork_aliased_uint32_t *) src; \ - const cork_aliased_uint32_t *end = blocks + (nblocks * 4); \ - const cork_aliased_uint32_t *curr; \ - const uint8_t *tail = (const uint8_t *) end; \ - \ - uint32_t h1 = cork_u128_be32(seed.u128, 0); \ - uint32_t h2 = cork_u128_be32(seed.u128, 1); \ - uint32_t h3 = cork_u128_be32(seed.u128, 2); \ - uint32_t h4 = cork_u128_be32(seed.u128, 3); \ - \ - uint32_t c1 = 0x239b961b; \ - uint32_t c2 = 0xab0e9789; \ - uint32_t c3 = 0x38b34ae5; \ - uint32_t c4 = 0xa1e38b93; \ - \ - uint32_t k1 = 0; \ - uint32_t k2 = 0; \ - uint32_t k3 = 0; \ - uint32_t k4 = 0; \ - \ - /* body */ \ - for (curr = blocks; curr != end; curr += 4) { \ - uint32_t k1 = curr[0]; \ - uint32_t k2 = curr[1]; \ - uint32_t k3 = curr[2]; \ - uint32_t k4 = curr[3]; \ - \ - k1 *= c1; k1 = CORK_ROTL32(k1,15); k1 *= c2; h1 ^= k1; \ - h1 = CORK_ROTL32(h1,19); h1 += h2; h1 = h1*5+0x561ccd1b; \ - \ - k2 *= c2; k2 = CORK_ROTL32(k2,16); k2 *= c3; h2 ^= k2; \ - h2 = CORK_ROTL32(h2,17); h2 += h3; h2 = h2*5+0x0bcaa747; \ - \ - k3 *= c3; k3 = CORK_ROTL32(k3,17); k3 *= c4; h3 ^= k3; \ - h3 = CORK_ROTL32(h3,15); h3 += h4; h3 = h3*5+0x96cd1c35; \ - \ - k4 *= c4; k4 = CORK_ROTL32(k4,18); k4 *= c1; h4 ^= k4; \ - h4 = CORK_ROTL32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17; \ - } \ - \ - /* tail */ \ - switch (len & 15) { \ - case 15: k4 ^= tail[14] << 16; \ - case 14: k4 ^= tail[13] << 8; \ - case 13: k4 ^= tail[12] << 0; \ - k4 *= c4; k4 = CORK_ROTL32(k4,18); k4 *= c1; h4 ^= k4; \ - \ - case 12: k3 ^= tail[11] << 24; \ - case 11: k3 ^= tail[10] << 16; \ - case 10: k3 ^= tail[ 9] << 8; \ - case 9: k3 ^= tail[ 8] << 0; \ - k3 *= c3; k3 = CORK_ROTL32(k3,17); k3 *= c4; h3 ^= k3; \ - \ - case 8: k2 ^= tail[ 7] << 24; \ - case 7: k2 ^= tail[ 6] << 16; \ - case 6: k2 ^= tail[ 5] << 8; \ - case 5: k2 ^= tail[ 4] << 0; \ - k2 *= c2; k2 = CORK_ROTL32(k2,16); k2 *= c3; h2 ^= k2; \ - \ - case 4: k1 ^= tail[ 3] << 24; \ - case 3: k1 ^= tail[ 2] << 16; \ - case 2: k1 ^= tail[ 1] << 8; \ - case 1: k1 ^= tail[ 0] << 0; \ - k1 *= c1; k1 = CORK_ROTL32(k1,15); k1 *= c2; h1 ^= k1; \ - }; \ - \ - /* finalization */ \ - \ - h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len; \ - \ - h1 += h2; h1 += h3; h1 += h4; \ - h2 += h1; h3 += h1; h4 += h1; \ - \ - h1 = cork_fmix32(h1); \ - h2 = cork_fmix32(h2); \ - h3 = cork_fmix32(h3); \ - h4 = cork_fmix32(h4); \ - \ - h1 += h2; h1 += h3; h1 += h4; \ - h2 += h1; h3 += h1; h4 += h1; \ - \ - (dest)->u128 = cork_u128_from_32(h1, h2, h3, h4); \ -} while (0) - -#define cork_murmur_hash_x64_128(seed, src, len, dest) \ -do { \ - typedef uint64_t __attribute__((__may_alias__)) cork_aliased_uint64_t; \ - \ - const unsigned int nblocks = len / 16; \ - const cork_aliased_uint64_t *blocks = (const cork_aliased_uint64_t *) src; \ - const cork_aliased_uint64_t *end = blocks + (nblocks * 2); \ - const cork_aliased_uint64_t *curr; \ - const uint8_t *tail = (const uint8_t *) end; \ - \ - uint64_t h1 = cork_u128_be64(seed.u128, 0); \ - uint64_t h2 = cork_u128_be64(seed.u128, 1); \ - \ - uint64_t c1 = UINT64_C(0x87c37b91114253d5); \ - uint64_t c2 = UINT64_C(0x4cf5ad432745937f); \ - \ - uint64_t k1 = 0; \ - uint64_t k2 = 0; \ - \ - /* body */ \ - for (curr = blocks; curr != end; curr += 2) { \ - uint64_t k1 = curr[0]; \ - uint64_t k2 = curr[1]; \ - \ - k1 *= c1; k1 = CORK_ROTL64(k1,31); k1 *= c2; h1 ^= k1; \ - h1 = CORK_ROTL64(h1,27); h1 += h2; h1 = h1*5+0x52dce729; \ - \ - k2 *= c2; k2 = CORK_ROTL64(k2,33); k2 *= c1; h2 ^= k2; \ - h2 = CORK_ROTL64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5; \ - } \ - \ - /* tail */ \ - switch (len & 15) { \ - case 15: k2 ^= (uint64_t) (tail[14]) << 48; \ - case 14: k2 ^= (uint64_t) (tail[13]) << 40; \ - case 13: k2 ^= (uint64_t) (tail[12]) << 32; \ - case 12: k2 ^= (uint64_t) (tail[11]) << 24; \ - case 11: k2 ^= (uint64_t) (tail[10]) << 16; \ - case 10: k2 ^= (uint64_t) (tail[ 9]) << 8; \ - case 9: k2 ^= (uint64_t) (tail[ 8]) << 0; \ - k2 *= c2; k2 = CORK_ROTL64(k2,33); k2 *= c1; h2 ^= k2; \ - \ - case 8: k1 ^= (uint64_t) (tail[ 7]) << 56; \ - case 7: k1 ^= (uint64_t) (tail[ 6]) << 48; \ - case 6: k1 ^= (uint64_t) (tail[ 5]) << 40; \ - case 5: k1 ^= (uint64_t) (tail[ 4]) << 32; \ - case 4: k1 ^= (uint64_t) (tail[ 3]) << 24; \ - case 3: k1 ^= (uint64_t) (tail[ 2]) << 16; \ - case 2: k1 ^= (uint64_t) (tail[ 1]) << 8; \ - case 1: k1 ^= (uint64_t) (tail[ 0]) << 0; \ - k1 *= c1; k1 = CORK_ROTL64(k1,31); k1 *= c2; h1 ^= k1; \ - }; \ - \ - /* finalization */ \ - \ - h1 ^= len; h2 ^= len; \ - \ - h1 += h2; \ - h2 += h1; \ - \ - h1 = cork_fmix64(h1); \ - h2 = cork_fmix64(h2); \ - \ - h1 += h2; \ - h2 += h1; \ - \ - (dest)->u128 = cork_u128_from_64(h1, h2); \ -} while (0) - - -#include -CORK_HASH_ATTRIBUTES -cork_hash -cork_hash_buffer(cork_hash seed, const void *src, size_t len) -{ -#if CORK_SIZEOF_POINTER == 8 - cork_big_hash big_seed = {cork_u128_from_32(seed, seed, seed, seed)}; - cork_big_hash hash; - cork_murmur_hash_x64_128(big_seed, src, len, &hash); - return cork_u128_be32(hash.u128, 0); -#else - cork_hash hash = 0; - cork_murmur_hash_x86_32(seed, src, len, &hash); - return hash; -#endif -} - - -CORK_HASH_ATTRIBUTES -cork_big_hash -cork_big_hash_buffer(cork_big_hash seed, const void *src, size_t len) -{ - cork_big_hash result; -#if CORK_SIZEOF_POINTER == 8 - cork_murmur_hash_x64_128(seed, src, len, &result); -#else - cork_murmur_hash_x86_128(seed, src, len, &result); -#endif - return result; -} - - -#define cork_hash_variable(seed, val) \ - (cork_hash_buffer((seed), &(val), sizeof((val)))) -#define cork_stable_hash_variable(seed, val) \ - (cork_stable_hash_buffer((seed), &(val), sizeof((val)))) -#define cork_big_hash_variable(seed, val) \ - (cork_big_hash_buffer((seed), &(val), sizeof((val)))) - - -#endif /* LIBCORK_CORE_HASH_H */ diff --git a/libcork/include/libcork/core/id.h b/libcork/include/libcork/core/id.h deleted file mode 100644 index 3e94179ae..000000000 --- a/libcork/include/libcork/core/id.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_ID_H -#define LIBCORK_CORE_ID_H - -#include - - -struct cork_uid { - const char *name; -}; - -typedef const struct cork_uid *cork_uid; - -#define CORK_UID_NONE ((cork_uid) NULL) - -#define cork_uid_define_named(c_name, name) \ - static const struct cork_uid c_name##__id = { name }; \ - static cork_uid c_name = &c_name##__id; -#define cork_uid_define(c_name) \ - cork_uid_define_named(c_name, #c_name) - -#define cork_uid_equal(id1, id2) ((id1) == (id2)) -#define cork_uid_hash(id) ((cork_hash) (uintptr_t) (id)) -#define cork_uid_name(id) ((id)->name) - - -#endif /* LIBCORK_CORE_ID_H */ diff --git a/libcork/include/libcork/core/mempool.h b/libcork/include/libcork/core/mempool.h deleted file mode 100644 index e762befcc..000000000 --- a/libcork/include/libcork/core/mempool.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORK_MEMPOOL_H -#define LIBCORK_CORK_MEMPOOL_H - - -#include -#include -#include -#include -#include - - -#define CORK_MEMPOOL_DEFAULT_BLOCK_SIZE 4096 - - -struct cork_mempool; - - -CORK_API struct cork_mempool * -cork_mempool_new_size_ex(size_t element_size, size_t block_size); - -#define cork_mempool_new_size(element_size) \ - (cork_mempool_new_size_ex \ - ((element_size), CORK_MEMPOOL_DEFAULT_BLOCK_SIZE)) - -#define cork_mempool_new_ex(type, block_size) \ - (cork_mempool_new_size_ex(sizeof(type), (block_size))) - -#define cork_mempool_new(type) \ - (cork_mempool_new_size(sizeof(type))) - -CORK_API void -cork_mempool_free(struct cork_mempool *mp); - - -CORK_API void -cork_mempool_set_callbacks(struct cork_mempool *mp, - void *user_data, cork_free_f free_user_data, - cork_init_f init_object, - cork_done_f done_object); - - -CORK_API void * -cork_mempool_new_object(struct cork_mempool *mp); - - -CORK_API void -cork_mempool_free_object(struct cork_mempool *mp, void *ptr); - - -#endif /* LIBCORK_CORK_MEMPOOL_H */ diff --git a/libcork/include/libcork/core/net-addresses.h b/libcork/include/libcork/core/net-addresses.h deleted file mode 100644 index 5de73b240..000000000 --- a/libcork/include/libcork/core/net-addresses.h +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_NET_ADDRESSES_H -#define LIBCORK_CORE_NET_ADDRESSES_H - - -#include - -#include -#include -#include - - -/*----------------------------------------------------------------------- - * IP addresses - */ - -struct cork_ipv4 { - union { - uint8_t u8[4]; - uint16_t u16[2]; - uint32_t u32; - } _; -}; - -struct cork_ipv6 { - union { - uint8_t u8[16]; - uint16_t u16[8]; - uint32_t u32[4]; - uint64_t u64[2]; - } _; -}; - -struct cork_ip { - /* Which version of IP address this is. */ - unsigned int version; - union { - struct cork_ipv4 v4; - struct cork_ipv6 v6; - } ip; -}; - - -#define CORK_IPV4_STRING_LENGTH (sizeof "xxx.xxx.xxx.xxx") -#define CORK_IPV6_STRING_LENGTH \ - (sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") -#define CORK_IP_STRING_LENGTH CORK_IPV6_STRING_LENGTH - - -/*** IPv4 ***/ - -/* src must be well-formed: 4 bytes, big-endian */ -#define cork_ipv4_copy(addr, src) \ - (memcpy((addr), (src), sizeof(struct cork_ipv4))) - -#define cork_ipv4_equal(a1, a2) \ - ((a1)->_.u32 == (a2)->_.u32) - -CORK_API int -cork_ipv4_init(struct cork_ipv4 *addr, const char *str); - -CORK_API bool -cork_ipv4_equal_(const struct cork_ipv4 *addr1, const struct cork_ipv4 *addr2); - -CORK_API void -cork_ipv4_to_raw_string(const struct cork_ipv4 *addr, char *dest); - -CORK_API bool -cork_ipv4_is_valid_network(const struct cork_ipv4 *addr, - unsigned int cidr_prefix); - - -/*** IPv6 ***/ - -/* src must be well-formed: 16 bytes, big-endian */ -#define cork_ipv6_copy(addr, src) \ - (memcpy((addr), (src), sizeof(struct cork_ipv6))) - -#define cork_ipv6_equal(a1, a2) \ - ((a1)->_.u64[0] == (a2)->_.u64[0] && \ - (a1)->_.u64[1] == (a2)->_.u64[1]) - -CORK_API int -cork_ipv6_init(struct cork_ipv6 *addr, const char *str); - -CORK_API bool -cork_ipv6_equal_(const struct cork_ipv6 *addr1, const struct cork_ipv6 *addr2); - -CORK_API void -cork_ipv6_to_raw_string(const struct cork_ipv6 *addr, char *dest); - -CORK_API bool -cork_ipv6_is_valid_network(const struct cork_ipv6 *addr, - unsigned int cidr_prefix); - - -/*** Generic IP ***/ - -#define cork_ip_equal(a1, a2) \ - ((a1)->version == 4? \ - ((a2)->version == 4 && cork_ipv4_equal(&(a1)->ip.v4, &(a2)->ip.v4)): \ - ((a2)->version == 6 && cork_ipv6_equal(&(a1)->ip.v6, &(a2)->ip.v6))) - -/* src must be well-formed: 4 bytes, big-endian */ -#define cork_ip_from_ipv4(addr, src) \ - do { \ - (addr)->version = 4; \ - cork_ipv4_copy(&(addr)->ip.v4, (src)); \ - } while (0) - -/* src must be well-formed: 16 bytes, big-endian */ -#define cork_ip_from_ipv6(addr, src) \ - do { \ - (addr)->version = 6; \ - cork_ipv6_copy(&(addr)->ip.v6, (src)); \ - } while (0) - -/* src must be well-formed: 4 bytes, big-endian */ -CORK_API void -cork_ip_from_ipv4_(struct cork_ip *addr, const void *src); - -/* src must be well-formed: 16 bytes, big-endian */ -CORK_API void -cork_ip_from_ipv6_(struct cork_ip *addr, const void *src); - -CORK_API int -cork_ip_init(struct cork_ip *addr, const char *str); - -CORK_API bool -cork_ip_equal_(const struct cork_ip *addr1, const struct cork_ip *addr2); - -CORK_API void -cork_ip_to_raw_string(const struct cork_ip *addr, char *dest); - -CORK_API bool -cork_ip_is_valid_network(const struct cork_ip *addr, unsigned int cidr_prefix); - - -#endif /* LIBCORK_CORE_NET_ADDRESSES_H */ diff --git a/libcork/include/libcork/core/timestamp.h b/libcork/include/libcork/core/timestamp.h deleted file mode 100644 index 4eba7b147..000000000 --- a/libcork/include/libcork/core/timestamp.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_TIMESTAMP_H -#define LIBCORK_CORE_TIMESTAMP_H - - -#include -#include -#include -#include - - -typedef uint64_t cork_timestamp; - - -#define cork_timestamp_init_sec(ts, sec) \ - do { \ - *(ts) = (((uint64_t) (sec)) << 32); \ - } while (0) - -#define cork_timestamp_init_gsec(ts, sec, gsec) \ - do { \ - *(ts) = (((uint64_t) (sec)) << 32) | \ - (((uint64_t) (gsec)) & 0xffffffff); \ - } while (0) - -#define cork_timestamp_init_msec(ts, sec, msec) \ - do { \ - *(ts) = (((uint64_t) (sec)) << 32) | \ - ((((uint64_t) (msec)) << 32) / 1000); \ - } while (0) - -#define cork_timestamp_init_usec(ts, sec, usec) \ - do { \ - *(ts) = (((uint64_t) (sec)) << 32) | \ - ((((uint64_t) (usec)) << 32) / 1000000); \ - } while (0) - -#define cork_timestamp_init_nsec(ts, sec, nsec) \ - do { \ - *(ts) = (((uint64_t) (sec)) << 32) | \ - ((((uint64_t) (nsec)) << 32) / 1000000000); \ - } while (0) - - -CORK_API void -cork_timestamp_init_now(cork_timestamp *ts); - - -#define cork_timestamp_sec(ts) ((uint32_t) ((ts) >> 32)) -#define cork_timestamp_gsec(ts) ((uint32_t) ((ts) & 0xffffffff)) - -CORK_ATTR_UNUSED -static inline uint64_t -cork_timestamp_gsec_to_units(const cork_timestamp ts, uint64_t denom) -{ - uint64_t half = ((uint64_t) 1 << 31) / denom; - uint64_t gsec = cork_timestamp_gsec(ts); - gsec += half; - gsec *= denom; - gsec >>= 32; - return gsec; -} - -#define cork_timestamp_msec(ts) cork_timestamp_gsec_to_units(ts, 1000) -#define cork_timestamp_usec(ts) cork_timestamp_gsec_to_units(ts, 1000000) -#define cork_timestamp_nsec(ts) cork_timestamp_gsec_to_units(ts, 1000000000) - - -CORK_API int -cork_timestamp_format_utc(const cork_timestamp ts, const char *format, - struct cork_buffer *dest); - -CORK_API int -cork_timestamp_format_local(const cork_timestamp ts, const char *format, - struct cork_buffer *dest); - - -#endif /* LIBCORK_CORE_TIMESTAMP_H */ diff --git a/libcork/include/libcork/core/types.h b/libcork/include/libcork/core/types.h deleted file mode 100644 index f469bedac..000000000 --- a/libcork/include/libcork/core/types.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_TYPES_H -#define LIBCORK_CORE_TYPES_H - -/* For now, we assume that the C99 integer types are available using the - * standard headers. */ - -#include -#include -#include -#include -#include - - -/* Define preprocessor macros that contain the size of several built-in - * types. Again, we assume that we have the C99 definitions available. */ - -#if SHRT_MAX == INT8_MAX -#define CORK_SIZEOF_SHORT 1 -#elif SHRT_MAX == INT16_MAX -#define CORK_SIZEOF_SHORT 2 -#elif SHRT_MAX == INT32_MAX -#define CORK_SIZEOF_SHORT 4 -#elif SHRT_MAX == INT64_MAX -#define CORK_SIZEOF_SHORT 8 -#else -#error "Cannot determine size of short" -#endif - -#if INT_MAX == INT8_MAX -#define CORK_SIZEOF_INT 1 -#elif INT_MAX == INT16_MAX -#define CORK_SIZEOF_INT 2 -#elif INT_MAX == INT32_MAX -#define CORK_SIZEOF_INT 4 -#elif INT_MAX == INT64_MAX -#define CORK_SIZEOF_INT 8 -#else -#error "Cannot determine size of int" -#endif - -#if LONG_MAX == INT8_MAX -#define CORK_SIZEOF_LONG 1 -#elif LONG_MAX == INT16_MAX -#define CORK_SIZEOF_LONG 2 -#elif LONG_MAX == INT32_MAX -#define CORK_SIZEOF_LONG 4 -#elif LONG_MAX == INT64_MAX -#define CORK_SIZEOF_LONG 8 -#else -#error "Cannot determine size of long" -#endif - -#if INTPTR_MAX == INT8_MAX -#define CORK_SIZEOF_POINTER 1 -#elif INTPTR_MAX == INT16_MAX -#define CORK_SIZEOF_POINTER 2 -#elif INTPTR_MAX == INT32_MAX -#define CORK_SIZEOF_POINTER 4 -#elif INTPTR_MAX == INT64_MAX -#define CORK_SIZEOF_POINTER 8 -#else -#error "Cannot determine size of void *" -#endif - - -/* Return a pointer to a @c struct, given a pointer to one of its - * fields. */ -#define cork_container_of(field, struct_type, field_name) \ - ((struct_type *) (- offsetof(struct_type, field_name) + \ - (void *) (field))) - -#endif /* LIBCORK_CORE_TYPES_H */ diff --git a/libcork/include/libcork/core/u128.h b/libcork/include/libcork/core/u128.h deleted file mode 100644 index 692f096d0..000000000 --- a/libcork/include/libcork/core/u128.h +++ /dev/null @@ -1,223 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_U128_H -#define LIBCORK_CORE_U128_H - - -#include -#include -#include -#include - -typedef struct { - union { - uint8_t u8[16]; - uint16_t u16[8]; - uint32_t u32[4]; - uint64_t u64[2]; -#if CORK_HOST_ENDIANNESS == CORK_BIG_ENDIAN - struct { uint64_t hi; uint64_t lo; } be64; -#else - struct { uint64_t lo; uint64_t hi; } be64; -#endif -#if CORK_CONFIG_HAVE_GCC_INT128 -#define CORK_U128_HAVE_U128 1 - unsigned __int128 u128; -#elif CORK_CONFIG_HAVE_GCC_MODE_ATTRIBUTE -#define CORK_U128_HAVE_U128 1 - unsigned int u128 __attribute__((mode(TI))); -#else -#define CORK_U128_HAVE_U128 0 -#endif - } _; -} cork_u128; - - -/* i0-3 are given in big-endian order, regardless of host endianness */ -CORK_ATTR_UNUSED -static cork_u128 -cork_u128_from_32(uint32_t i0, uint32_t i1, uint32_t i2, uint32_t i3) -{ - cork_u128 value; -#if CORK_HOST_ENDIANNESS == CORK_BIG_ENDIAN - value._.u32[0] = i0; - value._.u32[1] = i1; - value._.u32[2] = i2; - value._.u32[3] = i3; -#else - value._.u32[3] = i0; - value._.u32[2] = i1; - value._.u32[1] = i2; - value._.u32[0] = i3; -#endif - return value; -} - -/* i0-1 are given in big-endian order, regardless of host endianness */ -CORK_ATTR_UNUSED -static cork_u128 -cork_u128_from_64(uint64_t i0, uint64_t i1) -{ - cork_u128 value; -#if CORK_HOST_ENDIANNESS == CORK_BIG_ENDIAN - value._.u64[0] = i0; - value._.u64[1] = i1; -#else - value._.u64[1] = i0; - value._.u64[0] = i1; -#endif - return value; -} - - -#if CORK_HOST_ENDIANNESS == CORK_BIG_ENDIAN -#define cork_u128_be8(val, idx) ((val)._.u8[(idx)]) -#define cork_u128_be16(val, idx) ((val)._.u16[(idx)]) -#define cork_u128_be32(val, idx) ((val)._.u32[(idx)]) -#define cork_u128_be64(val, idx) ((val)._.u64[(idx)]) -#else -#define cork_u128_be8(val, idx) ((val)._.u8[15 - (idx)]) -#define cork_u128_be16(val, idx) ((val)._.u16[7 - (idx)]) -#define cork_u128_be32(val, idx) ((val)._.u32[3 - (idx)]) -#define cork_u128_be64(val, idx) ((val)._.u64[1 - (idx)]) -#endif - - -CORK_ATTR_UNUSED -static cork_u128 -cork_u128_add(cork_u128 a, cork_u128 b) -{ - cork_u128 result; -#if CORK_U128_HAVE_U128 - result._.u128 = a._.u128 + b._.u128; -#else - result._.be64.lo = a._.be64.lo + b._.be64.lo; - result._.be64.hi = - a._.be64.hi + b._.be64.hi + (result._.be64.lo < a._.be64.lo); -#endif - return result; -} - -CORK_ATTR_UNUSED -static cork_u128 -cork_u128_sub(cork_u128 a, cork_u128 b) -{ - cork_u128 result; -#if CORK_U128_HAVE_U128 - result._.u128 = a._.u128 - b._.u128; -#else - result._.be64.lo = a._.be64.lo - b._.be64.lo; - result._.be64.hi = - a._.be64.hi - b._.be64.hi - (result._.be64.lo > a._.be64.lo); -#endif - return result; -} - - -CORK_ATTR_UNUSED -static bool -cork_u128_eq(cork_u128 a, cork_u128 b) -{ -#if CORK_U128_HAVE_U128 - return (a._.u128 == b._.u128); -#else - return (a._.be64.hi == b._.be64.hi) && (a._.be64.lo == b._.be64.lo); -#endif -} - -CORK_ATTR_UNUSED -static bool -cork_u128_ne(cork_u128 a, cork_u128 b) -{ -#if CORK_U128_HAVE_U128 - return (a._.u128 != b._.u128); -#else - return (a._.be64.hi != b._.be64.hi) || (a._.be64.lo != b._.be64.lo); -#endif -} - -CORK_ATTR_UNUSED -static bool -cork_u128_lt(cork_u128 a, cork_u128 b) -{ -#if CORK_U128_HAVE_U128 - return (a._.u128 < b._.u128); -#else - if (a._.be64.hi == b._.be64.hi) { - return a._.be64.lo < b._.be64.lo; - } else { - return a._.be64.hi < b._.be64.hi; - } -#endif -} - -CORK_ATTR_UNUSED -static bool -cork_u128_le(cork_u128 a, cork_u128 b) -{ -#if CORK_U128_HAVE_U128 - return (a._.u128 <= b._.u128); -#else - if (a._.be64.hi == b._.be64.hi) { - return a._.be64.lo <= b._.be64.lo; - } else { - return a._.be64.hi <= b._.be64.hi; - } -#endif -} - -CORK_ATTR_UNUSED -static bool -cork_u128_gt(cork_u128 a, cork_u128 b) -{ -#if CORK_U128_HAVE_U128 - return (a._.u128 > b._.u128); -#else - if (a._.be64.hi == b._.be64.hi) { - return a._.be64.lo > b._.be64.lo; - } else { - return a._.be64.hi > b._.be64.hi; - } -#endif -} - -CORK_ATTR_UNUSED -static bool -cork_u128_ge(cork_u128 a, cork_u128 b) -{ -#if CORK_U128_HAVE_U128 - return (a._.u128 >= b._.u128); -#else - if (a._.be64.hi == b._.be64.hi) { - return a._.be64.lo >= b._.be64.lo; - } else { - return a._.be64.hi >= b._.be64.hi; - } -#endif -} - - -/* log10(x) = log2(x) / log2(10) ~= log2(x) / 3.322 */ -#define CORK_U128_DECIMAL_LENGTH 44 /* ~= 128 / 3 + 1 + 1 */ - -CORK_API const char * -cork_u128_to_decimal(char *buf, cork_u128 val); - - -#define CORK_U128_HEX_LENGTH 33 - -CORK_API const char * -cork_u128_to_hex(char *buf, cork_u128 val); - -CORK_API const char * -cork_u128_to_padded_hex(char *buf, cork_u128 val); - - -#endif /* LIBCORK_CORE_U128_H */ diff --git a/libcork/include/libcork/ds.h b/libcork/include/libcork/ds.h deleted file mode 100644 index 8cedd21c5..000000000 --- a/libcork/include/libcork/ds.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_H -#define LIBCORK_DS_H - -/*** include all of the parts ***/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* LIBCORK_DS_H */ diff --git a/libcork/include/libcork/ds/array.h b/libcork/include/libcork/ds/array.h deleted file mode 100644 index d86a8b6f5..000000000 --- a/libcork/include/libcork/ds/array.h +++ /dev/null @@ -1,161 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_ARRAY_H -#define LIBCORK_DS_ARRAY_H - - -#include -#include -#include - - -/*----------------------------------------------------------------------- - * Resizable arrays - */ - -struct cork_array_priv; - -struct cork_raw_array { - void *items; - size_t size; - struct cork_array_priv *priv; -}; - -CORK_API void -cork_raw_array_init(struct cork_raw_array *array, size_t element_size); - -CORK_API void -cork_raw_array_done(struct cork_raw_array *array); - -CORK_API void -cork_raw_array_set_callback_data(struct cork_raw_array *array, - void *user_data, cork_free_f free_user_data); - -CORK_API void -cork_raw_array_set_init(struct cork_raw_array *array, cork_init_f init); - -CORK_API void -cork_raw_array_set_done(struct cork_raw_array *array, cork_done_f done); - -CORK_API void -cork_raw_array_set_reuse(struct cork_raw_array *array, cork_init_f reuse); - -CORK_API void -cork_raw_array_set_remove(struct cork_raw_array *array, cork_done_f remove); - -CORK_API size_t -cork_raw_array_element_size(const struct cork_raw_array *array); - -CORK_API void -cork_raw_array_clear(struct cork_raw_array *array); - -CORK_API void * -cork_raw_array_elements(const struct cork_raw_array *array); - -CORK_API void * -cork_raw_array_at(const struct cork_raw_array *array, size_t index); - -CORK_API size_t -cork_raw_array_size(const struct cork_raw_array *array); - -CORK_API bool -cork_raw_array_is_empty(const struct cork_raw_array *array); - -CORK_API void -cork_raw_array_ensure_size(struct cork_raw_array *array, size_t count); - -CORK_API void * -cork_raw_array_append(struct cork_raw_array *array); - -CORK_API int -cork_raw_array_copy(struct cork_raw_array *dest, - const struct cork_raw_array *src, - cork_copy_f copy, void *user_data); - - -/*----------------------------------------------------------------------- - * Type-checked resizable arrays - */ - -#define cork_array(T) \ - struct { \ - T *items; \ - size_t size; \ - struct cork_array_priv *priv; \ - } - -#define cork_array_element_size(arr) (sizeof((arr)->items[0])) -#define cork_array_elements(arr) ((arr)->items) -#define cork_array_at(arr, i) ((arr)->items[(i)]) -#define cork_array_size(arr) ((arr)->size) -#define cork_array_is_empty(arr) ((arr)->size == 0) -#define cork_array_to_raw(arr) ((struct cork_raw_array *) (void *) (arr)) - -#define cork_array_init(arr) \ - (cork_raw_array_init(cork_array_to_raw(arr), cork_array_element_size(arr))) -#define cork_array_done(arr) \ - (cork_raw_array_done(cork_array_to_raw(arr))) - -#define cork_array_set_callback_data(arr, ud, fud) \ - (cork_raw_array_set_callback_data(cork_array_to_raw(arr), (ud), (fud))) -#define cork_array_set_init(arr, i) \ - (cork_raw_array_set_init(cork_array_to_raw(arr), (i))) -#define cork_array_set_done(arr, d) \ - (cork_raw_array_set_done(cork_array_to_raw(arr), (d))) -#define cork_array_set_reuse(arr, r) \ - (cork_raw_array_set_reuse(cork_array_to_raw(arr), (r))) -#define cork_array_set_remove(arr, r) \ - (cork_raw_array_set_remove(cork_array_to_raw(arr), (r))) - -#define cork_array_clear(arr) \ - (cork_raw_array_clear(cork_array_to_raw(arr))) -#define cork_array_copy(d, s, c, ud) \ - (cork_raw_array_copy(cork_array_to_raw(d), cork_array_to_raw(s), (c), (ud))) - -#define cork_array_ensure_size(arr, count) \ - (cork_raw_array_ensure_size(cork_array_to_raw(arr), (count))) - -#define cork_array_append(arr, element) \ - (cork_raw_array_append(cork_array_to_raw(arr)), \ - ((arr)->items[(arr)->size - 1] = (element), (void) 0)) - -#define cork_array_append_get(arr) \ - (cork_raw_array_append(cork_array_to_raw(arr)), \ - &(arr)->items[(arr)->size - 1]) - - -/*----------------------------------------------------------------------- - * Builtin array types - */ - -CORK_API void -cork_raw_pointer_array_init(struct cork_raw_array *array, cork_free_f free); - -#define cork_pointer_array_init(arr, f) \ - (cork_raw_pointer_array_init(cork_array_to_raw(arr), (f))) - -struct cork_string_array { - const char **items; - size_t size; - struct cork_array_priv *priv; -}; - -CORK_API void -cork_string_array_init(struct cork_string_array *array); - -CORK_API void -cork_string_array_append(struct cork_string_array *array, const char *str); - -CORK_API void -cork_string_array_copy(struct cork_string_array *dest, - const struct cork_string_array *src); - - -#endif /* LIBCORK_DS_ARRAY_H */ diff --git a/libcork/include/libcork/ds/bitset.h b/libcork/include/libcork/ds/bitset.h deleted file mode 100644 index f43ce096e..000000000 --- a/libcork/include/libcork/ds/bitset.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_BITS_H -#define LIBCORK_DS_BITS_H - - -#include -#include - - -/*----------------------------------------------------------------------- - * Bit sets - */ - -struct cork_bitset { - uint8_t *bits; - size_t bit_count; - size_t byte_count; -}; - -CORK_API struct cork_bitset * -cork_bitset_new(size_t bit_count); - -CORK_API void -cork_bitset_free(struct cork_bitset *set); - -CORK_API void -cork_bitset_clear(struct cork_bitset *set); - -/* Extract the byte that contains a particular bit in an array. */ -#define cork_bitset_byte_for_bit(set, i) \ - ((set)->bits[(i) / 8]) - -/* Create a bit mask that extracts a particular bit from the byte that it lives - * in. */ -#define cork_bitset_pos_mask_for_bit(i) \ - (0x80 >> ((i) % 8)) - -/* Create a bit mask that extracts everything except for a particular bit from - * the byte that it lives in. */ -#define cork_bitset_neg_mask_for_bit(i) \ - (~cork_bitset_pos_mask_for_bit(i)) - -/* Return whether a particular bit is set in a byte array. Bits are numbered - * from 0, in a big-endian order. */ -#define cork_bitset_get(set, i) \ - ((cork_bitset_byte_for_bit(set, i) & cork_bitset_pos_mask_for_bit(i)) != 0) - -/* Set (or unset) a particular bit is set in a byte array. Bits are numbered - * from 0, in a big-endian order. */ -#define cork_bitset_set(set, i, val) \ - (cork_bitset_byte_for_bit(set, i) = \ - (cork_bitset_byte_for_bit(set, i) & cork_bitset_neg_mask_for_bit(i)) \ - | ((val)? cork_bitset_pos_mask_for_bit(i): 0)) - - -#endif /* LIBCORK_DS_BITS_H */ diff --git a/libcork/include/libcork/ds/buffer.h b/libcork/include/libcork/ds/buffer.h deleted file mode 100644 index 39fbbfa1f..000000000 --- a/libcork/include/libcork/ds/buffer.h +++ /dev/null @@ -1,163 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_BUFFER_H -#define LIBCORK_DS_BUFFER_H - - -#include - -#include -#include -#include - - -struct cork_buffer { - /* The current contents of the buffer. */ - void *buf; - /* The current size of the buffer. */ - size_t size; - /* The amount of space allocated for buf. */ - size_t allocated_size; -}; - - -CORK_API void -cork_buffer_init(struct cork_buffer *buffer); - -#define CORK_BUFFER_INIT() { NULL, 0, 0 } - -CORK_API struct cork_buffer * -cork_buffer_new(void); - -CORK_API void -cork_buffer_done(struct cork_buffer *buffer); - -CORK_API void -cork_buffer_free(struct cork_buffer *buffer); - - -CORK_API bool -cork_buffer_equal(const struct cork_buffer *buffer1, - const struct cork_buffer *buffer2); - - -CORK_API void -cork_buffer_ensure_size(struct cork_buffer *buffer, size_t desired_size); - - -CORK_API void -cork_buffer_clear(struct cork_buffer *buffer); - -CORK_API void -cork_buffer_truncate(struct cork_buffer *buffer, size_t length); - -#define cork_buffer_byte(buffer, i) (((const uint8_t *) (buffer)->buf)[(i)]) -#define cork_buffer_char(buffer, i) (((const char *) (buffer)->buf)[(i)]) - - -/*----------------------------------------------------------------------- - * A whole bunch of methods for adding data - */ - -#define cork_buffer_copy(dest, src) \ - (cork_buffer_set((dest), (src)->buf, (src)->size)) - -CORK_API void -cork_buffer_set(struct cork_buffer *buffer, const void *src, size_t length); - -#define cork_buffer_append_copy(dest, src) \ - (cork_buffer_append((dest), (src)->buf, (src)->size)) - -CORK_API void -cork_buffer_append(struct cork_buffer *buffer, const void *src, size_t length); - - -CORK_API void -cork_buffer_set_string(struct cork_buffer *buffer, const char *str); - -CORK_API void -cork_buffer_append_string(struct cork_buffer *buffer, const char *str); - -#define cork_buffer_set_literal(buffer, str) \ - (cork_buffer_set((buffer), (str), sizeof((str)) - 1)) - -#define cork_buffer_append_literal(buffer, str) \ - (cork_buffer_append((buffer), (str), sizeof((str)) - 1)) - - -CORK_API void -cork_buffer_printf(struct cork_buffer *buffer, const char *format, ...) - CORK_ATTR_PRINTF(2,3); - -CORK_API void -cork_buffer_append_printf(struct cork_buffer *buffer, const char *format, ...) - CORK_ATTR_PRINTF(2,3); - -CORK_API void -cork_buffer_vprintf(struct cork_buffer *buffer, const char *format, - va_list args) - CORK_ATTR_PRINTF(2,0); - -CORK_API void -cork_buffer_append_vprintf(struct cork_buffer *buffer, const char *format, - va_list args) - CORK_ATTR_PRINTF(2,0); - - -/*----------------------------------------------------------------------- - * Some helpers for pretty-printing data - */ - -CORK_API void -cork_buffer_append_indent(struct cork_buffer *buffer, size_t indent); - -CORK_API void -cork_buffer_append_c_string(struct cork_buffer *buffer, - const char *src, size_t length); - -CORK_API void -cork_buffer_append_hex_dump(struct cork_buffer *buffer, size_t indent, - const char *src, size_t length); - -CORK_API void -cork_buffer_append_multiline(struct cork_buffer *buffer, size_t indent, - const char *src, size_t length); - -CORK_API void -cork_buffer_append_binary(struct cork_buffer *buffer, size_t indent, - const char *src, size_t length); - - -/*----------------------------------------------------------------------- - * Buffer's managed buffer/slice implementation - */ - -#include -#include - -CORK_API struct cork_managed_buffer * -cork_buffer_to_managed_buffer(struct cork_buffer *buffer); - -CORK_API int -cork_buffer_to_slice(struct cork_buffer *buffer, struct cork_slice *slice); - - -/*----------------------------------------------------------------------- - * Buffer's stream consumer implementation - */ - -#include - -CORK_API struct cork_stream_consumer * -cork_buffer_to_stream_consumer(struct cork_buffer *buffer); - - -#endif /* LIBCORK_DS_BUFFER_H */ diff --git a/libcork/include/libcork/ds/dllist.h b/libcork/include/libcork/ds/dllist.h deleted file mode 100644 index 7fc22bfe6..000000000 --- a/libcork/include/libcork/ds/dllist.h +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2014, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_DLLIST_H -#define LIBCORK_DS_DLLIST_H - -#include -#include - - -struct cork_dllist_item { - /* A pointer to the next element in the list. */ - struct cork_dllist_item *next; - /* A pointer to the previous element in the list. */ - struct cork_dllist_item *prev; -}; - - -struct cork_dllist { - /* The sentinel element for this list. */ - struct cork_dllist_item head; -}; - -#define CORK_DLLIST_INIT(list) { { &(list).head, &(list).head } } - -#define cork_dllist_init(list) \ - do { \ - (list)->head.next = &(list)->head; \ - (list)->head.prev = &(list)->head; \ - } while (0) - - - -/* DEPRECATED! Use cork_dllist_foreach or cork_dllist_visit instead. */ -typedef void -(*cork_dllist_map_func)(struct cork_dllist_item *element, void *user_data); - -CORK_API void -cork_dllist_map(struct cork_dllist *list, - cork_dllist_map_func func, void *user_data); - - -typedef int -cork_dllist_visit_f(void *ud, struct cork_dllist_item *element); - -CORK_API int -cork_dllist_visit(struct cork_dllist *list, void *ud, - cork_dllist_visit_f *visit); - - -#define cork_dllist_foreach_void(list, curr, _next) \ - for ((curr) = cork_dllist_start((list)), (_next) = (curr)->next; \ - !cork_dllist_is_end((list), (curr)); \ - (curr) = (_next), (_next) = (curr)->next) - -#define cork_dllist_foreach(list, curr, _next, etype, element, item_field) \ - for ((curr) = cork_dllist_start((list)), (_next) = (curr)->next, \ - (element) = cork_container_of((curr), etype, item_field); \ - !cork_dllist_is_end((list), (curr)); \ - (curr) = (_next), (_next) = (curr)->next, \ - (element) = cork_container_of((curr), etype, item_field)) - - -CORK_API size_t -cork_dllist_size(const struct cork_dllist *list); - - -#define cork_dllist_add_after(pred, element) \ - do { \ - (element)->prev = (pred); \ - (element)->next = (pred)->next; \ - (pred)->next->prev = (element); \ - (pred)->next = (element); \ - } while (0) - -#define cork_dllist_add_before(succ, element) \ - do { \ - (element)->next = (succ); \ - (element)->prev = (succ)->prev; \ - (succ)->prev->next = (element); \ - (succ)->prev = (element); \ - } while (0) - -#define cork_dllist_add_to_head(list, element) \ - cork_dllist_add_after(&(list)->head, (element)) - -#define cork_dllist_add_to_tail(list, element) \ - cork_dllist_add_before(&(list)->head, (element)) - -#define cork_dllist_add cork_dllist_add_to_tail - - -#define cork_dllist_add_list_to_head(dest, src) \ - do { \ - struct cork_dllist_item *dest_start = cork_dllist_start(dest); \ - struct cork_dllist_item *src_start = cork_dllist_start(src); \ - dest_start->prev = &(src)->head; \ - src_start->prev = &(dest)->head; \ - (src)->head.next = dest_start; \ - (dest)->head.next = src_start; \ - cork_dllist_remove(&(src)->head); \ - cork_dllist_init(src); \ - } while (0) - -#define cork_dllist_add_list_to_tail(dest, src) \ - do { \ - struct cork_dllist_item *dest_end = cork_dllist_end(dest); \ - struct cork_dllist_item *src_end = cork_dllist_end(src); \ - dest_end->next = &(src)->head; \ - src_end->next = &(dest)->head; \ - (src)->head.prev = dest_end; \ - (dest)->head.prev = src_end; \ - cork_dllist_remove(&(src)->head); \ - cork_dllist_init(src); \ - } while (0) - - -#define cork_dllist_remove(element) \ - do { \ - (element)->prev->next = (element)->next; \ - (element)->next->prev = (element)->prev; \ - } while (0) - - -#define cork_dllist_is_empty(list) \ - (cork_dllist_is_end((list), cork_dllist_start((list)))) - - -#define cork_dllist_head(list) \ - (((list)->head.next == &(list)->head)? NULL: (list)->head.next) -#define cork_dllist_tail(list) \ - (((list)->head.prev == &(list)->head)? NULL: (list)->head.prev) - -#define cork_dllist_start(list) \ - ((list)->head.next) -#define cork_dllist_end(list) \ - ((list)->head.prev) - -#define cork_dllist_is_start(list, element) \ - ((element) == &(list)->head) -#define cork_dllist_is_end(list, element) \ - ((element) == &(list)->head) - - -#endif /* LIBCORK_DS_DLLIST_H */ diff --git a/libcork/include/libcork/ds/hash-table.h b/libcork/include/libcork/ds/hash-table.h deleted file mode 100644 index 6a0eee407..000000000 --- a/libcork/include/libcork/ds/hash-table.h +++ /dev/null @@ -1,159 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_HASH_TABLE_H -#define LIBCORK_DS_HASH_TABLE_H - -#include -#include -#include -#include -#include -#include - - -/*----------------------------------------------------------------------- - * Hash tables - */ - -struct cork_hash_table_entry { - cork_hash hash; - void *key; - void *value; -}; - - -struct cork_hash_table; - -CORK_API struct cork_hash_table * -cork_hash_table_new(size_t initial_size, unsigned int flags); - -CORK_API void -cork_hash_table_free(struct cork_hash_table *table); - - -CORK_API void -cork_hash_table_set_user_data(struct cork_hash_table *table, - void *user_data, cork_free_f free_user_data); - -CORK_API void -cork_hash_table_set_equals(struct cork_hash_table *table, cork_equals_f equals); - -CORK_API void -cork_hash_table_set_free_key(struct cork_hash_table *table, cork_free_f free); - -CORK_API void -cork_hash_table_set_free_value(struct cork_hash_table *table, cork_free_f free); - -CORK_API void -cork_hash_table_set_hash(struct cork_hash_table *table, cork_hash_f hash); - - -CORK_API void -cork_hash_table_clear(struct cork_hash_table *table); - - -CORK_API void -cork_hash_table_ensure_size(struct cork_hash_table *table, - size_t desired_count); - -CORK_API size_t -cork_hash_table_size(const struct cork_hash_table *table); - - -CORK_API void * -cork_hash_table_get(const struct cork_hash_table *table, const void *key); - -CORK_API void * -cork_hash_table_get_hash(const struct cork_hash_table *table, - cork_hash hash, const void *key); - -CORK_API struct cork_hash_table_entry * -cork_hash_table_get_entry(const struct cork_hash_table *table, - const void *key); - -CORK_API struct cork_hash_table_entry * -cork_hash_table_get_entry_hash(const struct cork_hash_table *table, - cork_hash hash, const void *key); - -CORK_API struct cork_hash_table_entry * -cork_hash_table_get_or_create(struct cork_hash_table *table, - void *key, bool *is_new); - -CORK_API struct cork_hash_table_entry * -cork_hash_table_get_or_create_hash(struct cork_hash_table *table, - cork_hash hash, void *key, bool *is_new); - -CORK_API void -cork_hash_table_put(struct cork_hash_table *table, - void *key, void *value, - bool *is_new, void **old_key, void **old_value); - -CORK_API void -cork_hash_table_put_hash(struct cork_hash_table *table, - cork_hash hash, void *key, void *value, - bool *is_new, void **old_key, void **old_value); - -CORK_API void -cork_hash_table_delete_entry(struct cork_hash_table *table, - struct cork_hash_table_entry *entry); - -CORK_API bool -cork_hash_table_delete(struct cork_hash_table *table, const void *key, - void **deleted_key, void **deleted_value); - -CORK_API bool -cork_hash_table_delete_hash(struct cork_hash_table *table, - cork_hash hash, const void *key, - void **deleted_key, void **deleted_value); - - -enum cork_hash_table_map_result { - /* Abort the current @ref cork_hash_table_map operation. */ - CORK_HASH_TABLE_MAP_ABORT = 0, - /* Continue on to the next entry in the hash table. */ - CORK_HASH_TABLE_MAP_CONTINUE = 1, - /* Delete the entry that was just processed, and then continue on to - * the next entry in the hash table. */ - CORK_HASH_TABLE_MAP_DELETE = 2 -}; - -typedef enum cork_hash_table_map_result -(*cork_hash_table_map_f)(void *user_data, struct cork_hash_table_entry *entry); - -CORK_API void -cork_hash_table_map(struct cork_hash_table *table, void *user_data, - cork_hash_table_map_f mapper); - - -struct cork_hash_table_iterator { - struct cork_hash_table *table; - void *priv; -}; - -CORK_API void -cork_hash_table_iterator_init(struct cork_hash_table *table, - struct cork_hash_table_iterator *iterator); - -CORK_API struct cork_hash_table_entry * -cork_hash_table_iterator_next(struct cork_hash_table_iterator *iterator); - - -/*----------------------------------------------------------------------- - * Built-in key types - */ - -CORK_API struct cork_hash_table * -cork_string_hash_table_new(size_t initial_size, unsigned int flags); - -CORK_API struct cork_hash_table * -cork_pointer_hash_table_new(size_t initial_size, unsigned int flags); - - -#endif /* LIBCORK_DS_HASH_TABLE_H */ diff --git a/libcork/include/libcork/ds/managed-buffer.h b/libcork/include/libcork/ds/managed-buffer.h deleted file mode 100644 index e74ef3b6b..000000000 --- a/libcork/include/libcork/ds/managed-buffer.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_MANAGED_BUFFER_H -#define LIBCORK_DS_MANAGED_BUFFER_H - -#include -#include -#include - - -/*----------------------------------------------------------------------- - * Managed buffers - */ - -struct cork_managed_buffer; - -struct cork_managed_buffer_iface { - /* Free the contents of a managed buffer, and the managed buffer - * object itself. */ - void - (*free)(struct cork_managed_buffer *buf); -}; - - -struct cork_managed_buffer { - /* The buffer that this instance manages */ - const void *buf; - /* The size of buf */ - size_t size; - /* A reference count for the buffer. If this drops to 0, the buffer - * will be finalized. */ - volatile int ref_count; - /* The managed buffer implementation for this instance. */ - struct cork_managed_buffer_iface *iface; -}; - - -CORK_API struct cork_managed_buffer * -cork_managed_buffer_new_copy(const void *buf, size_t size); - - -typedef void -(*cork_managed_buffer_freer)(void *buf, size_t size); - -CORK_API struct cork_managed_buffer * -cork_managed_buffer_new(const void *buf, size_t size, - cork_managed_buffer_freer free); - - -CORK_API struct cork_managed_buffer * -cork_managed_buffer_ref(struct cork_managed_buffer *buf); - -CORK_API void -cork_managed_buffer_unref(struct cork_managed_buffer *buf); - - -CORK_API int -cork_managed_buffer_slice(struct cork_slice *dest, - struct cork_managed_buffer *buffer, - size_t offset, size_t length); - -CORK_API int -cork_managed_buffer_slice_offset(struct cork_slice *dest, - struct cork_managed_buffer *buffer, - size_t offset); - - -#endif /* LIBCORK_DS_MANAGED_BUFFER_H */ diff --git a/libcork/include/libcork/ds/ring-buffer.h b/libcork/include/libcork/ds/ring-buffer.h deleted file mode 100644 index d76affdc5..000000000 --- a/libcork/include/libcork/ds/ring-buffer.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_RING_BUFFER_H -#define LIBCORK_DS_RING_BUFFER_H - -#include -#include - - -struct cork_ring_buffer { - /* The elements of the ring buffer */ - void **elements; - /* The number of elements that can be stored in this ring - * buffer. */ - size_t allocated_size; - /* The actual number of elements currently in the ring buffer. */ - size_t size; - /* The index of the next element to read from the buffer */ - size_t read_index; - /* The index of the next element to write into the buffer */ - size_t write_index; -}; - - -CORK_API int -cork_ring_buffer_init(struct cork_ring_buffer *buf, size_t size); - -CORK_API struct cork_ring_buffer * -cork_ring_buffer_new(size_t size); - -CORK_API void -cork_ring_buffer_done(struct cork_ring_buffer *buf); - -CORK_API void -cork_ring_buffer_free(struct cork_ring_buffer *buf); - - -#define cork_ring_buffer_is_empty(buf) ((buf)->size == 0) -#define cork_ring_buffer_is_full(buf) ((buf)->size == (buf)->allocated_size) - - -CORK_API int -cork_ring_buffer_add(struct cork_ring_buffer *buf, void *element); - -CORK_API void * -cork_ring_buffer_pop(struct cork_ring_buffer *buf); - -CORK_API void * -cork_ring_buffer_peek(struct cork_ring_buffer *buf); - - -#endif /* LIBCORK_DS_RING_BUFFER_H */ diff --git a/libcork/include/libcork/ds/slice.h b/libcork/include/libcork/ds/slice.h deleted file mode 100644 index 9daefee3c..000000000 --- a/libcork/include/libcork/ds/slice.h +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_SLICE_H -#define LIBCORK_DS_SLICE_H - -#include -#include - - -/*----------------------------------------------------------------------- - * Error handling - */ - -/* hash of "libcork/ds/slice.h" */ -#define CORK_SLICE_ERROR 0x960ca750 - -enum cork_slice_error { - /* Trying to slice a nonexistent subset of a buffer */ - CORK_SLICE_INVALID_SLICE -}; - - -/*----------------------------------------------------------------------- - * Slices - */ - -struct cork_slice; - -struct cork_slice_iface { - /* Free the slice. Can be NULL if you don't need to free any - * underlying buffer. */ - void - (*free)(struct cork_slice *self); - - /* Create a copy of a slice. You can assume that offset and length - * refer to a valid subset of the buffer. */ - int - (*copy)(struct cork_slice *dest, const struct cork_slice *self, - size_t offset, size_t length); - - /* Create a “light” copy of a slice. A light copy is not allowed to exist - * longer than the slice that it was copied from, which can sometimes let - * you perform less work to produce the copy. You can assume that offset - * and length refer to a valid subset of the buffer. */ - int - (*light_copy)(struct cork_slice *dest, const struct cork_slice *self, - size_t offset, size_t length); - - /* Update the current slice to point at a different subset. You can - * assume that offset and length refer to a valid subset of the - * buffer. Can be NULL if you don't need to do anything special to - * the underlying buffer; in this case, we'll update the slice's buf - * and size fields for you. */ - int - (*slice)(struct cork_slice *self, size_t offset, size_t length); -}; - - -struct cork_slice { - /* The beginning of the sliced portion of the buffer. */ - const void *buf; - /* The length of the sliced portion of the buffer. */ - size_t size; - /* The slice implementation of the underlying buffer. */ - struct cork_slice_iface *iface; - /* An opaque pointer used by the slice implementation to refer to - * the underlying buffer. */ - void *user_data; -}; - - -CORK_API void -cork_slice_clear(struct cork_slice *slice); - -#define cork_slice_is_empty(slice) ((slice)->buf == NULL) - - -CORK_API int -cork_slice_copy(struct cork_slice *dest, const struct cork_slice *slice, - size_t offset, size_t length); - -#define cork_slice_copy_fast(dest, slice, offset, length) \ - ((slice)->iface->copy((dest), (slice), (offset), (length))) - -CORK_API int -cork_slice_copy_offset(struct cork_slice *dest, const struct cork_slice *slice, - size_t offset); - -#define cork_slice_copy_offset_fast(dest, slice, offset) \ - ((slice)->iface->copy \ - ((dest), (slice), (offset), (slice)->size - (offset))) - - -CORK_API int -cork_slice_light_copy(struct cork_slice *dest, const struct cork_slice *slice, - size_t offset, size_t length); - -#define cork_slice_light_copy_fast(dest, slice, offset, length) \ - ((slice)->iface->light_copy((dest), (slice), (offset), (length))) - -CORK_API int -cork_slice_light_copy_offset(struct cork_slice *dest, - const struct cork_slice *slice, size_t offset); - -#define cork_slice_light_copy_offset_fast(dest, slice, offset) \ - ((slice)->iface->light_copy \ - ((dest), (slice), (offset), (slice)->size - (offset))) - - -CORK_API int -cork_slice_slice(struct cork_slice *slice, size_t offset, size_t length); - -#define cork_slice_slice_fast(_slice, offset, length) \ - ((_slice)->iface->slice == NULL? \ - ((_slice)->buf += (offset), (_slice)->size = (length), 0): \ - ((_slice)->iface->slice((_slice), (offset), (length)))) - -CORK_API int -cork_slice_slice_offset(struct cork_slice *slice, size_t offset); - -#define cork_slice_slice_offset_fast(_slice, offset) \ - ((_slice)->iface->slice == NULL? \ - ((_slice)->buf += (offset), (_slice)->size -= (offset), 0): \ - ((_slice)->iface->slice \ - ((_slice), (offset), (_slice)->size - (offset)))) - - -CORK_API void -cork_slice_finish(struct cork_slice *slice); - -CORK_API bool -cork_slice_equal(const struct cork_slice *slice1, - const struct cork_slice *slice2); - -CORK_API void -cork_slice_init_static(struct cork_slice *dest, const void *buf, size_t size); - -CORK_API void -cork_slice_init_copy_once(struct cork_slice *dest, const void *buf, - size_t size); - - -#endif /* LIBCORK_DS_SLICE_H */ diff --git a/libcork/include/libcork/ds/stream.h b/libcork/include/libcork/ds/stream.h deleted file mode 100644 index b36972576..000000000 --- a/libcork/include/libcork/ds/stream.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_DS_STREAM_H -#define LIBCORK_DS_STREAM_H - -#include - -#include -#include - - -struct cork_stream_consumer { - int - (*data)(struct cork_stream_consumer *consumer, - const void *buf, size_t size, bool is_first_chunk); - - int - (*eof)(struct cork_stream_consumer *consumer); - - void - (*free)(struct cork_stream_consumer *consumer); -}; - - -#define cork_stream_consumer_data(consumer, buf, size, is_first) \ - ((consumer)->data((consumer), (buf), (size), (is_first))) - -#define cork_stream_consumer_eof(consumer) \ - ((consumer)->eof((consumer))) - -#define cork_stream_consumer_free(consumer) \ - ((consumer)->free((consumer))) - - -CORK_API int -cork_consume_fd(struct cork_stream_consumer *consumer, int fd); - -CORK_API int -cork_consume_file(struct cork_stream_consumer *consumer, FILE *fp); - -CORK_API int -cork_consume_file_from_path(struct cork_stream_consumer *consumer, - const char *path, int flags); - - -CORK_API struct cork_stream_consumer * -cork_fd_consumer_new(int fd); - -CORK_API struct cork_stream_consumer * -cork_file_consumer_new(FILE *fp); - -CORK_API struct cork_stream_consumer * -cork_file_from_path_consumer_new(const char *path, int flags); - - -#endif /* LIBCORK_DS_STREAM_H */ diff --git a/libcork/include/libcork/helpers/errors.h b/libcork/include/libcork/helpers/errors.h deleted file mode 100644 index 377667573..000000000 --- a/libcork/include/libcork/helpers/errors.h +++ /dev/null @@ -1,142 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_HELPERS_ERRORS_H -#define LIBCORK_HELPERS_ERRORS_H - - -/* This header is *not* automatically included when you include - * libcork/core.h, since we define some macros that don't include a - * cork_ or CORK_ prefix. Don't want to pollute your namespace unless - * you ask for it! */ - - -#include -#include -#include - - -#if !defined(CORK_PRINT_ERRORS) -#define CORK_PRINT_ERRORS 0 -#endif - -#if !defined(CORK_PRINT_ERROR) -#if CORK_PRINT_ERRORS -#include -#define CORK_PRINT_ERROR_(func, file, line) \ - fprintf(stderr, "---\nError in %s (%s:%u)\n %s\n", \ - (func), (file), (unsigned int) (line), \ - cork_error_message()); -#define CORK_PRINT_ERROR() CORK_PRINT_ERROR_(__func__, __FILE__, __LINE__) -#else -#define CORK_PRINT_ERROR() /* do nothing */ -#endif -#endif - - -/* A bunch of macros for calling a function that returns an error. If - * an error occurs, it will automatically be propagated out as the - * result of your own function. With these macros, you won't have a - * check to check or modify the error condition; it's returned as-is. - * - * XZ_check - * - * where: - * - * X = what happens if an error occurs - * "e" = jump to the "error" label - * "rY" = return a default error result (Y defined below) - * "x" = return an error result that you specify - * - * Y = your return type - * "i" = int - * "p" = some pointer type - * - * Z = the return type of the function you're calling - * "e" = use cork_error_occurred() to check - * "i" = int - * "p" = some pointer type - * - * In all cases, we assume that your function has a cork_error parameter - * called "err". - */ - - -/* jump to "error" label */ - -#define ee_check(call) \ - do { \ - (call); \ - if (CORK_UNLIKELY(cork_error_occurred())) { \ - CORK_PRINT_ERROR(); \ - goto error; \ - } \ - } while (0) - -#define ei_check(call) \ - do { \ - int __rc = (call); \ - if (CORK_UNLIKELY(__rc != 0)) { \ - CORK_PRINT_ERROR(); \ - goto error; \ - } \ - } while (0) - -#define ep_check(call) \ - do { \ - const void *__result = (call); \ - if (CORK_UNLIKELY(__result == NULL)) { \ - CORK_PRINT_ERROR(); \ - goto error; \ - } \ - } while (0) - - -/* return specific error code */ - -#define xe_check(result, call) \ - do { \ - (call); \ - if (CORK_UNLIKELY(cork_error_occurred())) { \ - CORK_PRINT_ERROR(); \ - return result; \ - } \ - } while (0) - -#define xi_check(result, call) \ - do { \ - int __rc = (call); \ - if (CORK_UNLIKELY(__rc != 0)) { \ - CORK_PRINT_ERROR(); \ - return result; \ - } \ - } while (0) - -#define xp_check(result, call) \ - do { \ - const void *__result = (call); \ - if (CORK_UNLIKELY(__result == NULL)) { \ - CORK_PRINT_ERROR(); \ - return result; \ - } \ - } while (0) - - -/* return default error code */ - -#define rie_check(call) xe_check(-1, call) -#define rii_check(call) xi_check(__rc, call) -#define rip_check(call) xp_check(-1, call) -#define rpe_check(call) xe_check(NULL, call) -#define rpi_check(call) xi_check(NULL, call) -#define rpp_check(call) xp_check(NULL, call) - - -#endif /* LIBCORK_HELPERS_ERRORS_H */ diff --git a/libcork/include/libcork/helpers/gc.h b/libcork/include/libcork/helpers/gc.h deleted file mode 100644 index 43742445b..000000000 --- a/libcork/include/libcork/helpers/gc.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2011-2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_HELPERS_REFCOUNT_H -#define LIBCORK_HELPERS_REFCOUNT_H - - -#include -#include - - -#define _free_(name) \ -static void \ -name##__free(void *obj) - - -#define _recurse_(name) \ -static void \ -name##__recurse(struct cork_gc *gc, void *obj, \ - cork_gc_recurser recurse, void *ud) - - -#define _gc_(name) \ -static struct cork_gc_obj_iface name##__gc = { \ - name##__free, name##__recurse \ -}; - -#define _gc_no_free_(name) \ -static struct cork_gc_obj_iface name##__gc = { \ - NULL, name##__recurse \ -}; - -#define _gc_no_recurse_(name) \ -static struct cork_gc_obj_iface name##__gc = { \ - name##__free, NULL \ -}; - -#define _gc_leaf_(name) \ -static struct cork_gc_obj_iface name##__gc = { \ - NULL, NULL \ -}; - - -#endif /* LIBCORK_HELPERS_REFCOUNT_H */ diff --git a/libcork/include/libcork/helpers/posix.h b/libcork/include/libcork/helpers/posix.h deleted file mode 100644 index 7a933d5bb..000000000 --- a/libcork/include/libcork/helpers/posix.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_HELPERS_POSIX_H -#define LIBCORK_HELPERS_POSIX_H - -/* This header is *not* automatically included when you include - * libcork/core.h, since we define some macros that don't include a - * cork_ or CORK_ prefix. Don't want to pollute your namespace unless - * you ask for it! */ - -#include - -#include -#include -#include - - -#if !defined(CORK_PRINT_ERRORS) -#define CORK_PRINT_ERRORS 0 -#endif - -#if !defined(CORK_PRINT_ERROR) -#if CORK_PRINT_ERRORS -#include -#define CORK_PRINT_ERROR_(func, file, line) \ - fprintf(stderr, "---\nError in %s (%s:%u)\n %s\n", \ - (func), (file), (unsigned int) (line), \ - cork_error_message()); -#define CORK_PRINT_ERROR() CORK_PRINT_ERROR_(__func__, __FILE__, __LINE__) -#else -#define CORK_PRINT_ERROR() /* do nothing */ -#endif -#endif - - -#define xi_check_posix(call, on_error) \ - do { \ - while (true) { \ - if ((call) == -1) { \ - if (errno == EINTR) { \ - continue; \ - } else { \ - cork_system_error_set(); \ - CORK_PRINT_ERROR(); \ - on_error; \ - } \ - } else { \ - break; \ - } \ - } \ - } while (0) - -#define xp_check_posix(call, on_error) \ - do { \ - while (true) { \ - if ((call) == NULL) { \ - if (errno == EINTR) { \ - continue; \ - } else { \ - cork_system_error_set(); \ - CORK_PRINT_ERROR(); \ - on_error; \ - } \ - } else { \ - break; \ - } \ - } \ - } while (0) - - -#define ei_check_posix(call) xi_check_posix(call, goto error) -#define rii_check_posix(call) xi_check_posix(call, return -1) -#define rpi_check_posix(call) xi_check_posix(call, return NULL) - -#define ep_check_posix(call) xp_check_posix(call, goto error) -#define rip_check_posix(call) xp_check_posix(call, return -1) -#define rpp_check_posix(call) xp_check_posix(call, return NULL) - - -#endif /* LIBCORK_HELPERS_POSIX_H */ diff --git a/libcork/include/libcork/os.h b/libcork/include/libcork/os.h deleted file mode 100644 index 116396288..000000000 --- a/libcork/include/libcork/os.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_OS_H -#define LIBCORK_OS_H - -/*** include all of the parts ***/ - -#include -#include -#include - -#endif /* LIBCORK_OS_H */ diff --git a/libcork/include/libcork/os/files.h b/libcork/include/libcork/os/files.h deleted file mode 100644 index 82f1f30d6..000000000 --- a/libcork/include/libcork/os/files.h +++ /dev/null @@ -1,271 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_FILES_H -#define LIBCORK_CORE_FILES_H - -#include -#include - - -/*----------------------------------------------------------------------- - * Paths - */ - -struct cork_path; - -/* path can be relative or absolute */ -CORK_API struct cork_path * -cork_path_new(const char *path); - -CORK_API struct cork_path * -cork_path_clone(const struct cork_path *other); - -CORK_API void -cork_path_free(struct cork_path *path); - - -CORK_API void -cork_path_set(struct cork_path *path, const char *content); - -CORK_API const char * -cork_path_get(const struct cork_path *path); - - -CORK_API int -cork_path_set_cwd(struct cork_path *path); - -CORK_API struct cork_path * -cork_path_cwd(void); - - -CORK_API int -cork_path_set_absolute(struct cork_path *path); - -CORK_API struct cork_path * -cork_path_absolute(const struct cork_path *other); - - -CORK_API void -cork_path_append(struct cork_path *path, const char *more); - -CORK_API void -cork_path_append_path(struct cork_path *path, const struct cork_path *more); - -CORK_API struct cork_path * -cork_path_join(const struct cork_path *other, const char *more); - -CORK_API struct cork_path * -cork_path_join_path(const struct cork_path *other, - const struct cork_path *more); - - -CORK_API void -cork_path_set_basename(struct cork_path *path); - -CORK_API struct cork_path * -cork_path_basename(const struct cork_path *other); - - -CORK_API void -cork_path_set_dirname(struct cork_path *path); - -CORK_API struct cork_path * -cork_path_dirname(const struct cork_path *other); - - -/*----------------------------------------------------------------------- - * Lists of paths - */ - -struct cork_path_list; - -CORK_API struct cork_path_list * -cork_path_list_new_empty(void); - -/* list must be a colon-separated list of paths */ -CORK_API struct cork_path_list * -cork_path_list_new(const char *list); - -CORK_API void -cork_path_list_free(struct cork_path_list *list); - -CORK_API const char * -cork_path_list_to_string(const struct cork_path_list *list); - -/* Takes control of path. path must not already be in the list. */ -CORK_API void -cork_path_list_add(struct cork_path_list *list, struct cork_path *path); - -CORK_API size_t -cork_path_list_size(const struct cork_path_list *list); - -/* The list still owns path; you must not free it or modify it. */ -CORK_API const struct cork_path * -cork_path_list_get(const struct cork_path_list *list, size_t index); - - -/*----------------------------------------------------------------------- - * Files - */ - -#define CORK_FILE_RECURSIVE 0x0001 -#define CORK_FILE_PERMISSIVE 0x0002 - -typedef unsigned int cork_file_mode; - -enum cork_file_type { - CORK_FILE_MISSING = 0, - CORK_FILE_REGULAR = 1, - CORK_FILE_DIRECTORY = 2, - CORK_FILE_SYMLINK = 3, - CORK_FILE_UNKNOWN = 4 -}; - -struct cork_file; - -CORK_API struct cork_file * -cork_file_new(const char *path); - -/* Takes control of path */ -CORK_API struct cork_file * -cork_file_new_from_path(struct cork_path *path); - -CORK_API void -cork_file_free(struct cork_file *file); - -/* File owns the result; you should not free it */ -CORK_API const struct cork_path * -cork_file_path(struct cork_file *file); - -CORK_API int -cork_file_exists(struct cork_file *file, bool *exists); - -CORK_API int -cork_file_type(struct cork_file *file, enum cork_file_type *type); - - -typedef int -(*cork_file_directory_iterator)(struct cork_file *child, const char *rel_name, - void *user_data); - -CORK_API int -cork_file_iterate_directory(struct cork_file *file, - cork_file_directory_iterator iterator, - void *user_data); - -/* If flags includes CORK_FILE_RECURSIVE, this creates parent directories, - * if needed. If flags doesn't include CORK_FILE_PERMISSIVE, then it's an error - * if the directory already exists. */ -CORK_API int -cork_file_mkdir(struct cork_file *file, cork_file_mode mode, - unsigned int flags); - -/* Removes a file or directory. If file is a directory, and flags contains - * CORK_FILE_RECURSIVE, then all of the directory's contents are removed, too. - * Otherwise, the directory must already be empty. */ -CORK_API int -cork_file_remove(struct cork_file *file, unsigned int flags); - - -CORK_API struct cork_file * -cork_path_list_find_file(const struct cork_path_list *list, - const char *rel_path); - - -/*----------------------------------------------------------------------- - * Lists of files - */ - -struct cork_file_list; - -CORK_API struct cork_file_list * -cork_file_list_new_empty(void); - -CORK_API struct cork_file_list * -cork_file_list_new(struct cork_path_list *path_list); - -CORK_API void -cork_file_list_free(struct cork_file_list *list); - -/* Takes control of file. file must not already be in the list. */ -CORK_API void -cork_file_list_add(struct cork_file_list *list, struct cork_file *file); - -CORK_API size_t -cork_file_list_size(struct cork_file_list *list); - -/* The list still owns file; you must not free it. Editing the file updates the - * entry in the list. */ -CORK_API struct cork_file * -cork_file_list_get(struct cork_file_list *list, size_t index); - - -CORK_API struct cork_file_list * -cork_path_list_find_files(const struct cork_path_list *list, - const char *rel_path); - - -/*----------------------------------------------------------------------- - * Walking a directory tree - */ - -#define CORK_SKIP_DIRECTORY 1 - -struct cork_dir_walker { - int - (*enter_directory)(struct cork_dir_walker *walker, const char *full_path, - const char *rel_path, const char *base_name); - - int - (*file)(struct cork_dir_walker *walker, const char *full_path, - const char *rel_path, const char *base_name); - - int - (*leave_directory)(struct cork_dir_walker *walker, const char *full_path, - const char *rel_path, const char *base_name); -}; - -#define cork_dir_walker_enter_directory(w, fp, rp, bn) \ - ((w)->enter_directory((w), (fp), (rp), (bn))) - -#define cork_dir_walker_file(w, fp, rp, bn) \ - ((w)->file((w), (fp), (rp), (bn))) - -#define cork_dir_walker_leave_directory(w, fp, rp, bn) \ - ((w)->leave_directory((w), (fp), (rp), (bn))) - - -CORK_API int -cork_walk_directory(const char *path, struct cork_dir_walker *walker); - - -/*----------------------------------------------------------------------- - * Standard paths and path lists - */ - -CORK_API struct cork_path * -cork_path_home(void); - - -CORK_API struct cork_path_list * -cork_path_config_paths(void); - -CORK_API struct cork_path_list * -cork_path_data_paths(void); - -CORK_API struct cork_path * -cork_path_user_cache_path(void); - -CORK_API struct cork_path * -cork_path_user_runtime_path(void); - - -#endif /* LIBCORK_CORE_FILES_H */ diff --git a/libcork/include/libcork/os/process.h b/libcork/include/libcork/os/process.h deleted file mode 100644 index 5d7813dc7..000000000 --- a/libcork/include/libcork/os/process.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_CORE_PROCESS_H -#define LIBCORK_CORE_PROCESS_H - -#include - - -typedef void -(*cork_cleanup_function)(void); - -CORK_API void -cork_cleanup_at_exit_named(const char *name, int priority, - cork_cleanup_function function); - -#define cork_cleanup_at_exit(priority, function) \ - cork_cleanup_at_exit_named(#function, priority, function) - - -#endif /* LIBCORK_CORE_PROCESS_H */ diff --git a/libcork/include/libcork/os/subprocess.h b/libcork/include/libcork/os/subprocess.h deleted file mode 100644 index 6aba53fbb..000000000 --- a/libcork/include/libcork/os/subprocess.h +++ /dev/null @@ -1,196 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_OS_SUBPROCESS_H -#define LIBCORK_OS_SUBPROCESS_H - -#include - -#include -#include -#include -#include - - -/*----------------------------------------------------------------------- - * Environments - */ - -struct cork_env; - -CORK_API struct cork_env * -cork_env_new(void); - -CORK_API struct cork_env * -cork_env_clone_current(void); - -CORK_API void -cork_env_free(struct cork_env *env); - - -CORK_API void -cork_env_replace_current(struct cork_env *env); - - -/* For all of the following, if env is NULL, these functions access or update - * the actual environment of the current process. Otherwise, they act on the - * given environment instance. */ - -CORK_API const char * -cork_env_get(struct cork_env *env, const char *name); - -CORK_API void -cork_env_add(struct cork_env *env, const char *name, const char *value); - -CORK_API void -cork_env_add_printf(struct cork_env *env, const char *name, - const char *format, ...) - CORK_ATTR_PRINTF(3,4); - -CORK_API void -cork_env_add_vprintf(struct cork_env *env, const char *name, - const char *format, va_list args) - CORK_ATTR_PRINTF(3,0); - -CORK_API void -cork_env_remove(struct cork_env *env, const char *name); - - -/*----------------------------------------------------------------------- - * Executing another process - */ - -struct cork_exec; - -CORK_API struct cork_exec * -cork_exec_new(const char *program); - -CORK_ATTR_SENTINEL -CORK_API struct cork_exec * -cork_exec_new_with_params(const char *program, ...); - -CORK_API struct cork_exec * -cork_exec_new_with_param_array(const char *program, char * const *params); - -CORK_API void -cork_exec_free(struct cork_exec *exec); - -CORK_API const char * -cork_exec_description(struct cork_exec *exec); - -CORK_API const char * -cork_exec_program(struct cork_exec *exec); - -CORK_API size_t -cork_exec_param_count(struct cork_exec *exec); - -CORK_API const char * -cork_exec_param(struct cork_exec *exec, size_t index); - -CORK_API void -cork_exec_add_param(struct cork_exec *exec, const char *param); - -/* Can return NULL */ -CORK_API struct cork_env * -cork_exec_env(struct cork_exec *exec); - -/* Takes control of env */ -CORK_API void -cork_exec_set_env(struct cork_exec *exec, struct cork_env *env); - -/* Can return NULL */ -CORK_API const char * -cork_exec_cwd(struct cork_exec *exec); - -CORK_API void -cork_exec_set_cwd(struct cork_exec *exec, const char *directory); - -CORK_API int -cork_exec_run(struct cork_exec *exec); - - -/*----------------------------------------------------------------------- - * Subprocesses - */ - -struct cork_subprocess; - -/* If env is NULL, we use the environment variables of the calling process. */ - -/* Takes control of body */ -CORK_API struct cork_subprocess * -cork_subprocess_new(struct cork_thread_body *body, - struct cork_stream_consumer *stdout_consumer, - struct cork_stream_consumer *stderr_consumer, - int *exit_code); - -/* Takes control of exec */ -CORK_API struct cork_subprocess * -cork_subprocess_new_exec(struct cork_exec *exec, - struct cork_stream_consumer *stdout_consumer, - struct cork_stream_consumer *stderr_consumer, - int *exit_code); - -CORK_API void -cork_subprocess_free(struct cork_subprocess *sub); - -CORK_API struct cork_stream_consumer * -cork_subprocess_stdin(struct cork_subprocess *sub); - -CORK_API int -cork_subprocess_start(struct cork_subprocess *sub); - -CORK_API bool -cork_subprocess_is_finished(struct cork_subprocess *sub); - -CORK_API int -cork_subprocess_abort(struct cork_subprocess *sub); - -CORK_API bool -cork_subprocess_drain(struct cork_subprocess *sub); - -CORK_API int -cork_subprocess_wait(struct cork_subprocess *sub); - - -/*----------------------------------------------------------------------- - * Groups of subprocesses - */ - -struct cork_subprocess_group; - -CORK_API struct cork_subprocess_group * -cork_subprocess_group_new(void); - -CORK_API void -cork_subprocess_group_free(struct cork_subprocess_group *group); - -/* Takes control of sub */ -CORK_API void -cork_subprocess_group_add(struct cork_subprocess_group *group, - struct cork_subprocess *sub); - -CORK_API int -cork_subprocess_group_start(struct cork_subprocess_group *group); - -CORK_API bool -cork_subprocess_group_is_finished(struct cork_subprocess_group *group); - -CORK_API int -cork_subprocess_group_abort(struct cork_subprocess_group *group); - -CORK_API bool -cork_subprocess_group_drain(struct cork_subprocess_group *group); - -CORK_API int -cork_subprocess_group_wait(struct cork_subprocess_group *group); - - -#endif /* LIBCORK_OS_SUBPROCESS_H */ diff --git a/libcork/include/libcork/threads.h b/libcork/include/libcork/threads.h deleted file mode 100644 index c00841917..000000000 --- a/libcork/include/libcork/threads.h +++ /dev/null @@ -1,19 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_THREADS_H -#define LIBCORK_THREADS_H - -/*** include all of the parts ***/ - -#include -#include - -#endif /* LIBCORK_THREADS_H */ diff --git a/libcork/include/libcork/threads/atomics.h b/libcork/include/libcork/threads/atomics.h deleted file mode 100644 index e1cc04d14..000000000 --- a/libcork/include/libcork/threads/atomics.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_THREADS_ATOMICS_H -#define LIBCORK_THREADS_ATOMICS_H - -#include -#include - -/*----------------------------------------------------------------------- - * GCC intrinsics - */ - -/* Ideally we can use GCC's intrinsics to define everything */ -#if defined(CORK_CONFIG_HAVE_GCC_ATOMICS) - -#define cork_int_atomic_add __sync_add_and_fetch -#define cork_uint_atomic_add __sync_add_and_fetch -#define cork_int_atomic_pre_add __sync_fetch_and_add -#define cork_uint_atomic_pre_add __sync_fetch_and_add -#define cork_int_atomic_sub __sync_sub_and_fetch -#define cork_uint_atomic_sub __sync_sub_and_fetch -#define cork_int_atomic_pre_sub __sync_fetch_and_sub -#define cork_uint_atomic_pre_sub __sync_fetch_and_sub -#define cork_int_cas __sync_val_compare_and_swap -#define cork_uint_cas __sync_val_compare_and_swap -#define cork_ptr_cas __sync_val_compare_and_swap - - -/*----------------------------------------------------------------------- - * End of atomic implementations - */ -#else -#error "No atomics implementation!" -#endif - - -#endif /* LIBCORK_THREADS_ATOMICS_H */ diff --git a/libcork/include/libcork/threads/basics.h b/libcork/include/libcork/threads/basics.h deleted file mode 100644 index d5fef91cf..000000000 --- a/libcork/include/libcork/threads/basics.h +++ /dev/null @@ -1,216 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#ifndef LIBCORK_THREADS_BASICS_H -#define LIBCORK_THREADS_BASICS_H - -#include - -#include -#include -#include - - -/*----------------------------------------------------------------------- - * Thread IDs - */ - -typedef unsigned int cork_thread_id; - -#define CORK_THREAD_NONE ((cork_thread_id) 0) - -/* Returns a valid ID for any thread — even the main thread and threads that - * aren't created by libcork. */ -CORK_API cork_thread_id -cork_current_thread_get_id(void); - - -/*----------------------------------------------------------------------- - * Main functions - */ - -struct cork_thread_body { - int - (*run)(struct cork_thread_body *self); - - void - (*free)(struct cork_thread_body *self); -}; - -#define cork_thread_body_run(tb) ((tb)->run((tb))) -#define cork_thread_body_free(tb) ((tb)->free((tb))) - - -/*----------------------------------------------------------------------- - * Threads - */ - -struct cork_thread; - -/* Returns NULL for the main thread, and for any thread not created via - * cork_thread_new/cork_thread_start. */ -CORK_API struct cork_thread * -cork_current_thread_get(void); - -CORK_API struct cork_thread * -cork_thread_new(const char *name, struct cork_thread_body *body); - -/* Thread must not have been started yet. */ -CORK_API void -cork_thread_free(struct cork_thread *thread); - -CORK_API const char * -cork_thread_get_name(struct cork_thread *thread); - -CORK_API cork_thread_id -cork_thread_get_id(struct cork_thread *thread); - -/* Can only be called once per thread. Thread will automatically be freed when - * its done. */ -CORK_API int -cork_thread_start(struct cork_thread *thread); - -/* Can only be called once per thread; must be called after cork_thread_start. */ -CORK_API int -cork_thread_join(struct cork_thread *thread); - - -/*----------------------------------------------------------------------- - * Executing something once - */ - -#if CORK_CONFIG_HAVE_GCC_ASM && (CORK_CONFIG_ARCH_X86 || CORK_CONFIG_ARCH_X64) -#define cork_pause() \ - do { \ - __asm__ __volatile__ ("pause"); \ - } while (0) -#else -#define cork_pause() do { /* do nothing */ } while (0) -#endif - - -#define cork_once_barrier(name) \ - static struct { \ - volatile int barrier; \ - cork_thread_id initializing_thread; \ - } name##__once; - -#define cork_once(name, call) \ - do { \ - if (CORK_LIKELY(name##__once.barrier == 2)) { \ - /* already initialized */ \ - } else { \ - /* Try to claim the ability to perform the initialization */ \ - int prior_state = cork_int_cas(&name##__once.barrier, 0, 1); \ - if (CORK_LIKELY(prior_state == 0)) { \ - CORK_ATTR_UNUSED int result; \ - /* we get to initialize */ \ - call; \ - result = cork_int_cas(&name##__once.barrier, 1, 2); \ - assert(result == 1); \ - } else { \ - /* someone else is initializing, spin/wait until done */ \ - while (name##__once.barrier != 2) { cork_pause(); } \ - } \ - } \ - } while (0) - -#define cork_once_recursive(name, call) \ - do { \ - if (CORK_LIKELY(name##__once.barrier == 2)) { \ - /* already initialized */ \ - } else { \ - /* Try to claim the ability to perform the initialization */ \ - int prior_state = cork_int_cas(&name##__once.barrier, 0, 1); \ - if (CORK_LIKELY(prior_state == 0)) { \ - CORK_ATTR_UNUSED int result; \ - /* we get to initialize */ \ - name##__once.initializing_thread = \ - cork_current_thread_get_id(); \ - call; \ - result = cork_int_cas(&name##__once.barrier, 1, 2); \ - assert(result == 1); \ - } else { \ - /* someone else is initializing, is it us? */ \ - if (name##__once.initializing_thread == \ - cork_current_thread_get_id()) { \ - /* yep, fall through to let our recursion continue */ \ - } else { \ - /* nope; wait for the initialization to finish */ \ - while (name##__once.barrier != 2) { cork_pause(); } \ - } \ - } \ - } \ - } while (0) - - -/*----------------------------------------------------------------------- - * Thread-local storage - */ - -/* Prefer, in order: - * - * 1) __thread storage class - * 2) pthread_key_t - */ - -#if CORK_CONFIG_HAVE_THREAD_STORAGE_CLASS -#define cork_tls(TYPE, NAME) \ -static __thread TYPE NAME##__tls; \ -\ -static TYPE * \ -NAME##_get(void) \ -{ \ - return &NAME##__tls; \ -} - -#elif CORK_HAVE_PTHREADS -#include -#include - -#include - -#define cork_tls(TYPE, NAME) \ -static pthread_key_t NAME##__tls_key; \ -cork_once_barrier(NAME##__tls_barrier); \ -\ -static void \ -NAME##__tls_destroy(void *vself) \ -{ \ - free(vself); \ -} \ -\ -static void \ -NAME##__create_key(void) \ -{ \ - CORK_ATTR_UNUSED int rc; \ - rc = pthread_key_create(&NAME##__tls_key, &NAME##__tls_destroy); \ - assert(rc == 0); \ -} \ -\ -static TYPE * \ -NAME##_get(void) \ -{ \ - TYPE *self; \ - cork_once(NAME##__tls_barrier, NAME##__create_key()); \ - self = pthread_getspecific(NAME##__tls_key); \ - if (CORK_UNLIKELY(self == NULL)) { \ - self = cork_calloc(1, sizeof(TYPE)); \ - pthread_setspecific(NAME##__tls_key, self); \ - } \ - return self; \ -} - -#else -#error "No thread-local storage implementation!" -#endif - - -#endif /* LIBCORK_THREADS_BASICS_H */ diff --git a/libcork/posix/directory-walker.c b/libcork/posix/directory-walker.c deleted file mode 100644 index c5a25c5d4..000000000 --- a/libcork/posix/directory-walker.c +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "libcork/core/attributes.h" -#include "libcork/core/error.h" -#include "libcork/core/types.h" -#include "libcork/ds/buffer.h" -#include "libcork/helpers/errors.h" -#include "libcork/helpers/posix.h" -#include "libcork/os/files.h" - - -static int -cork_walk_one_directory(struct cork_dir_walker *w, struct cork_buffer *path, - size_t root_path_size) -{ - DIR *dir = NULL; - struct dirent *entry; - size_t dir_path_size; - - rip_check_posix(dir = opendir(path->buf)); - - cork_buffer_append(path, "/", 1); - dir_path_size = path->size; - errno = 0; - while ((entry = readdir(dir)) != NULL) { - struct stat info; - - /* Skip the "." and ".." entries */ - if (strcmp(entry->d_name, ".") == 0 || - strcmp(entry->d_name, "..") == 0) { - continue; - } - - /* Stat the directory entry */ - cork_buffer_append_string(path, entry->d_name); - ei_check_posix(stat(path->buf, &info)); - - /* If the entry is a subdirectory, recurse into it. */ - if (S_ISDIR(info.st_mode)) { - int rc = cork_dir_walker_enter_directory - (w, path->buf, path->buf + root_path_size, - path->buf + dir_path_size); - if (rc != CORK_SKIP_DIRECTORY) { - ei_check(cork_walk_one_directory(w, path, root_path_size)); - ei_check(cork_dir_walker_leave_directory - (w, path->buf, path->buf + root_path_size, - path->buf + dir_path_size)); - } - } else if (S_ISREG(info.st_mode)) { - ei_check(cork_dir_walker_file - (w, path->buf, path->buf + root_path_size, - path->buf + dir_path_size)); - } - - /* Remove this entry name from the path buffer. */ - cork_buffer_truncate(path, dir_path_size); - - /* We have to reset errno to 0 because of the ambiguous way - * readdir uses a return value of NULL. Other functions may - * return normally yet set errno to a non-zero value. dlopen - * on Mac OS X is an ogreish example. Since an error readdir - * is indicated by returning NULL and setting errno to indicate - * the error, then we need to reset it to zero before each call. - * We shall assume, perhaps to our great misery, that functions - * within this loop do proper error checking and act accordingly. - */ - errno = 0; - } - - /* Check errno immediately after the while loop terminates */ - if (CORK_UNLIKELY(errno != 0)) { - cork_system_error_set(); - goto error; - } - - /* Remove the trailing '/' from the path buffer. */ - cork_buffer_truncate(path, dir_path_size - 1); - rii_check_posix(closedir(dir)); - return 0; - -error: - if (dir != NULL) { - rii_check_posix(closedir(dir)); - } - return -1; -} - -int -cork_walk_directory(const char *path, struct cork_dir_walker *w) -{ - int rc; - char *p; - struct cork_buffer buf = CORK_BUFFER_INIT(); - - /* Seed the buffer with the directory's path, ensuring that there's no - * trailing '/' */ - cork_buffer_append_string(&buf, path); - p = buf.buf; - while (p[buf.size-1] == '/') { - buf.size--; - p[buf.size] = '\0'; - } - rc = cork_walk_one_directory(w, &buf, buf.size + 1); - cork_buffer_done(&buf); - return rc; -} diff --git a/libcork/posix/env.c b/libcork/posix/env.c deleted file mode 100644 index ce4f25cbf..000000000 --- a/libcork/posix/env.c +++ /dev/null @@ -1,208 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include - -#include "libcork/core.h" -#include "libcork/ds.h" -#include "libcork/os/subprocess.h" -#include "libcork/helpers/errors.h" - -#if defined(__APPLE__) -/* Apple doesn't provide access to the "environ" variable from a shared library. - * There's a workaround function to grab the environ pointer described at [1]. - * - * [1] http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html - */ -#include -#define environ (*_NSGetEnviron()) - -#else -/* On all other POSIX platforms, we assume that environ is available in shared - * libraries. */ -extern char **environ; - -#endif - - -struct cork_env_var { - const char *name; - const char *value; -}; - -static struct cork_env_var * -cork_env_var_new(const char *name, const char *value) -{ - struct cork_env_var *var = cork_new(struct cork_env_var); - var->name = cork_strdup(name); - var->value = cork_strdup(value); - return var; -} - -static void -cork_env_var_free(void *vvar) -{ - struct cork_env_var *var = vvar; - cork_strfree(var->name); - cork_strfree(var->value); - free(var); -} - - -struct cork_env { - struct cork_hash_table *variables; - struct cork_buffer buffer; -}; - -struct cork_env * -cork_env_new(void) -{ - struct cork_env *env = cork_new(struct cork_env); - env->variables = cork_string_hash_table_new(0, 0); - cork_hash_table_set_free_value(env->variables, cork_env_var_free); - cork_buffer_init(&env->buffer); - return env; -} - -static void -cork_env_add_internal(struct cork_env *env, const char *name, const char *value) -{ - if (env == NULL) { - setenv(name, value, true); - } else { - struct cork_env_var *var = cork_env_var_new(name, value); - void *old_var; - - cork_hash_table_put - (env->variables, (void *) var->name, var, NULL, NULL, &old_var); - - if (old_var != NULL) { - cork_env_var_free(old_var); - } - } -} - -struct cork_env * -cork_env_clone_current(void) -{ - char **curr; - struct cork_env *env = cork_env_new(); - - for (curr = environ; *curr != NULL; curr++) { - const char *entry = *curr; - const char *equal; - - equal = strchr(entry, '='); - if (CORK_UNLIKELY(equal == NULL)) { - /* This environment entry is malformed; skip it. */ - continue; - } - - /* Make a copy of the name so that it's NUL-terminated rather than - * equal-terminated. */ - cork_buffer_set(&env->buffer, entry, equal - entry); - cork_env_add_internal(env, env->buffer.buf, equal + 1); - } - - return env; -} - - -void -cork_env_free(struct cork_env *env) -{ - cork_hash_table_free(env->variables); - cork_buffer_done(&env->buffer); - free(env); -} - -const char * -cork_env_get(struct cork_env *env, const char *name) -{ - if (env == NULL) { - return getenv(name); - } else { - struct cork_env_var *var = - cork_hash_table_get(env->variables, (void *) name); - return (var == NULL)? NULL: var->value; - } -} - -void -cork_env_add(struct cork_env *env, const char *name, const char *value) -{ - cork_env_add_internal(env, name, value); -} - -void -cork_env_add_vprintf(struct cork_env *env, const char *name, - const char *format, va_list args) -{ - cork_buffer_vprintf(&env->buffer, format, args); - cork_env_add_internal(env, name, env->buffer.buf); -} - -void -cork_env_add_printf(struct cork_env *env, const char *name, - const char *format, ...) -{ - va_list args; - va_start(args, format); - cork_env_add_vprintf(env, name, format, args); - va_end(args); -} - -void -cork_env_remove(struct cork_env *env, const char *name) -{ - if (env == NULL) { - unsetenv(name); - } else { - void *old_var; - cork_hash_table_delete(env->variables, (void *) name, NULL, &old_var); - if (old_var != NULL) { - cork_env_var_free(old_var); - } - } -} - - -static enum cork_hash_table_map_result -cork_env_set_vars(void *user_data, struct cork_hash_table_entry *entry) -{ - struct cork_env_var *var = entry->value; - setenv(var->name, var->value, false); - return CORK_HASH_TABLE_MAP_CONTINUE; -} - -#if defined(__APPLE__) || (defined(BSD) && (BSD >= 199103)) -/* A handful of platforms [1] don't provide clearenv(), so we must implement our - * own version that clears the environ array directly. - * - * [1] http://www.gnu.org/software/gnulib/manual/html_node/clearenv.html - */ -static void -clearenv(void) -{ - *environ = NULL; -} - -#else -/* Otherwise assume that we have clearenv available. */ -#endif - -void -cork_env_replace_current(struct cork_env *env) -{ - clearenv(); - cork_hash_table_map(env->variables, NULL, cork_env_set_vars); -} diff --git a/libcork/posix/exec.c b/libcork/posix/exec.c deleted file mode 100644 index 66fd2159e..000000000 --- a/libcork/posix/exec.c +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include - -#include "libcork/core.h" -#include "libcork/ds.h" -#include "libcork/os/subprocess.h" -#include "libcork/helpers/errors.h" - -#define ri_check_posix(call) \ - do { \ - while (true) { \ - if ((call) == -1) { \ - if (errno == EINTR) { \ - continue; \ - } else { \ - cork_system_error_set(); \ - CORK_PRINT_ERROR(); \ - return -1; \ - } \ - } else { \ - break; \ - } \ - } \ - } while (0) - - -struct cork_exec { - const char *program; - struct cork_string_array params; - struct cork_env *env; - const char *cwd; - struct cork_buffer description; -}; - -struct cork_exec * -cork_exec_new(const char *program) -{ - struct cork_exec *exec = cork_new(struct cork_exec); - exec->program = cork_strdup(program); - cork_string_array_init(&exec->params); - exec->env = NULL; - exec->cwd = NULL; - cork_buffer_init(&exec->description); - cork_buffer_set_string(&exec->description, program); - return exec; -} - -struct cork_exec * -cork_exec_new_with_params(const char *program, ...) -{ - struct cork_exec *exec; - va_list args; - const char *param; - - exec = cork_exec_new(program); - cork_exec_add_param(exec, program); - va_start(args, program); - while ((param = va_arg(args, const char *)) != NULL) { - cork_exec_add_param(exec, param); - } - return exec; -} - -struct cork_exec * -cork_exec_new_with_param_array(const char *program, char * const *params) -{ - char * const *curr; - struct cork_exec *exec = cork_exec_new(program); - for (curr = params; *curr != NULL; curr++) { - cork_exec_add_param(exec, *curr); - } - return exec; -} - -void -cork_exec_free(struct cork_exec *exec) -{ - cork_strfree(exec->program); - cork_array_done(&exec->params); - if (exec->env != NULL) { - cork_env_free(exec->env); - } - if (exec->cwd != NULL) { - cork_strfree(exec->cwd); - } - cork_buffer_done(&exec->description); - free(exec); -} - -const char * -cork_exec_description(struct cork_exec *exec) -{ - return exec->description.buf; -} - -const char * -cork_exec_program(struct cork_exec *exec) -{ - return exec->program; -} - -size_t -cork_exec_param_count(struct cork_exec *exec) -{ - return cork_array_size(&exec->params); -} - -const char * -cork_exec_param(struct cork_exec *exec, size_t index) -{ - return cork_array_at(&exec->params, index); -} - -void -cork_exec_add_param(struct cork_exec *exec, const char *param) -{ - /* Don't add the first parameter to the description; that's a copy of the - * program name, which we've already added. */ - if (!cork_array_is_empty(&exec->params)) { - cork_buffer_append(&exec->description, " ", 1); - cork_buffer_append_string(&exec->description, param); - } - cork_array_append(&exec->params, cork_strdup(param)); -} - -struct cork_env * -cork_exec_env(struct cork_exec *exec) -{ - return exec->env; -} - -void -cork_exec_set_env(struct cork_exec *exec, struct cork_env *env) -{ - if (exec->env != NULL) { - cork_env_free(exec->env); - } - exec->env = env; -} - -const char * -cork_exec_cwd(struct cork_exec *exec) -{ - return exec->cwd; -} - -void -cork_exec_set_cwd(struct cork_exec *exec, const char *directory) -{ - if (exec->cwd != NULL) { - cork_strfree(exec->cwd); - } - exec->cwd = cork_strdup(directory); -} - -int -cork_exec_run(struct cork_exec *exec) -{ - const char **params; - - /* Make sure the parameter array is NULL-terminated. */ - cork_array_append(&exec->params, NULL); - params = cork_array_elements(&exec->params); - - /* Fill in the requested environment */ - if (exec->env != NULL) { - cork_env_replace_current(exec->env); - } - - /* Change the working directory, if requested */ - if (exec->cwd != NULL) { - ri_check_posix(chdir(exec->cwd)); - } - - /* Execute the new program */ - ri_check_posix(execvp(exec->program, (char * const *) params)); - - /* This is unreachable */ - return 0; -} diff --git a/libcork/posix/files.c b/libcork/posix/files.c deleted file mode 100644 index 7a4a2ad98..000000000 --- a/libcork/posix/files.c +++ /dev/null @@ -1,872 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "libcork/core/attributes.h" -#include "libcork/core/error.h" -#include "libcork/core/types.h" -#include "libcork/ds/array.h" -#include "libcork/ds/buffer.h" -#include "libcork/helpers/errors.h" -#include "libcork/helpers/posix.h" -#include "libcork/os/files.h" -#include "libcork/os/subprocess.h" - - -#if !defined(CORK_DEBUG_FILES) -#define CORK_DEBUG_FILES 0 -#endif - -#if CORK_DEBUG_FILES -#include -#define DEBUG(...) fprintf(stderr, __VA_ARGS__) -#else -#define DEBUG(...) /* no debug messages */ -#endif - - -/*----------------------------------------------------------------------- - * Paths - */ - -struct cork_path { - struct cork_buffer given; -}; - -static struct cork_path * -cork_path_new_internal(const char *str, size_t length) -{ - struct cork_path *path = cork_new(struct cork_path); - cork_buffer_init(&path->given); - if (length == 0) { - cork_buffer_ensure_size(&path->given, 16); - cork_buffer_set(&path->given, "", 0); - } else { - cork_buffer_set(&path->given, str, length); - } - return path; -} - -struct cork_path * -cork_path_new(const char *source) -{ - return cork_path_new_internal(source, source == NULL? 0: strlen(source)); -} - -struct cork_path * -cork_path_clone(const struct cork_path *other) -{ - return cork_path_new_internal(other->given.buf, other->given.size); -} - -void -cork_path_free(struct cork_path *path) -{ - cork_buffer_done(&path->given); - free(path); -} - - -void -cork_path_set(struct cork_path *path, const char *content) -{ - if (content == NULL) { - cork_buffer_clear(&path->given); - } else { - cork_buffer_set_string(&path->given, content); - } -} - -const char * -cork_path_get(const struct cork_path *path) -{ - return path->given.buf; -} - -#define cork_path_get(path) ((const char *) (path)->given.buf) -#define cork_path_size(path) ((path)->given.size) -#define cork_path_truncate(path, size) \ - (cork_buffer_truncate(&(path)->given, (size))) - - -int -cork_path_set_cwd(struct cork_path *path) -{ - cork_buffer_ensure_size(&path->given, PATH_MAX); - rip_check_posix(getcwd(path->given.buf, PATH_MAX)); - path->given.size = strlen(path->given.buf); - return 0; -} - -struct cork_path * -cork_path_cwd(void) -{ - struct cork_path *path = cork_path_new(NULL); - ei_check(cork_path_set_cwd(path)); - return path; - -error: - cork_path_free(path); - return NULL; -} - - -int -cork_path_set_absolute(struct cork_path *path) -{ - struct cork_buffer buf; - - if (path->given.size > 0 && - cork_buffer_char(&path->given, path->given.size - 1) == '/') { - /* The path is already absolute */ - return 0; - } - - cork_buffer_init(&buf); - cork_buffer_ensure_size(&buf, PATH_MAX); - ep_check_posix(getcwd(buf.buf, PATH_MAX)); - buf.size = strlen(buf.buf); - cork_buffer_append(&buf, "/", 1); - cork_buffer_append_copy(&buf, &path->given); - cork_buffer_done(&path->given); - path->given = buf; - return 0; - -error: - cork_buffer_done(&buf); - return -1; -} - -struct cork_path * -cork_path_absolute(const struct cork_path *other) -{ - struct cork_path *path = cork_path_clone(other); - ei_check(cork_path_set_absolute(path)); - return path; - -error: - cork_path_free(path); - return NULL; -} - - -void -cork_path_append(struct cork_path *path, const char *more) -{ - if (more == NULL || more[0] == '\0') { - return; - } - - if (more[0] == '/') { - /* If more starts with a "/", then its absolute, and should replace the - * contents of the current path. */ - cork_buffer_set_string(&path->given, more); - } else { - /* Otherwise, more is relative, and should be appended to the current - * path. If the current given path doesn't end in a "/", then we need - * to add one to keep the path well-formed. */ - - if (path->given.size > 0 && - cork_buffer_char(&path->given, path->given.size - 1) != '/') { - cork_buffer_append(&path->given, "/", 1); - } - - cork_buffer_append_string(&path->given, more); - } -} - -struct cork_path * -cork_path_join(const struct cork_path *other, const char *more) -{ - struct cork_path *path = cork_path_clone(other); - cork_path_append(path, more); - return path; -} - -void -cork_path_append_path(struct cork_path *path, const struct cork_path *more) -{ - cork_path_append(path, more->given.buf); -} - -struct cork_path * -cork_path_join_path(const struct cork_path *other, const struct cork_path *more) -{ - struct cork_path *path = cork_path_clone(other); - cork_path_append_path(path, more); - return path; -} - - -void -cork_path_set_basename(struct cork_path *path) -{ - char *given = path->given.buf; - const char *last_slash = strrchr(given, '/'); - if (last_slash != NULL) { - size_t offset = last_slash - given; - size_t basename_length = path->given.size - offset - 1; - memmove(given, last_slash + 1, basename_length); - given[basename_length] = '\0'; - path->given.size = basename_length; - } -} - -struct cork_path * -cork_path_basename(const struct cork_path *other) -{ - struct cork_path *path = cork_path_clone(other); - cork_path_set_basename(path); - return path; -} - - -void -cork_path_set_dirname(struct cork_path *path) -{ - const char *given = path->given.buf; - const char *last_slash = strrchr(given, '/'); - if (last_slash == NULL) { - cork_buffer_clear(&path->given); - } else { - size_t offset = last_slash - given; - if (offset == 0) { - /* A special case for the immediate subdirectories of "/" */ - cork_buffer_truncate(&path->given, 1); - } else { - cork_buffer_truncate(&path->given, offset); - } - } -} - -struct cork_path * -cork_path_dirname(const struct cork_path *other) -{ - struct cork_path *path = cork_path_clone(other); - cork_path_set_dirname(path); - return path; -} - - -/*----------------------------------------------------------------------- - * Lists of paths - */ - -struct cork_path_list { - cork_array(struct cork_path *) array; - struct cork_buffer string; -}; - -struct cork_path_list * -cork_path_list_new_empty(void) -{ - struct cork_path_list *list = cork_new(struct cork_path_list); - cork_array_init(&list->array); - cork_buffer_init(&list->string); - return list; -} - -void -cork_path_list_free(struct cork_path_list *list) -{ - size_t i; - for (i = 0; i < cork_array_size(&list->array); i++) { - struct cork_path *path = cork_array_at(&list->array, i); - cork_path_free(path); - } - cork_array_done(&list->array); - cork_buffer_done(&list->string); - free(list); -} - -const char * -cork_path_list_to_string(const struct cork_path_list *list) -{ - return list->string.buf; -} - -void -cork_path_list_add(struct cork_path_list *list, struct cork_path *path) -{ - cork_array_append(&list->array, path); - if (cork_array_size(&list->array) > 1) { - cork_buffer_append(&list->string, ":", 1); - } - cork_buffer_append_string(&list->string, cork_path_get(path)); -} - -size_t -cork_path_list_size(const struct cork_path_list *list) -{ - return cork_array_size(&list->array); -} - -const struct cork_path * -cork_path_list_get(const struct cork_path_list *list, size_t index) -{ - return cork_array_at(&list->array, index); -} - -static void -cork_path_list_append_string(struct cork_path_list *list, const char *str) -{ - struct cork_path *path; - const char *curr = str; - const char *next; - - while ((next = strchr(curr, ':')) != NULL) { - size_t size = next - curr; - path = cork_path_new_internal(curr, size); - cork_path_list_add(list, path); - curr = next + 1; - } - - path = cork_path_new(curr); - cork_path_list_add(list, path); -} - -struct cork_path_list * -cork_path_list_new(const char *str) -{ - struct cork_path_list *list = cork_path_list_new_empty(); - cork_path_list_append_string(list, str); - return list; -} - - -/*----------------------------------------------------------------------- - * Files - */ - -struct cork_file { - struct cork_path *path; - struct stat stat; - enum cork_file_type type; - bool has_stat; -}; - -static void -cork_file_init(struct cork_file *file, struct cork_path *path) -{ - file->path = path; - file->has_stat = false; -} - -struct cork_file * -cork_file_new(const char *path) -{ - return cork_file_new_from_path(cork_path_new(path)); -} - -struct cork_file * -cork_file_new_from_path(struct cork_path *path) -{ - struct cork_file *file = cork_new(struct cork_file); - cork_file_init(file, path); - return file; -} - -static void -cork_file_reset(struct cork_file *file) -{ - file->has_stat = false; -} - -static void -cork_file_done(struct cork_file *file) -{ - cork_path_free(file->path); -} - -void -cork_file_free(struct cork_file *file) -{ - cork_file_done(file); - free(file); -} - -const struct cork_path * -cork_file_path(struct cork_file *file) -{ - return file->path; -} - -static int -cork_file_stat(struct cork_file *file) -{ - if (file->has_stat) { - return 0; - } else { - int rc; - rc = stat(cork_path_get(file->path), &file->stat); - - if (rc == -1) { - if (errno == ENOENT || errno == ENOTDIR) { - file->type = CORK_FILE_MISSING; - file->has_stat = true; - return 0; - } else { - cork_system_error_set(); - return -1; - } - } - - if (S_ISREG(file->stat.st_mode)) { - file->type = CORK_FILE_REGULAR; - } else if (S_ISDIR(file->stat.st_mode)) { - file->type = CORK_FILE_DIRECTORY; - } else if (S_ISLNK(file->stat.st_mode)) { - file->type = CORK_FILE_SYMLINK; - } else { - file->type = CORK_FILE_UNKNOWN; - } - - file->has_stat = true; - return 0; - } -} - -int -cork_file_exists(struct cork_file *file, bool *exists) -{ - rii_check(cork_file_stat(file)); - *exists = (file->type != CORK_FILE_MISSING); - return 0; -} - -int -cork_file_type(struct cork_file *file, enum cork_file_type *type) -{ - rii_check(cork_file_stat(file)); - *type = file->type; - return 0; -} - - -struct cork_file * -cork_path_list_find_file(const struct cork_path_list *list, - const char *rel_path) -{ - size_t i; - size_t count = cork_path_list_size(list); - struct cork_file *file; - - for (i = 0; i < count; i++) { - const struct cork_path *path = cork_path_list_get(list, i); - struct cork_path *joined = cork_path_join(path, rel_path); - bool exists; - file = cork_file_new_from_path(joined); - ei_check(cork_file_exists(file, &exists)); - if (exists) { - return file; - } else { - cork_file_free(file); - } - } - - cork_error_set_printf - (ENOENT, "%s not found in %s", - rel_path, cork_path_list_to_string(list)); - return NULL; - -error: - cork_file_free(file); - return NULL; -} - - -/*----------------------------------------------------------------------- - * Directories - */ - -int -cork_file_iterate_directory(struct cork_file *file, - cork_file_directory_iterator iterator, - void *user_data) -{ - DIR *dir = NULL; - struct dirent *entry; - size_t dir_path_size; - struct cork_path *child_path; - struct cork_file child_file; - - rip_check_posix(dir = opendir(cork_path_get(file->path))); - child_path = cork_path_clone(file->path); - cork_file_init(&child_file, child_path); - dir_path_size = cork_path_size(child_path); - - errno = 0; - while ((entry = readdir(dir)) != NULL) { - /* Skip the "." and ".." entries */ - if (strcmp(entry->d_name, ".") == 0 || - strcmp(entry->d_name, "..") == 0) { - continue; - } - - cork_path_append(child_path, entry->d_name); - ei_check(cork_file_stat(&child_file)); - - /* If the entry is a subdirectory, recurse into it. */ - ei_check(iterator(&child_file, entry->d_name, user_data)); - - /* Remove this entry name from the path buffer. */ - cork_path_truncate(child_path, dir_path_size); - cork_file_reset(&child_file); - - /* We have to reset errno to 0 because of the ambiguous way readdir uses - * a return value of NULL. Other functions may return normally yet set - * errno to a non-zero value. dlopen on Mac OS X is an ogreish example. - * Since an error readdir is indicated by returning NULL and setting - * errno to indicate the error, then we need to reset it to zero before - * each call. We shall assume, perhaps to our great misery, that - * functions within this loop do proper error checking and act - * accordingly. */ - errno = 0; - } - - /* Check errno immediately after the while loop terminates */ - if (CORK_UNLIKELY(errno != 0)) { - cork_system_error_set(); - goto error; - } - - cork_file_done(&child_file); - rii_check_posix(closedir(dir)); - return 0; - -error: - cork_file_done(&child_file); - rii_check_posix(closedir(dir)); - return -1; -} - -static int -cork_file_mkdir_one(struct cork_file *file, cork_file_mode mode, - unsigned int flags) -{ - DEBUG("mkdir %s\n", cork_path_get(file->path)); - - /* First check if the directory already exists. */ - rii_check(cork_file_stat(file)); - if (file->type == CORK_FILE_DIRECTORY) { - DEBUG(" Already exists!\n"); - if (!(flags & CORK_FILE_PERMISSIVE)) { - cork_system_error_set_explicit(EEXIST); - return -1; - } else { - return 0; - } - } else if (file->type != CORK_FILE_MISSING) { - DEBUG(" Exists and not a directory!\n"); - cork_system_error_set_explicit(EEXIST); - return -1; - } - - /* If the caller asked for a recursive mkdir, then make sure the parent - * directory exists. */ - if (flags & CORK_FILE_RECURSIVE) { - struct cork_path *parent = cork_path_dirname(file->path); - DEBUG(" Checking parent %s\n", cork_path_get(parent)); - if (parent->given.size == 0) { - /* There is no parent; we're either at the filesystem root (for an - * absolute path) or the current directory (for a relative one). - * Either way, we can assume it already exists. */ - cork_path_free(parent); - } else { - int rc; - struct cork_file parent_file; - cork_file_init(&parent_file, parent); - rc = cork_file_mkdir_one - (&parent_file, mode, flags | CORK_FILE_PERMISSIVE); - cork_file_done(&parent_file); - rii_check(rc); - } - } - - /* Create the directory already! */ - DEBUG(" Creating %s\n", cork_path_get(file->path)); - rii_check_posix(mkdir(cork_path_get(file->path), mode)); - return 0; -} - -int -cork_file_mkdir(struct cork_file *file, cork_file_mode mode, - unsigned int flags) -{ - return cork_file_mkdir_one(file, mode, flags); -} - -static int -cork_file_remove_iterator(struct cork_file *file, const char *rel_name, - void *user_data) -{ - unsigned int *flags = user_data; - return cork_file_remove(file, *flags); -} - -int -cork_file_remove(struct cork_file *file, unsigned int flags) -{ - DEBUG("rm %s\n", cork_path_get(file->path)); - rii_check(cork_file_stat(file)); - - if (file->type == CORK_FILE_MISSING) { - if (flags & CORK_FILE_PERMISSIVE) { - return 0; - } else { - cork_system_error_set_explicit(ENOENT); - return -1; - } - } else if (file->type == CORK_FILE_DIRECTORY) { - if (flags & CORK_FILE_RECURSIVE) { - /* The user asked that we delete the contents of the directory - * first. */ - rii_check(cork_file_iterate_directory - (file, cork_file_remove_iterator, &flags)); - } - - rii_check_posix(rmdir(cork_path_get(file->path))); - return 0; - } else { - rii_check(unlink(cork_path_get(file->path))); - return 0; - } -} - - -/*----------------------------------------------------------------------- - * Lists of files - */ - -struct cork_file_list { - cork_array(struct cork_file *) array; -}; - -struct cork_file_list * -cork_file_list_new_empty(void) -{ - struct cork_file_list *list = cork_new(struct cork_file_list); - cork_array_init(&list->array); - return list; -} - -void -cork_file_list_free(struct cork_file_list *list) -{ - size_t i; - for (i = 0; i < cork_array_size(&list->array); i++) { - struct cork_file *file = cork_array_at(&list->array, i); - cork_file_free(file); - } - cork_array_done(&list->array); - free(list); -} - -void -cork_file_list_add(struct cork_file_list *list, struct cork_file *file) -{ - cork_array_append(&list->array, file); -} - -size_t -cork_file_list_size(struct cork_file_list *list) -{ - return cork_array_size(&list->array); -} - -struct cork_file * -cork_file_list_get(struct cork_file_list *list, size_t index) -{ - return cork_array_at(&list->array, index); -} - -struct cork_file_list * -cork_file_list_new(struct cork_path_list *path_list) -{ - struct cork_file_list *list = cork_file_list_new_empty(); - size_t count = cork_path_list_size(path_list); - size_t i; - - for (i = 0; i < count; i++) { - const struct cork_path *path = cork_path_list_get(path_list, i); - struct cork_file *file = cork_file_new(cork_path_get(path)); - cork_array_append(&list->array, file); - } - - return list; -} - - -struct cork_file_list * -cork_path_list_find_files(const struct cork_path_list *path_list, - const char *rel_path) -{ - size_t i; - size_t count = cork_path_list_size(path_list); - struct cork_file_list *list = cork_file_list_new_empty(); - struct cork_file *file; - - for (i = 0; i < count; i++) { - const struct cork_path *path = cork_path_list_get(path_list, i); - struct cork_path *joined = cork_path_join(path, rel_path); - bool exists; - file = cork_file_new_from_path(joined); - ei_check(cork_file_exists(file, &exists)); - if (exists) { - cork_file_list_add(list, file); - } else { - cork_file_free(file); - } - } - - return list; - -error: - cork_file_list_free(list); - cork_file_free(file); - return NULL; -} - - -/*----------------------------------------------------------------------- - * Standard paths and path lists - */ - -#define empty_string(str) ((str) == NULL || (str)[0] == '\0') - -struct cork_path * -cork_path_home(void) -{ - const char *path = cork_env_get(NULL, "HOME"); - if (empty_string(path)) { - cork_undefined("Cannot determine home directory"); - return NULL; - } else { - return cork_path_new(path); - } -} - - -struct cork_path_list * -cork_path_config_paths(void) -{ - struct cork_path_list *list = cork_path_list_new_empty(); - const char *var; - struct cork_path *path; - - /* The first entry should be the user's configuration directory. This is - * specified by $XDG_CONFIG_HOME, with $HOME/.config as the default. */ - var = cork_env_get(NULL, "XDG_CONFIG_HOME"); - if (empty_string(var)) { - ep_check(path = cork_path_home()); - cork_path_append(path, ".config"); - cork_path_list_add(list, path); - } else { - path = cork_path_new(var); - cork_path_list_add(list, path); - } - - /* The remaining entries should be the system-wide configuration - * directories. These are specified by $XDG_CONFIG_DIRS, with /etc/xdg as - * the default. */ - var = cork_env_get(NULL, "XDG_CONFIG_DIRS"); - if (empty_string(var)) { - path = cork_path_new("/etc/xdg"); - cork_path_list_add(list, path); - } else { - cork_path_list_append_string(list, var); - } - - return list; - -error: - cork_path_list_free(list); - return NULL; -} - -struct cork_path_list * -cork_path_data_paths(void) -{ - struct cork_path_list *list = cork_path_list_new_empty(); - const char *var; - struct cork_path *path; - - /* The first entry should be the user's data directory. This is specified - * by $XDG_DATA_HOME, with $HOME/.local/share as the default. */ - var = cork_env_get(NULL, "XDG_DATA_HOME"); - if (empty_string(var)) { - ep_check(path = cork_path_home()); - cork_path_append(path, ".local/share"); - cork_path_list_add(list, path); - } else { - path = cork_path_new(var); - cork_path_list_add(list, path); - } - - /* The remaining entries should be the system-wide configuration - * directories. These are specified by $XDG_DATA_DIRS, with - * /usr/local/share:/usr/share as the the default. */ - var = cork_env_get(NULL, "XDG_DATA_DIRS"); - if (empty_string(var)) { - path = cork_path_new("/usr/local/share"); - cork_path_list_add(list, path); - path = cork_path_new("/usr/share"); - cork_path_list_add(list, path); - } else { - cork_path_list_append_string(list, var); - } - - return list; - -error: - cork_path_list_free(list); - return NULL; -} - -struct cork_path * -cork_path_user_cache_path(void) -{ - const char *var; - struct cork_path *path; - - /* The user's cache directory is specified by $XDG_CACHE_HOME, with - * $HOME/.cache as the default. */ - var = cork_env_get(NULL, "XDG_CACHE_HOME"); - if (empty_string(var)) { - rpp_check(path = cork_path_home()); - cork_path_append(path, ".cache"); - return path; - } else { - return cork_path_new(var); - } -} - -struct cork_path * -cork_path_user_runtime_path(void) -{ - const char *var; - - /* The user's cache directory is specified by $XDG_RUNTIME_DIR, with - * no default given by the spec. */ - var = cork_env_get(NULL, "XDG_RUNTIME_DIR"); - if (empty_string(var)) { - cork_undefined("Cannot determine user-specific runtime directory"); - return NULL; - } else { - return cork_path_new(var); - } -} diff --git a/libcork/posix/process.c b/libcork/posix/process.c deleted file mode 100644 index e22e16689..000000000 --- a/libcork/posix/process.c +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include - -#include "libcork/core.h" -#include "libcork/ds.h" -#include "libcork/os/process.h" -#include "libcork/helpers/errors.h" - - -#if !defined(CORK_DEBUG_PROCESS) -#define CORK_DEBUG_PROCESS 0 -#endif - -#if CORK_DEBUG_PROCESS -#include -#define DEBUG(...) fprintf(stderr, __VA_ARGS__) -#else -#define DEBUG(...) /* no debug messages */ -#endif - - -struct cork_cleanup_entry { - struct cork_dllist_item item; - int priority; - const char *name; - cork_cleanup_function function; -}; - -static struct cork_cleanup_entry * -cork_cleanup_entry_new(const char *name, int priority, - cork_cleanup_function function) -{ - struct cork_cleanup_entry *self = cork_new(struct cork_cleanup_entry); - self->priority = priority; - self->name = cork_strdup(name); - self->function = function; - return self; -} - -static void -cork_cleanup_entry_free(struct cork_cleanup_entry *self) -{ - cork_strfree(self->name); - free(self); -} - -static struct cork_dllist cleanup_entries = CORK_DLLIST_INIT(cleanup_entries); - -static void -cork_cleanup_entry_add(struct cork_cleanup_entry *entry) -{ - struct cork_dllist_item *curr; - - /* Linear search through the list of existing cleanup functions. When we - * find the first existing function with a higher priority, we've found - * where to insert the new function. */ - for (curr = cork_dllist_start(&cleanup_entries); - !cork_dllist_is_end(&cleanup_entries, curr); curr = curr->next) { - struct cork_cleanup_entry *existing = - cork_container_of(curr, struct cork_cleanup_entry, item); - if (existing->priority > entry->priority) { - cork_dllist_add_before(&existing->item, &entry->item); - return; - } - } - - /* If we fall through the loop, then the new function should be appended to - * the end of the list. */ - cork_dllist_add(&cleanup_entries, &entry->item); -} - -static void -cork_cleanup_call_one(struct cork_dllist_item *item, void *user_data) -{ - struct cork_cleanup_entry *entry = - cork_container_of(item, struct cork_cleanup_entry, item); - DEBUG("Call cleanup function [%d] %s\n", entry->priority, entry->name); - entry->function(); - cork_cleanup_entry_free(entry); -} - -static void -cork_cleanup_call_all(void) -{ - cork_dllist_map(&cleanup_entries, cork_cleanup_call_one, NULL); -} - - -CORK_INITIALIZER(cleanup_init) -{ - atexit(cork_cleanup_call_all); -} - -CORK_API void -cork_cleanup_at_exit_named(const char *name, int priority, - cork_cleanup_function function) -{ - struct cork_cleanup_entry *entry = - cork_cleanup_entry_new(name, priority, function); - DEBUG("Register cleanup function [%d] %s\n", priority, name); - cork_cleanup_entry_add(entry); -} diff --git a/libcork/posix/subprocess.c b/libcork/posix/subprocess.c deleted file mode 100644 index 75f1c4e52..000000000 --- a/libcork/posix/subprocess.c +++ /dev/null @@ -1,676 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2012-2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license - * details. - * ---------------------------------------------------------------------- - */ - -#include -#include -#include -#include -#ifndef __MINGW32__ -#include -#include -#endif -#include - -#include "libcork/core.h" -#include "libcork/ds.h" -#include "libcork/os/subprocess.h" -#include "libcork/threads/basics.h" -#include "libcork/helpers/errors.h" -#include "libcork/helpers/posix.h" - - -#if !defined(CORK_DEBUG_SUBPROCESS) -#define CORK_DEBUG_SUBPROCESS 0 -#endif - -#if CORK_DEBUG_SUBPROCESS -#include -#define DEBUG(...) fprintf(stderr, __VA_ARGS__) -#else -#define DEBUG(...) /* no debug messages */ -#endif - - -/*----------------------------------------------------------------------- - * Subprocess groups - */ - -#define BUF_SIZE 4096 - -struct cork_subprocess_group { - cork_array(struct cork_subprocess *) subprocesses; -}; - -struct cork_subprocess_group * -cork_subprocess_group_new(void) -{ - struct cork_subprocess_group *group = - cork_new(struct cork_subprocess_group); - cork_pointer_array_init - (&group->subprocesses, (cork_free_f) cork_subprocess_free); - return group; -} - -void -cork_subprocess_group_free(struct cork_subprocess_group *group) -{ - cork_array_done(&group->subprocesses); - free(group); -} - -void -cork_subprocess_group_add(struct cork_subprocess_group *group, - struct cork_subprocess *sub) -{ - cork_array_append(&group->subprocesses, sub); -} - - -/*----------------------------------------------------------------------- - * Pipes (parent reads) - */ - -struct cork_read_pipe { - struct cork_stream_consumer *consumer; - int fds[2]; - bool first; -}; - -static void -cork_read_pipe_init(struct cork_read_pipe *p, struct cork_stream_consumer *consumer) -{ - p->consumer = consumer; - p->fds[0] = -1; - p->fds[1] = -1; -} - -static int -cork_read_pipe_close_read(struct cork_read_pipe *p) -{ - if (p->fds[0] != -1) { - DEBUG("Closing read pipe %d\n", p->fds[0]); - rii_check_posix(close(p->fds[0])); - p->fds[0] = -1; - } - return 0; -} - -static int -cork_read_pipe_close_write(struct cork_read_pipe *p) -{ - if (p->fds[1] != -1) { - DEBUG("Closing write pipe %d\n", p->fds[1]); - rii_check_posix(close(p->fds[1])); - p->fds[1] = -1; - } - return 0; -} - -static void -cork_read_pipe_close(struct cork_read_pipe *p) -{ - cork_read_pipe_close_read(p); - cork_read_pipe_close_write(p); -} - -static void -cork_read_pipe_done(struct cork_read_pipe *p) -{ - cork_read_pipe_close(p); -} - -static int -cork_read_pipe_open(struct cork_read_pipe *p) -{ - if (p->consumer != NULL) { - int flags; - - /* We want the read end of the pipe to be non-blocking. */ - DEBUG("[read] Opening pipe\n"); - rii_check_posix(pipe(p->fds)); - DEBUG("[read] Got read=%d write=%d\n", p->fds[0], p->fds[1]); - DEBUG("[read] Setting non-blocking flag on read pipe\n"); - ei_check_posix(flags = fcntl(p->fds[0], F_GETFD)); - flags |= O_NONBLOCK; - ei_check_posix(fcntl(p->fds[0], F_SETFD, flags)); - } - - p->first = true; - return 0; - -error: - cork_read_pipe_close(p); - return -1; -} - -static int -cork_read_pipe_dup(struct cork_read_pipe *p, int fd) -{ - if (p->fds[1] != -1) { - rii_check_posix(dup2(p->fds[1], fd)); - } - return 0; -} - -static int -cork_read_pipe_read(struct cork_read_pipe *p, char *buf, bool *progress) -{ - if (p->fds[0] == -1) { - return 0; - } - - do { - DEBUG("[read] Reading from pipe %d\n", p->fds[0]); - ssize_t bytes_read = read(p->fds[0], buf, BUF_SIZE); - if (bytes_read == -1) { - if (errno == EAGAIN) { - /* We've exhausted all of the data currently available. */ - DEBUG("[read] No more bytes without blocking\n"); - return 0; - } else if (errno == EINTR) { - /* Interrupted by a signal; return so that our wait loop can - * catch that. */ - DEBUG("[read] Interrupted by signal\n"); - return 0; - } else { - /* An actual error */ - cork_system_error_set(); - DEBUG("[read] Error: %s\n", cork_error_message()); - return -1; - } - } else if (bytes_read == 0) { - DEBUG("[read] End of stream\n"); - *progress = true; - rii_check(cork_stream_consumer_eof(p->consumer)); - rii_check_posix(close(p->fds[0])); - p->fds[0] = -1; - return 0; - } else { - DEBUG("[read] Got %zd bytes\n", bytes_read); - *progress = true; - rii_check(cork_stream_consumer_data - (p->consumer, buf, bytes_read, p->first)); - p->first = false; - } - } while (true); -} - -static bool -cork_read_pipe_is_finished(struct cork_read_pipe *p) -{ - return p->fds[0] == -1; -} - - -/*----------------------------------------------------------------------- - * Pipes (parent writes) - */ - -struct cork_write_pipe { - struct cork_stream_consumer consumer; - int fds[2]; -}; - -static int -cork_write_pipe_close_read(struct cork_write_pipe *p) -{ - if (p->fds[0] != -1) { - DEBUG("[write] Closing read pipe %d\n", p->fds[0]); - rii_check_posix(close(p->fds[0])); - p->fds[0] = -1; - } - return 0; -} - -static int -cork_write_pipe_close_write(struct cork_write_pipe *p) -{ - if (p->fds[1] != -1) { - DEBUG("[write] Closing write pipe %d\n", p->fds[1]); - rii_check_posix(close(p->fds[1])); - p->fds[1] = -1; - } - return 0; -} - -static int -cork_write_pipe__data(struct cork_stream_consumer *consumer, - const void *buf, size_t size, bool is_first_chunk) -{ - struct cork_write_pipe *p = - cork_container_of(consumer, struct cork_write_pipe, consumer); - rii_check_posix(write(p->fds[1], buf, size)); - return 0; -} - -static int -cork_write_pipe__eof(struct cork_stream_consumer *consumer) -{ - struct cork_write_pipe *p = - cork_container_of(consumer, struct cork_write_pipe, consumer); - return cork_write_pipe_close_write(p); -} - -static void -cork_write_pipe__free(struct cork_stream_consumer *consumer) -{ -} - -static void -cork_write_pipe_init(struct cork_write_pipe *p) -{ - p->consumer.data = cork_write_pipe__data; - p->consumer.eof = cork_write_pipe__eof; - p->consumer.free = cork_write_pipe__free; - p->fds[0] = -1; - p->fds[1] = -1; -} - -static void -cork_write_pipe_close(struct cork_write_pipe *p) -{ - cork_write_pipe_close_read(p); - cork_write_pipe_close_write(p); -} - -static void -cork_write_pipe_done(struct cork_write_pipe *p) -{ - cork_write_pipe_close(p); -} - -static int -cork_write_pipe_open(struct cork_write_pipe *p) -{ - DEBUG("[write] Opening writer pipe\n"); - rii_check_posix(pipe(p->fds)); - DEBUG("[write] Got read=%d write=%d\n", p->fds[0], p->fds[1]); - return 0; -} - -static int -cork_write_pipe_dup(struct cork_write_pipe *p, int fd) -{ - if (p->fds[0] != -1) { - rii_check_posix(dup2(p->fds[0], fd)); - } - return 0; -} - - -/*----------------------------------------------------------------------- - * Subprocesses - */ - -struct cork_subprocess { - pid_t pid; - struct cork_write_pipe stdin_pipe; - struct cork_read_pipe stdout_pipe; - struct cork_read_pipe stderr_pipe; - struct cork_thread_body *body; - int *exit_code; - char buf[BUF_SIZE]; -}; - -struct cork_subprocess * -cork_subprocess_new(struct cork_thread_body *body, - struct cork_stream_consumer *stdout_consumer, - struct cork_stream_consumer *stderr_consumer, - int *exit_code) -{ - struct cork_subprocess *self = cork_new(struct cork_subprocess); - cork_write_pipe_init(&self->stdin_pipe); - cork_read_pipe_init(&self->stdout_pipe, stdout_consumer); - cork_read_pipe_init(&self->stderr_pipe, stderr_consumer); - self->pid = 0; - self->body = body; - self->exit_code = exit_code; - return self; -} - -void -cork_subprocess_free(struct cork_subprocess *self) -{ - cork_thread_body_free(self->body); - cork_write_pipe_done(&self->stdin_pipe); - cork_read_pipe_done(&self->stdout_pipe); - cork_read_pipe_done(&self->stderr_pipe); - free(self); -} - -struct cork_stream_consumer * -cork_subprocess_stdin(struct cork_subprocess *self) -{ - return &self->stdin_pipe.consumer; -} - - -/*----------------------------------------------------------------------- - * Executing another program - */ - -struct cork_exec_body { - struct cork_thread_body parent; - struct cork_exec *exec; -}; - -static int -cork_exec__run(struct cork_thread_body *vself) -{ - struct cork_exec_body *self = - cork_container_of(vself, struct cork_exec_body, parent); - return cork_exec_run(self->exec); -} - -static void -cork_exec__free(struct cork_thread_body *vself) -{ - struct cork_exec_body *self = - cork_container_of(vself, struct cork_exec_body, parent); - cork_exec_free(self->exec); - free(self); -} - -static struct cork_thread_body * -cork_exec_body_new(struct cork_exec *exec) -{ - struct cork_exec_body *self = cork_new(struct cork_exec_body); - self->parent.run = cork_exec__run; - self->parent.free = cork_exec__free; - self->exec = exec; - return &self->parent; -} - -struct cork_subprocess * -cork_subprocess_new_exec(struct cork_exec *exec, - struct cork_stream_consumer *out, - struct cork_stream_consumer *err, - int *exit_code) -{ - struct cork_thread_body *body = cork_exec_body_new(exec); - return cork_subprocess_new(body, out, err, exit_code); -} - - -/*----------------------------------------------------------------------- - * Running subprocesses - */ - -int -cork_subprocess_start(struct cork_subprocess *self) -{ - pid_t pid; - - /* Create the stdout and stderr pipes. */ - if (cork_write_pipe_open(&self->stdin_pipe) == -1) { - return -1; - } - if (cork_read_pipe_open(&self->stdout_pipe) == -1) { - cork_write_pipe_close(&self->stdin_pipe); - return -1; - } - if (cork_read_pipe_open(&self->stderr_pipe) == -1) { - cork_write_pipe_close(&self->stdin_pipe); - cork_read_pipe_close(&self->stdout_pipe); - return -1; - } - - /* Fork the child process. */ - DEBUG("Forking child process\n"); - pid = fork(); - if (pid == 0) { - /* Child process */ - int rc; - - /* Close the parent's end of the pipes */ - DEBUG("[child] "); - cork_write_pipe_close_write(&self->stdin_pipe); - DEBUG("[child] "); - cork_read_pipe_close_read(&self->stdout_pipe); - DEBUG("[child] "); - cork_read_pipe_close_read(&self->stderr_pipe); - - /* Bind the stdout and stderr pipes */ - if (cork_write_pipe_dup(&self->stdin_pipe, STDIN_FILENO) == -1) { - _exit(EXIT_FAILURE); - } - if (cork_read_pipe_dup(&self->stdout_pipe, STDOUT_FILENO) == -1) { - _exit(EXIT_FAILURE); - } - if (cork_read_pipe_dup(&self->stderr_pipe, STDERR_FILENO) == -1) { - _exit(EXIT_FAILURE); - } - - /* Run the subprocess's body */ - rc = cork_thread_body_run(self->body); - if (CORK_LIKELY(rc == 0)) { - _exit(EXIT_SUCCESS); - } else { - fprintf(stderr, "%s\n", cork_error_message()); - _exit(EXIT_FAILURE); - } - } else if (pid < 0) { - /* Error forking */ - cork_system_error_set(); - return -1; - } else { - /* Parent process */ - DEBUG(" Child PID=%d\n", (int) pid); - self->pid = pid; - cork_write_pipe_close_read(&self->stdin_pipe); - cork_read_pipe_close_write(&self->stdout_pipe); - cork_read_pipe_close_write(&self->stderr_pipe); - return 0; - } -} - -static int -cork_subprocess_reap(struct cork_subprocess *self, int flags, bool *progress) -{ - int pid; - int status; - rii_check_posix(pid = waitpid(self->pid, &status, flags)); - if (pid == self->pid) { - *progress = true; - self->pid = 0; - if (self->exit_code != NULL) { - *self->exit_code = WEXITSTATUS(status); - } - } - return 0; -} - -int -cork_subprocess_abort(struct cork_subprocess *self) -{ - if (self->pid > 0) { - CORK_ATTR_UNUSED bool progress; - DEBUG("Terminating child process %d\n", (int) self->pid); - kill(self->pid, SIGTERM); - return cork_subprocess_reap(self, 0, &progress); - } else { - return 0; - } -} - -bool -cork_subprocess_is_finished(struct cork_subprocess *self) -{ - return (self->pid == 0) - && cork_read_pipe_is_finished(&self->stdout_pipe) - && cork_read_pipe_is_finished(&self->stderr_pipe); -} - -#if defined(__APPLE__) || defined(__MINGW32__) || defined(__CYGWIN__) -#include -#define THREAD_YIELD pthread_yield_np -#elif defined(__linux__) || defined(BSD) -#include -#define THREAD_YIELD sched_yield -#else -#error "Unknown thread yield implementation" -#endif - -static void -cork_subprocess_yield(unsigned int *spin_count) -{ - /* Adapted from - * http://www.1024cores.net/home/lock-free-algorithms/tricks/spinning */ - - if (*spin_count < 10) { - /* Spin-wait */ - cork_pause(); - } else if (*spin_count < 20) { - /* A more intense spin-wait */ - int i; - for (i = 0; i < 50; i++) { - cork_pause(); - } - } else if (*spin_count < 22) { - THREAD_YIELD(); - } else if (*spin_count < 24) { - usleep(0); - } else if (*spin_count < 50) { - usleep(1); - } else if (*spin_count < 75) { - usleep((*spin_count - 49) * 1000); - } else { - usleep(25000); - } - - (*spin_count)++; -} - -static int -cork_subprocess_drain_(struct cork_subprocess *self, bool *progress) -{ - rii_check(cork_read_pipe_read(&self->stdout_pipe, self->buf, progress)); - rii_check(cork_read_pipe_read(&self->stderr_pipe, self->buf, progress)); - if (self->pid > 0) { - return cork_subprocess_reap(self, WNOHANG, progress); - } else { - return 0; - } -} - -bool -cork_subprocess_drain(struct cork_subprocess *self) -{ - bool progress; - cork_subprocess_drain_(self, &progress); - return progress; -} - -int -cork_subprocess_wait(struct cork_subprocess *self) -{ - unsigned int spin_count = 0; - bool progress; - while (!cork_subprocess_is_finished(self)) { - progress = false; - rii_check(cork_subprocess_drain_(self, &progress)); - if (!progress) { - cork_subprocess_yield(&spin_count); - } - } - return 0; -} - - -/*----------------------------------------------------------------------- - * Running subprocess groups - */ - -static int -cork_subprocess_group_terminate(struct cork_subprocess_group *group) -{ - size_t i; - for (i = 0; i < cork_array_size(&group->subprocesses); i++) { - struct cork_subprocess *sub = cork_array_at(&group->subprocesses, i); - rii_check(cork_subprocess_abort(sub)); - } - return 0; -} - -int -cork_subprocess_group_start(struct cork_subprocess_group *group) -{ - size_t i; - DEBUG("Starting subprocess group\n"); - /* Start each subprocess. */ - for (i = 0; i < cork_array_size(&group->subprocesses); i++) { - struct cork_subprocess *sub = cork_array_at(&group->subprocesses, i); - ei_check(cork_subprocess_start(sub)); - } - return 0; - -error: - cork_subprocess_group_terminate(group); - return -1; -} - - -int -cork_subprocess_group_abort(struct cork_subprocess_group *group) -{ - DEBUG("Aborting subprocess group\n"); - return cork_subprocess_group_terminate(group); -} - - -bool -cork_subprocess_group_is_finished(struct cork_subprocess_group *group) -{ - size_t i; - for (i = 0; i < cork_array_size(&group->subprocesses); i++) { - struct cork_subprocess *sub = cork_array_at(&group->subprocesses, i); - bool sub_finished = cork_subprocess_is_finished(sub); - if (!sub_finished) { - return false; - } - } - return true; -} - -static int -cork_subprocess_group_drain_(struct cork_subprocess_group *group, - bool *progress) -{ - size_t i; - for (i = 0; i < cork_array_size(&group->subprocesses); i++) { - struct cork_subprocess *sub = cork_array_at(&group->subprocesses, i); - rii_check(cork_subprocess_drain_(sub, progress)); - } - return 0; -} - -bool -cork_subprocess_group_drain(struct cork_subprocess_group *group) -{ - bool progress = false; - cork_subprocess_group_drain_(group, &progress); - return progress; -} - -int -cork_subprocess_group_wait(struct cork_subprocess_group *group) -{ - unsigned int spin_count = 0; - bool progress; - DEBUG("Waiting for subprocess group to finish\n"); - while (!cork_subprocess_group_is_finished(group)) { - progress = false; - rii_check(cork_subprocess_group_drain_(group, &progress)); - if (!progress) { - cork_subprocess_yield(&spin_count); - } - } - return 0; -} diff --git a/libcork/pthreads/thread.c b/libcork/pthreads/thread.c deleted file mode 100644 index 0dd55a302..000000000 --- a/libcork/pthreads/thread.c +++ /dev/null @@ -1,183 +0,0 @@ -/* -*- coding: utf-8 -*- - * ---------------------------------------------------------------------- - * Copyright © 2013, RedJack, LLC. - * All rights reserved. - * - * Please see the COPYING file in this distribution for license details. - * ---------------------------------------------------------------------- - */ - -#include - -#include - -#include "libcork/core/allocator.h" -#include "libcork/core/error.h" -#include "libcork/core/types.h" -#include "libcork/ds/buffer.h" -#include "libcork/threads/basics.h" - - -/*----------------------------------------------------------------------- - * Current thread - */ - -static volatile cork_thread_id last_thread_descriptor = 0; - -struct cork_thread { - const char *name; - cork_thread_id id; - pthread_t thread_id; - struct cork_thread_body *body; - cork_error error_code; - struct cork_buffer error_message; - bool started; - bool joined; -}; - -struct cork_thread_descriptor { - struct cork_thread *current_thread; - cork_thread_id id; -}; - -cork_tls(struct cork_thread_descriptor, cork_thread_descriptor); - -struct cork_thread * -cork_current_thread_get(void) -{ - struct cork_thread_descriptor *desc = cork_thread_descriptor_get(); - return desc->current_thread; -} - -cork_thread_id -cork_current_thread_get_id(void) -{ - struct cork_thread_descriptor *desc = cork_thread_descriptor_get(); - if (CORK_UNLIKELY(desc->id == 0)) { - if (desc->current_thread == NULL) { - desc->id = cork_uint_atomic_add(&last_thread_descriptor, 1); - } else { - desc->id = desc->current_thread->id; - } - } - return desc->id; -} - - -/*----------------------------------------------------------------------- - * Threads - */ - -struct cork_thread * -cork_thread_new(const char *name, struct cork_thread_body *body) -{ - struct cork_thread *self = cork_new(struct cork_thread); - self->name = cork_strdup(name); - self->id = cork_uint_atomic_add(&last_thread_descriptor, 1); - self->body = body; - self->error_code = CORK_ERROR_NONE; - cork_buffer_init(&self->error_message); - self->started = false; - self->joined = false; - return self; -} - -static void -cork_thread_free_private(struct cork_thread *self) -{ - cork_strfree(self->name); - cork_thread_body_free(self->body); - cork_buffer_done(&self->error_message); - free(self); -} - -void -cork_thread_free(struct cork_thread *self) -{ - assert(!self->started); - cork_thread_free_private(self); -} - -const char * -cork_thread_get_name(struct cork_thread *self) -{ - return self->name; -} - -cork_thread_id -cork_thread_get_id(struct cork_thread *self) -{ - return self->id; -} - -static void * -cork_thread_pthread_run(void *vself) -{ - int rc; - struct cork_thread *self = vself; - struct cork_thread_descriptor *desc = cork_thread_descriptor_get(); - - desc->current_thread = self; - desc->id = self->id; - rc = cork_thread_body_run(self->body); - - /* If an error occurred in the body of the thread, save the error into the - * cork_thread object so that we can propagate that error when some calls - * cork_thread_join. */ - if (CORK_UNLIKELY(rc != 0)) { - if (CORK_LIKELY(cork_error_occurred())) { - self->error_code = cork_error_code(); - cork_buffer_set_string(&self->error_message, cork_error_message()); - } else { - self->error_code = CORK_UNKNOWN_ERROR; - cork_buffer_set_string(&self->error_message, "Unknown error"); - } - } - - return NULL; -} - -int -cork_thread_start(struct cork_thread *self) -{ - int rc; - pthread_t thread_id; - - assert(!self->started); - - rc = pthread_create(&thread_id, NULL, cork_thread_pthread_run, self); - if (CORK_UNLIKELY(rc != 0)) { - cork_system_error_set_explicit(rc); - return -1; - } - - self->thread_id = thread_id; - self->started = true; - return 0; -} - -int -cork_thread_join(struct cork_thread *self) -{ - int rc; - - assert(self->started && !self->joined); - - rc = pthread_join(self->thread_id, NULL); - if (CORK_UNLIKELY(rc != 0)) { - cork_system_error_set_explicit(rc); - cork_thread_free_private(self); - return -1; - } - - if (CORK_UNLIKELY(self->error_code != CORK_ERROR_NONE)) { - cork_error_set_printf - (self->error_code, "Error from thread %s: %s", - self->name, (char *) self->error_message.buf); - cork_thread_free_private(self); - return -1; - } - - cork_thread_free_private(self); - return 0; -} diff --git a/libev/Changes b/libev/Changes deleted file mode 100644 index 9e8f4f26b..000000000 --- a/libev/Changes +++ /dev/null @@ -1,477 +0,0 @@ -Revision history for libev, a high-performance and full-featured event loop. - -TODO: ev_loop_wakeup -TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone) -TODO: faq, process a thing in each iteration -TODO: dbeugging tips, ev_verify, ev_init twice -TODO: ev_break for immediate exit (EVBREAK_NOW?) -TODO: ev_feed_child_event -TODO: document the special problem of signals around fork. -TODO: store pid for each signal -TODO: document file descriptor usage per loop -TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork -TODO: embed watchers need updating when fd changes -TODO: document portbaility requirements for atomic pointer access - -4.15 Fri Mar 1 12:04:50 CET 2013 - - destroying a non-default loop would stop the global waitpid - watcher (Denis Bilenko). - - queueing pending watchers of higher priority from a watcher now invokes - them in a timely fashion (reported by Denis Bilenko). - - add throw() to all libev functions that cannot throw exceptions, for - further code size decrease when compiling for C++. - - add throw () to callbacks that must not throw exceptions (allocator, - syserr, loop acquire/release, periodic reschedule cbs). - - fix event_base_loop return code, add event_get_callback, event_base_new, - event_base_get_method calls to improve libevent 1.x emulation and add - some libevent 2.x functionality (based on a patch by Jeff Davey). - - add more memory fences to fix a bug reported by Jeff Davey. Better - be overfenced than underprotected. - - ev_run now returns a boolean status (true meaning watchers are - still active). - - ev_once: undef EV_ERROR in ev_kqueue.c, to avoid clashing with - libev's EV_ERROR (reported by 191919). - - (ecb) add memory fence support for xlC (Darin McBride). - - (ecb) add memory fence support for gcc-mips (Anton Kirilov). - - (ecb) add memory fence support for gcc-alpha (Christian Weisgerber). - - work around some kernels losing file descriptors by leaking - the kqueue descriptor in the child. - - work around linux inotify not reporting IN_ATTRIB changes for directories - in many cases. - - include sys/syscall.h instead of plain syscall.h. - - check for io watcher loops in ev_verify, check for the most - common reported usage bug in ev_io_start. - - chose socket vs. WSASocket at compiletime using EV_USE_WSASOCKET. - - always use WSASend/WSARecv directly on windows, hoping that this - works in all cases (unlike read/write/send/recv...). - - try to detect signals around a fork faster (test program by - Denis Bilenko). - - work around recent glibc versions that leak memory in realloc. - - rename ev::embed::set to ev::embed::set_embed to avoid clashing - the watcher base set (loop) method. - - rewrite the async/signal pipe logic to always keep a valid fd, which - simplifies (and hopefuly correctifies :) the race checking - on fork, at the cost of one extra fd. - - add fat, msdos, jffs2, ramfs, ntfs and btrfs to the list of - inotify-supporting filesystems. - - move orig_CFLAGS assignment to after AC_INIT, as newer autoconf - versions ignore it before - (https://bugzilla.redhat.com/show_bug.cgi?id=908096). - - add some untested android support. - - enum expressions must be of type int (reported by Juan Pablo L). - -4.11 Sat Feb 4 19:52:39 CET 2012 - - INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as - was documented already, but not implemented in the repeating case. - - new compiletime symbols: EV_NO_SMP and EV_NO_THREADS. - - fix a race where the workaround against the epoll fork bugs - caused signals to not be handled anymore. - - correct backend_fudge for most backends, and implement a windows - specific workaround to avoid looping because we call both - select and Sleep, both with different time resolutions. - - document range and guarantees of ev_sleep. - - document reasonable ranges for periodics interval and offset. - - rename backend_fudge to backend_mintime to avoid future confusion :) - - change the default periodic reschedule function to hopefully be more - exact and correct even in corner cases or in the far future. - - do not rely on -lm anymore: use it when available but use our - own floor () if it is missing. This should make it easier to embed, - as no external libraries are required. - - strategically import macros from libecb and mark rarely-used functions - as cache-cold (saving almost 2k code size on typical amd64 setups). - - add Symbols.ev and Symbols.event files, that were missing. - - fix backend_mintime value for epoll (was 1/1024, is 1/1000 now). - - fix #3 "be smart about timeouts" to not "deadlock" when - timeout == now, also improve the section overall. - - avoid "AVOIDING FINISHING BEFORE RETURNING" idiom. - - support new EV_API_STATIC mode to make all libev symbols - static. - - supply default CFLAGS of -g -O3 with gcc when original CFLAGS - were empty. - -4.04 Wed Feb 16 09:01:51 CET 2011 - - fix two problems in the native win32 backend, where reuse of fd's - with different underlying handles caused handles not to be removed - or added to the select set (analyzed and tested by Bert Belder). - - do no rely on ceil() in ev_e?poll.c. - - backport libev to HP-UX versions before 11 v3. - - configure did not detect nanosleep and clock_gettime properly when - they are available in the libc (as opposed to -lrt). - -4.03 Tue Jan 11 14:37:25 CET 2011 - - officially support polling files with all backends. - - support files, /dev/zero etc. the same way as select in the epoll - backend, by generating events on our own. - - ports backend: work around solaris bug 6874410 and many related ones - (EINTR, maybe more), with no performance loss (note that the solaris - bug report is actually wrong, reality is far more bizarre and broken - than that). - - define EV_READ/EV_WRITE as macros in event.h, as some programs use - #ifdef to test for them. - - new (experimental) function: ev_feed_signal. - - new (to become default) EVFLAG_NOSIGMASK flag. - - new EVBACKEND_MASK symbol. - - updated COMMON IDIOMS SECTION. - -4.01 Fri Nov 5 21:51:29 CET 2010 - - automake fucked it up, apparently, --add-missing -f is not quite enough - to make it update its files, so 4.00 didn't install ev++.h and - event.h on make install. grrr. - - ev_loop(count|depth) didn't return anything (Robin Haberkorn). - - change EV_UNDEF to 0xffffffff to silence some overzealous compilers. - - use "(libev) " prefix for all libev error messages now. - -4.00 Mon Oct 25 12:32:12 CEST 2010 - - "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading. - - ev_embed_stop did not correctly stop the watcher (very good - testcase by Vladimir Timofeev). - - ev_run will now always update the current loop time - it erroneously - didn't when idle watchers were active, causing timers not to fire. - - fix a bug where a timeout of zero caused the timer not to fire - in the libevent emulation (testcase by Péter Szabó). - - applied win32 fixes by Michael Lenaghan (also James Mansion). - - replace EV_MINIMAL by EV_FEATURES. - - prefer EPOLL_CTL_ADD over EPOLL_CTL_MOD in some more cases, as it - seems the former is *much* faster than the latter. - - linux kernel version detection (for inotify bug workarounds) - did not work properly. - - reduce the number of spurious wake-ups with the ports backend. - - remove dependency on sys/queue.h on freebsd (patch by Vanilla Hsu). - - do async init within ev_async_start, not ev_async_set, which avoids - an API quirk where the set function must be called in the C++ API - even when there is nothing to set. - - add (undocumented) EV_ENABLE when adding events with kqueue, - this might help with OS X, which seems to need it despite documenting - not to need it (helpfully pointed out by Tilghman Lesher). - - do not use poll by default on freebsd, it's broken (what isn't - on freebsd...). - - allow to embed epoll on kernels >= 2.6.32. - - configure now prepends -O3, not appends it, so one can still - override it. - - ev.pod: greatly expanded the portability section, added a porting - section, a description of watcher states and made lots of minor fixes. - - disable poll backend on AIX, the poll header spams the namespace - and it's not worth working around dead platforms (reported - and analyzed by Aivars Kalvans). - - improve header file compatibility of the standalone eventfd code - in an obscure case. - - implement EV_AVOID_STDIO option. - - do not use sscanf to parse linux version number (smaller, faster, - no sscanf dependency). - - new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings. - - update libev.m4 HAVE_CLOCK_SYSCALL test for newer glibcs. - - add section on accept() problems to the manpage. - - rename EV_TIMEOUT to EV_TIMER. - - rename ev_loop_count/depth/verify/loop/unloop. - - remove ev_default_destroy and ev_default_fork. - - switch to two-digit minor version. - - work around an apparent gentoo compiler bug. - - define _DARWIN_UNLIMITED_SELECT. just so. - - use enum instead of #define for most constants. - - improve compatibility to older C++ compilers. - - (experimental) ev_run/ev_default_loop/ev_break/ev_loop_new have now - default arguments when compiled as C++. - - enable automake dependency tracking. - - ev_loop_new no longer leaks memory when loop creation failed. - - new ev_cleanup watcher type. - -3.9 Thu Dec 31 07:59:59 CET 2009 - - signalfd is no longer used by default and has to be requested - explicitly - this means that easy to catch bugs become hard to - catch race conditions, but the users have spoken. - - point out the unspecified signal mask in the documentation, and - that this is a race condition regardless of EV_SIGNALFD. - - backport inotify code to C89. - - inotify file descriptors could leak into child processes. - - ev_stat watchers could keep an erroneous extra ref on the loop, - preventing exit when unregistering all watchers (testcases - provided by ry@tinyclouds.org). - - implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration - symbols to make it easier for apps to do their own fd management. - - support EV_IDLE_ENABLE being disabled in ev++.h - (patch by Didier Spezia). - - take advantage of inotify_init1, if available, to set cloexec/nonblock - on fd creation, to avoid races. - - the signal handling pipe wasn't always initialised under windows - (analysed by lekma). - - changed minimum glibc requirement from glibc 2.9 to 2.7, for - signalfd. - - add missing string.h include (Denis F. Latypoff). - - only replace ev_stat.prev when we detect an actual difference, - so prev is (almost) always different to attr. this might - have caused the problems with 04_stat.t. - - add ev::timer->remaining () method to C++ API. - -3.8 Sun Aug 9 14:30:45 CEST 2009 - - incompatible change: do not necessarily reset signal handler - to SIG_DFL when a sighandler is stopped. - - ev_default_destroy did not properly free or zero some members, - potentially causing crashes and memory corruption on repeated - ev_default_destroy/ev_default_loop calls. - - take advantage of signalfd on GNU/Linux systems. - - document that the signal mask might be in an unspecified - state when using libev's signal handling. - - take advantage of some GNU/Linux calls to set cloexec/nonblock - on fd creation, to avoid race conditions. - -3.7 Fri Jul 17 16:36:32 CEST 2009 - - ev_unloop and ev_loop wrongly used a global variable to exit loops, - instead of using a per-loop variable (bug caught by accident...). - - the ev_set_io_collect_interval interpretation has changed. - - add new functionality: ev_set_userdata, ev_userdata, - ev_set_invoke_pending_cb, ev_set_loop_release_cb, - ev_invoke_pending, ev_pending_count, together with a long example - about thread locking. - - add ev_timer_remaining (as requested by Denis F. Latypoff). - - add ev_loop_depth. - - calling ev_unloop in fork/prepare watchers will no longer poll - for new events. - - Denis F. Latypoff corrected many typos in example code snippets. - - honor autoconf detection of EV_USE_CLOCK_SYSCALL, also double- - check that the syscall number is available before trying to - use it (reported by ry@tinyclouds). - - use GetSystemTimeAsFileTime instead of _timeb on windows, for - slightly higher accuracy. - - properly declare ev_loop_verify and ev_now_update even when - !EV_MULTIPLICITY. - - do not compile in any priority code when EV_MAXPRI == EV_MINPRI. - - support EV_MINIMAL==2 for a reduced API. - - actually 0-initialise struct sigaction when installing signals. - - add section on hibernate and stopped processes to ev_timer docs. - -3.6 Tue Apr 28 02:49:30 CEST 2009 - - multiple timers becoming ready within an event loop iteration - will be invoked in the "correct" order now. - - do not leave the event loop early just because we have no active - watchers, fixing a problem when embedding a kqueue loop - that has active kernel events but no registered watchers - (reported by blacksand blacksand). - - correctly zero the idx values for arrays, so destroying and - reinitialising the default loop actually works (patch by - Malek Hadj-Ali). - - implement ev_suspend and ev_resume. - - new EV_CUSTOM revents flag for use by applications. - - add documentation section about priorities. - - add a glossary to the dcoumentation. - - extend the ev_fork description slightly. - - optimize a jump out of call_pending. - -3.53 Sun Feb 15 02:38:20 CET 2009 - - fix a bug in event pipe creation on win32 that would cause a - failed assertion on event loop creation (patch by Malek Hadj-Ali). - - probe for CLOCK_REALTIME support at runtime as well and fall - back to gettimeofday if there is an error, to support older - operating systems with newer header files/libraries. - - prefer gettimeofday over clock_gettime with USE_CLOCK_SYSCALL - (default most everywhere), otherwise not. - -3.52 Wed Jan 7 21:43:02 CET 2009 - - fix compilation of select backend in fd_set mode when NFDBITS is - missing (to get it to compile on QNX, reported by Rodrigo Campos). - - better select-nfds handling when select backend is in fd_set mode. - - diagnose fd_set overruns when select backend is in fd_set mode. - - due to a thinko, instead of disabling everything but - select on the borked OS X platform, everything but select was - allowed (reported by Emanuele Giaquinta). - - actually verify that local and remote port are matching in - libev's socketpair emulation, which makes denial-of-service - attacks harder (but not impossible - it's windows). Make sure - it even works under vista, which thinks that getpeer/sockname - should return fantasy port numbers. - - include "libev" in all assertion messages for potentially - clearer diagnostics. - - event_get_version (libevent compatibility) returned - a useless string instead of the expected version string - (patch by W.C.A. Wijngaards). - -3.51 Wed Dec 24 23:00:11 CET 2008 - - fix a bug where an inotify watcher was added twice, causing - freezes on hash collisions (reported and analysed by Graham Leggett). - - new config symbol, EV_USE_CLOCK_SYSCALL, to make libev use - a direct syscall - slower, but no dependency on librt et al. - - assume negative return values != -1 signals success of port_getn - (http://cvs.epicsol.org/cgi/viewcvs.cgi/epic5/source/newio.c?rev=1.52) - (no known failure reports, but it doesn't hurt). - - fork detection in ev_embed now stops and restarts the watcher - automatically. - - EXPERIMENTAL: default the method to operator () in ev++.h, - to make it nicer to use functors (requested by Benedek László). - - fixed const object callbacks in ev++.h. - - replaced loop_ref argument of watcher.set (loop) by a direct - ev_loop * in ev++.h, to avoid clashes with functor patch. - - do not try to watch the empty string via inotify. - - inotify watchers could be leaked under certain circumstances. - - OS X 10.5 is actually even more broken than earlier versions, - so fall back to select on that piece of garbage. - - fixed some weirdness in the ev_embed documentation. - -3.49 Wed Nov 19 11:26:53 CET 2008 - - ev_stat watchers will now use inotify as a mere hint on - kernels <2.6.25, or if the filesystem is not in the - "known to be good" list. - - better mingw32 compatibility (it's not as borked as native win32) - (analysed by Roger Pack). - - include stdio.h in the example program, as too many people are - confused by the weird C language otherwise. I guess the next thing - I get told is that the "..." ellipses in the examples don't compile - with their C compiler. - -3.48 Thu Oct 30 09:02:37 CET 2008 - - further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll - backend by assuming the kernel event mask hasn't changed if - ADD fails with EEXIST. - - work around spurious event notification bugs in epoll by using - a 32-bit generation counter. recreate kernel state if we receive - spurious notifications or unwanted events. this is very costly, - but I didn't come up with this horrible design. - - use memset to initialise most arrays now and do away with the - init functions. - - expand time-out strategies into a "Be smart about timeouts" section. - - drop the "struct" from all ev_watcher declarations in the - documentation and did other clarifications (yeah, it was a mistake - to have a struct AND a function called ev_loop). - - fix a bug where ev_default would not initialise the default - loop again after it was destroyed with ev_default_destroy. - - rename syserr to ev_syserr to avoid name clashes when embedding, - do similar changes for event.c. - -3.45 Tue Oct 21 21:59:26 CEST 2008 - - disable inotify usage on linux <2.6.25, as it is broken - (reported by Yoann Vandoorselaere). - - ev_stat erroneously would try to add inotify watchers - even when inotify wasn't available (this should only - have a performance impact). - - ev_once now passes both timeout and io to the callback if both - occur concurrently, instead of giving timeouts precedence. - - disable EV_USE_INOTIFY when sys/inotify.h is too old. - -3.44 Mon Sep 29 05:18:39 CEST 2008 - - embed watchers now automatically invoke ev_loop_fork on the - embedded loop when the parent loop forks. - - new function: ev_now_update (loop). - - verify_watcher was not marked static. - - improve the "associating..." manpage section. - - documentation tweaks here and there. - -3.43 Sun Jul 6 05:34:41 CEST 2008 - - include more include files on windows to get struct _stati64 - (reported by Chris Hulbert, but doesn't quite fix his issue). - - add missing #include in ev.c on windows (reported by - Matt Tolton). - -3.42 Tue Jun 17 12:12:07 CEST 2008 - - work around yet another windows bug: FD_SET actually adds fd's - multiple times to the fd_*SET*, despite official MSN docs claiming - otherwise. Reported and well-analysed by Matt Tolton. - - define NFDBITS to 0 when EV_SELECT_IS_WINSOCKET to make it compile - (reported any analysed by Chris Hulbert). - - fix a bug in ev_ebadf (this function is only used to catch - programming errors in the libev user). reported by Matt Tolton. - - fix a bug in fd_intern on win32 (could lead to compile errors - under some circumstances, but would work correctly if it compiles). - reported by Matt Tolton. - - (try to) work around missing lstat on windows. - - pass in the write fd set as except fd set under windows. windows - is so uncontrollably lame that it requires this. this means that - switching off oobinline is not supported (but tcp/ip doesn't - have oob, so that would be stupid anyways. - - use posix module symbol to auto-detect monotonic clock presence - and some other default values. - -3.41 Fri May 23 18:42:54 CEST 2008 - - work around an obscure bug in winsocket select: if you - provide only empty fd sets then select returns WSAEINVAL. how sucky. - - improve timer scheduling stability and reduce use of time_epsilon. - - use 1-based 2-heap for EV_MINIMAL, simplifies code, reduces - codesize and makes for better cache-efficiency. - - use 3-based 4-heap for !EV_MINIMAL. this makes better use - of cpu cache lines and gives better growth behaviour than - 2-based heaps. - - cache timestamp within heap for !EV_MINIMAL, to avoid random - memory accesses. - - document/add EV_USE_4HEAP and EV_HEAP_CACHE_AT. - - fix a potential aliasing issue in ev_timer_again. - - add/document ev_periodic_at, retract direct access to ->at. - - improve ev_stat docs. - - add portability requirements section. - - fix manpage headers etc. - - normalise WSA error codes to lower range on windows. - - add consistency check code that can be called automatically - or on demand to check for internal structures (ev_loop_verify). - -3.31 Wed Apr 16 20:45:04 CEST 2008 - - added last minute fix for ev_poll.c by Brandon Black. - -3.3 Wed Apr 16 19:04:10 CEST 2008 - - event_base_loopexit should return 0 on success - (W.C.A. Wijngaards). - - added linux eventfd support. - - try to autodetect epoll and inotify support - by libc header version if not using autoconf. - - new symbols: EV_DEFAULT_UC and EV_DEFAULT_UC_. - - declare functions defined in ev.h as inline if - C99 or gcc are available. - - enable inlining with gcc versions 2 and 3. - - work around broken poll implementations potentially - not clearing revents field in ev_poll (Brandon Black) - (no such systems are known at this time). - - work around a bug in realloc on openbsd and darwin, - also makes the erroneous valgrind complaints - go away (noted by various people). - - fix ev_async_pending, add c++ wrapper for ev_async - (based on patch sent by Johannes Deisenhofer). - - add sensible set method to ev::embed. - - made integer constants type int in ev.h. - -3.2 Wed Apr 2 17:11:19 CEST 2008 - - fix a 64 bit overflow issue in the select backend, - by using fd_mask instead of int for the mask. - - rename internal sighandler to avoid clash with very old perls. - - entering ev_loop will not clear the ONESHOT or NONBLOCKING - flags of any outer loops anymore. - - add ev_async_pending. - -3.1 Thu Mar 13 13:45:22 CET 2008 - - implement ev_async watchers. - - only initialise signal pipe on demand. - - make use of sig_atomic_t configurable. - - improved documentation. - -3.0 Mon Jan 28 13:14:47 CET 2008 - - API/ABI bump to version 3.0. - - ev++.h includes "ev.h" by default now, not . - - slightly improved documentation. - - speed up signal detection after a fork. - - only optionally return trace status changed in ev_child - watchers. - - experimental (and undocumented) loop wrappers for ev++.h. - -2.01 Tue Dec 25 08:04:41 CET 2007 - - separate Changes file. - - fix ev_path_set => ev_stat_set typo. - - remove event_compat.h from the libev tarball. - - change how include files are found. - - doc updates. - - update licenses, explicitly allow for GPL relicensing. - -2.0 Sat Dec 22 17:47:03 CET 2007 - - new ev_sleep, ev_set_(io|timeout)_collect_interval. - - removed epoll from embeddable fd set. - - fix embed watchers. - - renamed ev_embed.loop to other. - - added exported Symbol tables. - - undefine member wrapper macros at the end of ev.c. - - respect EV_H in ev++.h. - -1.86 Tue Dec 18 02:36:57 CET 2007 - - fix memleak on loop destroy (not relevant for perl). - -1.85 Fri Dec 14 20:32:40 CET 2007 - - fix some aliasing issues w.r.t. timers and periodics - (not relevant for perl). - -(for historic versions refer to EV/Changes, found in the Perl interface) - -0.1 Wed Oct 31 21:31:48 CET 2007 - - original version; hacked together in <24h. - diff --git a/libev/LICENSE b/libev/LICENSE deleted file mode 100644 index 777d67caa..000000000 --- a/libev/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -All files in libev are -Copyright (c)2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann. - -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. - -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. - -Alternatively, the contents of this package may be used under the terms -of the GNU General Public License ("GPL") version 2 or any later version, -in which case the provisions of the GPL are applicable instead of the -above. If you wish to allow the use of your version of this package only -under the terms of the GPL and not to allow others to use your version of -this file under the BSD license, indicate your decision by deleting the -provisions above and replace them with the notice and other provisions -required by the GPL in this and the other files of this package. If you do -not delete the provisions above, a recipient may use your version of this -file under either the BSD or the GPL. diff --git a/libev/Makefile.am b/libev/Makefile.am deleted file mode 100644 index bff2bde64..000000000 --- a/libev/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -VERSION_INFO = 4:0:0 - -EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ - ev_vars.h ev_wrap.h \ - ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ - ev.3 ev.pod Symbols.ev Symbols.event - -noinst_LTLIBRARIES = libev.la - -libev_la_SOURCES = ev.c event.c -libev_la_LDFLAGS = -static -version-info $(VERSION_INFO) diff --git a/libev/Makefile.in b/libev/Makefile.in deleted file mode 100644 index df52ba91f..000000000 --- a/libev/Makefile.in +++ /dev/null @@ -1,519 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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 = libev -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - config.guess config.sub depcomp install-sh ltmain.sh missing \ - mkinstalldirs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.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/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \ - $(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libev_la_LIBADD = -am_libev_la_OBJECTS = ev.lo event.lo -libev_la_OBJECTS = $(am_libev_la_OBJECTS) -libev_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libev_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libev_la_SOURCES) -DIST_SOURCES = $(libev_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -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@ -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@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -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@ -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@ -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@ -acx_pthread_config = @acx_pthread_config@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -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@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign -VERSION_INFO = 4:0:0 -EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ - ev_vars.h ev_wrap.h \ - ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ - ev.3 ev.pod Symbols.ev Symbols.event - -noinst_LTLIBRARIES = libev.la -libev_la_SOURCES = ev.c event.c -libev_la_LDFLAGS = -static -version-info $(VERSION_INFO) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(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 libev/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign libev/Makefile -.PRECIOUS: 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: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(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)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libev.la: $(libev_la_OBJECTS) $(libev_la_DEPENDENCIES) $(EXTRA_libev_la_DEPENDENCIES) - $(libev_la_LINK) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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 -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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" - -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) - -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 ./$(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 ./$(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 all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags 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 uninstall uninstall-am - - -# 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: diff --git a/libev/README b/libev/README deleted file mode 100644 index 31f619387..000000000 --- a/libev/README +++ /dev/null @@ -1,58 +0,0 @@ -libev is a high-performance event loop/event model with lots of features. -(see benchmark at http://libev.schmorp.de/bench.html) - - -ABOUT - - Homepage: http://software.schmorp.de/pkg/libev - Mailinglist: libev@lists.schmorp.de - http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev - Library Documentation: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod - - Libev is modelled (very losely) after libevent and the Event perl - module, but is faster, scales better and is more correct, and also more - featureful. And also smaller. Yay. - - Some of the specialties of libev not commonly found elsewhere are: - - - extensive and detailed, readable documentation (not doxygen garbage). - - fully supports fork, can detect fork in various ways and automatically - re-arms kernel mechanisms that do not support fork. - - highly optimised select, poll, epoll, kqueue and event ports backends. - - filesystem object (path) watching (with optional linux inotify support). - - wallclock-based times (using absolute time, cron-like). - - relative timers/timeouts (handle time jumps). - - fast intra-thread communication between multiple - event loops (with optional fast linux eventfd backend). - - extremely easy to embed (fully documented, no dependencies, - autoconf supported but optional). - - very small codebase, no bloated library, simple code. - - fully extensible by being able to plug into the event loop, - integrate other event loops, integrate other event loop users. - - very little memory use (small watchers, small event loop data). - - optional C++ interface allowing method and function callbacks - at no extra memory or runtime overhead. - - optional Perl interface with similar characteristics (capable - of running Glib/Gtk2 on libev). - - support for other languages (multiple C++ interfaces, D, Ruby, - Python) available from third-parties. - - Examples of programs that embed libev: the EV perl module, node.js, - auditd, rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the - Deliantra MMORPG server (http://www.deliantra.net/), Rubinius (a - next-generation Ruby VM), the Ebb web server, the Rev event toolkit. - - -CONTRIBUTORS - - libev was written and designed by Marc Lehmann and Emanuele Giaquinta. - - The following people sent in patches or made other noteworthy - contributions to the design (for minor patches, see the Changes - file. If I forgot to include you, please shout at me, it was an - accident): - - W.C.A. Wijngaards - Christopher Layne - Chris Brody - diff --git a/libev/Symbols.ev b/libev/Symbols.ev deleted file mode 100644 index 7a29a75cb..000000000 --- a/libev/Symbols.ev +++ /dev/null @@ -1,73 +0,0 @@ -ev_async_send -ev_async_start -ev_async_stop -ev_backend -ev_break -ev_check_start -ev_check_stop -ev_child_start -ev_child_stop -ev_cleanup_start -ev_cleanup_stop -ev_clear_pending -ev_default_loop -ev_default_loop_ptr -ev_depth -ev_embed_start -ev_embed_stop -ev_embed_sweep -ev_embeddable_backends -ev_feed_event -ev_feed_fd_event -ev_feed_signal -ev_feed_signal_event -ev_fork_start -ev_fork_stop -ev_idle_start -ev_idle_stop -ev_invoke -ev_invoke_pending -ev_io_start -ev_io_stop -ev_iteration -ev_loop_destroy -ev_loop_fork -ev_loop_new -ev_now -ev_now_update -ev_once -ev_pending_count -ev_periodic_again -ev_periodic_start -ev_periodic_stop -ev_prepare_start -ev_prepare_stop -ev_recommended_backends -ev_ref -ev_resume -ev_run -ev_set_allocator -ev_set_invoke_pending_cb -ev_set_io_collect_interval -ev_set_loop_release_cb -ev_set_syserr_cb -ev_set_timeout_collect_interval -ev_set_userdata -ev_signal_start -ev_signal_stop -ev_sleep -ev_stat_start -ev_stat_stat -ev_stat_stop -ev_supported_backends -ev_suspend -ev_time -ev_timer_again -ev_timer_remaining -ev_timer_start -ev_timer_stop -ev_unref -ev_userdata -ev_verify -ev_version_major -ev_version_minor diff --git a/libev/Symbols.event b/libev/Symbols.event deleted file mode 100644 index 799d4246e..000000000 --- a/libev/Symbols.event +++ /dev/null @@ -1,24 +0,0 @@ -event_active -event_add -event_base_dispatch -event_base_free -event_base_get_method -event_base_loop -event_base_loopexit -event_base_new -event_base_once -event_base_priority_init -event_base_set -event_del -event_dispatch -event_get_callback -event_get_method -event_get_version -event_init -event_loop -event_loopexit -event_once -event_pending -event_priority_init -event_priority_set -event_set diff --git a/libev/aclocal.m4 b/libev/aclocal.m4 deleted file mode 100644 index 371f6c68b..000000000 --- a/libev/aclocal.m4 +++ /dev/null @@ -1,9599 +0,0 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 3337 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.6], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.6])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, -# 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/libev/autogen.sh b/libev/autogen.sh deleted file mode 100644 index 8056ee7f9..000000000 --- a/libev/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -autoreconf --install --symlink --force diff --git a/libev/config.guess b/libev/config.guess deleted file mode 100644 index f32079abd..000000000 --- a/libev/config.guess +++ /dev/null @@ -1,1526 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-01-23' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# 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 Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/libev/config.h.in b/libev/config.h.in deleted file mode 100644 index 508542b5e..000000000 --- a/libev/config.h.in +++ /dev/null @@ -1,125 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* 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 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 the floor function is available */ -#undef HAVE_FLOOR - -/* Define to 1 if you have the `inotify_init' function. */ -#undef HAVE_INOTIFY_INIT - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `kqueue' function. */ -#undef HAVE_KQUEUE - -/* Define to 1 if you have the `rt' library (-lrt). */ -#undef HAVE_LIBRT - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `nanosleep' function. */ -#undef HAVE_NANOSLEEP - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the 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 header file. */ -#undef HAVE_PORT_H - -/* Define to 1 if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define to 1 if you have the `signalfd' function. */ -#undef HAVE_SIGNALFD - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EPOLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EVENTFD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EVENT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_INOTIFY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SIGNALFD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* 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 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/libev/config.sub b/libev/config.sub deleted file mode 100644 index 6759825a5..000000000 --- a/libev/config.sub +++ /dev/null @@ -1,1658 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-01-16' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# 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. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/libev/configure b/libev/configure deleted file mode 100644 index 0ee3ba563..000000000 --- a/libev/configure +++ /dev/null @@ -1,13929 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69. -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= - -ac_unique_file="ev_epoll.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_maintainer_mode -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -with_sysroot -enable_libtool_lock -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -orig_CFLAGS="$CFLAGS" - - - -am__api_version='1.11' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=libev - VERSION=4.15 - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - ac_config_headers="$ac_config_headers config.h" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -if test -z "$orig_CFLAGS"; then - if test x$GCC = xyes; then - CFLAGS="-g -O3" - fi -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - -for ac_header in sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -for ac_func in clock_gettime -do : - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CLOCK_GETTIME 1 -_ACEOF - -else - - if test $(uname) = Linux; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5 -$as_echo_n "checking for clock_gettime syscall... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main () -{ -struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_have_clock_syscall=1 - -$as_echo "#define HAVE_CLOCK_SYSCALL 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if ${ac_cv_lib_rt_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_clock_gettime=yes -else - ac_cv_lib_rt_clock_gettime=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRT 1 -_ACEOF - - LIBS="-lrt $LIBS" - -fi - - unset ac_cv_func_clock_gettime - for ac_func in clock_gettime -do : - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CLOCK_GETTIME 1 -_ACEOF - -fi -done - - fi - -fi -done - - -for ac_func in nanosleep -do : - ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" -if test "x$ac_cv_func_nanosleep" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NANOSLEEP 1 -_ACEOF - -else - - if test -z "$LIBEV_M4_AVOID_LIBRT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 -$as_echo_n "checking for nanosleep in -lrt... " >&6; } -if ${ac_cv_lib_rt_nanosleep+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char nanosleep (); -int -main () -{ -return nanosleep (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_nanosleep=yes -else - ac_cv_lib_rt_nanosleep=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 -$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } -if test "x$ac_cv_lib_rt_nanosleep" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRT 1 -_ACEOF - - LIBS="-lrt $LIBS" - -fi - - unset ac_cv_func_nanosleep - for ac_func in nanosleep -do : - ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" -if test "x$ac_cv_func_nanosleep" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NANOSLEEP 1 -_ACEOF - -fi -done - - fi - -fi -done - - -if test -z "$LIBEV_M4_AVOID_LIBM"; then - LIBM=m -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 -$as_echo_n "checking for library containing floor... " >&6; } -if ${ac_cv_search_floor+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char floor (); -int -main () -{ -return floor (); - ; - return 0; -} -_ACEOF -for ac_lib in '' $LIBM; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_floor=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_floor+:} false; then : - break -fi -done -if ${ac_cv_search_floor+:} false; then : - -else - ac_cv_search_floor=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 -$as_echo "$ac_cv_search_floor" >&6; } -ac_res=$ac_cv_search_floor -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -$as_echo "#define HAVE_FLOOR 1" >>confdefs.h - -fi - - - - -ac_config_files="$ac_config_files Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -nm_file_list_spec \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/libev/configure.ac b/libev/configure.ac deleted file mode 100644 index 80b18cbf9..000000000 --- a/libev/configure.ac +++ /dev/null @@ -1,26 +0,0 @@ -AC_INIT - -orig_CFLAGS="$CFLAGS" - -AC_CONFIG_SRCDIR([ev_epoll.c]) - -AM_INIT_AUTOMAKE(libev,4.15) dnl also update ev.h! -AC_CONFIG_HEADERS([config.h]) -AM_MAINTAINER_MODE - -AC_PROG_CC - -dnl Supply default CFLAGS, if not specified -if test -z "$orig_CFLAGS"; then - if test x$GCC = xyes; then - CFLAGS="-g -O3" - fi -fi - -AC_PROG_INSTALL -AC_PROG_LIBTOOL - -m4_include([libev.m4]) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/libev/depcomp b/libev/depcomp deleted file mode 100644 index df8eea7e4..000000000 --- a/libev/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 . - -# 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 . - -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 outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -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" - -# 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 - -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 -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## 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). -## - 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 -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## 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. - tr ' ' ' -' < "$tmpdepfile" | -## 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. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then : - else - 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 ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -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. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - 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 -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - 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. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - 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 -eq 0; then : - else - 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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#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. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # 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.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - 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" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - 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:: \1 \\:p' >> "$depfile" - echo " " >> "$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: diff --git a/libev/ev++.h b/libev/ev++.h deleted file mode 100644 index ab7d0a651..000000000 --- a/libev/ev++.h +++ /dev/null @@ -1,816 +0,0 @@ -/* - * libev simple C++ wrapper classes - * - * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, the contents of this file may be used under the terms of - * the GNU General Public License ("GPL") version 2 or any later version, - * in which case the provisions of the GPL are applicable instead of - * the above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use your - * version of this file under the BSD license, indicate your decision - * by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file under - * either the BSD or the GPL. - */ - -#ifndef EVPP_H__ -#define EVPP_H__ - -#ifdef EV_H -# include EV_H -#else -# include "ev.h" -#endif - -#ifndef EV_USE_STDEXCEPT -# define EV_USE_STDEXCEPT 1 -#endif - -#if EV_USE_STDEXCEPT -# include -#endif - -namespace ev { - - typedef ev_tstamp tstamp; - - enum { - UNDEF = EV_UNDEF, - NONE = EV_NONE, - READ = EV_READ, - WRITE = EV_WRITE, -#if EV_COMPAT3 - TIMEOUT = EV_TIMEOUT, -#endif - TIMER = EV_TIMER, - PERIODIC = EV_PERIODIC, - SIGNAL = EV_SIGNAL, - CHILD = EV_CHILD, - STAT = EV_STAT, - IDLE = EV_IDLE, - CHECK = EV_CHECK, - PREPARE = EV_PREPARE, - FORK = EV_FORK, - ASYNC = EV_ASYNC, - EMBED = EV_EMBED, -# undef ERROR // some systems stupidly #define ERROR - ERROR = EV_ERROR - }; - - enum - { - AUTO = EVFLAG_AUTO, - NOENV = EVFLAG_NOENV, - FORKCHECK = EVFLAG_FORKCHECK, - - SELECT = EVBACKEND_SELECT, - POLL = EVBACKEND_POLL, - EPOLL = EVBACKEND_EPOLL, - KQUEUE = EVBACKEND_KQUEUE, - DEVPOLL = EVBACKEND_DEVPOLL, - PORT = EVBACKEND_PORT - }; - - enum - { -#if EV_COMPAT3 - NONBLOCK = EVLOOP_NONBLOCK, - ONESHOT = EVLOOP_ONESHOT, -#endif - NOWAIT = EVRUN_NOWAIT, - ONCE = EVRUN_ONCE - }; - - enum how_t - { - ONE = EVBREAK_ONE, - ALL = EVBREAK_ALL - }; - - struct bad_loop -#if EV_USE_STDEXCEPT - : std::runtime_error -#endif - { -#if EV_USE_STDEXCEPT - bad_loop () - : std::runtime_error ("libev event loop cannot be initialized, bad value of LIBEV_FLAGS?") - { - } -#endif - }; - -#ifdef EV_AX -# undef EV_AX -#endif - -#ifdef EV_AX_ -# undef EV_AX_ -#endif - -#if EV_MULTIPLICITY -# define EV_AX raw_loop -# define EV_AX_ raw_loop, -#else -# define EV_AX -# define EV_AX_ -#endif - - struct loop_ref - { - loop_ref (EV_P) throw () -#if EV_MULTIPLICITY - : EV_AX (EV_A) -#endif - { - } - - bool operator == (const loop_ref &other) const throw () - { -#if EV_MULTIPLICITY - return EV_AX == other.EV_AX; -#else - return true; -#endif - } - - bool operator != (const loop_ref &other) const throw () - { -#if EV_MULTIPLICITY - return ! (*this == other); -#else - return false; -#endif - } - -#if EV_MULTIPLICITY - bool operator == (const EV_P) const throw () - { - return this->EV_AX == EV_A; - } - - bool operator != (const EV_P) const throw () - { - return (*this == EV_A); - } - - operator struct ev_loop * () const throw () - { - return EV_AX; - } - - operator const struct ev_loop * () const throw () - { - return EV_AX; - } - - bool is_default () const throw () - { - return EV_AX == ev_default_loop (0); - } -#endif - -#if EV_COMPAT3 - void loop (int flags = 0) - { - ev_run (EV_AX_ flags); - } - - void unloop (how_t how = ONE) throw () - { - ev_break (EV_AX_ how); - } -#endif - - void run (int flags = 0) - { - ev_run (EV_AX_ flags); - } - - void break_loop (how_t how = ONE) throw () - { - ev_break (EV_AX_ how); - } - - void post_fork () throw () - { - ev_loop_fork (EV_AX); - } - - unsigned int backend () const throw () - { - return ev_backend (EV_AX); - } - - tstamp now () const throw () - { - return ev_now (EV_AX); - } - - void ref () throw () - { - ev_ref (EV_AX); - } - - void unref () throw () - { - ev_unref (EV_AX); - } - -#if EV_FEATURE_API - unsigned int iteration () const throw () - { - return ev_iteration (EV_AX); - } - - unsigned int depth () const throw () - { - return ev_depth (EV_AX); - } - - void set_io_collect_interval (tstamp interval) throw () - { - ev_set_io_collect_interval (EV_AX_ interval); - } - - void set_timeout_collect_interval (tstamp interval) throw () - { - ev_set_timeout_collect_interval (EV_AX_ interval); - } -#endif - - // function callback - void once (int fd, int events, tstamp timeout, void (*cb)(int, void *), void *arg = 0) throw () - { - ev_once (EV_AX_ fd, events, timeout, cb, arg); - } - - // method callback - template - void once (int fd, int events, tstamp timeout, K *object) throw () - { - once (fd, events, timeout, method_thunk, object); - } - - // default method == operator () - template - void once (int fd, int events, tstamp timeout, K *object) throw () - { - once (fd, events, timeout, method_thunk, object); - } - - template - static void method_thunk (int revents, void *arg) - { - (static_cast(arg)->*method) - (revents); - } - - // no-argument method callback - template - void once (int fd, int events, tstamp timeout, K *object) throw () - { - once (fd, events, timeout, method_noargs_thunk, object); - } - - template - static void method_noargs_thunk (int revents, void *arg) - { - (static_cast(arg)->*method) - (); - } - - // simpler function callback - template - void once (int fd, int events, tstamp timeout) throw () - { - once (fd, events, timeout, simpler_func_thunk); - } - - template - static void simpler_func_thunk (int revents, void *arg) - { - (*cb) - (revents); - } - - // simplest function callback - template - void once (int fd, int events, tstamp timeout) throw () - { - once (fd, events, timeout, simplest_func_thunk); - } - - template - static void simplest_func_thunk (int revents, void *arg) - { - (*cb) - (); - } - - void feed_fd_event (int fd, int revents) throw () - { - ev_feed_fd_event (EV_AX_ fd, revents); - } - - void feed_signal_event (int signum) throw () - { - ev_feed_signal_event (EV_AX_ signum); - } - -#if EV_MULTIPLICITY - struct ev_loop* EV_AX; -#endif - - }; - -#if EV_MULTIPLICITY - struct dynamic_loop : loop_ref - { - - dynamic_loop (unsigned int flags = AUTO) throw (bad_loop) - : loop_ref (ev_loop_new (flags)) - { - if (!EV_AX) - throw bad_loop (); - } - - ~dynamic_loop () throw () - { - ev_loop_destroy (EV_AX); - EV_AX = 0; - } - - private: - - dynamic_loop (const dynamic_loop &); - - dynamic_loop & operator= (const dynamic_loop &); - - }; -#endif - - struct default_loop : loop_ref - { - default_loop (unsigned int flags = AUTO) throw (bad_loop) -#if EV_MULTIPLICITY - : loop_ref (ev_default_loop (flags)) -#endif - { - if ( -#if EV_MULTIPLICITY - !EV_AX -#else - !ev_default_loop (flags) -#endif - ) - throw bad_loop (); - } - - private: - default_loop (const default_loop &); - default_loop &operator = (const default_loop &); - }; - - inline loop_ref get_default_loop () throw () - { -#if EV_MULTIPLICITY - return ev_default_loop (0); -#else - return loop_ref (); -#endif - } - -#undef EV_AX -#undef EV_AX_ - -#undef EV_PX -#undef EV_PX_ -#if EV_MULTIPLICITY -# define EV_PX loop_ref EV_A -# define EV_PX_ loop_ref EV_A_ -#else -# define EV_PX -# define EV_PX_ -#endif - - template - struct base : ev_watcher - { - #if EV_MULTIPLICITY - EV_PX; - - // loop set - void set (EV_P) throw () - { - this->EV_A = EV_A; - } - #endif - - base (EV_PX) throw () - #if EV_MULTIPLICITY - : EV_A (EV_A) - #endif - { - ev_init (this, 0); - } - - void set_ (const void *data, void (*cb)(EV_P_ ev_watcher *w, int revents)) throw () - { - this->data = (void *)data; - ev_set_cb (static_cast(this), cb); - } - - // function callback - template - void set (void *data = 0) throw () - { - set_ (data, function_thunk); - } - - template - static void function_thunk (EV_P_ ev_watcher *w, int revents) - { - function - (*static_cast(w), revents); - } - - // method callback - template - void set (K *object) throw () - { - set_ (object, method_thunk); - } - - // default method == operator () - template - void set (K *object) throw () - { - set_ (object, method_thunk); - } - - template - static void method_thunk (EV_P_ ev_watcher *w, int revents) - { - (static_cast(w->data)->*method) - (*static_cast(w), revents); - } - - // no-argument callback - template - void set (K *object) throw () - { - set_ (object, method_noargs_thunk); - } - - template - static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents) - { - (static_cast(w->data)->*method) - (); - } - - void operator ()(int events = EV_UNDEF) - { - return - ev_cb (static_cast(this)) - (static_cast(this), events); - } - - bool is_active () const throw () - { - return ev_is_active (static_cast(this)); - } - - bool is_pending () const throw () - { - return ev_is_pending (static_cast(this)); - } - - void feed_event (int revents) throw () - { - ev_feed_event (EV_A_ static_cast(this), revents); - } - }; - - inline tstamp now (EV_P) throw () - { - return ev_now (EV_A); - } - - inline void delay (tstamp interval) throw () - { - ev_sleep (interval); - } - - inline int version_major () throw () - { - return ev_version_major (); - } - - inline int version_minor () throw () - { - return ev_version_minor (); - } - - inline unsigned int supported_backends () throw () - { - return ev_supported_backends (); - } - - inline unsigned int recommended_backends () throw () - { - return ev_recommended_backends (); - } - - inline unsigned int embeddable_backends () throw () - { - return ev_embeddable_backends (); - } - - inline void set_allocator (void *(*cb)(void *ptr, long size) throw ()) throw () - { - ev_set_allocator (cb); - } - - inline void set_syserr_cb (void (*cb)(const char *msg) throw ()) throw () - { - ev_set_syserr_cb (cb); - } - - #if EV_MULTIPLICITY - #define EV_CONSTRUCT(cppstem,cstem) \ - (EV_PX = get_default_loop ()) throw () \ - : base (EV_A) \ - { \ - } - #else - #define EV_CONSTRUCT(cppstem,cstem) \ - () throw () \ - { \ - } - #endif - - /* using a template here would require quite a bit more lines, - * so a macro solution was chosen */ - #define EV_BEGIN_WATCHER(cppstem,cstem) \ - \ - struct cppstem : base \ - { \ - void start () throw () \ - { \ - ev_ ## cstem ## _start (EV_A_ static_cast(this)); \ - } \ - \ - void stop () throw () \ - { \ - ev_ ## cstem ## _stop (EV_A_ static_cast(this)); \ - } \ - \ - cppstem EV_CONSTRUCT(cppstem,cstem) \ - \ - ~cppstem () throw () \ - { \ - stop (); \ - } \ - \ - using base::set; \ - \ - private: \ - \ - cppstem (const cppstem &o); \ - \ - cppstem &operator =(const cppstem &o); \ - \ - public: - - #define EV_END_WATCHER(cppstem,cstem) \ - }; - - EV_BEGIN_WATCHER (io, io) - void set (int fd, int events) throw () - { - int active = is_active (); - if (active) stop (); - ev_io_set (static_cast(this), fd, events); - if (active) start (); - } - - void set (int events) throw () - { - int active = is_active (); - if (active) stop (); - ev_io_set (static_cast(this), fd, events); - if (active) start (); - } - - void start (int fd, int events) throw () - { - set (fd, events); - start (); - } - EV_END_WATCHER (io, io) - - EV_BEGIN_WATCHER (timer, timer) - void set (ev_tstamp after, ev_tstamp repeat = 0.) throw () - { - int active = is_active (); - if (active) stop (); - ev_timer_set (static_cast(this), after, repeat); - if (active) start (); - } - - void start (ev_tstamp after, ev_tstamp repeat = 0.) throw () - { - set (after, repeat); - start (); - } - - void again () throw () - { - ev_timer_again (EV_A_ static_cast(this)); - } - - ev_tstamp remaining () - { - return ev_timer_remaining (EV_A_ static_cast(this)); - } - EV_END_WATCHER (timer, timer) - - #if EV_PERIODIC_ENABLE - EV_BEGIN_WATCHER (periodic, periodic) - void set (ev_tstamp at, ev_tstamp interval = 0.) throw () - { - int active = is_active (); - if (active) stop (); - ev_periodic_set (static_cast(this), at, interval, 0); - if (active) start (); - } - - void start (ev_tstamp at, ev_tstamp interval = 0.) throw () - { - set (at, interval); - start (); - } - - void again () throw () - { - ev_periodic_again (EV_A_ static_cast(this)); - } - EV_END_WATCHER (periodic, periodic) - #endif - - #if EV_SIGNAL_ENABLE - EV_BEGIN_WATCHER (sig, signal) - void set (int signum) throw () - { - int active = is_active (); - if (active) stop (); - ev_signal_set (static_cast(this), signum); - if (active) start (); - } - - void start (int signum) throw () - { - set (signum); - start (); - } - EV_END_WATCHER (sig, signal) - #endif - - #if EV_CHILD_ENABLE - EV_BEGIN_WATCHER (child, child) - void set (int pid, int trace = 0) throw () - { - int active = is_active (); - if (active) stop (); - ev_child_set (static_cast(this), pid, trace); - if (active) start (); - } - - void start (int pid, int trace = 0) throw () - { - set (pid, trace); - start (); - } - EV_END_WATCHER (child, child) - #endif - - #if EV_STAT_ENABLE - EV_BEGIN_WATCHER (stat, stat) - void set (const char *path, ev_tstamp interval = 0.) throw () - { - int active = is_active (); - if (active) stop (); - ev_stat_set (static_cast(this), path, interval); - if (active) start (); - } - - void start (const char *path, ev_tstamp interval = 0.) throw () - { - stop (); - set (path, interval); - start (); - } - - void update () throw () - { - ev_stat_stat (EV_A_ static_cast(this)); - } - EV_END_WATCHER (stat, stat) - #endif - - #if EV_IDLE_ENABLE - EV_BEGIN_WATCHER (idle, idle) - void set () throw () { } - EV_END_WATCHER (idle, idle) - #endif - - #if EV_PREPARE_ENABLE - EV_BEGIN_WATCHER (prepare, prepare) - void set () throw () { } - EV_END_WATCHER (prepare, prepare) - #endif - - #if EV_CHECK_ENABLE - EV_BEGIN_WATCHER (check, check) - void set () throw () { } - EV_END_WATCHER (check, check) - #endif - - #if EV_EMBED_ENABLE - EV_BEGIN_WATCHER (embed, embed) - void set_embed (struct ev_loop *embedded_loop) throw () - { - int active = is_active (); - if (active) stop (); - ev_embed_set (static_cast(this), embedded_loop); - if (active) start (); - } - - void start (struct ev_loop *embedded_loop) throw () - { - set (embedded_loop); - start (); - } - - void sweep () - { - ev_embed_sweep (EV_A_ static_cast(this)); - } - EV_END_WATCHER (embed, embed) - #endif - - #if EV_FORK_ENABLE - EV_BEGIN_WATCHER (fork, fork) - void set () throw () { } - EV_END_WATCHER (fork, fork) - #endif - - #if EV_ASYNC_ENABLE - EV_BEGIN_WATCHER (async, async) - void send () throw () - { - ev_async_send (EV_A_ static_cast(this)); - } - - bool async_pending () throw () - { - return ev_async_pending (static_cast(this)); - } - EV_END_WATCHER (async, async) - #endif - - #undef EV_PX - #undef EV_PX_ - #undef EV_CONSTRUCT - #undef EV_BEGIN_WATCHER - #undef EV_END_WATCHER -} - -#endif - diff --git a/libev/ev.c b/libev/ev.c deleted file mode 100644 index e5bd5abd9..000000000 --- a/libev/ev.c +++ /dev/null @@ -1,4803 +0,0 @@ -/* - * libev event processing core, watcher management - * - * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, the contents of this file may be used under the terms of - * the GNU General Public License ("GPL") version 2 or any later version, - * in which case the provisions of the GPL are applicable instead of - * the above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use your - * version of this file under the BSD license, indicate your decision - * by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file under - * either the BSD or the GPL. - */ - -/* this big block deduces configuration from config.h */ -#ifndef EV_STANDALONE -# ifdef EV_CONFIG_H -# include EV_CONFIG_H -# else -# include "config.h" -# endif - -#if HAVE_FLOOR -# ifndef EV_USE_FLOOR -# define EV_USE_FLOOR 1 -# endif -#endif - -# if HAVE_CLOCK_SYSCALL -# ifndef EV_USE_CLOCK_SYSCALL -# define EV_USE_CLOCK_SYSCALL 1 -# ifndef EV_USE_REALTIME -# define EV_USE_REALTIME 0 -# endif -# ifndef EV_USE_MONOTONIC -# define EV_USE_MONOTONIC 1 -# endif -# endif -# elif !defined EV_USE_CLOCK_SYSCALL -# define EV_USE_CLOCK_SYSCALL 0 -# endif - -# if HAVE_CLOCK_GETTIME -# ifndef EV_USE_MONOTONIC -# define EV_USE_MONOTONIC 1 -# endif -# ifndef EV_USE_REALTIME -# define EV_USE_REALTIME 0 -# endif -# else -# ifndef EV_USE_MONOTONIC -# define EV_USE_MONOTONIC 0 -# endif -# ifndef EV_USE_REALTIME -# define EV_USE_REALTIME 0 -# endif -# endif - -# if HAVE_NANOSLEEP -# ifndef EV_USE_NANOSLEEP -# define EV_USE_NANOSLEEP EV_FEATURE_OS -# endif -# else -# undef EV_USE_NANOSLEEP -# define EV_USE_NANOSLEEP 0 -# endif - -# if HAVE_SELECT && HAVE_SYS_SELECT_H -# ifndef EV_USE_SELECT -# define EV_USE_SELECT EV_FEATURE_BACKENDS -# endif -# else -# undef EV_USE_SELECT -# define EV_USE_SELECT 0 -# endif - -# if HAVE_POLL && HAVE_POLL_H -# ifndef EV_USE_POLL -# define EV_USE_POLL EV_FEATURE_BACKENDS -# endif -# else -# undef EV_USE_POLL -# define EV_USE_POLL 0 -# endif - -# if HAVE_EPOLL_CTL && HAVE_SYS_EPOLL_H -# ifndef EV_USE_EPOLL -# define EV_USE_EPOLL EV_FEATURE_BACKENDS -# endif -# else -# undef EV_USE_EPOLL -# define EV_USE_EPOLL 0 -# endif - -# if HAVE_KQUEUE && HAVE_SYS_EVENT_H -# ifndef EV_USE_KQUEUE -# define EV_USE_KQUEUE EV_FEATURE_BACKENDS -# endif -# else -# undef EV_USE_KQUEUE -# define EV_USE_KQUEUE 0 -# endif - -# if HAVE_PORT_H && HAVE_PORT_CREATE -# ifndef EV_USE_PORT -# define EV_USE_PORT EV_FEATURE_BACKENDS -# endif -# else -# undef EV_USE_PORT -# define EV_USE_PORT 0 -# endif - -# if HAVE_INOTIFY_INIT && HAVE_SYS_INOTIFY_H -# ifndef EV_USE_INOTIFY -# define EV_USE_INOTIFY EV_FEATURE_OS -# endif -# else -# undef EV_USE_INOTIFY -# define EV_USE_INOTIFY 0 -# endif - -# if HAVE_SIGNALFD && HAVE_SYS_SIGNALFD_H -# ifndef EV_USE_SIGNALFD -# define EV_USE_SIGNALFD EV_FEATURE_OS -# endif -# else -# undef EV_USE_SIGNALFD -# define EV_USE_SIGNALFD 0 -# endif - -# if HAVE_EVENTFD -# ifndef EV_USE_EVENTFD -# define EV_USE_EVENTFD EV_FEATURE_OS -# endif -# else -# undef EV_USE_EVENTFD -# define EV_USE_EVENTFD 0 -# endif - -#endif - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#ifdef EV_H -# include EV_H -#else -# include "ev.h" -#endif - -#if EV_NO_THREADS -# undef EV_NO_SMP -# define EV_NO_SMP 1 -# undef ECB_NO_THREADS -# define ECB_NO_THREADS 1 -#endif -#if EV_NO_SMP -# undef EV_NO_SMP -# define ECB_NO_SMP 1 -#endif - -#ifndef _WIN32 -# include -# include -# include -#else -# include -# define WIN32_LEAN_AND_MEAN -# include -# include -# ifndef EV_SELECT_IS_WINSOCKET -# define EV_SELECT_IS_WINSOCKET 1 -# endif -# undef EV_AVOID_STDIO -#endif - -/* OS X, in its infinite idiocy, actually HARDCODES - * a limit of 1024 into their select. Where people have brains, - * OS X engineers apparently have a vacuum. Or maybe they were - * ordered to have a vacuum, or they do anything for money. - * This might help. Or not. - */ -#define _DARWIN_UNLIMITED_SELECT 1 - -/* this block tries to deduce configuration from header-defined symbols and defaults */ - -/* try to deduce the maximum number of signals on this platform */ -#if defined EV_NSIG -/* use what's provided */ -#elif defined NSIG -# define EV_NSIG (NSIG) -#elif defined _NSIG -# define EV_NSIG (_NSIG) -#elif defined SIGMAX -# define EV_NSIG (SIGMAX+1) -#elif defined SIG_MAX -# define EV_NSIG (SIG_MAX+1) -#elif defined _SIG_MAX -# define EV_NSIG (_SIG_MAX+1) -#elif defined MAXSIG -# define EV_NSIG (MAXSIG+1) -#elif defined MAX_SIG -# define EV_NSIG (MAX_SIG+1) -#elif defined SIGARRAYSIZE -# define EV_NSIG (SIGARRAYSIZE) /* Assume ary[SIGARRAYSIZE] */ -#elif defined _sys_nsig -# define EV_NSIG (_sys_nsig) /* Solaris 2.5 */ -#else -# error "unable to find value for NSIG, please report" -/* to make it compile regardless, just remove the above line, */ -/* but consider reporting it, too! :) */ -# define EV_NSIG 65 -#endif - -#ifndef EV_USE_FLOOR -# define EV_USE_FLOOR 0 -#endif - -#ifndef EV_USE_CLOCK_SYSCALL -# if __linux && __GLIBC__ >= 2 -# define EV_USE_CLOCK_SYSCALL EV_FEATURE_OS -# else -# define EV_USE_CLOCK_SYSCALL 0 -# endif -#endif - -#ifndef EV_USE_MONOTONIC -# if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 -# define EV_USE_MONOTONIC EV_FEATURE_OS -# else -# define EV_USE_MONOTONIC 0 -# endif -#endif - -#ifndef EV_USE_REALTIME -# define EV_USE_REALTIME !EV_USE_CLOCK_SYSCALL -#endif - -#ifndef EV_USE_NANOSLEEP -# if _POSIX_C_SOURCE >= 199309L -# define EV_USE_NANOSLEEP EV_FEATURE_OS -# else -# define EV_USE_NANOSLEEP 0 -# endif -#endif - -#ifndef EV_USE_SELECT -# define EV_USE_SELECT EV_FEATURE_BACKENDS -#endif - -#ifndef EV_USE_POLL -# ifdef _WIN32 -# define EV_USE_POLL 0 -# else -# define EV_USE_POLL EV_FEATURE_BACKENDS -# endif -#endif - -#ifndef EV_USE_EPOLL -# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) -# define EV_USE_EPOLL EV_FEATURE_BACKENDS -# else -# define EV_USE_EPOLL 0 -# endif -#endif - -#ifndef EV_USE_KQUEUE -# define EV_USE_KQUEUE 0 -#endif - -#ifndef EV_USE_PORT -# define EV_USE_PORT 0 -#endif - -#ifndef EV_USE_INOTIFY -# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) -# define EV_USE_INOTIFY EV_FEATURE_OS -# else -# define EV_USE_INOTIFY 0 -# endif -#endif - -#ifndef EV_PID_HASHSIZE -# define EV_PID_HASHSIZE EV_FEATURE_DATA ? 16 : 1 -#endif - -#ifndef EV_INOTIFY_HASHSIZE -# define EV_INOTIFY_HASHSIZE EV_FEATURE_DATA ? 16 : 1 -#endif - -#ifndef EV_USE_EVENTFD -# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) -# define EV_USE_EVENTFD EV_FEATURE_OS -# else -# define EV_USE_EVENTFD 0 -# endif -#endif - -#ifndef EV_USE_SIGNALFD -# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) -# define EV_USE_SIGNALFD EV_FEATURE_OS -# else -# define EV_USE_SIGNALFD 0 -# endif -#endif - -#if 0 /* debugging */ -# define EV_VERIFY 3 -# define EV_USE_4HEAP 1 -# define EV_HEAP_CACHE_AT 1 -#endif - -#ifndef EV_VERIFY -# define EV_VERIFY (EV_FEATURE_API ? 1 : 0) -#endif - -#ifndef EV_USE_4HEAP -# define EV_USE_4HEAP EV_FEATURE_DATA -#endif - -#ifndef EV_HEAP_CACHE_AT -# define EV_HEAP_CACHE_AT EV_FEATURE_DATA -#endif - -#ifdef ANDROID -/* supposedly, android doesn't typedef fd_mask */ -# undef EV_USE_SELECT -# define EV_USE_SELECT 0 -/* supposedly, we need to include syscall.h, not sys/syscall.h, so just disable */ -# undef EV_USE_CLOCK_SYSCALL -# define EV_USE_CLOCK_SYSCALL 0 -#endif - -/* aix's poll.h seems to cause lots of trouble */ -#ifdef _AIX -/* AIX has a completely broken poll.h header */ -# undef EV_USE_POLL -# define EV_USE_POLL 0 -#endif - -/* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */ -/* which makes programs even slower. might work on other unices, too. */ -#if EV_USE_CLOCK_SYSCALL -# include -# ifdef SYS_clock_gettime -# define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) -# undef EV_USE_MONOTONIC -# define EV_USE_MONOTONIC 1 -# else -# undef EV_USE_CLOCK_SYSCALL -# define EV_USE_CLOCK_SYSCALL 0 -# endif -#endif - -/* this block fixes any misconfiguration where we know we run into trouble otherwise */ - -#ifndef CLOCK_MONOTONIC -# undef EV_USE_MONOTONIC -# define EV_USE_MONOTONIC 0 -#endif - -#ifndef CLOCK_REALTIME -# undef EV_USE_REALTIME -# define EV_USE_REALTIME 0 -#endif - -#if !EV_STAT_ENABLE -# undef EV_USE_INOTIFY -# define EV_USE_INOTIFY 0 -#endif - -#if !EV_USE_NANOSLEEP -/* hp-ux has it in sys/time.h, which we unconditionally include above */ -# if !defined _WIN32 && !defined __hpux -# include -# endif -#endif - -#if EV_USE_INOTIFY -# include -# include -/* some very old inotify.h headers don't have IN_DONT_FOLLOW */ -# ifndef IN_DONT_FOLLOW -# undef EV_USE_INOTIFY -# define EV_USE_INOTIFY 0 -# endif -#endif - -#if EV_USE_EVENTFD -/* our minimum requirement is glibc 2.7 which has the stub, but not the header */ -# include -# ifndef EFD_NONBLOCK -# define EFD_NONBLOCK O_NONBLOCK -# endif -# ifndef EFD_CLOEXEC -# ifdef O_CLOEXEC -# define EFD_CLOEXEC O_CLOEXEC -# else -# define EFD_CLOEXEC 02000000 -# endif -# endif -EV_CPP(extern "C") int (eventfd) (unsigned int initval, int flags); -#endif - -#if EV_USE_SIGNALFD -/* our minimum requirement is glibc 2.7 which has the stub, but not the header */ -# include -# ifndef SFD_NONBLOCK -# define SFD_NONBLOCK O_NONBLOCK -# endif -# ifndef SFD_CLOEXEC -# ifdef O_CLOEXEC -# define SFD_CLOEXEC O_CLOEXEC -# else -# define SFD_CLOEXEC 02000000 -# endif -# endif -EV_CPP (extern "C") int signalfd (int fd, const sigset_t *mask, int flags); - -struct signalfd_siginfo -{ - uint32_t ssi_signo; - char pad[128 - sizeof (uint32_t)]; -}; -#endif - -/**/ - -#if EV_VERIFY >= 3 -# define EV_FREQUENT_CHECK ev_verify (EV_A) -#else -# define EV_FREQUENT_CHECK do { } while (0) -#endif - -/* - * This is used to work around floating point rounding problems. - * This value is good at least till the year 4000. - */ -#define MIN_INTERVAL 0.0001220703125 /* 1/2**13, good till 4000 */ -/*#define MIN_INTERVAL 0.00000095367431640625 /* 1/2**20, good till 2200 */ - -#define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */ -#define MAX_BLOCKTIME 59.743 /* never wait longer than this time (to detect time jumps) */ - -#define EV_TV_SET(tv,t) do { tv.tv_sec = (long)t; tv.tv_usec = (long)((t - tv.tv_sec) * 1e6); } while (0) -#define EV_TS_SET(ts,t) do { ts.tv_sec = (long)t; ts.tv_nsec = (long)((t - ts.tv_sec) * 1e9); } while (0) - -/* the following is ecb.h embedded into libev - use update_ev_c to update from an external copy */ -/* ECB.H BEGIN */ -/* - * libecb - http://software.schmorp.de/pkg/libecb - * - * Copyright (©) 2009-2012 Marc Alexander Lehmann - * Copyright (©) 2011 Emanuele Giaquinta - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ECB_H -#define ECB_H - -/* 16 bits major, 16 bits minor */ -#define ECB_VERSION 0x00010003 - -#ifdef _WIN32 - typedef signed char int8_t; - typedef unsigned char uint8_t; - typedef signed short int16_t; - typedef unsigned short uint16_t; - typedef signed int int32_t; - typedef unsigned int uint32_t; - #if __GNUC__ - typedef signed long long int64_t; - typedef unsigned long long uint64_t; - #else /* _MSC_VER || __BORLANDC__ */ - typedef signed __int64 int64_t; - typedef unsigned __int64 uint64_t; - #endif - #ifdef _WIN64 - #define ECB_PTRSIZE 8 - typedef uint64_t uintptr_t; - typedef int64_t intptr_t; - #else - #define ECB_PTRSIZE 4 - typedef uint32_t uintptr_t; - typedef int32_t intptr_t; - #endif -#else - #include - #if UINTMAX_MAX > 0xffffffffU - #define ECB_PTRSIZE 8 - #else - #define ECB_PTRSIZE 4 - #endif -#endif - -/* work around x32 idiocy by defining proper macros */ -#if __x86_64 || _M_AMD64 - #if __ILP32 - #define ECB_AMD64_X32 1 - #else - #define ECB_AMD64 1 - #endif -#endif - -/* many compilers define _GNUC_ to some versions but then only implement - * what their idiot authors think are the "more important" extensions, - * causing enormous grief in return for some better fake benchmark numbers. - * or so. - * we try to detect these and simply assume they are not gcc - if they have - * an issue with that they should have done it right in the first place. - */ -#ifndef ECB_GCC_VERSION - #if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__ - #define ECB_GCC_VERSION(major,minor) 0 - #else - #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) - #endif -#endif - -#define ECB_C (__STDC__+0) /* this assumes that __STDC__ is either empty or a number */ -#define ECB_C99 (__STDC_VERSION__ >= 199901L) -#define ECB_C11 (__STDC_VERSION__ >= 201112L) -#define ECB_CPP (__cplusplus+0) -#define ECB_CPP11 (__cplusplus >= 201103L) - -#if ECB_CPP - #define ECB_EXTERN_C extern "C" - #define ECB_EXTERN_C_BEG ECB_EXTERN_C { - #define ECB_EXTERN_C_END } -#else - #define ECB_EXTERN_C extern - #define ECB_EXTERN_C_BEG - #define ECB_EXTERN_C_END -#endif - -/*****************************************************************************/ - -/* ECB_NO_THREADS - ecb is not used by multiple threads, ever */ -/* ECB_NO_SMP - ecb might be used in multiple threads, but only on a single cpu */ - -#if ECB_NO_THREADS - #define ECB_NO_SMP 1 -#endif - -#if ECB_NO_SMP - #define ECB_MEMORY_FENCE do { } while (0) -#endif - -#ifndef ECB_MEMORY_FENCE - #if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 - #if __i386 || __i386__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory") - #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") - #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") - #elif __amd64 || __amd64__ || __x86_64 || __x86_64__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory") - #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") - #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") - #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") - #elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ \ - || defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory") - #elif defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ \ - || defined __ARM_ARCH_7M__ || defined __ARM_ARCH_7R__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("dmb" : : : "memory") - #elif __sparc || __sparc__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory") - #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory") - #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore") - #elif defined __s390__ || defined __s390x__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory") - #elif defined __mips__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") - #elif defined __alpha__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory") - #elif defined __hppa__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory") - #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") - #elif defined __ia64__ - #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mf" : : : "memory") - #endif - #endif -#endif - -#ifndef ECB_MEMORY_FENCE - #if ECB_GCC_VERSION(4,7) - /* see comment below (stdatomic.h) about the C11 memory model. */ - #define ECB_MEMORY_FENCE __atomic_thread_fence (__ATOMIC_SEQ_CST) - - /* The __has_feature syntax from clang is so misdesigned that we cannot use it - * without risking compile time errors with other compilers. We *could* - * define our own ecb_clang_has_feature, but I just can't be bothered to work - * around this shit time and again. - * #elif defined __clang && __has_feature (cxx_atomic) - * // see comment below (stdatomic.h) about the C11 memory model. - * #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST) - */ - - #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__ - #define ECB_MEMORY_FENCE __sync_synchronize () - #elif _MSC_VER >= 1400 /* VC++ 2005 */ - #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier) - #define ECB_MEMORY_FENCE _ReadWriteBarrier () - #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */ - #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier () - #elif defined _WIN32 - #include - #define ECB_MEMORY_FENCE MemoryBarrier () /* actually just xchg on x86... scary */ - #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 - #include - #define ECB_MEMORY_FENCE __machine_rw_barrier () - #define ECB_MEMORY_FENCE_ACQUIRE __machine_r_barrier () - #define ECB_MEMORY_FENCE_RELEASE __machine_w_barrier () - #elif __xlC__ - #define ECB_MEMORY_FENCE __sync () - #endif -#endif - -#ifndef ECB_MEMORY_FENCE - #if ECB_C11 && !defined __STDC_NO_ATOMICS__ - /* we assume that these memory fences work on all variables/all memory accesses, */ - /* not just C11 atomics and atomic accesses */ - #include - /* Unfortunately, neither gcc 4.7 nor clang 3.1 generate any instructions for */ - /* any fence other than seq_cst, which isn't very efficient for us. */ - /* Why that is, we don't know - either the C11 memory model is quite useless */ - /* for most usages, or gcc and clang have a bug */ - /* I *currently* lean towards the latter, and inefficiently implement */ - /* all three of ecb's fences as a seq_cst fence */ - #define ECB_MEMORY_FENCE atomic_thread_fence (memory_order_seq_cst) - #endif -#endif - -#ifndef ECB_MEMORY_FENCE - #if !ECB_AVOID_PTHREADS - /* - * if you get undefined symbol references to pthread_mutex_lock, - * or failure to find pthread.h, then you should implement - * the ECB_MEMORY_FENCE operations for your cpu/compiler - * OR provide pthread.h and link against the posix thread library - * of your system. - */ - #include - #define ECB_NEEDS_PTHREADS 1 - #define ECB_MEMORY_FENCE_NEEDS_PTHREADS 1 - - static pthread_mutex_t ecb_mf_lock = PTHREAD_MUTEX_INITIALIZER; - #define ECB_MEMORY_FENCE do { pthread_mutex_lock (&ecb_mf_lock); pthread_mutex_unlock (&ecb_mf_lock); } while (0) - #endif -#endif - -#if !defined ECB_MEMORY_FENCE_ACQUIRE && defined ECB_MEMORY_FENCE - #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE -#endif - -#if !defined ECB_MEMORY_FENCE_RELEASE && defined ECB_MEMORY_FENCE - #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE -#endif - -/*****************************************************************************/ - -#if __cplusplus - #define ecb_inline static inline -#elif ECB_GCC_VERSION(2,5) - #define ecb_inline static __inline__ -#elif ECB_C99 - #define ecb_inline static inline -#else - #define ecb_inline static -#endif - -#if ECB_GCC_VERSION(3,3) - #define ecb_restrict __restrict__ -#elif ECB_C99 - #define ecb_restrict restrict -#else - #define ecb_restrict -#endif - -typedef int ecb_bool; - -#define ECB_CONCAT_(a, b) a ## b -#define ECB_CONCAT(a, b) ECB_CONCAT_(a, b) -#define ECB_STRINGIFY_(a) # a -#define ECB_STRINGIFY(a) ECB_STRINGIFY_(a) - -#define ecb_function_ ecb_inline - -#if ECB_GCC_VERSION(3,1) - #define ecb_attribute(attrlist) __attribute__(attrlist) - #define ecb_is_constant(expr) __builtin_constant_p (expr) - #define ecb_expect(expr,value) __builtin_expect ((expr),(value)) - #define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality) -#else - #define ecb_attribute(attrlist) - #define ecb_is_constant(expr) 0 - #define ecb_expect(expr,value) (expr) - #define ecb_prefetch(addr,rw,locality) -#endif - -/* no emulation for ecb_decltype */ -#if ECB_GCC_VERSION(4,5) - #define ecb_decltype(x) __decltype(x) -#elif ECB_GCC_VERSION(3,0) - #define ecb_decltype(x) __typeof(x) -#endif - -#define ecb_noinline ecb_attribute ((__noinline__)) -#define ecb_unused ecb_attribute ((__unused__)) -#define ecb_const ecb_attribute ((__const__)) -#define ecb_pure ecb_attribute ((__pure__)) - -#if ECB_C11 - #define ecb_noreturn _Noreturn -#else - #define ecb_noreturn ecb_attribute ((__noreturn__)) -#endif - -#if ECB_GCC_VERSION(4,3) - #define ecb_artificial ecb_attribute ((__artificial__)) - #define ecb_hot ecb_attribute ((__hot__)) - #define ecb_cold ecb_attribute ((__cold__)) -#else - #define ecb_artificial - #define ecb_hot - #define ecb_cold -#endif - -/* put around conditional expressions if you are very sure that the */ -/* expression is mostly true or mostly false. note that these return */ -/* booleans, not the expression. */ -#define ecb_expect_false(expr) ecb_expect (!!(expr), 0) -#define ecb_expect_true(expr) ecb_expect (!!(expr), 1) -/* for compatibility to the rest of the world */ -#define ecb_likely(expr) ecb_expect_true (expr) -#define ecb_unlikely(expr) ecb_expect_false (expr) - -/* count trailing zero bits and count # of one bits */ -#if ECB_GCC_VERSION(3,4) - /* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */ - #define ecb_ld32(x) (__builtin_clz (x) ^ 31) - #define ecb_ld64(x) (__builtin_clzll (x) ^ 63) - #define ecb_ctz32(x) __builtin_ctz (x) - #define ecb_ctz64(x) __builtin_ctzll (x) - #define ecb_popcount32(x) __builtin_popcount (x) - /* no popcountll */ -#else - ecb_function_ int ecb_ctz32 (uint32_t x) ecb_const; - ecb_function_ int - ecb_ctz32 (uint32_t x) - { - int r = 0; - - x &= ~x + 1; /* this isolates the lowest bit */ - -#if ECB_branchless_on_i386 - r += !!(x & 0xaaaaaaaa) << 0; - r += !!(x & 0xcccccccc) << 1; - r += !!(x & 0xf0f0f0f0) << 2; - r += !!(x & 0xff00ff00) << 3; - r += !!(x & 0xffff0000) << 4; -#else - if (x & 0xaaaaaaaa) r += 1; - if (x & 0xcccccccc) r += 2; - if (x & 0xf0f0f0f0) r += 4; - if (x & 0xff00ff00) r += 8; - if (x & 0xffff0000) r += 16; -#endif - - return r; - } - - ecb_function_ int ecb_ctz64 (uint64_t x) ecb_const; - ecb_function_ int - ecb_ctz64 (uint64_t x) - { - int shift = x & 0xffffffffU ? 0 : 32; - return ecb_ctz32 (x >> shift) + shift; - } - - ecb_function_ int ecb_popcount32 (uint32_t x) ecb_const; - ecb_function_ int - ecb_popcount32 (uint32_t x) - { - x -= (x >> 1) & 0x55555555; - x = ((x >> 2) & 0x33333333) + (x & 0x33333333); - x = ((x >> 4) + x) & 0x0f0f0f0f; - x *= 0x01010101; - - return x >> 24; - } - - ecb_function_ int ecb_ld32 (uint32_t x) ecb_const; - ecb_function_ int ecb_ld32 (uint32_t x) - { - int r = 0; - - if (x >> 16) { x >>= 16; r += 16; } - if (x >> 8) { x >>= 8; r += 8; } - if (x >> 4) { x >>= 4; r += 4; } - if (x >> 2) { x >>= 2; r += 2; } - if (x >> 1) { r += 1; } - - return r; - } - - ecb_function_ int ecb_ld64 (uint64_t x) ecb_const; - ecb_function_ int ecb_ld64 (uint64_t x) - { - int r = 0; - - if (x >> 32) { x >>= 32; r += 32; } - - return r + ecb_ld32 (x); - } -#endif - -ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) ecb_const; -ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); } -ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) ecb_const; -ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); } - -ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) ecb_const; -ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) -{ - return ( (x * 0x0802U & 0x22110U) - | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16; -} - -ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) ecb_const; -ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) -{ - x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1); - x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2); - x = ((x >> 4) & 0x0f0f) | ((x & 0x0f0f) << 4); - x = ( x >> 8 ) | ( x << 8); - - return x; -} - -ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) ecb_const; -ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) -{ - x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); - x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); - x = ((x >> 4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) << 4); - x = ((x >> 8) & 0x00ff00ff) | ((x & 0x00ff00ff) << 8); - x = ( x >> 16 ) | ( x << 16); - - return x; -} - -/* popcount64 is only available on 64 bit cpus as gcc builtin */ -/* so for this version we are lazy */ -ecb_function_ int ecb_popcount64 (uint64_t x) ecb_const; -ecb_function_ int -ecb_popcount64 (uint64_t x) -{ - return ecb_popcount32 (x) + ecb_popcount32 (x >> 32); -} - -ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) ecb_const; -ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) ecb_const; -ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) ecb_const; -ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) ecb_const; -ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) ecb_const; -ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) ecb_const; -ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) ecb_const; -ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) ecb_const; - -ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); } -ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); } -ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); } -ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); } -ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); } -ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); } -ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); } -ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); } - -#if ECB_GCC_VERSION(4,3) - #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16) - #define ecb_bswap32(x) __builtin_bswap32 (x) - #define ecb_bswap64(x) __builtin_bswap64 (x) -#else - ecb_function_ uint16_t ecb_bswap16 (uint16_t x) ecb_const; - ecb_function_ uint16_t - ecb_bswap16 (uint16_t x) - { - return ecb_rotl16 (x, 8); - } - - ecb_function_ uint32_t ecb_bswap32 (uint32_t x) ecb_const; - ecb_function_ uint32_t - ecb_bswap32 (uint32_t x) - { - return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16); - } - - ecb_function_ uint64_t ecb_bswap64 (uint64_t x) ecb_const; - ecb_function_ uint64_t - ecb_bswap64 (uint64_t x) - { - return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32); - } -#endif - -#if ECB_GCC_VERSION(4,5) - #define ecb_unreachable() __builtin_unreachable () -#else - /* this seems to work fine, but gcc always emits a warning for it :/ */ - ecb_inline void ecb_unreachable (void) ecb_noreturn; - ecb_inline void ecb_unreachable (void) { } -#endif - -/* try to tell the compiler that some condition is definitely true */ -#define ecb_assume(cond) if (!(cond)) ecb_unreachable (); else 0 - -ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const; -ecb_inline unsigned char -ecb_byteorder_helper (void) -{ - /* the union code still generates code under pressure in gcc, */ - /* but less than using pointers, and always seems to */ - /* successfully return a constant. */ - /* the reason why we have this horrible preprocessor mess */ - /* is to avoid it in all cases, at least on common architectures */ - /* or when using a recent enough gcc version (>= 4.6) */ -#if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64 - return 0x44; -#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - return 0x44; -#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - return 0x11; -#else - union - { - uint32_t i; - uint8_t c; - } u = { 0x11223344 }; - return u.c; -#endif -} - -ecb_inline ecb_bool ecb_big_endian (void) ecb_const; -ecb_inline ecb_bool ecb_big_endian (void) { return ecb_byteorder_helper () == 0x11; } -ecb_inline ecb_bool ecb_little_endian (void) ecb_const; -ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; } - -#if ECB_GCC_VERSION(3,0) || ECB_C99 - #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0)) -#else - #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n))) -#endif - -#if __cplusplus - template - static inline T ecb_div_rd (T val, T div) - { - return val < 0 ? - ((-val + div - 1) / div) : (val ) / div; - } - template - static inline T ecb_div_ru (T val, T div) - { - return val < 0 ? - ((-val ) / div) : (val + div - 1) / div; - } -#else - #define ecb_div_rd(val,div) ((val) < 0 ? - ((-(val) + (div) - 1) / (div)) : ((val) ) / (div)) - #define ecb_div_ru(val,div) ((val) < 0 ? - ((-(val) ) / (div)) : ((val) + (div) - 1) / (div)) -#endif - -#if ecb_cplusplus_does_not_suck - /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */ - template - static inline int ecb_array_length (const T (&arr)[N]) - { - return N; - } -#else - #define ecb_array_length(name) (sizeof (name) / sizeof (name [0])) -#endif - -/*******************************************************************************/ -/* floating point stuff, can be disabled by defining ECB_NO_LIBM */ - -/* basically, everything uses "ieee pure-endian" floating point numbers */ -/* the only noteworthy exception is ancient armle, which uses order 43218765 */ -#if 0 \ - || __i386 || __i386__ \ - || __amd64 || __amd64__ || __x86_64 || __x86_64__ \ - || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ - || defined __arm__ && defined __ARM_EABI__ \ - || defined __s390__ || defined __s390x__ \ - || defined __mips__ \ - || defined __alpha__ \ - || defined __hppa__ \ - || defined __ia64__ \ - || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 - #define ECB_STDFP 1 - #include /* for memcpy */ -#else - #define ECB_STDFP 0 - #include /* for frexp*, ldexp* */ -#endif - -#ifndef ECB_NO_LIBM - - /* convert a float to ieee single/binary32 */ - ecb_function_ uint32_t ecb_float_to_binary32 (float x) ecb_const; - ecb_function_ uint32_t - ecb_float_to_binary32 (float x) - { - uint32_t r; - - #if ECB_STDFP - memcpy (&r, &x, 4); - #else - /* slow emulation, works for anything but -0 */ - uint32_t m; - int e; - - if (x == 0e0f ) return 0x00000000U; - if (x > +3.40282346638528860e+38f) return 0x7f800000U; - if (x < -3.40282346638528860e+38f) return 0xff800000U; - if (x != x ) return 0x7fbfffffU; - - m = frexpf (x, &e) * 0x1000000U; - - r = m & 0x80000000U; - - if (r) - m = -m; - - if (e <= -126) - { - m &= 0xffffffU; - m >>= (-125 - e); - e = -126; - } - - r |= (e + 126) << 23; - r |= m & 0x7fffffU; - #endif - - return r; - } - - /* converts an ieee single/binary32 to a float */ - ecb_function_ float ecb_binary32_to_float (uint32_t x) ecb_const; - ecb_function_ float - ecb_binary32_to_float (uint32_t x) - { - float r; - - #if ECB_STDFP - memcpy (&r, &x, 4); - #else - /* emulation, only works for normals and subnormals and +0 */ - int neg = x >> 31; - int e = (x >> 23) & 0xffU; - - x &= 0x7fffffU; - - if (e) - x |= 0x800000U; - else - e = 1; - - /* we distrust ldexpf a bit and do the 2**-24 scaling by an extra multiply */ - r = ldexpf (x * (0.5f / 0x800000U), e - 126); - - r = neg ? -r : r; - #endif - - return r; - } - - /* convert a double to ieee double/binary64 */ - ecb_function_ uint64_t ecb_double_to_binary64 (double x) ecb_const; - ecb_function_ uint64_t - ecb_double_to_binary64 (double x) - { - uint64_t r; - - #if ECB_STDFP - memcpy (&r, &x, 8); - #else - /* slow emulation, works for anything but -0 */ - uint64_t m; - int e; - - if (x == 0e0 ) return 0x0000000000000000U; - if (x > +1.79769313486231470e+308) return 0x7ff0000000000000U; - if (x < -1.79769313486231470e+308) return 0xfff0000000000000U; - if (x != x ) return 0X7ff7ffffffffffffU; - - m = frexp (x, &e) * 0x20000000000000U; - - r = m & 0x8000000000000000;; - - if (r) - m = -m; - - if (e <= -1022) - { - m &= 0x1fffffffffffffU; - m >>= (-1021 - e); - e = -1022; - } - - r |= ((uint64_t)(e + 1022)) << 52; - r |= m & 0xfffffffffffffU; - #endif - - return r; - } - - /* converts an ieee double/binary64 to a double */ - ecb_function_ double ecb_binary64_to_double (uint64_t x) ecb_const; - ecb_function_ double - ecb_binary64_to_double (uint64_t x) - { - double r; - - #if ECB_STDFP - memcpy (&r, &x, 8); - #else - /* emulation, only works for normals and subnormals and +0 */ - int neg = x >> 63; - int e = (x >> 52) & 0x7ffU; - - x &= 0xfffffffffffffU; - - if (e) - x |= 0x10000000000000U; - else - e = 1; - - /* we distrust ldexp a bit and do the 2**-53 scaling by an extra multiply */ - r = ldexp (x * (0.5 / 0x10000000000000U), e - 1022); - - r = neg ? -r : r; - #endif - - return r; - } - -#endif - -#endif - -/* ECB.H END */ - -#if ECB_MEMORY_FENCE_NEEDS_PTHREADS -/* if your architecture doesn't need memory fences, e.g. because it is - * single-cpu/core, or if you use libev in a project that doesn't use libev - * from multiple threads, then you can define ECB_AVOID_PTHREADS when compiling - * libev, in which cases the memory fences become nops. - * alternatively, you can remove this #error and link against libpthread, - * which will then provide the memory fences. - */ -# error "memory fences not defined for your architecture, please report" -#endif - -#ifndef ECB_MEMORY_FENCE -# define ECB_MEMORY_FENCE do { } while (0) -# define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE -# define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE -#endif - -#define expect_false(cond) ecb_expect_false (cond) -#define expect_true(cond) ecb_expect_true (cond) -#define noinline ecb_noinline - -#define inline_size ecb_inline - -#if EV_FEATURE_CODE -# define inline_speed ecb_inline -#else -# define inline_speed static noinline -#endif - -#define NUMPRI (EV_MAXPRI - EV_MINPRI + 1) - -#if EV_MINPRI == EV_MAXPRI -# define ABSPRI(w) (((W)w), 0) -#else -# define ABSPRI(w) (((W)w)->priority - EV_MINPRI) -#endif - -#define EMPTY /* required for microsofts broken pseudo-c compiler */ -#define EMPTY2(a,b) /* used to suppress some warnings */ - -typedef ev_watcher *W; -typedef ev_watcher_list *WL; -typedef ev_watcher_time *WT; - -#define ev_active(w) ((W)(w))->active -#define ev_at(w) ((WT)(w))->at - -#if EV_USE_REALTIME -/* sig_atomic_t is used to avoid per-thread variables or locking but still */ -/* giving it a reasonably high chance of working on typical architectures */ -static EV_ATOMIC_T have_realtime; /* did clock_gettime (CLOCK_REALTIME) work? */ -#endif - -#if EV_USE_MONOTONIC -static EV_ATOMIC_T have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work? */ -#endif - -#ifndef EV_FD_TO_WIN32_HANDLE -# define EV_FD_TO_WIN32_HANDLE(fd) _get_osfhandle (fd) -#endif -#ifndef EV_WIN32_HANDLE_TO_FD -# define EV_WIN32_HANDLE_TO_FD(handle) _open_osfhandle (handle, 0) -#endif -#ifndef EV_WIN32_CLOSE_FD -# define EV_WIN32_CLOSE_FD(fd) close (fd) -#endif - -#ifdef _WIN32 -# include "ev_win32.c" -#endif - -/*****************************************************************************/ - -/* define a suitable floor function (only used by periodics atm) */ - -#if EV_USE_FLOOR -# include -# define ev_floor(v) floor (v) -#else - -#include - -/* a floor() replacement function, should be independent of ev_tstamp type */ -static ev_tstamp noinline -ev_floor (ev_tstamp v) -{ - /* the choice of shift factor is not terribly important */ -#if FLT_RADIX != 2 /* assume FLT_RADIX == 10 */ - const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 10000000000000000000. : 1000000000.; -#else - const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 18446744073709551616. : 4294967296.; -#endif - - /* argument too large for an unsigned long? */ - if (expect_false (v >= shift)) - { - ev_tstamp f; - - if (v == v - 1.) - return v; /* very large number */ - - f = shift * ev_floor (v * (1. / shift)); - return f + ev_floor (v - f); - } - - /* special treatment for negative args? */ - if (expect_false (v < 0.)) - { - ev_tstamp f = -ev_floor (-v); - - return f - (f == v ? 0 : 1); - } - - /* fits into an unsigned long */ - return (unsigned long)v; -} - -#endif - -/*****************************************************************************/ - -#ifdef __linux -# include -#endif - -static unsigned int noinline ecb_cold -ev_linux_version (void) -{ -#ifdef __linux - unsigned int v = 0; - struct utsname buf; - int i; - char *p = buf.release; - - if (uname (&buf)) - return 0; - - for (i = 3+1; --i; ) - { - unsigned int c = 0; - - for (;;) - { - if (*p >= '0' && *p <= '9') - c = c * 10 + *p++ - '0'; - else - { - p += *p == '.'; - break; - } - } - - v = (v << 8) | c; - } - - return v; -#else - return 0; -#endif -} - -/*****************************************************************************/ - -#if EV_AVOID_STDIO -static void noinline ecb_cold -ev_printerr (const char *msg) -{ - write (STDERR_FILENO, msg, strlen (msg)); -} -#endif - -static void (*syserr_cb)(const char *msg) EV_THROW; - -void ecb_cold -ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW -{ - syserr_cb = cb; -} - -static void noinline ecb_cold -ev_syserr (const char *msg) -{ - if (!msg) - msg = "(libev) system error"; - - if (syserr_cb) - syserr_cb (msg); - else - { -#if EV_AVOID_STDIO - ev_printerr (msg); - ev_printerr (": "); - ev_printerr (strerror (errno)); - ev_printerr ("\n"); -#else - perror (msg); -#endif - abort (); - } -} - -static void * -ev_realloc_emul (void *ptr, long size) EV_THROW -{ - /* some systems, notably openbsd and darwin, fail to properly - * implement realloc (x, 0) (as required by both ansi c-89 and - * the single unix specification, so work around them here. - * recently, also (at least) fedora and debian started breaking it, - * despite documenting it otherwise. - */ - - if (size) - return realloc (ptr, size); - - free (ptr); - return 0; -} - -static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul; - -void ecb_cold -ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW -{ - alloc = cb; -} - -inline_speed void * -ev_realloc (void *ptr, long size) -{ - ptr = alloc (ptr, size); - - if (!ptr && size) - { -#if EV_AVOID_STDIO - ev_printerr ("(libev) memory allocation failed, aborting.\n"); -#else - fprintf (stderr, "(libev) cannot allocate %ld bytes, aborting.", size); -#endif - abort (); - } - - return ptr; -} - -#define ev_malloc(size) ev_realloc (0, (size)) -#define ev_free(ptr) ev_realloc ((ptr), 0) - -/*****************************************************************************/ - -/* set in reify when reification needed */ -#define EV_ANFD_REIFY 1 - -/* file descriptor info structure */ -typedef struct -{ - WL head; - unsigned char events; /* the events watched for */ - unsigned char reify; /* flag set when this ANFD needs reification (EV_ANFD_REIFY, EV__IOFDSET) */ - unsigned char emask; /* the epoll backend stores the actual kernel mask in here */ - unsigned char unused; -#if EV_USE_EPOLL - unsigned int egen; /* generation counter to counter epoll bugs */ -#endif -#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP - SOCKET handle; -#endif -#if EV_USE_IOCP - OVERLAPPED or, ow; -#endif -} ANFD; - -/* stores the pending event set for a given watcher */ -typedef struct -{ - W w; - int events; /* the pending event set for the given watcher */ -} ANPENDING; - -#if EV_USE_INOTIFY -/* hash table entry per inotify-id */ -typedef struct -{ - WL head; -} ANFS; -#endif - -/* Heap Entry */ -#if EV_HEAP_CACHE_AT - /* a heap element */ - typedef struct { - ev_tstamp at; - WT w; - } ANHE; - - #define ANHE_w(he) (he).w /* access watcher, read-write */ - #define ANHE_at(he) (he).at /* access cached at, read-only */ - #define ANHE_at_cache(he) (he).at = (he).w->at /* update at from watcher */ -#else - /* a heap element */ - typedef WT ANHE; - - #define ANHE_w(he) (he) - #define ANHE_at(he) (he)->at - #define ANHE_at_cache(he) -#endif - -#if EV_MULTIPLICITY - - struct ev_loop - { - ev_tstamp ev_rt_now; - #define ev_rt_now ((loop)->ev_rt_now) - #define VAR(name,decl) decl; - #include "ev_vars.h" - #undef VAR - }; - #include "ev_wrap.h" - - static struct ev_loop default_loop_struct; - EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */ - -#else - - EV_API_DECL ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a definition despite extern */ - #define VAR(name,decl) static decl; - #include "ev_vars.h" - #undef VAR - - static int ev_default_loop_ptr; - -#endif - -#if EV_FEATURE_API -# define EV_RELEASE_CB if (expect_false (release_cb)) release_cb (EV_A) -# define EV_ACQUIRE_CB if (expect_false (acquire_cb)) acquire_cb (EV_A) -# define EV_INVOKE_PENDING invoke_cb (EV_A) -#else -# define EV_RELEASE_CB (void)0 -# define EV_ACQUIRE_CB (void)0 -# define EV_INVOKE_PENDING ev_invoke_pending (EV_A) -#endif - -#define EVBREAK_RECURSE 0x80 - -/*****************************************************************************/ - -#ifndef EV_HAVE_EV_TIME -ev_tstamp -ev_time (void) EV_THROW -{ -#if EV_USE_REALTIME - if (expect_true (have_realtime)) - { - struct timespec ts; - clock_gettime (CLOCK_REALTIME, &ts); - return ts.tv_sec + ts.tv_nsec * 1e-9; - } -#endif - - struct timeval tv; - gettimeofday (&tv, 0); - return tv.tv_sec + tv.tv_usec * 1e-6; -} -#endif - -inline_size ev_tstamp -get_clock (void) -{ -#if EV_USE_MONOTONIC - if (expect_true (have_monotonic)) - { - struct timespec ts; - clock_gettime (CLOCK_MONOTONIC, &ts); - return ts.tv_sec + ts.tv_nsec * 1e-9; - } -#endif - - return ev_time (); -} - -#if EV_MULTIPLICITY -ev_tstamp -ev_now (EV_P) EV_THROW -{ - return ev_rt_now; -} -#endif - -void -ev_sleep (ev_tstamp delay) EV_THROW -{ - if (delay > 0.) - { -#if EV_USE_NANOSLEEP - struct timespec ts; - - EV_TS_SET (ts, delay); - nanosleep (&ts, 0); -#elif defined _WIN32 - Sleep ((unsigned long)(delay * 1e3)); -#else - struct timeval tv; - - /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */ - /* something not guaranteed by newer posix versions, but guaranteed */ - /* by older ones */ - EV_TV_SET (tv, delay); - select (0, 0, 0, 0, &tv); -#endif - } -} - -/*****************************************************************************/ - -#define MALLOC_ROUND 4096 /* prefer to allocate in chunks of this size, must be 2**n and >> 4 longs */ - -/* find a suitable new size for the given array, */ -/* hopefully by rounding to a nice-to-malloc size */ -inline_size int -array_nextsize (int elem, int cur, int cnt) -{ - int ncur = cur + 1; - - do - ncur <<= 1; - while (cnt > ncur); - - /* if size is large, round to MALLOC_ROUND - 4 * longs to accommodate malloc overhead */ - if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4) - { - ncur *= elem; - ncur = (ncur + elem + (MALLOC_ROUND - 1) + sizeof (void *) * 4) & ~(MALLOC_ROUND - 1); - ncur = ncur - sizeof (void *) * 4; - ncur /= elem; - } - - return ncur; -} - -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); -} - -#define array_init_zero(base,count) \ - memset ((void *)(base), 0, sizeof (*(base)) * (count)) - -#define array_needsize(type,base,cur,cnt,init) \ - if (expect_false ((cnt) > (cur))) \ - { \ - int ecb_unused ocur_ = (cur); \ - (base) = (type *)array_realloc \ - (sizeof (type), (base), &(cur), (cnt)); \ - init ((base) + (ocur_), (cur) - ocur_); \ - } - -#if 0 -#define array_slim(type,stem) \ - if (stem ## max < array_roundsize (stem ## cnt >> 2)) \ - { \ - stem ## max = array_roundsize (stem ## cnt >> 1); \ - base = (type *)ev_realloc (base, sizeof (type) * (stem ## max));\ - fprintf (stderr, "slimmed down " # stem " to %d\n", stem ## max);/*D*/\ - } -#endif - -#define array_free(stem, idx) \ - ev_free (stem ## s idx); stem ## cnt idx = stem ## max idx = 0; stem ## s idx = 0 - -/*****************************************************************************/ - -/* dummy callback for pending events */ -static void noinline -pendingcb (EV_P_ ev_prepare *w, int revents) -{ -} - -void noinline -ev_feed_event (EV_P_ void *w, int revents) EV_THROW -{ - W w_ = (W)w; - int pri = ABSPRI (w_); - - if (expect_false (w_->pending)) - pendings [pri][w_->pending - 1].events |= revents; - else - { - w_->pending = ++pendingcnt [pri]; - array_needsize (ANPENDING, pendings [pri], pendingmax [pri], w_->pending, EMPTY2); - pendings [pri][w_->pending - 1].w = w_; - pendings [pri][w_->pending - 1].events = revents; - } - - pendingpri = NUMPRI - 1; -} - -inline_speed void -feed_reverse (EV_P_ W w) -{ - array_needsize (W, rfeeds, rfeedmax, rfeedcnt + 1, EMPTY2); - rfeeds [rfeedcnt++] = w; -} - -inline_size void -feed_reverse_done (EV_P_ int revents) -{ - do - ev_feed_event (EV_A_ rfeeds [--rfeedcnt], revents); - while (rfeedcnt); -} - -inline_speed void -queue_events (EV_P_ W *events, int eventcnt, int type) -{ - int i; - - for (i = 0; i < eventcnt; ++i) - ev_feed_event (EV_A_ events [i], type); -} - -/*****************************************************************************/ - -inline_speed void -fd_event_nocheck (EV_P_ int fd, int revents) -{ - ANFD *anfd = anfds + fd; - ev_io *w; - - for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next) - { - int ev = w->events & revents; - - if (ev) - ev_feed_event (EV_A_ (W)w, ev); - } -} - -/* do not submit kernel events for fds that have reify set */ -/* because that means they changed while we were polling for new events */ -inline_speed void -fd_event (EV_P_ int fd, int revents) -{ - ANFD *anfd = anfds + fd; - - if (expect_true (!anfd->reify)) - fd_event_nocheck (EV_A_ fd, revents); -} - -void -ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW -{ - if (fd >= 0 && fd < anfdmax) - fd_event_nocheck (EV_A_ fd, revents); -} - -/* make sure the external fd watch events are in-sync */ -/* with the kernel/libev internal state */ -inline_size void -fd_reify (EV_P) -{ - int i; - -#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP - for (i = 0; i < fdchangecnt; ++i) - { - int fd = fdchanges [i]; - ANFD *anfd = anfds + fd; - - if (anfd->reify & EV__IOFDSET && anfd->head) - { - SOCKET handle = EV_FD_TO_WIN32_HANDLE (fd); - - if (handle != anfd->handle) - { - unsigned long arg; - - assert (("libev: only socket fds supported in this configuration", ioctlsocket (handle, FIONREAD, &arg) == 0)); - - /* handle changed, but fd didn't - we need to do it in two steps */ - backend_modify (EV_A_ fd, anfd->events, 0); - anfd->events = 0; - anfd->handle = handle; - } - } - } -#endif - - for (i = 0; i < fdchangecnt; ++i) - { - int fd = fdchanges [i]; - ANFD *anfd = anfds + fd; - ev_io *w; - - unsigned char o_events = anfd->events; - unsigned char o_reify = anfd->reify; - - anfd->reify = 0; - - /*if (expect_true (o_reify & EV_ANFD_REIFY)) probably a deoptimisation */ - { - anfd->events = 0; - - for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next) - anfd->events |= (unsigned char)w->events; - - if (o_events != anfd->events) - o_reify = EV__IOFDSET; /* actually |= */ - } - - if (o_reify & EV__IOFDSET) - backend_modify (EV_A_ fd, o_events, anfd->events); - } - - fdchangecnt = 0; -} - -/* something about the given fd changed */ -inline_size void -fd_change (EV_P_ int fd, int flags) -{ - unsigned char reify = anfds [fd].reify; - anfds [fd].reify |= flags; - - if (expect_true (!reify)) - { - ++fdchangecnt; - array_needsize (int, fdchanges, fdchangemax, fdchangecnt, EMPTY2); - fdchanges [fdchangecnt - 1] = fd; - } -} - -/* the given fd is invalid/unusable, so make sure it doesn't hurt us anymore */ -inline_speed void ecb_cold -fd_kill (EV_P_ int fd) -{ - ev_io *w; - - while ((w = (ev_io *)anfds [fd].head)) - { - ev_io_stop (EV_A_ w); - ev_feed_event (EV_A_ (W)w, EV_ERROR | EV_READ | EV_WRITE); - } -} - -/* check whether the given fd is actually valid, for error recovery */ -inline_size int ecb_cold -fd_valid (int fd) -{ -#ifdef _WIN32 - return EV_FD_TO_WIN32_HANDLE (fd) != -1; -#else - return fcntl (fd, F_GETFD) != -1; -#endif -} - -/* called on EBADF to verify fds */ -static void noinline ecb_cold -fd_ebadf (EV_P) -{ - int fd; - - for (fd = 0; fd < anfdmax; ++fd) - if (anfds [fd].events) - if (!fd_valid (fd) && errno == EBADF) - fd_kill (EV_A_ fd); -} - -/* called on ENOMEM in select/poll to kill some fds and retry */ -static void noinline ecb_cold -fd_enomem (EV_P) -{ - int fd; - - for (fd = anfdmax; fd--; ) - if (anfds [fd].events) - { - fd_kill (EV_A_ fd); - break; - } -} - -/* usually called after fork if backend needs to re-arm all fds from scratch */ -static void noinline -fd_rearm_all (EV_P) -{ - int fd; - - for (fd = 0; fd < anfdmax; ++fd) - if (anfds [fd].events) - { - anfds [fd].events = 0; - anfds [fd].emask = 0; - fd_change (EV_A_ fd, EV__IOFDSET | EV_ANFD_REIFY); - } -} - -/* used to prepare libev internal fd's */ -/* this is not fork-safe */ -inline_speed void -fd_intern (int fd) -{ -#ifdef _WIN32 - unsigned long arg = 1; - ioctlsocket (EV_FD_TO_WIN32_HANDLE (fd), FIONBIO, &arg); -#else - fcntl (fd, F_SETFD, FD_CLOEXEC); - fcntl (fd, F_SETFL, O_NONBLOCK); -#endif -} - -/*****************************************************************************/ - -/* - * the heap functions want a real array index. array index 0 is guaranteed to not - * be in-use at any time. the first heap entry is at array [HEAP0]. DHEAP gives - * the branching factor of the d-tree. - */ - -/* - * at the moment we allow libev the luxury of two heaps, - * a small-code-size 2-heap one and a ~1.5kb larger 4-heap - * which is more cache-efficient. - * the difference is about 5% with 50000+ watchers. - */ -#if EV_USE_4HEAP - -#define DHEAP 4 -#define HEAP0 (DHEAP - 1) /* index of first element in heap */ -#define HPARENT(k) ((((k) - HEAP0 - 1) / DHEAP) + HEAP0) -#define UPHEAP_DONE(p,k) ((p) == (k)) - -/* away from the root */ -inline_speed void -downheap (ANHE *heap, int N, int k) -{ - ANHE he = heap [k]; - ANHE *E = heap + N + HEAP0; - - for (;;) - { - ev_tstamp minat; - ANHE *minpos; - ANHE *pos = heap + DHEAP * (k - HEAP0) + HEAP0 + 1; - - /* find minimum child */ - if (expect_true (pos + DHEAP - 1 < E)) - { - /* fast path */ (minpos = pos + 0), (minat = ANHE_at (*minpos)); - if ( ANHE_at (pos [1]) < minat) (minpos = pos + 1), (minat = ANHE_at (*minpos)); - if ( ANHE_at (pos [2]) < minat) (minpos = pos + 2), (minat = ANHE_at (*minpos)); - if ( ANHE_at (pos [3]) < minat) (minpos = pos + 3), (minat = ANHE_at (*minpos)); - } - else if (pos < E) - { - /* slow path */ (minpos = pos + 0), (minat = ANHE_at (*minpos)); - if (pos + 1 < E && ANHE_at (pos [1]) < minat) (minpos = pos + 1), (minat = ANHE_at (*minpos)); - if (pos + 2 < E && ANHE_at (pos [2]) < minat) (minpos = pos + 2), (minat = ANHE_at (*minpos)); - if (pos + 3 < E && ANHE_at (pos [3]) < minat) (minpos = pos + 3), (minat = ANHE_at (*minpos)); - } - else - break; - - if (ANHE_at (he) <= minat) - break; - - heap [k] = *minpos; - ev_active (ANHE_w (*minpos)) = k; - - k = minpos - heap; - } - - heap [k] = he; - ev_active (ANHE_w (he)) = k; -} - -#else /* 4HEAP */ - -#define HEAP0 1 -#define HPARENT(k) ((k) >> 1) -#define UPHEAP_DONE(p,k) (!(p)) - -/* away from the root */ -inline_speed void -downheap (ANHE *heap, int N, int k) -{ - ANHE he = heap [k]; - - for (;;) - { - int c = k << 1; - - if (c >= N + HEAP0) - break; - - c += c + 1 < N + HEAP0 && ANHE_at (heap [c]) > ANHE_at (heap [c + 1]) - ? 1 : 0; - - if (ANHE_at (he) <= ANHE_at (heap [c])) - break; - - heap [k] = heap [c]; - ev_active (ANHE_w (heap [k])) = k; - - k = c; - } - - heap [k] = he; - ev_active (ANHE_w (he)) = k; -} -#endif - -/* towards the root */ -inline_speed void -upheap (ANHE *heap, int k) -{ - ANHE he = heap [k]; - - for (;;) - { - int p = HPARENT (k); - - if (UPHEAP_DONE (p, k) || ANHE_at (heap [p]) <= ANHE_at (he)) - break; - - heap [k] = heap [p]; - ev_active (ANHE_w (heap [k])) = k; - k = p; - } - - heap [k] = he; - ev_active (ANHE_w (he)) = k; -} - -/* move an element suitably so it is in a correct place */ -inline_size void -adjustheap (ANHE *heap, int N, int k) -{ - if (k > HEAP0 && ANHE_at (heap [k]) <= ANHE_at (heap [HPARENT (k)])) - upheap (heap, k); - else - downheap (heap, N, k); -} - -/* rebuild the heap: this function is used only once and executed rarely */ -inline_size void -reheap (ANHE *heap, int N) -{ - int i; - - /* we don't use floyds algorithm, upheap is simpler and is more cache-efficient */ - /* also, this is easy to implement and correct for both 2-heaps and 4-heaps */ - for (i = 0; i < N; ++i) - upheap (heap, i + HEAP0); -} - -/*****************************************************************************/ - -/* associate signal watchers to a signal signal */ -typedef struct -{ - EV_ATOMIC_T pending; -#if EV_MULTIPLICITY - EV_P; -#endif - WL head; -} ANSIG; - -static ANSIG signals [EV_NSIG - 1]; - -/*****************************************************************************/ - -#if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE - -static void noinline ecb_cold -evpipe_init (EV_P) -{ - if (!ev_is_active (&pipe_w)) - { - int fds [2]; - -# if EV_USE_EVENTFD - fds [0] = -1; - fds [1] = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC); - if (fds [1] < 0 && errno == EINVAL) - fds [1] = eventfd (0, 0); - - if (fds [1] < 0) -# endif - { - while (pipe (fds)) - ev_syserr ("(libev) error creating signal/async pipe"); - - fd_intern (fds [0]); - } - - fd_intern (fds [1]); - - evpipe [0] = fds [0]; - - if (evpipe [1] < 0) - evpipe [1] = fds [1]; /* first call, set write fd */ - else - { - /* on subsequent calls, do not change evpipe [1] */ - /* so that evpipe_write can always rely on its value. */ - /* this branch does not do anything sensible on windows, */ - /* so must not be executed on windows */ - - dup2 (fds [1], evpipe [1]); - close (fds [1]); - } - - ev_io_set (&pipe_w, evpipe [0] < 0 ? evpipe [1] : evpipe [0], EV_READ); - ev_io_start (EV_A_ &pipe_w); - ev_unref (EV_A); /* watcher should not keep loop alive */ - } -} - -inline_speed void -evpipe_write (EV_P_ EV_ATOMIC_T *flag) -{ - ECB_MEMORY_FENCE; /* push out the write before this function was called, acquire flag */ - - if (expect_true (*flag)) - return; - - *flag = 1; - ECB_MEMORY_FENCE_RELEASE; /* make sure flag is visible before the wakeup */ - - pipe_write_skipped = 1; - - ECB_MEMORY_FENCE; /* make sure pipe_write_skipped is visible before we check pipe_write_wanted */ - - if (pipe_write_wanted) - { - int old_errno; - - pipe_write_skipped = 0; - ECB_MEMORY_FENCE_RELEASE; - - old_errno = errno; /* save errno because write will clobber it */ - -#if EV_USE_EVENTFD - if (evpipe [0] < 0) - { - uint64_t counter = 1; - write (evpipe [1], &counter, sizeof (uint64_t)); - } - else -#endif - { -#ifdef _WIN32 - WSABUF buf; - DWORD sent; - buf.buf = &buf; - buf.len = 1; - WSASend (EV_FD_TO_WIN32_HANDLE (evpipe [1]), &buf, 1, &sent, 0, 0, 0); -#else - write (evpipe [1], &(evpipe [1]), 1); -#endif - } - - errno = old_errno; - } -} - -/* called whenever the libev signal pipe */ -/* got some events (signal, async) */ -static void -pipecb (EV_P_ ev_io *iow, int revents) -{ - int i; - - if (revents & EV_READ) - { -#if EV_USE_EVENTFD - if (evpipe [0] < 0) - { - uint64_t counter; - read (evpipe [1], &counter, sizeof (uint64_t)); - } - else -#endif - { - char dummy[4]; -#ifdef _WIN32 - WSABUF buf; - DWORD recvd; - DWORD flags = 0; - buf.buf = dummy; - buf.len = sizeof (dummy); - WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, &flags, 0, 0); -#else - read (evpipe [0], &dummy, sizeof (dummy)); -#endif - } - } - - pipe_write_skipped = 0; - - ECB_MEMORY_FENCE; /* push out skipped, acquire flags */ - -#if EV_SIGNAL_ENABLE - if (sig_pending) - { - sig_pending = 0; - - ECB_MEMORY_FENCE; - - for (i = EV_NSIG - 1; i--; ) - if (expect_false (signals [i].pending)) - ev_feed_signal_event (EV_A_ i + 1); - } -#endif - -#if EV_ASYNC_ENABLE - if (async_pending) - { - async_pending = 0; - - ECB_MEMORY_FENCE; - - for (i = asynccnt; i--; ) - if (asyncs [i]->sent) - { - asyncs [i]->sent = 0; - ECB_MEMORY_FENCE_RELEASE; - ev_feed_event (EV_A_ asyncs [i], EV_ASYNC); - } - } -#endif -} - -/*****************************************************************************/ - -void -ev_feed_signal (int signum) EV_THROW -{ -#if EV_MULTIPLICITY - EV_P; - ECB_MEMORY_FENCE_ACQUIRE; - EV_A = signals [signum - 1].loop; - - if (!EV_A) - return; -#endif - - signals [signum - 1].pending = 1; - evpipe_write (EV_A_ &sig_pending); -} - -static void -ev_sighandler (int signum) -{ -#ifdef _WIN32 - signal (signum, ev_sighandler); -#endif - - ev_feed_signal (signum); -} - -void noinline -ev_feed_signal_event (EV_P_ int signum) EV_THROW -{ - WL w; - - if (expect_false (signum <= 0 || signum >= EV_NSIG)) - return; - - --signum; - -#if EV_MULTIPLICITY - /* it is permissible to try to feed a signal to the wrong loop */ - /* or, likely more useful, feeding a signal nobody is waiting for */ - - if (expect_false (signals [signum].loop != EV_A)) - return; -#endif - - signals [signum].pending = 0; - ECB_MEMORY_FENCE_RELEASE; - - for (w = signals [signum].head; w; w = w->next) - ev_feed_event (EV_A_ (W)w, EV_SIGNAL); -} - -#if EV_USE_SIGNALFD -static void -sigfdcb (EV_P_ ev_io *iow, int revents) -{ - struct signalfd_siginfo si[2], *sip; /* these structs are big */ - - for (;;) - { - ssize_t res = read (sigfd, si, sizeof (si)); - - /* not ISO-C, as res might be -1, but works with SuS */ - for (sip = si; (char *)sip < (char *)si + res; ++sip) - ev_feed_signal_event (EV_A_ sip->ssi_signo); - - if (res < (ssize_t)sizeof (si)) - break; - } -} -#endif - -#endif - -/*****************************************************************************/ - -#if EV_CHILD_ENABLE -static WL childs [EV_PID_HASHSIZE]; - -static ev_signal childev; - -#ifndef WIFCONTINUED -# define WIFCONTINUED(status) 0 -#endif - -/* handle a single child status event */ -inline_speed void -child_reap (EV_P_ int chain, int pid, int status) -{ - ev_child *w; - int traced = WIFSTOPPED (status) || WIFCONTINUED (status); - - for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next) - { - if ((w->pid == pid || !w->pid) - && (!traced || (w->flags & 1))) - { - ev_set_priority (w, EV_MAXPRI); /* need to do it *now*, this *must* be the same prio as the signal watcher itself */ - w->rpid = pid; - w->rstatus = status; - ev_feed_event (EV_A_ (W)w, EV_CHILD); - } - } -} - -#ifndef WCONTINUED -# define WCONTINUED 0 -#endif - -/* called on sigchld etc., calls waitpid */ -static void -childcb (EV_P_ ev_signal *sw, int revents) -{ - int pid, status; - - /* some systems define WCONTINUED but then fail to support it (linux 2.4) */ - if (0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED))) - if (!WCONTINUED - || errno != EINVAL - || 0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED))) - return; - - /* make sure we are called again until all children have been reaped */ - /* we need to do it this way so that the callback gets called before we continue */ - ev_feed_event (EV_A_ (W)sw, EV_SIGNAL); - - child_reap (EV_A_ pid, pid, status); - if ((EV_PID_HASHSIZE) > 1) - child_reap (EV_A_ 0, pid, status); /* this might trigger a watcher twice, but feed_event catches that */ -} - -#endif - -/*****************************************************************************/ - -#if EV_USE_IOCP -# include "ev_iocp.c" -#endif -#if EV_USE_PORT -# include "ev_port.c" -#endif -#if EV_USE_KQUEUE -# include "ev_kqueue.c" -#endif -#if EV_USE_EPOLL -# include "ev_epoll.c" -#endif -#if EV_USE_POLL -# include "ev_poll.c" -#endif -#if EV_USE_SELECT -# include "ev_select.c" -#endif - -int ecb_cold -ev_version_major (void) EV_THROW -{ - return EV_VERSION_MAJOR; -} - -int ecb_cold -ev_version_minor (void) EV_THROW -{ - return EV_VERSION_MINOR; -} - -/* return true if we are running with elevated privileges and should ignore env variables */ -int inline_size ecb_cold -enable_secure (void) -{ -#ifdef _WIN32 - return 0; -#else - return getuid () != geteuid () - || getgid () != getegid (); -#endif -} - -unsigned int ecb_cold -ev_supported_backends (void) EV_THROW -{ - unsigned int flags = 0; - - if (EV_USE_PORT ) flags |= EVBACKEND_PORT; - if (EV_USE_KQUEUE) flags |= EVBACKEND_KQUEUE; - if (EV_USE_EPOLL ) flags |= EVBACKEND_EPOLL; - if (EV_USE_POLL ) flags |= EVBACKEND_POLL; - if (EV_USE_SELECT) flags |= EVBACKEND_SELECT; - - return flags; -} - -unsigned int ecb_cold -ev_recommended_backends (void) EV_THROW -{ - unsigned int flags = ev_supported_backends (); - -#ifndef __NetBSD__ - /* kqueue is borked on everything but netbsd apparently */ - /* it usually doesn't work correctly on anything but sockets and pipes */ - flags &= ~EVBACKEND_KQUEUE; -#endif -#ifdef __APPLE__ - /* only select works correctly on that "unix-certified" platform */ - flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */ - flags &= ~EVBACKEND_POLL; /* poll is based on kqueue from 10.5 onwards */ -#endif -#ifdef __FreeBSD__ - flags &= ~EVBACKEND_POLL; /* poll return value is unusable (http://forums.freebsd.org/archive/index.php/t-10270.html) */ -#endif - - return flags; -} - -unsigned int ecb_cold -ev_embeddable_backends (void) EV_THROW -{ - int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT; - - /* epoll embeddability broken on all linux versions up to at least 2.6.23 */ - if (ev_linux_version () < 0x020620) /* disable it on linux < 2.6.32 */ - flags &= ~EVBACKEND_EPOLL; - - return flags; -} - -unsigned int -ev_backend (EV_P) EV_THROW -{ - return backend; -} - -#if EV_FEATURE_API -unsigned int -ev_iteration (EV_P) EV_THROW -{ - return loop_count; -} - -unsigned int -ev_depth (EV_P) EV_THROW -{ - return loop_depth; -} - -void -ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW -{ - io_blocktime = interval; -} - -void -ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW -{ - timeout_blocktime = interval; -} - -void -ev_set_userdata (EV_P_ void *data) EV_THROW -{ - userdata = data; -} - -void * -ev_userdata (EV_P) EV_THROW -{ - return userdata; -} - -void -ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW -{ - invoke_cb = invoke_pending_cb; -} - -void -ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW -{ - release_cb = release; - acquire_cb = acquire; -} -#endif - -/* initialise a loop structure, must be zero-initialised */ -static void noinline ecb_cold -loop_init (EV_P_ unsigned int flags) EV_THROW -{ - if (!backend) - { - origflags = flags; - -#if EV_USE_REALTIME - if (!have_realtime) - { - struct timespec ts; - - if (!clock_gettime (CLOCK_REALTIME, &ts)) - have_realtime = 1; - } -#endif - -#if EV_USE_MONOTONIC - if (!have_monotonic) - { - struct timespec ts; - - if (!clock_gettime (CLOCK_MONOTONIC, &ts)) - have_monotonic = 1; - } -#endif - - /* pid check not overridable via env */ -#ifndef _WIN32 - if (flags & EVFLAG_FORKCHECK) - curpid = getpid (); -#endif - - if (!(flags & EVFLAG_NOENV) - && !enable_secure () - && getenv ("LIBEV_FLAGS")) - flags = atoi (getenv ("LIBEV_FLAGS")); - - ev_rt_now = ev_time (); - mn_now = get_clock (); - now_floor = mn_now; - rtmn_diff = ev_rt_now - mn_now; -#if EV_FEATURE_API - invoke_cb = ev_invoke_pending; -#endif - - io_blocktime = 0.; - timeout_blocktime = 0.; - backend = 0; - backend_fd = -1; - sig_pending = 0; -#if EV_ASYNC_ENABLE - async_pending = 0; -#endif - pipe_write_skipped = 0; - pipe_write_wanted = 0; - evpipe [0] = -1; - evpipe [1] = -1; -#if EV_USE_INOTIFY - fs_fd = flags & EVFLAG_NOINOTIFY ? -1 : -2; -#endif -#if EV_USE_SIGNALFD - sigfd = flags & EVFLAG_SIGNALFD ? -2 : -1; -#endif - - if (!(flags & EVBACKEND_MASK)) - flags |= ev_recommended_backends (); - -#if EV_USE_IOCP - if (!backend && (flags & EVBACKEND_IOCP )) backend = iocp_init (EV_A_ flags); -#endif -#if EV_USE_PORT - if (!backend && (flags & EVBACKEND_PORT )) backend = port_init (EV_A_ flags); -#endif -#if EV_USE_KQUEUE - if (!backend && (flags & EVBACKEND_KQUEUE)) backend = kqueue_init (EV_A_ flags); -#endif -#if EV_USE_EPOLL - if (!backend && (flags & EVBACKEND_EPOLL )) backend = epoll_init (EV_A_ flags); -#endif -#if EV_USE_POLL - if (!backend && (flags & EVBACKEND_POLL )) backend = poll_init (EV_A_ flags); -#endif -#if EV_USE_SELECT - if (!backend && (flags & EVBACKEND_SELECT)) backend = select_init (EV_A_ flags); -#endif - - ev_prepare_init (&pending_w, pendingcb); - -#if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE - ev_init (&pipe_w, pipecb); - ev_set_priority (&pipe_w, EV_MAXPRI); -#endif - } -} - -/* free up a loop structure */ -void ecb_cold -ev_loop_destroy (EV_P) -{ - int i; - -#if EV_MULTIPLICITY - /* mimic free (0) */ - if (!EV_A) - return; -#endif - -#if EV_CLEANUP_ENABLE - /* queue cleanup watchers (and execute them) */ - if (expect_false (cleanupcnt)) - { - queue_events (EV_A_ (W *)cleanups, cleanupcnt, EV_CLEANUP); - EV_INVOKE_PENDING; - } -#endif - -#if EV_CHILD_ENABLE - if (ev_is_default_loop (EV_A) && ev_is_active (&childev)) - { - ev_ref (EV_A); /* child watcher */ - ev_signal_stop (EV_A_ &childev); - } -#endif - - if (ev_is_active (&pipe_w)) - { - /*ev_ref (EV_A);*/ - /*ev_io_stop (EV_A_ &pipe_w);*/ - - if (evpipe [0] >= 0) EV_WIN32_CLOSE_FD (evpipe [0]); - if (evpipe [1] >= 0) EV_WIN32_CLOSE_FD (evpipe [1]); - } - -#if EV_USE_SIGNALFD - if (ev_is_active (&sigfd_w)) - close (sigfd); -#endif - -#if EV_USE_INOTIFY - if (fs_fd >= 0) - close (fs_fd); -#endif - - if (backend_fd >= 0) - close (backend_fd); - -#if EV_USE_IOCP - if (backend == EVBACKEND_IOCP ) iocp_destroy (EV_A); -#endif -#if EV_USE_PORT - if (backend == EVBACKEND_PORT ) port_destroy (EV_A); -#endif -#if EV_USE_KQUEUE - if (backend == EVBACKEND_KQUEUE) kqueue_destroy (EV_A); -#endif -#if EV_USE_EPOLL - if (backend == EVBACKEND_EPOLL ) epoll_destroy (EV_A); -#endif -#if EV_USE_POLL - if (backend == EVBACKEND_POLL ) poll_destroy (EV_A); -#endif -#if EV_USE_SELECT - if (backend == EVBACKEND_SELECT) select_destroy (EV_A); -#endif - - for (i = NUMPRI; i--; ) - { - array_free (pending, [i]); -#if EV_IDLE_ENABLE - array_free (idle, [i]); -#endif - } - - ev_free (anfds); anfds = 0; anfdmax = 0; - - /* have to use the microsoft-never-gets-it-right macro */ - array_free (rfeed, EMPTY); - array_free (fdchange, EMPTY); - array_free (timer, EMPTY); -#if EV_PERIODIC_ENABLE - array_free (periodic, EMPTY); -#endif -#if EV_FORK_ENABLE - array_free (fork, EMPTY); -#endif -#if EV_CLEANUP_ENABLE - array_free (cleanup, EMPTY); -#endif - array_free (prepare, EMPTY); - array_free (check, EMPTY); -#if EV_ASYNC_ENABLE - array_free (async, EMPTY); -#endif - - backend = 0; - -#if EV_MULTIPLICITY - if (ev_is_default_loop (EV_A)) -#endif - ev_default_loop_ptr = 0; -#if EV_MULTIPLICITY - else - ev_free (EV_A); -#endif -} - -#if EV_USE_INOTIFY -inline_size void infy_fork (EV_P); -#endif - -inline_size void -loop_fork (EV_P) -{ -#if EV_USE_PORT - if (backend == EVBACKEND_PORT ) port_fork (EV_A); -#endif -#if EV_USE_KQUEUE - if (backend == EVBACKEND_KQUEUE) kqueue_fork (EV_A); -#endif -#if EV_USE_EPOLL - if (backend == EVBACKEND_EPOLL ) epoll_fork (EV_A); -#endif -#if EV_USE_INOTIFY - infy_fork (EV_A); -#endif - -#if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE - if (ev_is_active (&pipe_w)) - { - /* pipe_write_wanted must be false now, so modifying fd vars should be safe */ - - ev_ref (EV_A); - ev_io_stop (EV_A_ &pipe_w); - - if (evpipe [0] >= 0) - EV_WIN32_CLOSE_FD (evpipe [0]); - - evpipe_init (EV_A); - /* iterate over everything, in case we missed something before */ - ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM); - } -#endif - - postfork = 0; -} - -#if EV_MULTIPLICITY - -struct ev_loop * ecb_cold -ev_loop_new (unsigned int flags) EV_THROW -{ - EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop)); - - memset (EV_A, 0, sizeof (struct ev_loop)); - loop_init (EV_A_ flags); - - if (ev_backend (EV_A)) - return EV_A; - - ev_free (EV_A); - return 0; -} - -#endif /* multiplicity */ - -#if EV_VERIFY -static void noinline ecb_cold -verify_watcher (EV_P_ W w) -{ - assert (("libev: watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI)); - - if (w->pending) - assert (("libev: pending watcher not on pending queue", pendings [ABSPRI (w)][w->pending - 1].w == w)); -} - -static void noinline ecb_cold -verify_heap (EV_P_ ANHE *heap, int N) -{ - int i; - - for (i = HEAP0; i < N + HEAP0; ++i) - { - assert (("libev: active index mismatch in heap", ev_active (ANHE_w (heap [i])) == i)); - assert (("libev: heap condition violated", i == HEAP0 || ANHE_at (heap [HPARENT (i)]) <= ANHE_at (heap [i]))); - assert (("libev: heap at cache mismatch", ANHE_at (heap [i]) == ev_at (ANHE_w (heap [i])))); - - verify_watcher (EV_A_ (W)ANHE_w (heap [i])); - } -} - -static void noinline ecb_cold -array_verify (EV_P_ W *ws, int cnt) -{ - while (cnt--) - { - assert (("libev: active index mismatch", ev_active (ws [cnt]) == cnt + 1)); - verify_watcher (EV_A_ ws [cnt]); - } -} -#endif - -#if EV_FEATURE_API -void ecb_cold -ev_verify (EV_P) EV_THROW -{ -#if EV_VERIFY - int i; - WL w, w2; - - assert (activecnt >= -1); - - assert (fdchangemax >= fdchangecnt); - for (i = 0; i < fdchangecnt; ++i) - assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0)); - - assert (anfdmax >= 0); - for (i = 0; i < anfdmax; ++i) - { - int j = 0; - - for (w = w2 = anfds [i].head; w; w = w->next) - { - verify_watcher (EV_A_ (W)w); - - if (j++ & 1) - { - assert (("libev: io watcher list contains a loop", w != w2)); - w2 = w2->next; - } - - assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1)); - assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)); - } - } - - assert (timermax >= timercnt); - verify_heap (EV_A_ timers, timercnt); - -#if EV_PERIODIC_ENABLE - assert (periodicmax >= periodiccnt); - verify_heap (EV_A_ periodics, periodiccnt); -#endif - - for (i = NUMPRI; i--; ) - { - assert (pendingmax [i] >= pendingcnt [i]); -#if EV_IDLE_ENABLE - assert (idleall >= 0); - assert (idlemax [i] >= idlecnt [i]); - array_verify (EV_A_ (W *)idles [i], idlecnt [i]); -#endif - } - -#if EV_FORK_ENABLE - assert (forkmax >= forkcnt); - array_verify (EV_A_ (W *)forks, forkcnt); -#endif - -#if EV_CLEANUP_ENABLE - assert (cleanupmax >= cleanupcnt); - array_verify (EV_A_ (W *)cleanups, cleanupcnt); -#endif - -#if EV_ASYNC_ENABLE - assert (asyncmax >= asynccnt); - array_verify (EV_A_ (W *)asyncs, asynccnt); -#endif - -#if EV_PREPARE_ENABLE - assert (preparemax >= preparecnt); - array_verify (EV_A_ (W *)prepares, preparecnt); -#endif - -#if EV_CHECK_ENABLE - assert (checkmax >= checkcnt); - array_verify (EV_A_ (W *)checks, checkcnt); -#endif - -# if 0 -#if EV_CHILD_ENABLE - for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next) - for (signum = EV_NSIG; signum--; ) if (signals [signum].pending) -#endif -# endif -#endif -} -#endif - -#if EV_MULTIPLICITY -struct ev_loop * ecb_cold -#else -int -#endif -ev_default_loop (unsigned int flags) EV_THROW -{ - if (!ev_default_loop_ptr) - { -#if EV_MULTIPLICITY - EV_P = ev_default_loop_ptr = &default_loop_struct; -#else - ev_default_loop_ptr = 1; -#endif - - loop_init (EV_A_ flags); - - if (ev_backend (EV_A)) - { -#if EV_CHILD_ENABLE - ev_signal_init (&childev, childcb, SIGCHLD); - ev_set_priority (&childev, EV_MAXPRI); - ev_signal_start (EV_A_ &childev); - ev_unref (EV_A); /* child watcher should not keep loop alive */ -#endif - } - else - ev_default_loop_ptr = 0; - } - - return ev_default_loop_ptr; -} - -void -ev_loop_fork (EV_P) EV_THROW -{ - postfork = 1; -} - -/*****************************************************************************/ - -void -ev_invoke (EV_P_ void *w, int revents) -{ - EV_CB_INVOKE ((W)w, revents); -} - -unsigned int -ev_pending_count (EV_P) EV_THROW -{ - int pri; - unsigned int count = 0; - - for (pri = NUMPRI; pri--; ) - count += pendingcnt [pri]; - - return count; -} - -void noinline -ev_invoke_pending (EV_P) -{ - pendingpri = NUMPRI; - - while (pendingpri) /* pendingpri possibly gets modified in the inner loop */ - { - --pendingpri; - - while (pendingcnt [pendingpri]) - { - ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri]; - - p->w->pending = 0; - EV_CB_INVOKE (p->w, p->events); - EV_FREQUENT_CHECK; - } - } -} - -#if EV_IDLE_ENABLE -/* make idle watchers pending. this handles the "call-idle */ -/* only when higher priorities are idle" logic */ -inline_size void -idle_reify (EV_P) -{ - if (expect_false (idleall)) - { - int pri; - - for (pri = NUMPRI; pri--; ) - { - if (pendingcnt [pri]) - break; - - if (idlecnt [pri]) - { - queue_events (EV_A_ (W *)idles [pri], idlecnt [pri], EV_IDLE); - break; - } - } - } -} -#endif - -/* make timers pending */ -inline_size void -timers_reify (EV_P) -{ - EV_FREQUENT_CHECK; - - if (timercnt && ANHE_at (timers [HEAP0]) < mn_now) - { - do - { - ev_timer *w = (ev_timer *)ANHE_w (timers [HEAP0]); - - /*assert (("libev: inactive timer on timer heap detected", ev_is_active (w)));*/ - - /* first reschedule or stop timer */ - if (w->repeat) - { - ev_at (w) += w->repeat; - if (ev_at (w) < mn_now) - ev_at (w) = mn_now; - - assert (("libev: negative ev_timer repeat value found while processing timers", w->repeat > 0.)); - - ANHE_at_cache (timers [HEAP0]); - downheap (timers, timercnt, HEAP0); - } - else - ev_timer_stop (EV_A_ w); /* nonrepeating: stop timer */ - - EV_FREQUENT_CHECK; - feed_reverse (EV_A_ (W)w); - } - while (timercnt && ANHE_at (timers [HEAP0]) < mn_now); - - feed_reverse_done (EV_A_ EV_TIMER); - } -} - -#if EV_PERIODIC_ENABLE - -static void noinline -periodic_recalc (EV_P_ ev_periodic *w) -{ - ev_tstamp interval = w->interval > MIN_INTERVAL ? w->interval : MIN_INTERVAL; - ev_tstamp at = w->offset + interval * ev_floor ((ev_rt_now - w->offset) / interval); - - /* the above almost always errs on the low side */ - while (at <= ev_rt_now) - { - ev_tstamp nat = at + w->interval; - - /* when resolution fails us, we use ev_rt_now */ - if (expect_false (nat == at)) - { - at = ev_rt_now; - break; - } - - at = nat; - } - - ev_at (w) = at; -} - -/* make periodics pending */ -inline_size void -periodics_reify (EV_P) -{ - EV_FREQUENT_CHECK; - - while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now) - { - do - { - ev_periodic *w = (ev_periodic *)ANHE_w (periodics [HEAP0]); - - /*assert (("libev: inactive timer on periodic heap detected", ev_is_active (w)));*/ - - /* first reschedule or stop timer */ - if (w->reschedule_cb) - { - ev_at (w) = w->reschedule_cb (w, ev_rt_now); - - assert (("libev: ev_periodic reschedule callback returned time in the past", ev_at (w) >= ev_rt_now)); - - ANHE_at_cache (periodics [HEAP0]); - downheap (periodics, periodiccnt, HEAP0); - } - else if (w->interval) - { - periodic_recalc (EV_A_ w); - ANHE_at_cache (periodics [HEAP0]); - downheap (periodics, periodiccnt, HEAP0); - } - else - ev_periodic_stop (EV_A_ w); /* nonrepeating: stop timer */ - - EV_FREQUENT_CHECK; - feed_reverse (EV_A_ (W)w); - } - while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now); - - feed_reverse_done (EV_A_ EV_PERIODIC); - } -} - -/* simply recalculate all periodics */ -/* TODO: maybe ensure that at least one event happens when jumping forward? */ -static void noinline ecb_cold -periodics_reschedule (EV_P) -{ - int i; - - /* adjust periodics after time jump */ - for (i = HEAP0; i < periodiccnt + HEAP0; ++i) - { - ev_periodic *w = (ev_periodic *)ANHE_w (periodics [i]); - - if (w->reschedule_cb) - ev_at (w) = w->reschedule_cb (w, ev_rt_now); - else if (w->interval) - periodic_recalc (EV_A_ w); - - ANHE_at_cache (periodics [i]); - } - - reheap (periodics, periodiccnt); -} -#endif - -/* adjust all timers by a given offset */ -static void noinline ecb_cold -timers_reschedule (EV_P_ ev_tstamp adjust) -{ - int i; - - for (i = 0; i < timercnt; ++i) - { - ANHE *he = timers + i + HEAP0; - ANHE_w (*he)->at += adjust; - ANHE_at_cache (*he); - } -} - -/* fetch new monotonic and realtime times from the kernel */ -/* also detect if there was a timejump, and act accordingly */ -inline_speed void -time_update (EV_P_ ev_tstamp max_block) -{ -#if EV_USE_MONOTONIC - if (expect_true (have_monotonic)) - { - int i; - ev_tstamp odiff = rtmn_diff; - - mn_now = get_clock (); - - /* only fetch the realtime clock every 0.5*MIN_TIMEJUMP seconds */ - /* interpolate in the meantime */ - if (expect_true (mn_now - now_floor < MIN_TIMEJUMP * .5)) - { - ev_rt_now = rtmn_diff + mn_now; - return; - } - - now_floor = mn_now; - ev_rt_now = ev_time (); - - /* loop a few times, before making important decisions. - * on the choice of "4": one iteration isn't enough, - * in case we get preempted during the calls to - * ev_time and get_clock. a second call is almost guaranteed - * to succeed in that case, though. and looping a few more times - * doesn't hurt either as we only do this on time-jumps or - * in the unlikely event of having been preempted here. - */ - for (i = 4; --i; ) - { - ev_tstamp diff; - rtmn_diff = ev_rt_now - mn_now; - - diff = odiff - rtmn_diff; - - if (expect_true ((diff < 0. ? -diff : diff) < MIN_TIMEJUMP)) - return; /* all is well */ - - ev_rt_now = ev_time (); - mn_now = get_clock (); - now_floor = mn_now; - } - - /* no timer adjustment, as the monotonic clock doesn't jump */ - /* timers_reschedule (EV_A_ rtmn_diff - odiff) */ -# if EV_PERIODIC_ENABLE - periodics_reschedule (EV_A); -# endif - } - else -#endif - { - ev_rt_now = ev_time (); - - if (expect_false (mn_now > ev_rt_now || ev_rt_now > mn_now + max_block + MIN_TIMEJUMP)) - { - /* adjust timers. this is easy, as the offset is the same for all of them */ - timers_reschedule (EV_A_ ev_rt_now - mn_now); -#if EV_PERIODIC_ENABLE - periodics_reschedule (EV_A); -#endif - } - - mn_now = ev_rt_now; - } -} - -int -ev_run (EV_P_ int flags) -{ -#if EV_FEATURE_API - ++loop_depth; -#endif - - assert (("libev: ev_loop recursion during release detected", loop_done != EVBREAK_RECURSE)); - - loop_done = EVBREAK_CANCEL; - - EV_INVOKE_PENDING; /* in case we recurse, ensure ordering stays nice and clean */ - - do - { -#if EV_VERIFY >= 2 - ev_verify (EV_A); -#endif - -#ifndef _WIN32 - if (expect_false (curpid)) /* penalise the forking check even more */ - if (expect_false (getpid () != curpid)) - { - curpid = getpid (); - postfork = 1; - } -#endif - -#if EV_FORK_ENABLE - /* we might have forked, so queue fork handlers */ - if (expect_false (postfork)) - if (forkcnt) - { - queue_events (EV_A_ (W *)forks, forkcnt, EV_FORK); - EV_INVOKE_PENDING; - } -#endif - -#if EV_PREPARE_ENABLE - /* queue prepare watchers (and execute them) */ - if (expect_false (preparecnt)) - { - queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE); - EV_INVOKE_PENDING; - } -#endif - - if (expect_false (loop_done)) - break; - - /* we might have forked, so reify kernel state if necessary */ - if (expect_false (postfork)) - loop_fork (EV_A); - - /* update fd-related kernel structures */ - fd_reify (EV_A); - - /* calculate blocking time */ - { - ev_tstamp waittime = 0.; - ev_tstamp sleeptime = 0.; - - /* remember old timestamp for io_blocktime calculation */ - ev_tstamp prev_mn_now = mn_now; - - /* update time to cancel out callback processing overhead */ - time_update (EV_A_ 1e100); - - /* from now on, we want a pipe-wake-up */ - pipe_write_wanted = 1; - - ECB_MEMORY_FENCE; /* make sure pipe_write_wanted is visible before we check for potential skips */ - - if (expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped))) - { - waittime = MAX_BLOCKTIME; - - if (timercnt) - { - ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now; - if (waittime > to) waittime = to; - } - -#if EV_PERIODIC_ENABLE - if (periodiccnt) - { - ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now; - if (waittime > to) waittime = to; - } -#endif - - /* don't let timeouts decrease the waittime below timeout_blocktime */ - if (expect_false (waittime < timeout_blocktime)) - waittime = timeout_blocktime; - - /* at this point, we NEED to wait, so we have to ensure */ - /* to pass a minimum nonzero value to the backend */ - if (expect_false (waittime < backend_mintime)) - waittime = backend_mintime; - - /* extra check because io_blocktime is commonly 0 */ - if (expect_false (io_blocktime)) - { - sleeptime = io_blocktime - (mn_now - prev_mn_now); - - if (sleeptime > waittime - backend_mintime) - sleeptime = waittime - backend_mintime; - - if (expect_true (sleeptime > 0.)) - { - ev_sleep (sleeptime); - waittime -= sleeptime; - } - } - } - -#if EV_FEATURE_API - ++loop_count; -#endif - assert ((loop_done = EVBREAK_RECURSE, 1)); /* assert for side effect */ - backend_poll (EV_A_ waittime); - assert ((loop_done = EVBREAK_CANCEL, 1)); /* assert for side effect */ - - pipe_write_wanted = 0; /* just an optimisation, no fence needed */ - - ECB_MEMORY_FENCE_ACQUIRE; - if (pipe_write_skipped) - { - assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w))); - ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM); - } - - - /* update ev_rt_now, do magic */ - time_update (EV_A_ waittime + sleeptime); - } - - /* queue pending timers and reschedule them */ - timers_reify (EV_A); /* relative timers called last */ -#if EV_PERIODIC_ENABLE - periodics_reify (EV_A); /* absolute timers called first */ -#endif - -#if EV_IDLE_ENABLE - /* queue idle watchers unless other events are pending */ - idle_reify (EV_A); -#endif - -#if EV_CHECK_ENABLE - /* queue check watchers, to be executed first */ - if (expect_false (checkcnt)) - queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); -#endif - - EV_INVOKE_PENDING; - } - while (expect_true ( - activecnt - && !loop_done - && !(flags & (EVRUN_ONCE | EVRUN_NOWAIT)) - )); - - if (loop_done == EVBREAK_ONE) - loop_done = EVBREAK_CANCEL; - -#if EV_FEATURE_API - --loop_depth; -#endif - - return activecnt; -} - -void -ev_break (EV_P_ int how) EV_THROW -{ - loop_done = how; -} - -void -ev_ref (EV_P) EV_THROW -{ - ++activecnt; -} - -void -ev_unref (EV_P) EV_THROW -{ - --activecnt; -} - -void -ev_now_update (EV_P) EV_THROW -{ - time_update (EV_A_ 1e100); -} - -void -ev_suspend (EV_P) EV_THROW -{ - ev_now_update (EV_A); -} - -void -ev_resume (EV_P) EV_THROW -{ - ev_tstamp mn_prev = mn_now; - - ev_now_update (EV_A); - timers_reschedule (EV_A_ mn_now - mn_prev); -#if EV_PERIODIC_ENABLE - /* TODO: really do this? */ - periodics_reschedule (EV_A); -#endif -} - -/*****************************************************************************/ -/* singly-linked list management, used when the expected list length is short */ - -inline_size void -wlist_add (WL *head, WL elem) -{ - elem->next = *head; - *head = elem; -} - -inline_size void -wlist_del (WL *head, WL elem) -{ - while (*head) - { - if (expect_true (*head == elem)) - { - *head = elem->next; - break; - } - - head = &(*head)->next; - } -} - -/* internal, faster, version of ev_clear_pending */ -inline_speed void -clear_pending (EV_P_ W w) -{ - if (w->pending) - { - pendings [ABSPRI (w)][w->pending - 1].w = (W)&pending_w; - w->pending = 0; - } -} - -int -ev_clear_pending (EV_P_ void *w) EV_THROW -{ - W w_ = (W)w; - int pending = w_->pending; - - if (expect_true (pending)) - { - ANPENDING *p = pendings [ABSPRI (w_)] + pending - 1; - p->w = (W)&pending_w; - w_->pending = 0; - return p->events; - } - else - return 0; -} - -inline_size void -pri_adjust (EV_P_ W w) -{ - int pri = ev_priority (w); - pri = pri < EV_MINPRI ? EV_MINPRI : pri; - pri = pri > EV_MAXPRI ? EV_MAXPRI : pri; - ev_set_priority (w, pri); -} - -inline_speed void -ev_start (EV_P_ W w, int active) -{ - pri_adjust (EV_A_ w); - w->active = active; - ev_ref (EV_A); -} - -inline_size void -ev_stop (EV_P_ W w) -{ - ev_unref (EV_A); - w->active = 0; -} - -/*****************************************************************************/ - -void noinline -ev_io_start (EV_P_ ev_io *w) EV_THROW -{ - int fd = w->fd; - - if (expect_false (ev_is_active (w))) - return; - - assert (("libev: ev_io_start called with negative fd", fd >= 0)); - assert (("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE)))); - - EV_FREQUENT_CHECK; - - ev_start (EV_A_ (W)w, 1); - array_needsize (ANFD, anfds, anfdmax, fd + 1, array_init_zero); - wlist_add (&anfds[fd].head, (WL)w); - - /* common bug, apparently */ - assert (("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w)); - - fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY); - w->events &= ~EV__IOFDSET; - - EV_FREQUENT_CHECK; -} - -void noinline -ev_io_stop (EV_P_ ev_io *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - assert (("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax)); - - EV_FREQUENT_CHECK; - - wlist_del (&anfds[w->fd].head, (WL)w); - ev_stop (EV_A_ (W)w); - - fd_change (EV_A_ w->fd, EV_ANFD_REIFY); - - EV_FREQUENT_CHECK; -} - -void noinline -ev_timer_start (EV_P_ ev_timer *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - ev_at (w) += mn_now; - - assert (("libev: ev_timer_start called with negative timer repeat value", w->repeat >= 0.)); - - EV_FREQUENT_CHECK; - - ++timercnt; - ev_start (EV_A_ (W)w, timercnt + HEAP0 - 1); - array_needsize (ANHE, timers, timermax, ev_active (w) + 1, EMPTY2); - ANHE_w (timers [ev_active (w)]) = (WT)w; - ANHE_at_cache (timers [ev_active (w)]); - upheap (timers, ev_active (w)); - - EV_FREQUENT_CHECK; - - /*assert (("libev: internal timer heap corruption", timers [ev_active (w)] == (WT)w));*/ -} - -void noinline -ev_timer_stop (EV_P_ ev_timer *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - { - int active = ev_active (w); - - assert (("libev: internal timer heap corruption", ANHE_w (timers [active]) == (WT)w)); - - --timercnt; - - if (expect_true (active < timercnt + HEAP0)) - { - timers [active] = timers [timercnt + HEAP0]; - adjustheap (timers, timercnt, active); - } - } - - ev_at (w) -= mn_now; - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} - -void noinline -ev_timer_again (EV_P_ ev_timer *w) EV_THROW -{ - EV_FREQUENT_CHECK; - - clear_pending (EV_A_ (W)w); - - if (ev_is_active (w)) - { - if (w->repeat) - { - ev_at (w) = mn_now + w->repeat; - ANHE_at_cache (timers [ev_active (w)]); - adjustheap (timers, timercnt, ev_active (w)); - } - else - ev_timer_stop (EV_A_ w); - } - else if (w->repeat) - { - ev_at (w) = w->repeat; - ev_timer_start (EV_A_ w); - } - - EV_FREQUENT_CHECK; -} - -ev_tstamp -ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW -{ - return ev_at (w) - (ev_is_active (w) ? mn_now : 0.); -} - -#if EV_PERIODIC_ENABLE -void noinline -ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - if (w->reschedule_cb) - ev_at (w) = w->reschedule_cb (w, ev_rt_now); - else if (w->interval) - { - assert (("libev: ev_periodic_start called with negative interval value", w->interval >= 0.)); - periodic_recalc (EV_A_ w); - } - else - ev_at (w) = w->offset; - - EV_FREQUENT_CHECK; - - ++periodiccnt; - ev_start (EV_A_ (W)w, periodiccnt + HEAP0 - 1); - array_needsize (ANHE, periodics, periodicmax, ev_active (w) + 1, EMPTY2); - ANHE_w (periodics [ev_active (w)]) = (WT)w; - ANHE_at_cache (periodics [ev_active (w)]); - upheap (periodics, ev_active (w)); - - EV_FREQUENT_CHECK; - - /*assert (("libev: internal periodic heap corruption", ANHE_w (periodics [ev_active (w)]) == (WT)w));*/ -} - -void noinline -ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - { - int active = ev_active (w); - - assert (("libev: internal periodic heap corruption", ANHE_w (periodics [active]) == (WT)w)); - - --periodiccnt; - - if (expect_true (active < periodiccnt + HEAP0)) - { - periodics [active] = periodics [periodiccnt + HEAP0]; - adjustheap (periodics, periodiccnt, active); - } - } - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} - -void noinline -ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW -{ - /* TODO: use adjustheap and recalculation */ - ev_periodic_stop (EV_A_ w); - ev_periodic_start (EV_A_ w); -} -#endif - -#ifndef SA_RESTART -# define SA_RESTART 0 -#endif - -#if EV_SIGNAL_ENABLE - -void noinline -ev_signal_start (EV_P_ ev_signal *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - assert (("libev: ev_signal_start called with illegal signal number", w->signum > 0 && w->signum < EV_NSIG)); - -#if EV_MULTIPLICITY - assert (("libev: a signal must not be attached to two different loops", - !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop)); - - signals [w->signum - 1].loop = EV_A; - ECB_MEMORY_FENCE_RELEASE; -#endif - - EV_FREQUENT_CHECK; - -#if EV_USE_SIGNALFD - if (sigfd == -2) - { - sigfd = signalfd (-1, &sigfd_set, SFD_NONBLOCK | SFD_CLOEXEC); - if (sigfd < 0 && errno == EINVAL) - sigfd = signalfd (-1, &sigfd_set, 0); /* retry without flags */ - - if (sigfd >= 0) - { - fd_intern (sigfd); /* doing it twice will not hurt */ - - sigemptyset (&sigfd_set); - - ev_io_init (&sigfd_w, sigfdcb, sigfd, EV_READ); - ev_set_priority (&sigfd_w, EV_MAXPRI); - ev_io_start (EV_A_ &sigfd_w); - ev_unref (EV_A); /* signalfd watcher should not keep loop alive */ - } - } - - if (sigfd >= 0) - { - /* TODO: check .head */ - sigaddset (&sigfd_set, w->signum); - sigprocmask (SIG_BLOCK, &sigfd_set, 0); - - signalfd (sigfd, &sigfd_set, 0); - } -#endif - - ev_start (EV_A_ (W)w, 1); - wlist_add (&signals [w->signum - 1].head, (WL)w); - - if (!((WL)w)->next) -# if EV_USE_SIGNALFD - if (sigfd < 0) /*TODO*/ -# endif - { -# ifdef _WIN32 - evpipe_init (EV_A); - - signal (w->signum, ev_sighandler); -# else - struct sigaction sa; - - evpipe_init (EV_A); - - sa.sa_handler = ev_sighandler; - sigfillset (&sa.sa_mask); - sa.sa_flags = SA_RESTART; /* if restarting works we save one iteration */ - sigaction (w->signum, &sa, 0); - - if (origflags & EVFLAG_NOSIGMASK) - { - sigemptyset (&sa.sa_mask); - sigaddset (&sa.sa_mask, w->signum); - sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0); - } -#endif - } - - EV_FREQUENT_CHECK; -} - -void noinline -ev_signal_stop (EV_P_ ev_signal *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - wlist_del (&signals [w->signum - 1].head, (WL)w); - ev_stop (EV_A_ (W)w); - - if (!signals [w->signum - 1].head) - { -#if EV_MULTIPLICITY - signals [w->signum - 1].loop = 0; /* unattach from signal */ -#endif -#if EV_USE_SIGNALFD - if (sigfd >= 0) - { - sigset_t ss; - - sigemptyset (&ss); - sigaddset (&ss, w->signum); - sigdelset (&sigfd_set, w->signum); - - signalfd (sigfd, &sigfd_set, 0); - sigprocmask (SIG_UNBLOCK, &ss, 0); - } - else -#endif - signal (w->signum, SIG_DFL); - } - - EV_FREQUENT_CHECK; -} - -#endif - -#if EV_CHILD_ENABLE - -void -ev_child_start (EV_P_ ev_child *w) EV_THROW -{ -#if EV_MULTIPLICITY - assert (("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr)); -#endif - if (expect_false (ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - ev_start (EV_A_ (W)w, 1); - wlist_add (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w); - - EV_FREQUENT_CHECK; -} - -void -ev_child_stop (EV_P_ ev_child *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - wlist_del (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w); - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} - -#endif - -#if EV_STAT_ENABLE - -# ifdef _WIN32 -# undef lstat -# define lstat(a,b) _stati64 (a,b) -# endif - -#define DEF_STAT_INTERVAL 5.0074891 -#define NFS_STAT_INTERVAL 30.1074891 /* for filesystems potentially failing inotify */ -#define MIN_STAT_INTERVAL 0.1074891 - -static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents); - -#if EV_USE_INOTIFY - -/* the * 2 is to allow for alignment padding, which for some reason is >> 8 */ -# define EV_INOTIFY_BUFSIZE (sizeof (struct inotify_event) * 2 + NAME_MAX) - -static void noinline -infy_add (EV_P_ ev_stat *w) -{ - w->wd = inotify_add_watch (fs_fd, w->path, - IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF | IN_MODIFY - | IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO - | IN_DONT_FOLLOW | IN_MASK_ADD); - - if (w->wd >= 0) - { - struct statfs sfs; - - /* now local changes will be tracked by inotify, but remote changes won't */ - /* unless the filesystem is known to be local, we therefore still poll */ - /* also do poll on <2.6.25, but with normal frequency */ - - if (!fs_2625) - w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; - else if (!statfs (w->path, &sfs) - && (sfs.f_type == 0x1373 /* devfs */ - || sfs.f_type == 0x4006 /* fat */ - || sfs.f_type == 0x4d44 /* msdos */ - || sfs.f_type == 0xEF53 /* ext2/3 */ - || sfs.f_type == 0x72b6 /* jffs2 */ - || sfs.f_type == 0x858458f6 /* ramfs */ - || sfs.f_type == 0x5346544e /* ntfs */ - || sfs.f_type == 0x3153464a /* jfs */ - || sfs.f_type == 0x9123683e /* btrfs */ - || sfs.f_type == 0x52654973 /* reiser3 */ - || sfs.f_type == 0x01021994 /* tmpfs */ - || sfs.f_type == 0x58465342 /* xfs */)) - w->timer.repeat = 0.; /* filesystem is local, kernel new enough */ - else - w->timer.repeat = w->interval ? w->interval : NFS_STAT_INTERVAL; /* remote, use reduced frequency */ - } - else - { - /* can't use inotify, continue to stat */ - w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; - - /* if path is not there, monitor some parent directory for speedup hints */ - /* note that exceeding the hardcoded path limit is not a correctness issue, */ - /* but an efficiency issue only */ - if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096) - { - char path [4096]; - strcpy (path, w->path); - - do - { - int mask = IN_MASK_ADD | IN_DELETE_SELF | IN_MOVE_SELF - | (errno == EACCES ? IN_ATTRIB : IN_CREATE | IN_MOVED_TO); - - char *pend = strrchr (path, '/'); - - if (!pend || pend == path) - break; - - *pend = 0; - w->wd = inotify_add_watch (fs_fd, path, mask); - } - while (w->wd < 0 && (errno == ENOENT || errno == EACCES)); - } - } - - if (w->wd >= 0) - wlist_add (&fs_hash [w->wd & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w); - - /* now re-arm timer, if required */ - if (ev_is_active (&w->timer)) ev_ref (EV_A); - ev_timer_again (EV_A_ &w->timer); - if (ev_is_active (&w->timer)) ev_unref (EV_A); -} - -static void noinline -infy_del (EV_P_ ev_stat *w) -{ - int slot; - int wd = w->wd; - - if (wd < 0) - return; - - w->wd = -2; - slot = wd & ((EV_INOTIFY_HASHSIZE) - 1); - wlist_del (&fs_hash [slot].head, (WL)w); - - /* remove this watcher, if others are watching it, they will rearm */ - inotify_rm_watch (fs_fd, wd); -} - -static void noinline -infy_wd (EV_P_ int slot, int wd, struct inotify_event *ev) -{ - if (slot < 0) - /* overflow, need to check for all hash slots */ - for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot) - infy_wd (EV_A_ slot, wd, ev); - else - { - WL w_; - - for (w_ = fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head; w_; ) - { - ev_stat *w = (ev_stat *)w_; - w_ = w_->next; /* lets us remove this watcher and all before it */ - - if (w->wd == wd || wd == -1) - { - if (ev->mask & (IN_IGNORED | IN_UNMOUNT | IN_DELETE_SELF)) - { - wlist_del (&fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w); - w->wd = -1; - infy_add (EV_A_ w); /* re-add, no matter what */ - } - - stat_timer_cb (EV_A_ &w->timer, 0); - } - } - } -} - -static void -infy_cb (EV_P_ ev_io *w, int revents) -{ - char buf [EV_INOTIFY_BUFSIZE]; - int ofs; - int len = read (fs_fd, buf, sizeof (buf)); - - for (ofs = 0; ofs < len; ) - { - struct inotify_event *ev = (struct inotify_event *)(buf + ofs); - infy_wd (EV_A_ ev->wd, ev->wd, ev); - ofs += sizeof (struct inotify_event) + ev->len; - } -} - -inline_size void ecb_cold -ev_check_2625 (EV_P) -{ - /* kernels < 2.6.25 are borked - * http://www.ussg.indiana.edu/hypermail/linux/kernel/0711.3/1208.html - */ - if (ev_linux_version () < 0x020619) - return; - - fs_2625 = 1; -} - -inline_size int -infy_newfd (void) -{ -#if defined IN_CLOEXEC && defined IN_NONBLOCK - int fd = inotify_init1 (IN_CLOEXEC | IN_NONBLOCK); - if (fd >= 0) - return fd; -#endif - return inotify_init (); -} - -inline_size void -infy_init (EV_P) -{ - if (fs_fd != -2) - return; - - fs_fd = -1; - - ev_check_2625 (EV_A); - - fs_fd = infy_newfd (); - - if (fs_fd >= 0) - { - fd_intern (fs_fd); - ev_io_init (&fs_w, infy_cb, fs_fd, EV_READ); - ev_set_priority (&fs_w, EV_MAXPRI); - ev_io_start (EV_A_ &fs_w); - ev_unref (EV_A); - } -} - -inline_size void -infy_fork (EV_P) -{ - int slot; - - if (fs_fd < 0) - return; - - ev_ref (EV_A); - ev_io_stop (EV_A_ &fs_w); - close (fs_fd); - fs_fd = infy_newfd (); - - if (fs_fd >= 0) - { - fd_intern (fs_fd); - ev_io_set (&fs_w, fs_fd, EV_READ); - ev_io_start (EV_A_ &fs_w); - ev_unref (EV_A); - } - - for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot) - { - WL w_ = fs_hash [slot].head; - fs_hash [slot].head = 0; - - while (w_) - { - ev_stat *w = (ev_stat *)w_; - w_ = w_->next; /* lets us add this watcher */ - - w->wd = -1; - - if (fs_fd >= 0) - infy_add (EV_A_ w); /* re-add, no matter what */ - else - { - w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; - if (ev_is_active (&w->timer)) ev_ref (EV_A); - ev_timer_again (EV_A_ &w->timer); - if (ev_is_active (&w->timer)) ev_unref (EV_A); - } - } - } -} - -#endif - -#ifdef _WIN32 -# define EV_LSTAT(p,b) _stati64 (p, b) -#else -# define EV_LSTAT(p,b) lstat (p, b) -#endif - -void -ev_stat_stat (EV_P_ ev_stat *w) EV_THROW -{ - if (lstat (w->path, &w->attr) < 0) - w->attr.st_nlink = 0; - else if (!w->attr.st_nlink) - w->attr.st_nlink = 1; -} - -static void noinline -stat_timer_cb (EV_P_ ev_timer *w_, int revents) -{ - ev_stat *w = (ev_stat *)(((char *)w_) - offsetof (ev_stat, timer)); - - ev_statdata prev = w->attr; - ev_stat_stat (EV_A_ w); - - /* memcmp doesn't work on netbsd, they.... do stuff to their struct stat */ - if ( - prev.st_dev != w->attr.st_dev - || prev.st_ino != w->attr.st_ino - || prev.st_mode != w->attr.st_mode - || prev.st_nlink != w->attr.st_nlink - || prev.st_uid != w->attr.st_uid - || prev.st_gid != w->attr.st_gid - || prev.st_rdev != w->attr.st_rdev - || prev.st_size != w->attr.st_size - || prev.st_atime != w->attr.st_atime - || prev.st_mtime != w->attr.st_mtime - || prev.st_ctime != w->attr.st_ctime - ) { - /* we only update w->prev on actual differences */ - /* in case we test more often than invoke the callback, */ - /* to ensure that prev is always different to attr */ - w->prev = prev; - - #if EV_USE_INOTIFY - if (fs_fd >= 0) - { - infy_del (EV_A_ w); - infy_add (EV_A_ w); - ev_stat_stat (EV_A_ w); /* avoid race... */ - } - #endif - - ev_feed_event (EV_A_ w, EV_STAT); - } -} - -void -ev_stat_start (EV_P_ ev_stat *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - ev_stat_stat (EV_A_ w); - - if (w->interval < MIN_STAT_INTERVAL && w->interval) - w->interval = MIN_STAT_INTERVAL; - - ev_timer_init (&w->timer, stat_timer_cb, 0., w->interval ? w->interval : DEF_STAT_INTERVAL); - ev_set_priority (&w->timer, ev_priority (w)); - -#if EV_USE_INOTIFY - infy_init (EV_A); - - if (fs_fd >= 0) - infy_add (EV_A_ w); - else -#endif - { - ev_timer_again (EV_A_ &w->timer); - ev_unref (EV_A); - } - - ev_start (EV_A_ (W)w, 1); - - EV_FREQUENT_CHECK; -} - -void -ev_stat_stop (EV_P_ ev_stat *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - -#if EV_USE_INOTIFY - infy_del (EV_A_ w); -#endif - - if (ev_is_active (&w->timer)) - { - ev_ref (EV_A); - ev_timer_stop (EV_A_ &w->timer); - } - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} -#endif - -#if EV_IDLE_ENABLE -void -ev_idle_start (EV_P_ ev_idle *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - pri_adjust (EV_A_ (W)w); - - EV_FREQUENT_CHECK; - - { - int active = ++idlecnt [ABSPRI (w)]; - - ++idleall; - ev_start (EV_A_ (W)w, active); - - array_needsize (ev_idle *, idles [ABSPRI (w)], idlemax [ABSPRI (w)], active, EMPTY2); - idles [ABSPRI (w)][active - 1] = w; - } - - EV_FREQUENT_CHECK; -} - -void -ev_idle_stop (EV_P_ ev_idle *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - { - int active = ev_active (w); - - idles [ABSPRI (w)][active - 1] = idles [ABSPRI (w)][--idlecnt [ABSPRI (w)]]; - ev_active (idles [ABSPRI (w)][active - 1]) = active; - - ev_stop (EV_A_ (W)w); - --idleall; - } - - EV_FREQUENT_CHECK; -} -#endif - -#if EV_PREPARE_ENABLE -void -ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - ev_start (EV_A_ (W)w, ++preparecnt); - array_needsize (ev_prepare *, prepares, preparemax, preparecnt, EMPTY2); - prepares [preparecnt - 1] = w; - - EV_FREQUENT_CHECK; -} - -void -ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - { - int active = ev_active (w); - - prepares [active - 1] = prepares [--preparecnt]; - ev_active (prepares [active - 1]) = active; - } - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} -#endif - -#if EV_CHECK_ENABLE -void -ev_check_start (EV_P_ ev_check *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - ev_start (EV_A_ (W)w, ++checkcnt); - array_needsize (ev_check *, checks, checkmax, checkcnt, EMPTY2); - checks [checkcnt - 1] = w; - - EV_FREQUENT_CHECK; -} - -void -ev_check_stop (EV_P_ ev_check *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - { - int active = ev_active (w); - - checks [active - 1] = checks [--checkcnt]; - ev_active (checks [active - 1]) = active; - } - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} -#endif - -#if EV_EMBED_ENABLE -void noinline -ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW -{ - ev_run (w->other, EVRUN_NOWAIT); -} - -static void -embed_io_cb (EV_P_ ev_io *io, int revents) -{ - ev_embed *w = (ev_embed *)(((char *)io) - offsetof (ev_embed, io)); - - if (ev_cb (w)) - ev_feed_event (EV_A_ (W)w, EV_EMBED); - else - ev_run (w->other, EVRUN_NOWAIT); -} - -static void -embed_prepare_cb (EV_P_ ev_prepare *prepare, int revents) -{ - ev_embed *w = (ev_embed *)(((char *)prepare) - offsetof (ev_embed, prepare)); - - { - EV_P = w->other; - - while (fdchangecnt) - { - fd_reify (EV_A); - ev_run (EV_A_ EVRUN_NOWAIT); - } - } -} - -static void -embed_fork_cb (EV_P_ ev_fork *fork_w, int revents) -{ - ev_embed *w = (ev_embed *)(((char *)fork_w) - offsetof (ev_embed, fork)); - - ev_embed_stop (EV_A_ w); - - { - EV_P = w->other; - - ev_loop_fork (EV_A); - ev_run (EV_A_ EVRUN_NOWAIT); - } - - ev_embed_start (EV_A_ w); -} - -#if 0 -static void -embed_idle_cb (EV_P_ ev_idle *idle, int revents) -{ - ev_idle_stop (EV_A_ idle); -} -#endif - -void -ev_embed_start (EV_P_ ev_embed *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - { - EV_P = w->other; - assert (("libev: loop to be embedded is not embeddable", backend & ev_embeddable_backends ())); - ev_io_init (&w->io, embed_io_cb, backend_fd, EV_READ); - } - - EV_FREQUENT_CHECK; - - ev_set_priority (&w->io, ev_priority (w)); - ev_io_start (EV_A_ &w->io); - - ev_prepare_init (&w->prepare, embed_prepare_cb); - ev_set_priority (&w->prepare, EV_MINPRI); - ev_prepare_start (EV_A_ &w->prepare); - - ev_fork_init (&w->fork, embed_fork_cb); - ev_fork_start (EV_A_ &w->fork); - - /*ev_idle_init (&w->idle, e,bed_idle_cb);*/ - - ev_start (EV_A_ (W)w, 1); - - EV_FREQUENT_CHECK; -} - -void -ev_embed_stop (EV_P_ ev_embed *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - ev_io_stop (EV_A_ &w->io); - ev_prepare_stop (EV_A_ &w->prepare); - ev_fork_stop (EV_A_ &w->fork); - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} -#endif - -#if EV_FORK_ENABLE -void -ev_fork_start (EV_P_ ev_fork *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - ev_start (EV_A_ (W)w, ++forkcnt); - array_needsize (ev_fork *, forks, forkmax, forkcnt, EMPTY2); - forks [forkcnt - 1] = w; - - EV_FREQUENT_CHECK; -} - -void -ev_fork_stop (EV_P_ ev_fork *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - { - int active = ev_active (w); - - forks [active - 1] = forks [--forkcnt]; - ev_active (forks [active - 1]) = active; - } - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} -#endif - -#if EV_CLEANUP_ENABLE -void -ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - ev_start (EV_A_ (W)w, ++cleanupcnt); - array_needsize (ev_cleanup *, cleanups, cleanupmax, cleanupcnt, EMPTY2); - cleanups [cleanupcnt - 1] = w; - - /* cleanup watchers should never keep a refcount on the loop */ - ev_unref (EV_A); - EV_FREQUENT_CHECK; -} - -void -ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - ev_ref (EV_A); - - { - int active = ev_active (w); - - cleanups [active - 1] = cleanups [--cleanupcnt]; - ev_active (cleanups [active - 1]) = active; - } - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} -#endif - -#if EV_ASYNC_ENABLE -void -ev_async_start (EV_P_ ev_async *w) EV_THROW -{ - if (expect_false (ev_is_active (w))) - return; - - w->sent = 0; - - evpipe_init (EV_A); - - EV_FREQUENT_CHECK; - - ev_start (EV_A_ (W)w, ++asynccnt); - array_needsize (ev_async *, asyncs, asyncmax, asynccnt, EMPTY2); - asyncs [asynccnt - 1] = w; - - EV_FREQUENT_CHECK; -} - -void -ev_async_stop (EV_P_ ev_async *w) EV_THROW -{ - clear_pending (EV_A_ (W)w); - if (expect_false (!ev_is_active (w))) - return; - - EV_FREQUENT_CHECK; - - { - int active = ev_active (w); - - asyncs [active - 1] = asyncs [--asynccnt]; - ev_active (asyncs [active - 1]) = active; - } - - ev_stop (EV_A_ (W)w); - - EV_FREQUENT_CHECK; -} - -void -ev_async_send (EV_P_ ev_async *w) EV_THROW -{ - w->sent = 1; - evpipe_write (EV_A_ &async_pending); -} -#endif - -/*****************************************************************************/ - -struct ev_once -{ - ev_io io; - ev_timer to; - void (*cb)(int revents, void *arg); - void *arg; -}; - -static void -once_cb (EV_P_ struct ev_once *once, int revents) -{ - void (*cb)(int revents, void *arg) = once->cb; - void *arg = once->arg; - - ev_io_stop (EV_A_ &once->io); - ev_timer_stop (EV_A_ &once->to); - ev_free (once); - - cb (revents, arg); -} - -static void -once_cb_io (EV_P_ ev_io *w, int revents) -{ - struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io)); - - once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->to)); -} - -static void -once_cb_to (EV_P_ ev_timer *w, int revents) -{ - struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to)); - - once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->io)); -} - -void -ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW -{ - struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once)); - - if (expect_false (!once)) - { - cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMER, arg); - return; - } - - once->cb = cb; - once->arg = arg; - - ev_init (&once->io, once_cb_io); - if (fd >= 0) - { - ev_io_set (&once->io, fd, events); - ev_io_start (EV_A_ &once->io); - } - - ev_init (&once->to, once_cb_to); - if (timeout >= 0.) - { - ev_timer_set (&once->to, timeout, 0.); - ev_timer_start (EV_A_ &once->to); - } -} - -/*****************************************************************************/ - -#if EV_WALK_ENABLE -void ecb_cold -ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW -{ - int i, j; - ev_watcher_list *wl, *wn; - - if (types & (EV_IO | EV_EMBED)) - for (i = 0; i < anfdmax; ++i) - for (wl = anfds [i].head; wl; ) - { - wn = wl->next; - -#if EV_EMBED_ENABLE - if (ev_cb ((ev_io *)wl) == embed_io_cb) - { - if (types & EV_EMBED) - cb (EV_A_ EV_EMBED, ((char *)wl) - offsetof (struct ev_embed, io)); - } - else -#endif -#if EV_USE_INOTIFY - if (ev_cb ((ev_io *)wl) == infy_cb) - ; - else -#endif - if ((ev_io *)wl != &pipe_w) - if (types & EV_IO) - cb (EV_A_ EV_IO, wl); - - wl = wn; - } - - if (types & (EV_TIMER | EV_STAT)) - for (i = timercnt + HEAP0; i-- > HEAP0; ) -#if EV_STAT_ENABLE - /*TODO: timer is not always active*/ - if (ev_cb ((ev_timer *)ANHE_w (timers [i])) == stat_timer_cb) - { - if (types & EV_STAT) - cb (EV_A_ EV_STAT, ((char *)ANHE_w (timers [i])) - offsetof (struct ev_stat, timer)); - } - else -#endif - if (types & EV_TIMER) - cb (EV_A_ EV_TIMER, ANHE_w (timers [i])); - -#if EV_PERIODIC_ENABLE - if (types & EV_PERIODIC) - for (i = periodiccnt + HEAP0; i-- > HEAP0; ) - cb (EV_A_ EV_PERIODIC, ANHE_w (periodics [i])); -#endif - -#if EV_IDLE_ENABLE - if (types & EV_IDLE) - for (j = NUMPRI; j--; ) - for (i = idlecnt [j]; i--; ) - cb (EV_A_ EV_IDLE, idles [j][i]); -#endif - -#if EV_FORK_ENABLE - if (types & EV_FORK) - for (i = forkcnt; i--; ) - if (ev_cb (forks [i]) != embed_fork_cb) - cb (EV_A_ EV_FORK, forks [i]); -#endif - -#if EV_ASYNC_ENABLE - if (types & EV_ASYNC) - for (i = asynccnt; i--; ) - cb (EV_A_ EV_ASYNC, asyncs [i]); -#endif - -#if EV_PREPARE_ENABLE - if (types & EV_PREPARE) - for (i = preparecnt; i--; ) -# if EV_EMBED_ENABLE - if (ev_cb (prepares [i]) != embed_prepare_cb) -# endif - cb (EV_A_ EV_PREPARE, prepares [i]); -#endif - -#if EV_CHECK_ENABLE - if (types & EV_CHECK) - for (i = checkcnt; i--; ) - cb (EV_A_ EV_CHECK, checks [i]); -#endif - -#if EV_SIGNAL_ENABLE - if (types & EV_SIGNAL) - for (i = 0; i < EV_NSIG - 1; ++i) - for (wl = signals [i].head; wl; ) - { - wn = wl->next; - cb (EV_A_ EV_SIGNAL, wl); - wl = wn; - } -#endif - -#if EV_CHILD_ENABLE - if (types & EV_CHILD) - for (i = (EV_PID_HASHSIZE); i--; ) - for (wl = childs [i]; wl; ) - { - wn = wl->next; - cb (EV_A_ EV_CHILD, wl); - wl = wn; - } -#endif -/* EV_STAT 0x00001000 /* stat data changed */ -/* EV_EMBED 0x00010000 /* embedded event loop needs sweep */ -} -#endif - -#if EV_MULTIPLICITY - #include "ev_wrap.h" -#endif - diff --git a/libev/ev.h b/libev/ev.h deleted file mode 100644 index c5d582e05..000000000 --- a/libev/ev.h +++ /dev/null @@ -1,845 +0,0 @@ -/* - * libev native API header - * - * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, the contents of this file may be used under the terms of - * the GNU General Public License ("GPL") version 2 or any later version, - * in which case the provisions of the GPL are applicable instead of - * the above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use your - * version of this file under the BSD license, indicate your decision - * by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file under - * either the BSD or the GPL. - */ - -#ifndef EV_H_ -#define EV_H_ - -#ifdef __cplusplus -# define EV_CPP(x) x -#else -# define EV_CPP(x) -#endif - -#define EV_THROW EV_CPP(throw()) - -EV_CPP(extern "C" {) - -/*****************************************************************************/ - -/* pre-4.0 compatibility */ -#ifndef EV_COMPAT3 -# define EV_COMPAT3 1 -#endif - -#ifndef EV_FEATURES -# if defined __OPTIMIZE_SIZE__ -# define EV_FEATURES 0x7c -# else -# define EV_FEATURES 0x7f -# endif -#endif - -#define EV_FEATURE_CODE ((EV_FEATURES) & 1) -#define EV_FEATURE_DATA ((EV_FEATURES) & 2) -#define EV_FEATURE_CONFIG ((EV_FEATURES) & 4) -#define EV_FEATURE_API ((EV_FEATURES) & 8) -#define EV_FEATURE_WATCHERS ((EV_FEATURES) & 16) -#define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32) -#define EV_FEATURE_OS ((EV_FEATURES) & 64) - -/* these priorities are inclusive, higher priorities will be invoked earlier */ -#ifndef EV_MINPRI -# define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0) -#endif -#ifndef EV_MAXPRI -# define EV_MAXPRI (EV_FEATURE_CONFIG ? +2 : 0) -#endif - -#ifndef EV_MULTIPLICITY -# define EV_MULTIPLICITY EV_FEATURE_CONFIG -#endif - -#ifndef EV_PERIODIC_ENABLE -# define EV_PERIODIC_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_STAT_ENABLE -# define EV_STAT_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_PREPARE_ENABLE -# define EV_PREPARE_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_CHECK_ENABLE -# define EV_CHECK_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_IDLE_ENABLE -# define EV_IDLE_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_FORK_ENABLE -# define EV_FORK_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_CLEANUP_ENABLE -# define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_SIGNAL_ENABLE -# define EV_SIGNAL_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_CHILD_ENABLE -# ifdef _WIN32 -# define EV_CHILD_ENABLE 0 -# else -# define EV_CHILD_ENABLE EV_FEATURE_WATCHERS -#endif -#endif - -#ifndef EV_ASYNC_ENABLE -# define EV_ASYNC_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_EMBED_ENABLE -# define EV_EMBED_ENABLE EV_FEATURE_WATCHERS -#endif - -#ifndef EV_WALK_ENABLE -# define EV_WALK_ENABLE 0 /* not yet */ -#endif - -/*****************************************************************************/ - -#if EV_CHILD_ENABLE && !EV_SIGNAL_ENABLE -# undef EV_SIGNAL_ENABLE -# define EV_SIGNAL_ENABLE 1 -#endif - -/*****************************************************************************/ - -typedef double ev_tstamp; - -#ifndef EV_ATOMIC_T -# include -# define EV_ATOMIC_T sig_atomic_t volatile -#endif - -#if EV_STAT_ENABLE -# ifdef _WIN32 -# include -# include -# endif -# include -#endif - -/* support multiple event loops? */ -#if EV_MULTIPLICITY -struct ev_loop; -# define EV_P struct ev_loop *loop /* a loop as sole parameter in a declaration */ -# define EV_P_ EV_P, /* a loop as first of multiple parameters */ -# define EV_A loop /* a loop as sole argument to a function call */ -# define EV_A_ EV_A, /* a loop as first of multiple arguments */ -# define EV_DEFAULT_UC ev_default_loop_uc_ () /* the default loop, if initialised, as sole arg */ -# define EV_DEFAULT_UC_ EV_DEFAULT_UC, /* the default loop as first of multiple arguments */ -# define EV_DEFAULT ev_default_loop (0) /* the default loop as sole arg */ -# define EV_DEFAULT_ EV_DEFAULT, /* the default loop as first of multiple arguments */ -#else -# define EV_P void -# define EV_P_ -# define EV_A -# define EV_A_ -# define EV_DEFAULT -# define EV_DEFAULT_ -# define EV_DEFAULT_UC -# define EV_DEFAULT_UC_ -# undef EV_EMBED_ENABLE -#endif - -/* EV_INLINE is used for functions in header files */ -#if __STDC_VERSION__ >= 199901L || __GNUC__ >= 3 -# define EV_INLINE static inline -#else -# define EV_INLINE static -#endif - -#ifdef EV_API_STATIC -# define EV_API_DECL static -#else -# define EV_API_DECL extern -#endif - -/* EV_PROTOTYPES can be used to switch of prototype declarations */ -#ifndef EV_PROTOTYPES -# define EV_PROTOTYPES 1 -#endif - -/*****************************************************************************/ - -#define EV_VERSION_MAJOR 4 -#define EV_VERSION_MINOR 15 - -/* eventmask, revents, events... */ -enum { - EV_UNDEF = (int)0xFFFFFFFF, /* guaranteed to be invalid */ - EV_NONE = 0x00, /* no events */ - EV_READ = 0x01, /* ev_io detected read will not block */ - EV_WRITE = 0x02, /* ev_io detected write will not block */ - EV__IOFDSET = 0x80, /* internal use only */ - EV_IO = EV_READ, /* alias for type-detection */ - EV_TIMER = 0x00000100, /* timer timed out */ -#if EV_COMPAT3 - EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */ -#endif - EV_PERIODIC = 0x00000200, /* periodic timer timed out */ - EV_SIGNAL = 0x00000400, /* signal was received */ - EV_CHILD = 0x00000800, /* child/pid had status change */ - EV_STAT = 0x00001000, /* stat data changed */ - EV_IDLE = 0x00002000, /* event loop is idling */ - EV_PREPARE = 0x00004000, /* event loop about to poll */ - EV_CHECK = 0x00008000, /* event loop finished poll */ - EV_EMBED = 0x00010000, /* embedded event loop needs sweep */ - EV_FORK = 0x00020000, /* event loop resumed in child */ - EV_CLEANUP = 0x00040000, /* event loop resumed in child */ - EV_ASYNC = 0x00080000, /* async intra-loop signal */ - EV_CUSTOM = 0x01000000, /* for use by user code */ - EV_ERROR = (int)0x80000000 /* sent when an error occurs */ -}; - -/* can be used to add custom fields to all watchers, while losing binary compatibility */ -#ifndef EV_COMMON -# define EV_COMMON void *data; -#endif - -#ifndef EV_CB_DECLARE -# define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents); -#endif -#ifndef EV_CB_INVOKE -# define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents)) -#endif - -/* not official, do not use */ -#define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents) - -/* - * struct member types: - * private: you may look at them, but not change them, - * and they might not mean anything to you. - * ro: can be read anytime, but only changed when the watcher isn't active. - * rw: can be read and modified anytime, even when the watcher is active. - * - * some internal details that might be helpful for debugging: - * - * active is either 0, which means the watcher is not active, - * or the array index of the watcher (periodics, timers) - * or the array index + 1 (most other watchers) - * or simply 1 for watchers that aren't in some array. - * pending is either 0, in which case the watcher isn't, - * or the array index + 1 in the pendings array. - */ - -#if EV_MINPRI == EV_MAXPRI -# define EV_DECL_PRIORITY -#elif !defined (EV_DECL_PRIORITY) -# define EV_DECL_PRIORITY int priority; -#endif - -/* shared by all watchers */ -#define EV_WATCHER(type) \ - int active; /* private */ \ - int pending; /* private */ \ - EV_DECL_PRIORITY /* private */ \ - EV_COMMON /* rw */ \ - EV_CB_DECLARE (type) /* private */ - -#define EV_WATCHER_LIST(type) \ - EV_WATCHER (type) \ - struct ev_watcher_list *next; /* private */ - -#define EV_WATCHER_TIME(type) \ - EV_WATCHER (type) \ - ev_tstamp at; /* private */ - -/* base class, nothing to see here unless you subclass */ -typedef struct ev_watcher -{ - EV_WATCHER (ev_watcher) -} ev_watcher; - -/* base class, nothing to see here unless you subclass */ -typedef struct ev_watcher_list -{ - EV_WATCHER_LIST (ev_watcher_list) -} ev_watcher_list; - -/* base class, nothing to see here unless you subclass */ -typedef struct ev_watcher_time -{ - EV_WATCHER_TIME (ev_watcher_time) -} ev_watcher_time; - -/* invoked when fd is either EV_READable or EV_WRITEable */ -/* revent EV_READ, EV_WRITE */ -typedef struct ev_io -{ - EV_WATCHER_LIST (ev_io) - - int fd; /* ro */ - int events; /* ro */ -} ev_io; - -/* invoked after a specific time, repeatable (based on monotonic clock) */ -/* revent EV_TIMEOUT */ -typedef struct ev_timer -{ - EV_WATCHER_TIME (ev_timer) - - ev_tstamp repeat; /* rw */ -} ev_timer; - -/* invoked at some specific time, possibly repeating at regular intervals (based on UTC) */ -/* revent EV_PERIODIC */ -typedef struct ev_periodic -{ - EV_WATCHER_TIME (ev_periodic) - - ev_tstamp offset; /* rw */ - ev_tstamp interval; /* rw */ - ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) EV_THROW; /* rw */ -} ev_periodic; - -/* invoked when the given signal has been received */ -/* revent EV_SIGNAL */ -typedef struct ev_signal -{ - EV_WATCHER_LIST (ev_signal) - - int signum; /* ro */ -} ev_signal; - -/* invoked when sigchld is received and waitpid indicates the given pid */ -/* revent EV_CHILD */ -/* does not support priorities */ -typedef struct ev_child -{ - EV_WATCHER_LIST (ev_child) - - int flags; /* private */ - int pid; /* ro */ - int rpid; /* rw, holds the received pid */ - int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */ -} ev_child; - -#if EV_STAT_ENABLE -/* st_nlink = 0 means missing file or other error */ -# ifdef _WIN32 -typedef struct _stati64 ev_statdata; -# else -typedef struct stat ev_statdata; -# endif - -/* invoked each time the stat data changes for a given path */ -/* revent EV_STAT */ -typedef struct ev_stat -{ - EV_WATCHER_LIST (ev_stat) - - ev_timer timer; /* private */ - ev_tstamp interval; /* ro */ - const char *path; /* ro */ - ev_statdata prev; /* ro */ - ev_statdata attr; /* ro */ - - int wd; /* wd for inotify, fd for kqueue */ -} ev_stat; -#endif - -#if EV_IDLE_ENABLE -/* invoked when the nothing else needs to be done, keeps the process from blocking */ -/* revent EV_IDLE */ -typedef struct ev_idle -{ - EV_WATCHER (ev_idle) -} ev_idle; -#endif - -/* invoked for each run of the mainloop, just before the blocking call */ -/* you can still change events in any way you like */ -/* revent EV_PREPARE */ -typedef struct ev_prepare -{ - EV_WATCHER (ev_prepare) -} ev_prepare; - -/* invoked for each run of the mainloop, just after the blocking call */ -/* revent EV_CHECK */ -typedef struct ev_check -{ - EV_WATCHER (ev_check) -} ev_check; - -#if EV_FORK_ENABLE -/* the callback gets invoked before check in the child process when a fork was detected */ -/* revent EV_FORK */ -typedef struct ev_fork -{ - EV_WATCHER (ev_fork) -} ev_fork; -#endif - -#if EV_CLEANUP_ENABLE -/* is invoked just before the loop gets destroyed */ -/* revent EV_CLEANUP */ -typedef struct ev_cleanup -{ - EV_WATCHER (ev_cleanup) -} ev_cleanup; -#endif - -#if EV_EMBED_ENABLE -/* used to embed an event loop inside another */ -/* the callback gets invoked when the event loop has handled events, and can be 0 */ -typedef struct ev_embed -{ - EV_WATCHER (ev_embed) - - struct ev_loop *other; /* ro */ - ev_io io; /* private */ - ev_prepare prepare; /* private */ - ev_check check; /* unused */ - ev_timer timer; /* unused */ - ev_periodic periodic; /* unused */ - ev_idle idle; /* unused */ - ev_fork fork; /* private */ -#if EV_CLEANUP_ENABLE - ev_cleanup cleanup; /* unused */ -#endif -} ev_embed; -#endif - -#if EV_ASYNC_ENABLE -/* invoked when somebody calls ev_async_send on the watcher */ -/* revent EV_ASYNC */ -typedef struct ev_async -{ - EV_WATCHER (ev_async) - - EV_ATOMIC_T sent; /* private */ -} ev_async; - -# define ev_async_pending(w) (+(w)->sent) -#endif - -/* the presence of this union forces similar struct layout */ -union ev_any_watcher -{ - struct ev_watcher w; - struct ev_watcher_list wl; - - struct ev_io io; - struct ev_timer timer; - struct ev_periodic periodic; - struct ev_signal signal; - struct ev_child child; -#if EV_STAT_ENABLE - struct ev_stat stat; -#endif -#if EV_IDLE_ENABLE - struct ev_idle idle; -#endif - struct ev_prepare prepare; - struct ev_check check; -#if EV_FORK_ENABLE - struct ev_fork fork; -#endif -#if EV_CLEANUP_ENABLE - struct ev_cleanup cleanup; -#endif -#if EV_EMBED_ENABLE - struct ev_embed embed; -#endif -#if EV_ASYNC_ENABLE - struct ev_async async; -#endif -}; - -/* flag bits for ev_default_loop and ev_loop_new */ -enum { - /* the default */ - EVFLAG_AUTO = 0x00000000U, /* not quite a mask */ - /* flag bits */ - EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */ - EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */ - /* debugging/feature disable */ - EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */ -#if EV_COMPAT3 - EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */ -#endif - EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */ - EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */ -}; - -/* method bits to be ored together */ -enum { - EVBACKEND_SELECT = 0x00000001U, /* about anywhere */ - EVBACKEND_POLL = 0x00000002U, /* !win */ - EVBACKEND_EPOLL = 0x00000004U, /* linux */ - EVBACKEND_KQUEUE = 0x00000008U, /* bsd */ - EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ - EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ - EVBACKEND_ALL = 0x0000003FU, /* all known backends */ - EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ -}; - -#if EV_PROTOTYPES -EV_API_DECL int ev_version_major (void) EV_THROW; -EV_API_DECL int ev_version_minor (void) EV_THROW; - -EV_API_DECL unsigned int ev_supported_backends (void) EV_THROW; -EV_API_DECL unsigned int ev_recommended_backends (void) EV_THROW; -EV_API_DECL unsigned int ev_embeddable_backends (void) EV_THROW; - -EV_API_DECL ev_tstamp ev_time (void) EV_THROW; -EV_API_DECL void ev_sleep (ev_tstamp delay) EV_THROW; /* sleep for a while */ - -/* Sets the allocation function to use, works like realloc. - * It is used to allocate and free memory. - * If it returns zero when memory needs to be allocated, the library might abort - * or take some potentially destructive action. - * The default is your system realloc function. - */ -EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW; - -/* set the callback function to call on a - * retryable syscall error - * (such as failed select, poll, epoll_wait) - */ -EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW; - -#if EV_MULTIPLICITY - -/* the default loop is the only one that handles signals and child watchers */ -/* you can call this as often as you like */ -EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; - -#ifdef EV_API_STATIC -EV_API_DECL struct ev_loop *ev_default_loop_ptr; -#endif - -EV_INLINE struct ev_loop * -ev_default_loop_uc_ (void) EV_THROW -{ - extern struct ev_loop *ev_default_loop_ptr; - - return ev_default_loop_ptr; -} - -EV_INLINE int -ev_is_default_loop (EV_P) EV_THROW -{ - return EV_A == EV_DEFAULT_UC; -} - -/* create and destroy alternative loops that don't handle signals */ -EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_THROW; - -EV_API_DECL ev_tstamp ev_now (EV_P) EV_THROW; /* time w.r.t. timers and the eventloop, updated after each poll */ - -#else - -EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; /* returns true when successful */ - -EV_API_DECL ev_tstamp ev_rt_now; - -EV_INLINE ev_tstamp -ev_now (void) EV_THROW -{ - return ev_rt_now; -} - -/* looks weird, but ev_is_default_loop (EV_A) still works if this exists */ -EV_INLINE int -ev_is_default_loop (void) EV_THROW -{ - return 1; -} - -#endif /* multiplicity */ - -/* destroy event loops, also works for the default loop */ -EV_API_DECL void ev_loop_destroy (EV_P); - -/* this needs to be called after fork, to duplicate the loop */ -/* when you want to re-use it in the child */ -/* you can call it in either the parent or the child */ -/* you can actually call it at any time, anywhere :) */ -EV_API_DECL void ev_loop_fork (EV_P) EV_THROW; - -EV_API_DECL unsigned int ev_backend (EV_P) EV_THROW; /* backend in use by loop */ - -EV_API_DECL void ev_now_update (EV_P) EV_THROW; /* update event loop time */ - -#if EV_WALK_ENABLE -/* walk (almost) all watchers in the loop of a given type, invoking the */ -/* callback on every such watcher. The callback might stop the watcher, */ -/* but do nothing else with the loop */ -EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW; -#endif - -#endif /* prototypes */ - -/* ev_run flags values */ -enum { - EVRUN_NOWAIT = 1, /* do not block/wait */ - EVRUN_ONCE = 2 /* block *once* only */ -}; - -/* ev_break how values */ -enum { - EVBREAK_CANCEL = 0, /* undo unloop */ - EVBREAK_ONE = 1, /* unloop once */ - EVBREAK_ALL = 2 /* unloop all loops */ -}; - -#if EV_PROTOTYPES -EV_API_DECL int ev_run (EV_P_ int flags EV_CPP (= 0)); -EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)) EV_THROW; /* break out of the loop */ - -/* - * ref/unref can be used to add or remove a refcount on the mainloop. every watcher - * keeps one reference. if you have a long-running watcher you never unregister that - * should not keep ev_loop from running, unref() after starting, and ref() before stopping. - */ -EV_API_DECL void ev_ref (EV_P) EV_THROW; -EV_API_DECL void ev_unref (EV_P) EV_THROW; - -/* - * convenience function, wait for a single event, without registering an event watcher - * if timeout is < 0, do wait indefinitely - */ -EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW; - -# if EV_FEATURE_API -EV_API_DECL unsigned int ev_iteration (EV_P) EV_THROW; /* number of loop iterations */ -EV_API_DECL unsigned int ev_depth (EV_P) EV_THROW; /* #ev_loop enters - #ev_loop leaves */ -EV_API_DECL void ev_verify (EV_P) EV_THROW; /* abort if loop data corrupted */ - -EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */ -EV_API_DECL void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */ - -/* advanced stuff for threading etc. support, see docs */ -EV_API_DECL void ev_set_userdata (EV_P_ void *data) EV_THROW; -EV_API_DECL void *ev_userdata (EV_P) EV_THROW; -EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW; -EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P) EV_THROW) EV_THROW; - -EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */ -EV_API_DECL void ev_invoke_pending (EV_P); /* invoke all pending watchers */ - -/* - * stop/start the timer handling. - */ -EV_API_DECL void ev_suspend (EV_P) EV_THROW; -EV_API_DECL void ev_resume (EV_P) EV_THROW; -#endif - -#endif - -/* these may evaluate ev multiple times, and the other arguments at most once */ -/* either use ev_init + ev_TYPE_set, or the ev_TYPE_init macro, below, to first initialise a watcher */ -#define ev_init(ev,cb_) do { \ - ((ev_watcher *)(void *)(ev))->active = \ - ((ev_watcher *)(void *)(ev))->pending = 0; \ - ev_set_priority ((ev), 0); \ - ev_set_cb ((ev), cb_); \ -} while (0) - -#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV__IOFDSET; } while (0) -#define ev_timer_set(ev,after_,repeat_) do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0) -#define ev_periodic_set(ev,ofs_,ival_,rcb_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb = (rcb_); } while (0) -#define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0) -#define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0) -#define ev_stat_set(ev,path_,interval_) do { (ev)->path = (path_); (ev)->interval = (interval_); (ev)->wd = -2; } while (0) -#define ev_idle_set(ev) /* nop, yes, this is a serious in-joke */ -#define ev_prepare_set(ev) /* nop, yes, this is a serious in-joke */ -#define ev_check_set(ev) /* nop, yes, this is a serious in-joke */ -#define ev_embed_set(ev,other_) do { (ev)->other = (other_); } while (0) -#define ev_fork_set(ev) /* nop, yes, this is a serious in-joke */ -#define ev_cleanup_set(ev) /* nop, yes, this is a serious in-joke */ -#define ev_async_set(ev) /* nop, yes, this is a serious in-joke */ - -#define ev_io_init(ev,cb,fd,events) do { ev_init ((ev), (cb)); ev_io_set ((ev),(fd),(events)); } while (0) -#define ev_timer_init(ev,cb,after,repeat) do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0) -#define ev_periodic_init(ev,cb,ofs,ival,rcb) do { ev_init ((ev), (cb)); ev_periodic_set ((ev),(ofs),(ival),(rcb)); } while (0) -#define ev_signal_init(ev,cb,signum) do { ev_init ((ev), (cb)); ev_signal_set ((ev), (signum)); } while (0) -#define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0) -#define ev_stat_init(ev,cb,path,interval) do { ev_init ((ev), (cb)); ev_stat_set ((ev),(path),(interval)); } while (0) -#define ev_idle_init(ev,cb) do { ev_init ((ev), (cb)); ev_idle_set ((ev)); } while (0) -#define ev_prepare_init(ev,cb) do { ev_init ((ev), (cb)); ev_prepare_set ((ev)); } while (0) -#define ev_check_init(ev,cb) do { ev_init ((ev), (cb)); ev_check_set ((ev)); } while (0) -#define ev_embed_init(ev,cb,other) do { ev_init ((ev), (cb)); ev_embed_set ((ev),(other)); } while (0) -#define ev_fork_init(ev,cb) do { ev_init ((ev), (cb)); ev_fork_set ((ev)); } while (0) -#define ev_cleanup_init(ev,cb) do { ev_init ((ev), (cb)); ev_cleanup_set ((ev)); } while (0) -#define ev_async_init(ev,cb) do { ev_init ((ev), (cb)); ev_async_set ((ev)); } while (0) - -#define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */ -#define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */ - -#define ev_cb(ev) (ev)->cb /* rw */ - -#if EV_MINPRI == EV_MAXPRI -# define ev_priority(ev) ((ev), EV_MINPRI) -# define ev_set_priority(ev,pri) ((ev), (pri)) -#else -# define ev_priority(ev) (+(((ev_watcher *)(void *)(ev))->priority)) -# define ev_set_priority(ev,pri) ( (ev_watcher *)(void *)(ev))->priority = (pri) -#endif - -#define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at) - -#ifndef ev_set_cb -# define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_) -#endif - -/* stopping (enabling, adding) a watcher does nothing if it is already running */ -/* stopping (disabling, deleting) a watcher does nothing unless its already running */ -#if EV_PROTOTYPES - -/* feeds an event into a watcher as if the event actually occurred */ -/* accepts any ev_watcher type */ -EV_API_DECL void ev_feed_event (EV_P_ void *w, int revents) EV_THROW; -EV_API_DECL void ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW; -#if EV_SIGNAL_ENABLE -EV_API_DECL void ev_feed_signal (int signum) EV_THROW; -EV_API_DECL void ev_feed_signal_event (EV_P_ int signum) EV_THROW; -#endif -EV_API_DECL void ev_invoke (EV_P_ void *w, int revents); -EV_API_DECL int ev_clear_pending (EV_P_ void *w) EV_THROW; - -EV_API_DECL void ev_io_start (EV_P_ ev_io *w) EV_THROW; -EV_API_DECL void ev_io_stop (EV_P_ ev_io *w) EV_THROW; - -EV_API_DECL void ev_timer_start (EV_P_ ev_timer *w) EV_THROW; -EV_API_DECL void ev_timer_stop (EV_P_ ev_timer *w) EV_THROW; -/* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */ -EV_API_DECL void ev_timer_again (EV_P_ ev_timer *w) EV_THROW; -/* return remaining time */ -EV_API_DECL ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW; - -#if EV_PERIODIC_ENABLE -EV_API_DECL void ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW; -EV_API_DECL void ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW; -EV_API_DECL void ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW; -#endif - -/* only supported in the default loop */ -#if EV_SIGNAL_ENABLE -EV_API_DECL void ev_signal_start (EV_P_ ev_signal *w) EV_THROW; -EV_API_DECL void ev_signal_stop (EV_P_ ev_signal *w) EV_THROW; -#endif - -/* only supported in the default loop */ -# if EV_CHILD_ENABLE -EV_API_DECL void ev_child_start (EV_P_ ev_child *w) EV_THROW; -EV_API_DECL void ev_child_stop (EV_P_ ev_child *w) EV_THROW; -# endif - -# if EV_STAT_ENABLE -EV_API_DECL void ev_stat_start (EV_P_ ev_stat *w) EV_THROW; -EV_API_DECL void ev_stat_stop (EV_P_ ev_stat *w) EV_THROW; -EV_API_DECL void ev_stat_stat (EV_P_ ev_stat *w) EV_THROW; -# endif - -# if EV_IDLE_ENABLE -EV_API_DECL void ev_idle_start (EV_P_ ev_idle *w) EV_THROW; -EV_API_DECL void ev_idle_stop (EV_P_ ev_idle *w) EV_THROW; -# endif - -#if EV_PREPARE_ENABLE -EV_API_DECL void ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW; -EV_API_DECL void ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW; -#endif - -#if EV_CHECK_ENABLE -EV_API_DECL void ev_check_start (EV_P_ ev_check *w) EV_THROW; -EV_API_DECL void ev_check_stop (EV_P_ ev_check *w) EV_THROW; -#endif - -# if EV_FORK_ENABLE -EV_API_DECL void ev_fork_start (EV_P_ ev_fork *w) EV_THROW; -EV_API_DECL void ev_fork_stop (EV_P_ ev_fork *w) EV_THROW; -# endif - -# if EV_CLEANUP_ENABLE -EV_API_DECL void ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW; -EV_API_DECL void ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW; -# endif - -# if EV_EMBED_ENABLE -/* only supported when loop to be embedded is in fact embeddable */ -EV_API_DECL void ev_embed_start (EV_P_ ev_embed *w) EV_THROW; -EV_API_DECL void ev_embed_stop (EV_P_ ev_embed *w) EV_THROW; -EV_API_DECL void ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW; -# endif - -# if EV_ASYNC_ENABLE -EV_API_DECL void ev_async_start (EV_P_ ev_async *w) EV_THROW; -EV_API_DECL void ev_async_stop (EV_P_ ev_async *w) EV_THROW; -EV_API_DECL void ev_async_send (EV_P_ ev_async *w) EV_THROW; -# endif - -#if EV_COMPAT3 - #define EVLOOP_NONBLOCK EVRUN_NOWAIT - #define EVLOOP_ONESHOT EVRUN_ONCE - #define EVUNLOOP_CANCEL EVBREAK_CANCEL - #define EVUNLOOP_ONE EVBREAK_ONE - #define EVUNLOOP_ALL EVBREAK_ALL - #if EV_PROTOTYPES - EV_INLINE void ev_loop (EV_P_ int flags) { ev_run (EV_A_ flags); } - EV_INLINE void ev_unloop (EV_P_ int how ) { ev_break (EV_A_ how ); } - EV_INLINE void ev_default_destroy (void) { ev_loop_destroy (EV_DEFAULT); } - EV_INLINE void ev_default_fork (void) { ev_loop_fork (EV_DEFAULT); } - #if EV_FEATURE_API - EV_INLINE unsigned int ev_loop_count (EV_P) { return ev_iteration (EV_A); } - EV_INLINE unsigned int ev_loop_depth (EV_P) { return ev_depth (EV_A); } - EV_INLINE void ev_loop_verify (EV_P) { ev_verify (EV_A); } - #endif - #endif -#else - typedef struct ev_loop ev_loop; -#endif - -#endif - -EV_CPP(}) - -#endif - diff --git a/libev/ev.pod b/libev/ev.pod deleted file mode 100644 index 73c4d3404..000000000 --- a/libev/ev.pod +++ /dev/null @@ -1,5554 +0,0 @@ -=head1 NAME - -libev - a high performance full-featured event loop written in C - -=head1 SYNOPSIS - - #include - -=head2 EXAMPLE PROGRAM - - // a single header file is required - #include - - #include // for puts - - // every watcher type has its own typedef'd struct - // with the name ev_TYPE - ev_io stdin_watcher; - ev_timer timeout_watcher; - - // all watcher callbacks have a similar signature - // this callback is called when data is readable on stdin - static void - stdin_cb (EV_P_ ev_io *w, int revents) - { - puts ("stdin ready"); - // for one-shot events, one must manually stop the watcher - // with its corresponding stop function. - ev_io_stop (EV_A_ w); - - // this causes all nested ev_run's to stop iterating - ev_break (EV_A_ EVBREAK_ALL); - } - - // another callback, this time for a time-out - static void - timeout_cb (EV_P_ ev_timer *w, int revents) - { - puts ("timeout"); - // this causes the innermost ev_run to stop iterating - ev_break (EV_A_ EVBREAK_ONE); - } - - int - main (void) - { - // use the default event loop unless you have special needs - struct ev_loop *loop = EV_DEFAULT; - - // initialise an io watcher, then start it - // this one will watch for stdin to become readable - ev_io_init (&stdin_watcher, stdin_cb, /*STDIN_FILENO*/ 0, EV_READ); - ev_io_start (loop, &stdin_watcher); - - // initialise a timer watcher, then start it - // simple non-repeating 5.5 second timeout - ev_timer_init (&timeout_watcher, timeout_cb, 5.5, 0.); - ev_timer_start (loop, &timeout_watcher); - - // now wait for events to arrive - ev_run (loop, 0); - - // break was called, so exit - return 0; - } - -=head1 ABOUT THIS DOCUMENT - -This document documents the libev software package. - -The newest version of this document is also available as an html-formatted -web page you might find easier to navigate when reading it for the first -time: L. - -While this document tries to be as complete as possible in documenting -libev, its usage and the rationale behind its design, it is not a tutorial -on event-based programming, nor will it introduce event-based programming -with libev. - -Familiarity with event based programming techniques in general is assumed -throughout this document. - -=head1 WHAT TO READ WHEN IN A HURRY - -This manual tries to be very detailed, but unfortunately, this also makes -it very long. If you just want to know the basics of libev, I suggest -reading L, then the L above and -look up the missing functions in L and the C and -C sections in L. - -=head1 ABOUT LIBEV - -Libev is an event loop: you register interest in certain events (such as a -file descriptor being readable or a timeout occurring), and it will manage -these event sources and provide your program with events. - -To do this, it must take more or less complete control over your process -(or thread) by executing the I handler, and will then -communicate events via a callback mechanism. - -You register interest in certain events by registering so-called I, which are relatively small C structures you initialise with the -details of the event, and then hand it over to libev by I the -watcher. - -=head2 FEATURES - -Libev supports C (files, many character devices...). - -Epoll is truly the train wreck among event poll mechanisms, a frankenpoll, -cobbled together in a hurry, no thought to design or interaction with -others. Oh, the pain, will it ever stop... - -While stopping, setting and starting an I/O watcher in the same iteration -will result in some caching, there is still a system call per such -incident (because the same I could point to a different -I now), so its best to avoid that. Also, C'ed -file descriptors might not work very well if you register events for both -file descriptors. - -Best performance from this backend is achieved by not unregistering all -watchers for a file descriptor until it has been closed, if possible, -i.e. keep at least one watcher active per fd at all times. Stopping and -starting a watcher (without re-setting it) also usually doesn't cause -extra overhead. A fork can both result in spurious notifications as well -as in libev having to destroy and recreate the epoll object, which can -take considerable time and thus should be avoided. - -All this means that, in practice, C can be as fast or -faster than epoll for maybe up to a hundred file descriptors, depending on -the usage. So sad. - -While nominally embeddable in other event loops, this feature is broken in -all kernel versions tested so far. - -This backend maps C and C in the same way as -C. - -=item C (value 8, most BSD clones) - -Kqueue deserves special mention, as at the time of this writing, it -was broken on all BSDs except NetBSD (usually it doesn't work reliably -with anything but sockets and pipes, except on Darwin, where of course -it's completely useless). Unlike epoll, however, whose brokenness -is by design, these kqueue bugs can (and eventually will) be fixed -without API changes to existing programs. For this reason it's not being -"auto-detected" unless you explicitly specify it in the flags (i.e. using -C) or libev was compiled on a known-to-be-good (-enough) -system like NetBSD. - -You still can embed kqueue into a normal poll or select backend and use it -only for sockets (after having made sure that sockets work with kqueue on -the target platform). See C watchers for more info. - -It scales in the same way as the epoll backend, but the interface to the -kernel is more efficient (which says nothing about its actual speed, of -course). While stopping, setting and starting an I/O watcher does never -cause an extra system call as with C, it still adds up to -two event changes per incident. Support for C is very bad (you -might have to leak fd's on fork, but it's more sane than epoll) and it -drops fds silently in similarly hard-to-detect cases. - -This backend usually performs well under most conditions. - -While nominally embeddable in other event loops, this doesn't work -everywhere, so you might need to test for this. And since it is broken -almost everywhere, you should only use it when you have a lot of sockets -(for which it usually works), by embedding it into another event loop -(e.g. C or C (but C is of course -also broken on OS X)) and, did I mention it, using it only for sockets. - -This backend maps C into an C kevent with -C, and C into an C kevent with -C. - -=item C (value 16, Solaris 8) - -This is not implemented yet (and might never be, unless you send me an -implementation). According to reports, C only supports sockets -and is not embeddable, which would limit the usefulness of this backend -immensely. - -=item C (value 32, Solaris 10) - -This uses the Solaris 10 event port mechanism. As with everything on Solaris, -it's really slow, but it still scales very well (O(active_fds)). - -While this backend scales well, it requires one system call per active -file descriptor per loop iteration. For small and medium numbers of file -descriptors a "slow" C or C backend -might perform better. - -On the positive side, this backend actually performed fully to -specification in all tests and is fully embeddable, which is a rare feat -among the OS-specific backends (I vastly prefer correctness over speed -hacks). - -On the negative side, the interface is I - so bizarre that -even sun itself gets it wrong in their code examples: The event polling -function sometimes returns events to the caller even though an error -occurred, but with no indication whether it has done so or not (yes, it's -even documented that way) - deadly for edge-triggered interfaces where you -absolutely have to know whether an event occurred or not because you have -to re-arm the watcher. - -Fortunately libev seems to be able to work around these idiocies. - -This backend maps C and C in the same way as -C. - -=item C - -Try all backends (even potentially broken ones that wouldn't be tried -with C). Since this is a mask, you can do stuff such as -C. - -It is definitely not recommended to use this flag, use whatever -C returns, or simply do not specify a backend -at all. - -=item C - -Not a backend at all, but a mask to select all backend bits from a -C value, in case you want to mask out any backends from a flags -value (e.g. when modifying the C environment variable). - -=back - -If one or more of the backend flags are or'ed into the flags value, -then only these backends will be tried (in the reverse order as listed -here). If none are specified, all backends in C will be tried. - -Example: Try to create a event loop that uses epoll and nothing else. - - struct ev_loop *epoller = ev_loop_new (EVBACKEND_EPOLL | EVFLAG_NOENV); - if (!epoller) - fatal ("no epoll found here, maybe it hides under your chair"); - -Example: Use whatever libev has to offer, but make sure that kqueue is -used if available. - - struct ev_loop *loop = ev_loop_new (ev_recommended_backends () | EVBACKEND_KQUEUE); - -=item ev_loop_destroy (loop) - -Destroys an event loop object (frees all memory and kernel state -etc.). None of the active event watchers will be stopped in the normal -sense, so e.g. C might still return true. It is your -responsibility to either stop all watchers cleanly yourself I -calling this function, or cope with the fact afterwards (which is usually -the easiest thing, you can just ignore the watchers and/or C them -for example). - -Note that certain global state, such as signal state (and installed signal -handlers), will not be freed by this function, and related watchers (such -as signal and child watchers) would need to be stopped manually. - -This function is normally used on loop objects allocated by -C, but it can also be used on the default loop returned by -C, in which case it is not thread-safe. - -Note that it is not advisable to call this function on the default loop -except in the rare occasion where you really need to free its resources. -If you need dynamically allocated loops it is better to use C -and C. - -=item ev_loop_fork (loop) - -This function sets a flag that causes subsequent C iterations to -reinitialise the kernel state for backends that have one. Despite the -name, you can call it anytime, but it makes most sense after forking, in -the child process. You I call it (or use C) in the -child before resuming or calling C. - -Again, you I to call it on I loop that you want to re-use after -a fork, I. This is -because some kernel interfaces *cough* I *cough* do funny things -during fork. - -On the other hand, you only need to call this function in the child -process if and only if you want to use the event loop in the child. If -you just fork+exec or create a new loop in the child, you don't have to -call it at all (in fact, C is so badly broken that it makes a -difference, but libev will usually detect this case on its own and do a -costly reset of the backend). - -The function itself is quite fast and it's usually not a problem to call -it just in case after a fork. - -Example: Automate calling C on the default loop when -using pthreads. - - static void - post_fork_child (void) - { - ev_loop_fork (EV_DEFAULT); - } - - ... - pthread_atfork (0, 0, post_fork_child); - -=item int ev_is_default_loop (loop) - -Returns true when the given loop is, in fact, the default loop, and false -otherwise. - -=item unsigned int ev_iteration (loop) - -Returns the current iteration count for the event loop, which is identical -to the number of times libev did poll for new events. It starts at C<0> -and happily wraps around with enough iterations. - -This value can sometimes be useful as a generation counter of sorts (it -"ticks" the number of loop iterations), as it roughly corresponds with -C and C calls - and is incremented between the -prepare and check phases. - -=item unsigned int ev_depth (loop) - -Returns the number of times C was entered minus the number of -times C was exited normally, in other words, the recursion depth. - -Outside C, this number is zero. In a callback, this number is -C<1>, unless C was invoked recursively (or from another thread), -in which case it is higher. - -Leaving C abnormally (setjmp/longjmp, cancelling the thread, -throwing an exception etc.), doesn't count as "exit" - consider this -as a hint to avoid such ungentleman-like behaviour unless it's really -convenient, in which case it is fully supported. - -=item unsigned int ev_backend (loop) - -Returns one of the C flags indicating the event backend in -use. - -=item ev_tstamp ev_now (loop) - -Returns the current "event loop time", which is the time the event loop -received events and started processing them. This timestamp does not -change as long as callbacks are being processed, and this is also the base -time used for relative timers. You can treat it as the timestamp of the -event occurring (or more correctly, libev finding out about it). - -=item ev_now_update (loop) - -Establishes the current time by querying the kernel, updating the time -returned by C in the progress. This is a costly operation and -is usually done automatically within C. - -This function is rarely useful, but when some event callback runs for a -very long time without entering the event loop, updating libev's idea of -the current time is a good idea. - -See also L in the C section. - -=item ev_suspend (loop) - -=item ev_resume (loop) - -These two functions suspend and resume an event loop, for use when the -loop is not used for a while and timeouts should not be processed. - -A typical use case would be an interactive program such as a game: When -the user presses C<^Z> to suspend the game and resumes it an hour later it -would be best to handle timeouts as if no time had actually passed while -the program was suspended. This can be achieved by calling C -in your C handler, sending yourself a C and calling -C directly afterwards to resume timer processing. - -Effectively, all C watchers will be delayed by the time spend -between C and C, and all C watchers -will be rescheduled (that is, they will lose any events that would have -occurred while suspended). - -After calling C you B call I function on the -given loop other than C, and you B call C -without a previous call to C. - -Calling C/C has the side effect of updating the -event loop time (see C). - -=item bool ev_run (loop, int flags) - -Finally, this is it, the event handler. This function usually is called -after you have initialised all your watchers and you want to start -handling events. It will ask the operating system for any new events, call -the watcher callbacks, and then repeat the whole process indefinitely: This -is why event loops are called I. - -If the flags argument is specified as C<0>, it will keep handling events -until either no event watchers are active anymore or C was -called. - -The return value is false if there are no more active watchers (which -usually means "all jobs done" or "deadlock"), and true in all other cases -(which usually means " you should call C again"). - -Please note that an explicit C is usually better than -relying on all watchers to be stopped when deciding when a program has -finished (especially in interactive programs), but having a program -that automatically loops as long as it has to and no longer by virtue -of relying on its watchers stopping correctly, that is truly a thing of -beauty. - -This function is I exception-safe - you can break out of a -C call by calling C in a callback, throwing a C++ -exception and so on. This does not decrement the C value, nor -will it clear any outstanding C breaks. - -A flags value of C will look for new events, will handle -those events and any already outstanding ones, but will not wait and -block your process in case there are no events and will return after one -iteration of the loop. This is sometimes useful to poll and handle new -events while doing lengthy calculations, to keep the program responsive. - -A flags value of C will look for new events (waiting if -necessary) and will handle those and any already outstanding ones. It -will block your process until at least one new event arrives (which could -be an event internal to libev itself, so there is no guarantee that a -user-registered callback will be called), and will return after one -iteration of the loop. - -This is useful if you are waiting for some external event in conjunction -with something not expressible using other libev watchers (i.e. "roll your -own C"). However, a pair of C/C watchers is -usually a better approach for this kind of thing. - -Here are the gory details of what C does (this is for your -understanding, not a guarantee that things will work exactly like this in -future versions): - - - Increment loop depth. - - Reset the ev_break status. - - Before the first iteration, call any pending watchers. - LOOP: - - If EVFLAG_FORKCHECK was used, check for a fork. - - If a fork was detected (by any means), queue and call all fork watchers. - - Queue and call all prepare watchers. - - If ev_break was called, goto FINISH. - - If we have been forked, detach and recreate the kernel state - as to not disturb the other process. - - Update the kernel state with all outstanding changes. - - Update the "event loop time" (ev_now ()). - - Calculate for how long to sleep or block, if at all - (active idle watchers, EVRUN_NOWAIT or not having - any active watchers at all will result in not sleeping). - - Sleep if the I/O and timer collect interval say so. - - Increment loop iteration counter. - - Block the process, waiting for any events. - - Queue all outstanding I/O (fd) events. - - Update the "event loop time" (ev_now ()), and do time jump adjustments. - - Queue all expired timers. - - Queue all expired periodics. - - Queue all idle watchers with priority higher than that of pending events. - - Queue all check watchers. - - Call all queued watchers in reverse order (i.e. check watchers first). - Signals and child watchers are implemented as I/O watchers, and will - be handled here by queueing them when their watcher gets executed. - - If ev_break has been called, or EVRUN_ONCE or EVRUN_NOWAIT - were used, or there are no active watchers, goto FINISH, otherwise - continue with step LOOP. - FINISH: - - Reset the ev_break status iff it was EVBREAK_ONE. - - Decrement the loop depth. - - Return. - -Example: Queue some jobs and then loop until no events are outstanding -anymore. - - ... queue jobs here, make sure they register event watchers as long - ... as they still have work to do (even an idle watcher will do..) - ev_run (my_loop, 0); - ... jobs done or somebody called break. yeah! - -=item ev_break (loop, how) - -Can be used to make a call to C return early (but only after it -has processed all outstanding events). The C argument must be either -C, which will make the innermost C call return, or -C, which will make all nested C calls return. - -This "break state" will be cleared on the next call to C. - -It is safe to call C from outside any C calls, too, in -which case it will have no effect. - -=item ev_ref (loop) - -=item ev_unref (loop) - -Ref/unref can be used to add or remove a reference count on the event -loop: Every watcher keeps one reference, and as long as the reference -count is nonzero, C will not return on its own. - -This is useful when you have a watcher that you never intend to -unregister, but that nevertheless should not keep C from -returning. In such a case, call C after starting, and C -before stopping it. - -As an example, libev itself uses this for its internal signal pipe: It -is not visible to the libev user and should not keep C from -exiting if no event watchers registered by it are active. It is also an -excellent way to do this for generic recurring timers or from within -third-party libraries. Just remember to I and I (but only if the watcher wasn't active before, or was active -before, respectively. Note also that libev might stop watchers itself -(e.g. non-repeating timers) in which case you have to C -in the callback). - -Example: Create a signal watcher, but keep it from keeping C -running when nothing else is active. - - ev_signal exitsig; - ev_signal_init (&exitsig, sig_cb, SIGINT); - ev_signal_start (loop, &exitsig); - ev_unref (loop); - -Example: For some weird reason, unregister the above signal handler again. - - ev_ref (loop); - ev_signal_stop (loop, &exitsig); - -=item ev_set_io_collect_interval (loop, ev_tstamp interval) - -=item ev_set_timeout_collect_interval (loop, ev_tstamp interval) - -These advanced functions influence the time that libev will spend waiting -for events. Both time intervals are by default C<0>, meaning that libev -will try to invoke timer/periodic callbacks and I/O callbacks with minimum -latency. - -Setting these to a higher value (the C I be >= C<0>) -allows libev to delay invocation of I/O and timer/periodic callbacks -to increase efficiency of loop iterations (or to increase power-saving -opportunities). - -The idea is that sometimes your program runs just fast enough to handle -one (or very few) event(s) per loop iteration. While this makes the -program responsive, it also wastes a lot of CPU time to poll for new -events, especially with backends like C (or libev) on file descriptors -representing files, and expect it to become ready when their program -doesn't block on disk accesses (which can take a long time on their own). - -However, this cannot ever work in the "expected" way - you get a readiness -notification as soon as the kernel knows whether and how much data is -there, and in the case of open files, that's always the case, so you -always get a readiness notification instantly, and your read (or possibly -write) will still block on the disk I/O. - -Another way to view it is that in the case of sockets, pipes, character -devices and so on, there is another party (the sender) that delivers data -on its own, but in the case of files, there is no such thing: the disk -will not send data on its own, simply because it doesn't know what you -wish to read - you would first have to request some data. - -Since files are typically not-so-well supported by advanced notification -mechanism, libev tries hard to emulate POSIX behaviour with respect -to files, even though you should not use it. The reason for this is -convenience: sometimes you want to watch STDIN or STDOUT, which is -usually a tty, often a pipe, but also sometimes files or special devices -(for example, C on Linux works with F but not with -F), and even though the file might better be served with -asynchronous I/O instead of with non-blocking I/O, it is still useful when -it "just works" instead of freezing. - -So avoid file descriptors pointing to files when you know it (e.g. use -libeio), but use them when it is convenient, e.g. for STDIN/STDOUT, or -when you rarely read from a file instead of from a socket, and want to -reuse the same code path. - -=head3 The special problem of fork - -Some backends (epoll, kqueue) do not support C at all or exhibit -useless behaviour. Libev fully supports fork, but needs to be told about -it in the child if you want to continue to use it in the child. - -To support fork in your child processes, you have to call C after a fork in the child, enable C, or resort to -C or C. - -=head3 The special problem of SIGPIPE - -While not really specific to libev, it is easy to forget about C: -when writing to a pipe whose other end has been closed, your program gets -sent a SIGPIPE, which, by default, aborts your program. For most programs -this is sensible behaviour, for daemons, this is usually undesirable. - -So when you encounter spurious, unexplained daemon exits, make sure you -ignore SIGPIPE (and maybe make sure you log the exit status of your daemon -somewhere, as that would have given you a big clue). - -=head3 The special problem of accept()ing when you can't - -Many implementations of the POSIX C function (for example, -found in post-2004 Linux) have the peculiar behaviour of not removing a -connection from the pending queue in all error cases. - -For example, larger servers often run out of file descriptors (because -of resource limits), causing C to fail with C but not -rejecting the connection, leading to libev signalling readiness on -the next iteration again (the connection still exists after all), and -typically causing the program to loop at 100% CPU usage. - -Unfortunately, the set of errors that cause this issue differs between -operating systems, there is usually little the app can do to remedy the -situation, and no known thread-safe method of removing the connection to -cope with overload is known (to me). - -One of the easiest ways to handle this situation is to just ignore it -- when the program encounters an overload, it will just loop until the -situation is over. While this is a form of busy waiting, no OS offers an -event-based way to handle this situation, so it's the best one can do. - -A better way to handle the situation is to log any errors other than -C and C, making sure not to flood the log with such -messages, and continue as usual, which at least gives the user an idea of -what could be wrong ("raise the ulimit!"). For extra points one could stop -the C watcher on the listening fd "for a while", which reduces CPU -usage. - -If your program is single-threaded, then you could also keep a dummy file -descriptor for overload situations (e.g. by opening F), and -when you run into C or C, close it, run C, -close that fd, and create a new dummy fd. This will gracefully refuse -clients under typical overload conditions. - -The last way to handle it is to simply log the error and C, as -is often done with C failures, but this results in an easy -opportunity for a DoS attack. - -=head3 Watcher-Specific Functions - -=over 4 - -=item ev_io_init (ev_io *, callback, int fd, int events) - -=item ev_io_set (ev_io *, int fd, int events) - -Configures an C watcher. The C is the file descriptor to -receive events for and C is either C, C or -C, to express the desire to receive the given events. - -=item int fd [read-only] - -The file descriptor being watched. - -=item int events [read-only] - -The events being watched. - -=back - -=head3 Examples - -Example: Call C when STDIN_FILENO has become, well -readable, but only once. Since it is likely line-buffered, you could -attempt to read a whole line in the callback. - - static void - stdin_readable_cb (struct ev_loop *loop, ev_io *w, int revents) - { - ev_io_stop (loop, w); - .. read from stdin here (or from w->fd) and handle any I/O errors - } - - ... - struct ev_loop *loop = ev_default_init (0); - ev_io stdin_readable; - ev_io_init (&stdin_readable, stdin_readable_cb, STDIN_FILENO, EV_READ); - ev_io_start (loop, &stdin_readable); - ev_run (loop, 0); - - -=head2 C - relative and optionally repeating timeouts - -Timer watchers are simple relative timers that generate an event after a -given time, and optionally repeating in regular intervals after that. - -The timers are based on real time, that is, if you register an event that -times out after an hour and you reset your system clock to January last -year, it will still time out after (roughly) one hour. "Roughly" because -detecting time jumps is hard, and some inaccuracies are unavoidable (the -monotonic clock option helps a lot here). - -The callback is guaranteed to be invoked only I its timeout has -passed (not I, so on systems with very low-resolution clocks this -might introduce a small delay, see "the special problem of being too -early", below). If multiple timers become ready during the same loop -iteration then the ones with earlier time-out values are invoked before -ones of the same priority with later time-out values (but this is no -longer true when a callback calls C recursively). - -=head3 Be smart about timeouts - -Many real-world problems involve some kind of timeout, usually for error -recovery. A typical example is an HTTP request - if the other side hangs, -you want to raise some error after a while. - -What follows are some ways to handle this problem, from obvious and -inefficient to smart and efficient. - -In the following, a 60 second activity timeout is assumed - a timeout that -gets reset to 60 seconds each time there is activity (e.g. each time some -data or other life sign was received). - -=over 4 - -=item 1. Use a timer and stop, reinitialise and start it on activity. - -This is the most obvious, but not the most simple way: In the beginning, -start the watcher: - - ev_timer_init (timer, callback, 60., 0.); - ev_timer_start (loop, timer); - -Then, each time there is some activity, C it, initialise it -and start it again: - - ev_timer_stop (loop, timer); - ev_timer_set (timer, 60., 0.); - ev_timer_start (loop, timer); - -This is relatively simple to implement, but means that each time there is -some activity, libev will first have to remove the timer from its internal -data structure and then add it again. Libev tries to be fast, but it's -still not a constant-time operation. - -=item 2. Use a timer and re-start it with C inactivity. - -This is the easiest way, and involves using C instead of -C. - -To implement this, configure an C with a C value -of C<60> and then call C at start and each time you -successfully read or write some data. If you go into an idle state where -you do not expect data to travel on the socket, you can C -the timer, and C will automatically restart it if need be. - -That means you can ignore both the C function and the -C argument to C, and only ever use the C -member and C. - -At start: - - ev_init (timer, callback); - timer->repeat = 60.; - ev_timer_again (loop, timer); - -Each time there is some activity: - - ev_timer_again (loop, timer); - -It is even possible to change the time-out on the fly, regardless of -whether the watcher is active or not: - - timer->repeat = 30.; - ev_timer_again (loop, timer); - -This is slightly more efficient then stopping/starting the timer each time -you want to modify its timeout value, as libev does not have to completely -remove and re-insert the timer from/into its internal data structure. - -It is, however, even simpler than the "obvious" way to do it. - -=item 3. Let the timer time out, but then re-arm it as required. - -This method is more tricky, but usually most efficient: Most timeouts are -relatively long compared to the intervals between other activity - in -our example, within 60 seconds, there are usually many I/O events with -associated activity resets. - -In this case, it would be more efficient to leave the C alone, -but remember the time of last activity, and check for a real timeout only -within the callback: - - ev_tstamp timeout = 60.; - ev_tstamp last_activity; // time of last activity - ev_timer timer; - - static void - callback (EV_P_ ev_timer *w, int revents) - { - // calculate when the timeout would happen - ev_tstamp after = last_activity - ev_now (EV_A) + timeout; - - // if negative, it means we the timeout already occurred - if (after < 0.) - { - // timeout occurred, take action - } - else - { - // callback was invoked, but there was some recent - // activity. simply restart the timer to time out - // after "after" seconds, which is the earliest time - // the timeout can occur. - ev_timer_set (w, after, 0.); - ev_timer_start (EV_A_ w); - } - } - -To summarise the callback: first calculate in how many seconds the -timeout will occur (by calculating the absolute time when it would occur, -C, and subtracting the current time, C from that). - -If this value is negative, then we are already past the timeout, i.e. we -timed out, and need to do whatever is needed in this case. - -Otherwise, we now the earliest time at which the timeout would trigger, -and simply start the timer with this timeout value. - -In other words, each time the callback is invoked it will check whether -the timeout occurred. If not, it will simply reschedule itself to check -again at the earliest time it could time out. Rinse. Repeat. - -This scheme causes more callback invocations (about one every 60 seconds -minus half the average time between activity), but virtually no calls to -libev to change the timeout. - -To start the machinery, simply initialise the watcher and set -C to the current time (meaning there was some activity just -now), then call the callback, which will "do the right thing" and start -the timer: - - last_activity = ev_now (EV_A); - ev_init (&timer, callback); - callback (EV_A_ &timer, 0); - -When there is some activity, simply store the current time in -C, no libev calls at all: - - if (activity detected) - last_activity = ev_now (EV_A); - -When your timeout value changes, then the timeout can be changed by simply -providing a new value, stopping the timer and calling the callback, which -will again do the right thing (for example, time out immediately :). - - timeout = new_value; - ev_timer_stop (EV_A_ &timer); - callback (EV_A_ &timer, 0); - -This technique is slightly more complex, but in most cases where the -time-out is unlikely to be triggered, much more efficient. - -=item 4. Wee, just use a double-linked list for your timeouts. - -If there is not one request, but many thousands (millions...), all -employing some kind of timeout with the same timeout value, then one can -do even better: - -When starting the timeout, calculate the timeout value and put the timeout -at the I of the list. - -Then use an C to fire when the timeout at the I of -the list is expected to fire (for example, using the technique #3). - -When there is some activity, remove the timer from the list, recalculate -the timeout, append it to the end of the list again, and make sure to -update the C if it was taken from the beginning of the list. - -This way, one can manage an unlimited number of timeouts in O(1) time for -starting, stopping and updating the timers, at the expense of a major -complication, and having to use a constant timeout. The constant timeout -ensures that the list stays sorted. - -=back - -So which method the best? - -Method #2 is a simple no-brain-required solution that is adequate in most -situations. Method #3 requires a bit more thinking, but handles many cases -better, and isn't very complicated either. In most case, choosing either -one is fine, with #3 being better in typical situations. - -Method #1 is almost always a bad idea, and buys you nothing. Method #4 is -rather complicated, but extremely efficient, something that really pays -off after the first million or so of active timers, i.e. it's usually -overkill :) - -=head3 The special problem of being too early - -If you ask a timer to call your callback after three seconds, then -you expect it to be invoked after three seconds - but of course, this -cannot be guaranteed to infinite precision. Less obviously, it cannot be -guaranteed to any precision by libev - imagine somebody suspending the -process with a STOP signal for a few hours for example. - -So, libev tries to invoke your callback as soon as possible I the -delay has occurred, but cannot guarantee this. - -A less obvious failure mode is calling your callback too early: many event -loops compare timestamps with a "elapsed delay >= requested delay", but -this can cause your callback to be invoked much earlier than you would -expect. - -To see why, imagine a system with a clock that only offers full second -resolution (think windows if you can't come up with a broken enough OS -yourself). If you schedule a one-second timer at the time 500.9, then the -event loop will schedule your timeout to elapse at a system time of 500 -(500.9 truncated to the resolution) + 1, or 501. - -If an event library looks at the timeout 0.1s later, it will see "501 >= -501" and invoke the callback 0.1s after it was started, even though a -one-second delay was requested - this is being "too early", despite best -intentions. - -This is the reason why libev will never invoke the callback if the elapsed -delay equals the requested delay, but only when the elapsed delay is -larger than the requested delay. In the example above, libev would only invoke -the callback at system time 502, or 1.1s after the timer was started. - -So, while libev cannot guarantee that your callback will be invoked -exactly when requested, it I and I guarantee that the requested -delay has actually elapsed, or in other words, it always errs on the "too -late" side of things. - -=head3 The special problem of time updates - -Establishing the current time is a costly operation (it usually takes -at least one system call): EV therefore updates its idea of the current -time only before and after C collects new events, which causes a -growing difference between C and C when handling -lots of events in one iteration. - -The relative timeouts are calculated relative to the C -time. This is usually the right thing as this timestamp refers to the time -of the event triggering whatever timeout you are modifying/starting. If -you suspect event processing to be delayed and you I to base the -timeout on the current time, use something like this to adjust for this: - - ev_timer_set (&timer, after + ev_now () - ev_time (), 0.); - -If the event loop is suspended for a long time, you can also force an -update of the time returned by C by calling C. - -=head3 The special problem of unsynchronised clocks - -Modern systems have a variety of clocks - libev itself uses the normal -"wall clock" clock and, if available, the monotonic clock (to avoid time -jumps). - -Neither of these clocks is synchronised with each other or any other clock -on the system, so C might return a considerably different time -than C or C