From 2643de44f274df8463d560c69f95a4cfdd440b34 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Mon, 4 Jul 2016 18:23:17 +0800 Subject: [PATCH] Clean up --- .gitignore | 8 +- .travis.yml | 4 + Makefile.am | 4 +- Makefile.in | 150 +++--------- README.md | 4 +- configure | 302 +++++++++++++++++++++++- configure.ac | 2 +- {Doc => doc}/Makefile.in | 0 {Doc => doc}/asciidoc.conf | 0 {Doc => doc}/manpage-base.xsl | 0 {Doc => doc}/manpage-bold-literal.xsl | 0 {Doc => doc}/manpage-normal.xsl | 0 {Doc => doc}/shadowsocks-libev.asciidoc | 0 {Doc => doc}/ss-local.asciidoc | 0 {Doc => doc}/ss-manager.asciidoc | 0 {Doc => doc}/ss-nat.asciidoc | 0 {Doc => doc}/ss-redir.asciidoc | 0 {Doc => doc}/ss-server.asciidoc | 0 {Doc => doc}/ss-tunnel.asciidoc | 0 libcork/Makefile.in | 6 + libev/Makefile.in | 6 + libipset/Makefile.in | 6 + libudns/Makefile.in | 6 + src/Makefile.in | 22 +- 24 files changed, 383 insertions(+), 137 deletions(-) rename {Doc => doc}/Makefile.in (100%) rename {Doc => doc}/asciidoc.conf (100%) rename {Doc => doc}/manpage-base.xsl (100%) rename {Doc => doc}/manpage-bold-literal.xsl (100%) rename {Doc => doc}/manpage-normal.xsl (100%) rename {Doc => doc}/shadowsocks-libev.asciidoc (100%) rename {Doc => doc}/ss-local.asciidoc (100%) rename {Doc => doc}/ss-manager.asciidoc (100%) rename {Doc => doc}/ss-nat.asciidoc (100%) rename {Doc => doc}/ss-redir.asciidoc (100%) rename {Doc => doc}/ss-server.asciidoc (100%) rename {Doc => doc}/ss-tunnel.asciidoc (100%) diff --git a/.gitignore b/.gitignore index a68c8d09..b146c1e3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ libev/Makefile libudns/Makefile libcork/Makefile libipset/Makefile -Doc/Makefile +doc/Makefile autom4te.cache/ /config.h config.log @@ -38,9 +38,9 @@ libsodium/src/libsodium/include/sodium/version.h *.swp # Documentation files -Doc/*.gz -Doc/*.xml -Doc/*.html +doc/*.gz +doc/*.xml +doc/*.html # Do not edit the following section # Edit Compile Debug Document Distribute diff --git a/.travis.yml b/.travis.yml index 4d4eea31..ff455e40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,10 @@ language: c compiler: - gcc - clang +addons: + apt: + packages: + - asciidoc script: "./configure && make" branches: only: diff --git a/Makefile.am b/Makefile.am index 73d375a6..9709e2af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ if USE_SYSTEM_SHARED_LIB -SUBDIRS = libcork libipset src Doc +SUBDIRS = libcork libipset src doc else -SUBDIRS = libsodium libcork libipset libudns libev src Doc +SUBDIRS = libsodium libcork libipset libudns libev src doc endif ACLOCAL_AMFLAGS = -I m4 diff --git a/Makefile.in b/Makefile.in index c75622e0..fefbb7de 100644 --- a/Makefile.in +++ b/Makefile.in @@ -82,12 +82,13 @@ subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/shadowsocks-libev.pc.in \ - COPYING INSTALL auto/ar-lib auto/compile auto/config.guess \ - auto/config.sub auto/depcomp auto/install-sh auto/missing \ - auto/ltmain.sh $(top_srcdir)/auto/ar-lib \ - $(top_srcdir)/auto/compile $(top_srcdir)/auto/config.guess \ - $(top_srcdir)/auto/config.sub $(top_srcdir)/auto/install-sh \ - $(top_srcdir)/auto/ltmain.sh $(top_srcdir)/auto/missing + $(top_srcdir)/doc/Makefile.in AUTHORS COPYING INSTALL \ + auto/ar-lib auto/compile auto/config.guess auto/config.sub \ + auto/depcomp auto/install-sh auto/missing auto/ltmain.sh \ + $(top_srcdir)/auto/ar-lib $(top_srcdir)/auto/compile \ + $(top_srcdir)/auto/config.guess $(top_srcdir)/auto/config.sub \ + $(top_srcdir)/auto/install-sh $(top_srcdir)/auto/ltmain.sh \ + $(top_srcdir)/auto/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/ax_tls.m4 $(top_srcdir)/m4/inet_ntop.m4 \ @@ -103,7 +104,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = shadowsocks-libev.pc +CONFIG_CLEAN_FILES = shadowsocks-libev.pc doc/Makefile CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -159,12 +160,7 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" \ - "$(DESTDIR)$(pkgconfiglibdir)" -man8dir = $(mandir)/man8 -NROFF = nroff -MANS = $(man_MANS) +am__installdirs = "$(DESTDIR)$(pkgconfiglibdir)" DATA = $(pkgconfiglib_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -195,7 +191,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags CSCOPE = cscope -DIST_SUBDIRS = libsodium libcork libipset libudns libev src +DIST_SUBDIRS = libsodium libcork libipset libudns libev src doc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -242,6 +238,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -254,6 +251,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -264,6 +262,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +GZIP = @GZIP@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -282,6 +281,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MV = @MV@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -300,11 +300,13 @@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ +RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -359,12 +361,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@USE_SYSTEM_SHARED_LIB_FALSE@SUBDIRS = libsodium libcork libipset libudns libev src -@USE_SYSTEM_SHARED_LIB_TRUE@SUBDIRS = libcork libipset src +@USE_SYSTEM_SHARED_LIB_FALSE@SUBDIRS = libsodium libcork libipset libudns libev src doc +@USE_SYSTEM_SHARED_LIB_TRUE@SUBDIRS = libcork libipset src doc ACLOCAL_AMFLAGS = -I m4 -man_MANS = man/shadowsocks-libev.8 man/ss-server.1 man/ss-local.1 man/ss-redir.1\ - man/ss-manager.1 man/ss-tunnel.1 man/ss-nat.1 - pkgconfiglibdir = $(libdir)/pkgconfig pkgconfiglib_DATA = shadowsocks-libev.pc all: config.h @@ -422,6 +421,8 @@ distclean-hdr: -rm -f config.h stamp-h1 shadowsocks-libev.pc: $(top_builddir)/config.status $(srcdir)/shadowsocks-libev.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -431,92 +432,6 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(man_MANS)'; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(man_MANS)'; \ - test -n "$(man8dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.8[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) install-pkgconfiglibDATA: $(pkgconfiglib_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfiglib_DATA)'; test -n "$(pkgconfiglibdir)" || list=; \ @@ -835,10 +750,10 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile $(MANS) $(DATA) config.h +all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgconfiglibdir)"; do \ + for dir in "$(DESTDIR)$(pkgconfiglibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -893,7 +808,7 @@ info: info-recursive info-am: -install-data-am: install-man install-pkgconfiglibDATA +install-data-am: install-pkgconfiglibDATA install-dvi: install-dvi-recursive @@ -909,7 +824,7 @@ install-info: install-info-recursive install-info-am: -install-man: install-man1 install-man8 +install-man: install-pdf: install-pdf-recursive @@ -939,9 +854,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-man uninstall-pkgconfiglibDATA - -uninstall-man: uninstall-man1 uninstall-man8 +uninstall-am: uninstall-pkgconfiglibDATA .MAKE: $(am__recursive_targets) all install-am install-strip @@ -955,13 +868,12 @@ uninstall-man: uninstall-man1 uninstall-man8 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-man1 install-man8 install-pdf \ - install-pdf-am install-pkgconfiglibDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-man uninstall-man1 uninstall-man8 \ + install-man install-pdf install-pdf-am \ + install-pkgconfiglibDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgconfiglibDATA diff --git a/README.md b/README.md index 60461ac2..8c03c1a4 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ section below. ``` bash cd shadowsocks-libev sudo apt-get install build-essential autoconf libtool libssl-dev \ - gawk debhelper dh-systemd init-system-helpers pkg-config + gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc dpkg-buildpackage -b -us -uc -i cd .. sudo dpkg -i shadowsocks-libev*.deb @@ -259,7 +259,7 @@ For Unix-like systems, especially Debian-based systems, e.g. Ubuntu, Debian or Linux Mint, you can build the binary like this: ```bash -sudo apt-get install build-essential autoconf libtool libssl-dev +sudo apt-get install build-essential autoconf libtool libssl-dev asciidoc ./configure && make sudo make install ``` diff --git a/configure b/configure index 3d99f587..77f42488 100755 --- a/configure +++ b/configure @@ -648,6 +648,12 @@ PTHREAD_LIBS PTHREAD_CC ax_pthread_config INET_NTOP_LIB +MV +RM +GZIP +XMLTO +ASCIIDOC +DISABLE_DOCUMENTATION USE_SYSTEM_SHARED_LIB_FALSE USE_SYSTEM_SHARED_LIB_TRUE OTOOL64 @@ -780,6 +786,7 @@ with_sysroot enable_libtool_lock enable_system_shared_lib with_crypto_library +enable_documentation enable_zlib with_zlib with_zlib_include @@ -1441,6 +1448,7 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --enable-system-shared-lib build against shared libraries when possible + --disable-documentation do not build documentation --disable-zlib disable zlib compression support --enable-applecc enable Apple CommonCrypto API support --disable-ssp Do not compile with -fstack-protector @@ -12024,6 +12032,215 @@ else fi +# Check whether --enable-documentation was given. +if test "${enable_documentation+set}" = set; then : + enableval=$enable_documentation; +else + enable_documentation=yes +fi + +if test "x$enable_documentation" = xyes; then : + DISABLE_DOCUMENTATION=0 +else + DISABLE_DOCUMENTATION=1 +fi + + +if test "x$enable_documentation" = xyes; then + # Extract the first word of "asciidoc", so it can be a program name with args. +set dummy asciidoc; 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_path_ASCIIDOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ASCIIDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ASCIIDOC="$ASCIIDOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ASCIIDOC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ASCIIDOC" && ac_cv_path_ASCIIDOC="asciidoc" + ;; +esac +fi +ASCIIDOC=$ac_cv_path_ASCIIDOC +if test -n "$ASCIIDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 +$as_echo "$ASCIIDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; 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_path_XMLTO+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XMLTO in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_XMLTO" && ac_cv_path_XMLTO="xmlto" + ;; +esac +fi +XMLTO=$ac_cv_path_XMLTO +if test -n "$XMLTO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 +$as_echo "$XMLTO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "gzip", so it can be a program name with args. +set dummy gzip; 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_path_GZIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GZIP" && ac_cv_path_GZIP="gzip" + ;; +esac +fi +GZIP=$ac_cv_path_GZIP +if test -n "$GZIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5 +$as_echo "$GZIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + { $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 + +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -12668,6 +12885,88 @@ $as_echo "no" >&6; } fi +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; 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_path_RM+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $RM in + [\\/]* | ?:[\\/]*) + ac_cv_path_RM="$RM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" + ;; +esac +fi +RM=$ac_cv_path_RM +if test -n "$RM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 +$as_echo "$RM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "mv", so it can be a program name with args. +set dummy mv; 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_path_MV+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MV in + [\\/]* | ?:[\\/]*) + ac_cv_path_MV="$MV" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv" + ;; +esac +fi +MV=$ac_cv_path_MV +if test -n "$MV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5 +$as_echo "$MV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test -z "$USE_SYSTEM_SHARED_LIB_TRUE"; then : else @@ -15585,7 +15884,7 @@ if test -z "$USE_SYSTEM_SHARED_LIB_TRUE"; then : fi -ac_config_files="$ac_config_files shadowsocks-libev.pc Makefile libcork/Makefile libipset/Makefile src/Makefile" +ac_config_files="$ac_config_files shadowsocks-libev.pc Makefile libcork/Makefile libipset/Makefile src/Makefile doc/Makefile" if test -z "$USE_SYSTEM_SHARED_LIB_TRUE"; then : else @@ -16623,6 +16922,7 @@ do "libcork/Makefile") CONFIG_FILES="$CONFIG_FILES libcork/Makefile" ;; "libipset/Makefile") CONFIG_FILES="$CONFIG_FILES libipset/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "libudns/Makefile") CONFIG_FILES="$CONFIG_FILES libudns/Makefile" ;; "libev/Makefile") CONFIG_FILES="$CONFIG_FILES libev/Makefile" ;; diff --git a/configure.ac b/configure.ac index 7d50425f..cbb036e1 100755 --- a/configure.ac +++ b/configure.ac @@ -307,7 +307,7 @@ AC_CONFIG_FILES([ shadowsocks-libev.pc libcork/Makefile libipset/Makefile src/Makefile - Doc/Makefile]) + doc/Makefile]) AM_COND_IF([USE_SYSTEM_SHARED_LIB], [], [AC_CONFIG_FILES([libudns/Makefile diff --git a/Doc/Makefile.in b/doc/Makefile.in similarity index 100% rename from Doc/Makefile.in rename to doc/Makefile.in diff --git a/Doc/asciidoc.conf b/doc/asciidoc.conf similarity index 100% rename from Doc/asciidoc.conf rename to doc/asciidoc.conf diff --git a/Doc/manpage-base.xsl b/doc/manpage-base.xsl similarity index 100% rename from Doc/manpage-base.xsl rename to doc/manpage-base.xsl diff --git a/Doc/manpage-bold-literal.xsl b/doc/manpage-bold-literal.xsl similarity index 100% rename from Doc/manpage-bold-literal.xsl rename to doc/manpage-bold-literal.xsl diff --git a/Doc/manpage-normal.xsl b/doc/manpage-normal.xsl similarity index 100% rename from Doc/manpage-normal.xsl rename to doc/manpage-normal.xsl diff --git a/Doc/shadowsocks-libev.asciidoc b/doc/shadowsocks-libev.asciidoc similarity index 100% rename from Doc/shadowsocks-libev.asciidoc rename to doc/shadowsocks-libev.asciidoc diff --git a/Doc/ss-local.asciidoc b/doc/ss-local.asciidoc similarity index 100% rename from Doc/ss-local.asciidoc rename to doc/ss-local.asciidoc diff --git a/Doc/ss-manager.asciidoc b/doc/ss-manager.asciidoc similarity index 100% rename from Doc/ss-manager.asciidoc rename to doc/ss-manager.asciidoc diff --git a/Doc/ss-nat.asciidoc b/doc/ss-nat.asciidoc similarity index 100% rename from Doc/ss-nat.asciidoc rename to doc/ss-nat.asciidoc diff --git a/Doc/ss-redir.asciidoc b/doc/ss-redir.asciidoc similarity index 100% rename from Doc/ss-redir.asciidoc rename to doc/ss-redir.asciidoc diff --git a/Doc/ss-server.asciidoc b/doc/ss-server.asciidoc similarity index 100% rename from Doc/ss-server.asciidoc rename to doc/ss-server.asciidoc diff --git a/Doc/ss-tunnel.asciidoc b/doc/ss-tunnel.asciidoc similarity index 100% rename from Doc/ss-tunnel.asciidoc rename to doc/ss-tunnel.asciidoc diff --git a/libcork/Makefile.in b/libcork/Makefile.in index 464a5369..bcd8b4c2 100644 --- a/libcork/Makefile.in +++ b/libcork/Makefile.in @@ -207,6 +207,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -219,6 +220,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -229,6 +231,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +GZIP = @GZIP@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -247,6 +250,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MV = @MV@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -265,11 +269,13 @@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ +RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libev/Makefile.in b/libev/Makefile.in index 0ee0bd4c..966481de 100644 --- a/libev/Makefile.in +++ b/libev/Makefile.in @@ -174,6 +174,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -186,6 +187,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -196,6 +198,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +GZIP = @GZIP@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -214,6 +217,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MV = @MV@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -232,11 +236,13 @@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ +RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libipset/Makefile.in b/libipset/Makefile.in index a8394afc..42272dd7 100644 --- a/libipset/Makefile.in +++ b/libipset/Makefile.in @@ -203,6 +203,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -215,6 +216,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -225,6 +227,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +GZIP = @GZIP@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -243,6 +246,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MV = @MV@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -261,11 +265,13 @@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ +RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libudns/Makefile.in b/libudns/Makefile.in index 77f3f5f0..0029f297 100644 --- a/libudns/Makefile.in +++ b/libudns/Makefile.in @@ -195,6 +195,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -207,6 +208,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -217,6 +219,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +GZIP = @GZIP@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -235,6 +238,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MV = @MV@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -253,11 +257,13 @@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ +RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/src/Makefile.in b/src/Makefile.in index 6287a335..0a9da1ad 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -322,6 +322,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -334,6 +335,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -344,6 +346,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +GZIP = @GZIP@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -362,6 +365,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MV = @MV@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -380,11 +384,13 @@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ +RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -453,14 +459,14 @@ ss_local_SOURCES = utils.c jconf.c json.c encrypt.c udprelay.c cache.c \ ss_tunnel_SOURCES = utils.c jconf.c json.c encrypt.c udprelay.c \ cache.c netutils.c tunnel.c $(am__append_12) ss_server_SOURCES = utils.c \ - netutils.c \ + netutils.c \ jconf.c \ json.c \ encrypt.c \ - udprelay.c \ - cache.c \ - acl.c \ - resolv.c \ + udprelay.c \ + cache.c \ + acl.c \ + resolv.c \ server.c ss_manager_SOURCES = utils.c \ @@ -481,9 +487,9 @@ ss_manager_CFLAGS = $(AM_CFLAGS) -DMODULE_MANAGER @BUILD_REDIRECTOR_TRUE@ jconf.c \ @BUILD_REDIRECTOR_TRUE@ json.c \ @BUILD_REDIRECTOR_TRUE@ encrypt.c \ -@BUILD_REDIRECTOR_TRUE@ netutils.c \ -@BUILD_REDIRECTOR_TRUE@ cache.c \ -@BUILD_REDIRECTOR_TRUE@ udprelay.c \ +@BUILD_REDIRECTOR_TRUE@ netutils.c \ +@BUILD_REDIRECTOR_TRUE@ cache.c \ +@BUILD_REDIRECTOR_TRUE@ udprelay.c \ @BUILD_REDIRECTOR_TRUE@ redir.c @BUILD_REDIRECTOR_TRUE@ss_redir_CFLAGS = $(AM_CFLAGS) -DMODULE_REDIR