email2trac-2.4.7/0000755000175000017500000000000011702275665011716 5ustar wmbwmbemail2trac-2.4.7/aclocal.m40000644000175000017500000011457211211140552013545 0ustar wmbwmb# generated automatically by aclocal 1.7.9 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. # Do all the work for Automake. -*- Autoconf -*- # 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. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 10 AC_PREREQ([2.54]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # 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_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 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) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # 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([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 ]) ]) # 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_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright 2002 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 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. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.7.9])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _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], [AC_FOREACH([_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. # # Copyright 1996, 1997, 2000, 2001 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # 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 # 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)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # 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 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # 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 ]) # AM_AUX_DIR_EXPAND # Copyright 2001 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # -*- Autoconf -*- # Copyright (C) 2003 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # 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])]) # serial 5 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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], 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'. 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 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 : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} 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 # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' 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 builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; 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. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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"]) ]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # 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 done .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 # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) 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 1999, 2000, 2001, 2002, 2003 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # AM_PATH_PYTHON([MINIMUM-VERSION]) # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python2 python2.6 python2.5 python.2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST) am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do if test "$am_cv_pathless_PYTHON" = : ; then AC_MSG_ERROR([no suitable Python interpreter found]) fi AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # hexversion has been introduced in Python 1.5.2; it's probably not # worth to support older versions (1.5.1 was released on October 31, 1998). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- # 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) email2trac-2.4.7/Makefile.in0000644000175000017500000000256011352362353013756 0ustar wmbwmb# Authors: Bas van der Vlies & Michel Jouvin # Date : 13 Jan 2005 # Desc. : Simple Makefile # # SVN INFO: # $Id: Makefile.in 332 2010-03-24 10:09:47Z bas $ # # prefix=@prefix@ EXEC_PREFIX=@exec_prefix@/bin PYTHON_BIN=@PYTHON@ CONFIG=@sysconfdir@ # User names # TRAC_USER=@trac_user@ MTA_USER=@mta_user@ INSTALL_USER=@install_user@ DEBUG=@DEBUG@ TRAC_SCRIPT_NAME=email2trac CC=@CC@ INSTALL=./install-sh CFLAGS=-DMTA_USER=\"$(MTA_USER)\" -DTRAC_USER=\"$(TRAC_USER)\" -DTRAC_SCRIPT_NAME=\"$(TRAC_SCRIPT_NAME)\" -DTRAC_SCRIPT_PATH=\"$(EXEC_PREFIX)\" -DDEBUG=$(DEBUG) PYTHON_FILES=delete_spam.py email2trac.py WRAPPER_SRC=run_email2trac.c run_email2trac.h all: run_email2trac run_email2trac: $(WRAPPER_SRC) Makefile $(CC) $(CFLAGS) -o $@ run_email2trac.c install: all install-conf $(INSTALL) -d $(DESTDIR)$(EXEC_PREFIX) for script in $(PYTHON_FILES) ; \ do \ name=`basename $$script '.py'` ;\ $(INSTALL) -m 755 -o $(INSTALL_USER) $$script $(DESTDIR)$(EXEC_PREFIX)/$$name ;\ done $(INSTALL) -m 4111 -o $(INSTALL_USER) run_email2trac $(DESTDIR)$(EXEC_PREFIX) install-conf: if [ ! -f $(DESTDIR)/$(CONFIG)/email2trac.conf ] ; \ then \ $(INSTALL) -c -m 644 -o $(INSTALL_USER) email2trac.conf $(DESTDIR)/$(CONFIG)/email2trac.conf ;\ fi clean: rm run_email2trac distclean: rm run_email2trac email2trac.py delete_spam.py config.log config.status Makefile email2trac-2.4.7/run_email2trac.h0000644000175000017500000000107710362442021014762 0ustar wmbwmb/* AUTHOR: Michel Jouvin SVN Info: $Id: run_email2trac.h 24 2006-01-15 12:46:09Z bas $ Local site configuration Value defined here are just default values than can be overriden at compile time See Makefile. */ /* User the MTA is running under */ #ifndef MTA_USER #define MTA_USER "nobody" #endif /* A user with write access to Trac DB */ #ifndef TRAC_USER #define TRAC_USER "www-data" #endif /* email2trac script name and path */ #ifndef TRAC_SCRIPT_NAME #define TRAC_SCRIPT_NAME "email2trac" #endif #ifndef TRAC_SCRIPT_PATH #define TRAC_SCRIPT_PATH "/usr/bin" #endif email2trac-2.4.7/email2trac.conf0000644000175000017500000000061311622714040014572 0ustar wmbwmb[DEFAULT] project: /data/trac/hpcv/project/test debug: 0 black_list: MAILER-DAEMON@ drop_spam : 1 drop_alternative_html_version: 1 email_quote: > html2text_cmd: ignore_trac_user_settings: 0 inline_properties: 1 reply_all : 0 spam_level: 5 strip_quotes: 0 strip_signature: 0 ticket_update: 1 ticket_update_by_subject: 1 umask: 022 verbatim_format: 1 [bas] project: /data/trac/bas spam_level: 1 email2trac-2.4.7/run_email2trac.c0000644000175000017500000001006611647745661015002 0ustar wmbwmb/* run_email2trac.c Authors: Bas van der Vlies, Walter de Jong and Michel Jouvin SVN Info: $Id: run_email2trac.c 574 2011-10-20 07:20:17Z bas $ Only nobody can become the user www-data. Postfix uses this user to start an program # Copyright (C) 2002 # # This file is part of the email2trac utils # # 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # */ #include "config.h" #include #include #include #include #include #include #include #include #ifdef HAVE_INITGROUPS #include #endif #include "run_email2trac.h" #ifndef DEBUG #define DEBUG 0 #endif void check_username(char *name) { if ( strlen(name) > 30 ) { if ( DEBUG ) printf("MTA_USERNAME is to large; %s\n", name); exit(-1); } } int main(int argc, char** argv) { int i,j; int caller = getuid(); int status; char **trac_script_args; char *python_egg_cache = NULL; struct passwd *TRAC; struct passwd *MTA; struct stat script_attrs; const char *trac_script = TRAC_SCRIPT_PATH "/" TRAC_SCRIPT_NAME; /* printf("trac_script = %s\n", trac_script); */ /* First copy arguments passed to the wrapper as scripts arguments after filtering out some of the possible script options */ trac_script_args = (char**) malloc((argc+1)*sizeof(char*)); if (trac_script_args == NULL) { if ( DEBUG ) printf("malloc failed\n"); return 1; } trac_script_args[0] = TRAC_SCRIPT_NAME; for (i=j=1; ipw_uid ) { if ( DEBUG ) printf("Invalid caller UID (%d)\n",caller); return -2; /* 254 : Invalid caller */ } /* set UID/GID and supplementary groups to be Trac (or apache) user */ check_username(TRAC_USER); if ( TRAC = getpwnam(TRAC_USER) ) { #ifdef HAVE_INITGROUPS if (initgroups(TRAC_USER, TRAC->pw_gid)) { if ( DEBUG ) printf("initgroups failed\n"); return -7; /* 249 : Can't set supplementary groups */ } #endif if (setgid(TRAC->pw_gid) || setuid(TRAC->pw_uid)) { if ( DEBUG ) printf("setgid or setuid failed\n"); return -5; /* 251: Can't set gid or uid */ } } else { if ( DEBUG ) printf("Invalid Trac user (%s)\n",TRAC_USER); return -6; /* 250 : Trac user not found */ } /* Check that script exists */ if ( stat(trac_script,&script_attrs) ) { if ( DEBUG ) printf("Script not found (%s)\n",trac_script); return -4; /* 252 : script not found */ } /* Set PYTHON_EGG_CACHE env variable if we have been told to do so */ if ( python_egg_cache != NULL ) { setenv("PYTHON_EGG_CACHE",python_egg_cache ,1); } /* Execute script */ status = execv(trac_script, trac_script_args); if ( DEBUG ) printf("Script %s execution failure (error=%d). Check permission and interpreter path.\n",trac_script,status); return -1; /* 255 : should never reach this point */ } /* EOB */ email2trac-2.4.7/delete_spam.py.in0000755000175000017500000001001411403727773015156 0ustar wmbwmb#!@PYTHON@ # # Copyright (C) 2002 # # This file is part of the email2trac utils # # 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # vi: # set ts=4 """ Author: Bas van der Vlies Date : 29 September 2205 Desc. : Delete Spam tickets from database. Else we get an lot of tickets Usage : delete_spam [ -f/--file -n/--dry-run -p/--project -v/--verbose] defaults: configfile = /etc/email2trac.conf SVN Info: $Id: delete_spam.py.in 374 2010-06-09 15:15:07Z bas $ """ import os import sys import getopt import shutil import ConfigParser from trac import __version__ as trac_version def ReadConfig(file, name): """ Parse the config file """ if not os.path.isfile(file): print 'File %s does not exists' %file sys.exit(1) config = ConfigParser.ConfigParser() try: config.read(file) except ConfigParser.MissingSectionHeaderError,detail: print detail sys.exit(1) # Use given project name else use defaults # if name: if not config.has_section(name): print "Not an valid project name: %s" %name print "Valid names: %s" %config.sections() sys.exit(1) project = dict() for option in config.options(name): project[option] = config.get(name, option) else: project = config.defaults() return project def new_delete_spam(parameters): """ This only works for trac versions higher or equal then 0.10 """ debug = int(parameters['debug']) DRY_RUN = parameters['DRY_RUN'] VERBOSE = parameters['VERBOSE'] project = parameters['project'] env = Environment(project, create=0) db = env.get_db_cnx() cursor = db.cursor() cursor.execute("SELECT id FROM ticket WHERE component = 'Spam';") while 1: row = cursor.fetchone() if not row: break spam_id = row[0] if debug or DRY_RUN or VERBOSE: print "Deleting ticket %s" %spam_id try: tkt = Ticket(env, spam_id, db) except util.TracError, detail: print detail continue if DRY_RUN: print 'DRY_RUN: tkt.delete()' else: tkt.delete() if __name__ == '__main__': # Default config file # configfile = '@email2trac_conf@' try: opts, args = getopt.getopt(sys.argv[1:], 'hf:np:v', ['help', 'file=', 'dry-run', 'project=', 'verbose']) except getopt.error,detail: print __doc__ print detail sys.exit(1) DRY_RUN = False VERBOSE = False project_name = None for opt,value in opts: if opt in [ '-h', '--help']: print __doc__ sys.exit(0) elif opt in ['-f', '--file']: configfile = value elif opt in ['-n', '--dry-run']: DRY_RUN = True elif opt in ['-p', '--project']: project_name = value elif opt in ['-v', '--verbose']: VERBOSE = True # Determine major trac version used to be in email2trac.conf # Quick hack for 0.12 # version = '0.%s' %(trac_version.split('.')[1]) if version.startswith('0.12'): version = '0.12' if VERBOSE: print "Found trac version: %s" %version ## We only support versions 0.11 and 0.12 # if not version in ['0.11', '0.12']: print 'Trac version %s is not suported' %(version) settings = ReadConfig(configfile, project_name) if not settings.has_key('project'): print __doc__ print 'No project defined in config file, eg:\n\t project: /data/trac/bas' sys.exit(1) settings['DRY_RUN'] = DRY_RUN settings['VERBOSE'] = VERBOSE from trac.env import Environment from trac.ticket import Ticket from trac import util new_delete_spam(settings) print 'Spam is deleted succesfully..' # EOB email2trac-2.4.7/email2trac.py.in0000755000175000017500000024316311674062622014727 0ustar wmbwmb#!@PYTHON@ # Copyright (C) 2002 # # This file is part of the email2trac utils # # 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # For vi/emacs or other use tabstop=4 (vi: set ts=4) # """ email2trac.py -- Email -> TRAC tickets A MTA filter to create Trac tickets from inbound emails. first proof of concept from: Copyright 2005, Daniel Lundin Copyright 2005, Edgewall Software Authors: Bas van der Vlies Walter de Jong How to use ---------- * See https://subtrac.sara.nl/oss/email2trac/ * Commandline opions: -h,--help -d, --debug -f,--file -n,--dry-run -p, --project -t, --ticket_prefix SVN Info: $Id: email2trac.py.in 582 2011-12-20 10:38:10Z bas $ """ import os import sys import string import getopt import time import email import email.Iterators import email.Header import re import urllib import unicodedata import mimetypes import traceback import logging import logging.handlers import UserDict import tempfile from datetime import timedelta, datetime from stat import * from trac import __version__ as trac_version from trac import config as trac_config ## Some global variables # m = None # This is to for the function AlwaysNotifyReporter sender_email = None class SaraDict(UserDict.UserDict): def __init__(self, dictin = None): UserDict.UserDict.__init__(self) self.name = None if dictin: if dictin.has_key('name'): self.name = dictin['name'] del dictin['name'] self.data = dictin def get_value(self, name): if self.has_key(name): return self[name] else: return None def __repr__(self): return repr(self.data) def __str__(self): return str(self.data) def __getattr__(self, name): """ override the class attribute get method. Return the value from the dictionary """ if self.data.has_key(name): return self.data[name] else: return None def __setattr__(self, name, value): """ override the class attribute set method only when the UserDict has set its class attribute """ if self.__dict__.has_key('data'): self.data[name] = value else: self.__dict__[name] = value def __iter__(self): return iter(self.data.keys()) class TicketEmailParser(object): env = None comment = '> ' def __init__(self, env, parameters, logger, version): self.env = env # Database connection # self.db = None # Save parameters # self.parameters = parameters self.logger = logger # Some useful mail constants # self.email_name = None self.email_addr = None self.email_from = None self.author = None self.id = None self.STRIP_CONTENT_TYPES = list() ## fields properties via body_text # self.properties = dict() self.VERSION = version self.get_config = self.env.config.get ## init function ## # self.setup_parameters() def setup_parameters(self): if self.parameters.umask: os.umask(self.parameters.umask) if not self.parameters.spam_level: self.parameters.spam_level = 0 if not self.parameters.spam_header: self.parameters.spam_header = 'X-Spam-Score' if not self.parameters.email_quote: self.parameters.email_quote = '> ' if not self.parameters.ticket_update_by_subject_lookback: self.parameters.ticket_update_by_subject_lookback = 30 if self.parameters.verbatim_format == None: self.parameters.verbatim_format = 1 if self.parameters.reflow == None: self.parameters.reflow = 1 if self.parameters.binhex: self.STRIP_CONTENT_TYPES.append('application/mac-binhex40') if self.parameters.applesingle: self.STRIP_CONTENT_TYPES.append('application/applefile') if self.parameters.appledouble: self.STRIP_CONTENT_TYPES.append('application/applefile') if self.parameters.strip_content_types: items = self.parameters.strip_content_types.split(',') for item in items: self.STRIP_CONTENT_TYPES.append(item.strip()) if self.parameters.tmpdir: self.parameters.tmpdir = os.path.normcase(str(self.parameters['tmpdir'])) else: self.parameters.tmpdir = os.path.normcase('/tmp') if self.parameters.email_triggers_workflow == None: self.parameters.email_triggers_workflow = 1 if not self.parameters.subject_field_separator: self.parameters.subject_field_separator = '&' else: self.parameters.subject_field_separator = self.parameters.subject_field_separator.strip() self.trac_smtp_from = self.get_config('notification', 'smtp_from') self.smtp_default_domain = self.get_config('notification', 'smtp_default_domain') self.system = None ########## Email Header Functions ########################################################### def spam(self, message): """ # X-Spam-Score: *** (3.255) BAYES_50,DNS_FROM_AHBL_RHSBL,HTML_ # Note if Spam_level then '*' are included """ self.logger.debug('function spam') spam = False if message.has_key(self.parameters.spam_header): spam_l = string.split(message[self.parameters.spam_header]) #self.logger.info('Spam header: %s' %(message[self.parameters.spam_header])) try: number = spam_l[0].count('*') except IndexError, detail: number = 0 if number >= self.parameters.spam_level: spam = True ## treat virus mails as spam # elif message.has_key('X-Virus-found'): spam = True ## Astaro firewall spam handling # elif message.get('X-Spam-Flag') == "YES" and message.get('X-Spam-Result') == "Spam": spam = True ## How to handle SPAM messages # if self.parameters.drop_spam and spam: self.logger.info('Message is a SPAM. Automatic ticket insertion refused (SPAM level > %d)' %self.parameters.spam_level) return 'drop' elif spam: return 'Spam' else: return False def email_header_acl(self, keyword, message_field, default): """ This function wil check if the email address is allowed or denied to send mail to the ticket list """ self.logger.debug('function email_header_acl: %s' %keyword) try: mail_addresses = self.parameters[keyword] # Check if we have an empty string # if not mail_addresses: return default except KeyError, detail: self.logger.debug('\t %s not defined, all messages are allowed.' %(keyword)) return default mail_addresses = string.split(mail_addresses, ',') message_addresses = string.split(message_field, ',') for entry in mail_addresses: entry = entry.strip() TO_RE = re.compile(entry, re.VERBOSE|re.IGNORECASE) for addr in message_addresses: addr = addr.strip() if self.parameters.compare_function_list in [ 'matches', 'match']: s = '\t%s matches %s' %(addr, entry) result = TO_RE.match(addr) else: s = '\t%s contains %s' %(addr, entry) result = TO_RE.search(addr) if result: self.logger.debug(s) return True return False def email_header_txt(self, m): """ Display To and CC addresses in description field """ s = '' if m['To'] and len(m['To']) > 0: s = "'''To:''' %s\r\n" %(m['To']) if m['Cc'] and len(m['Cc']) > 0: s = "%s'''Cc:''' %s\r\n" % (s, m['Cc']) return self.email_to_unicode(s) def get_sender_info(self, message): """ Get the default author name and email address from the message """ self.logger.debug('function get_sender_info') to_addrs = email.Utils.getaddresses( message.get_all('to', []) ) self.email_to_addrs = list() for n,e in to_addrs: self.email_to_addrs.append(e) self.email_to_addrs = ','.join(self.email_to_addrs) self.email_name, self.email_addr = email.Utils.parseaddr(message['from']) ## decode email name can contain charset # self.email_name = self.email_to_unicode(self.email_name) dstr = '\t email name: %s, email address: %s' %(self.email_name, self.email_addr) self.logger.debug(dstr) ## Trac can not handle author's name that contains spaces # if self.email_addr.lower() == self.trac_smtp_from.lower(): if self.email_name: self.author = self.email_name else: self.author = "email2trac" else: self.author = self.email_addr if self.parameters.ignore_trac_user_settings: return # Is this a registered user, use email address as search key: # result: # u : login name # n : Name that the user has set in the settings tab # e : email address that the user has set in the settings tab # users = [ (u,n,e) for (u, n, e) in self.env.get_known_users(self.db) if ( (e and (e.lower() == self.email_addr.lower())) or (u.lower() + '@' + self.smtp_default_domain.lower() == self.email_addr.lower()) ) ] if len(users) >= 1: self.email_from = users[0][0] self.author = users[0][0] def set_reply_fields(self, ticket, message): """ Set all the right fields for a new ticket """ self.logger.debug('function set_reply_fields') ## Only use name or email adress # ticket['reporter'] = self.author # Put all CC-addresses in ticket CC field # if self.parameters.reply_all: email_cc = '' cc_addrs = email.Utils.getaddresses( message.get_all('cc', []) ) if not cc_addrs: return ## Build a list of forbidden CC addresses # #to_addrs = email.Utils.getaddresses( message.get_all('to', []) ) #to_list = list() #for n,e in to_addrs: # to_list.append(e) ## Always Remove reporter email address from cc-list # try: cc_addrs.remove((self.author, self.email_addr)) except ValueError, detail: pass for name,addr in cc_addrs: ## Prevent mail loop # if addr == self.trac_smtp_from: self.logger.debug("Skipping %s mail address for CC-field" %(addr)) continue if email_cc: email_cc = '%s, %s' %(email_cc, addr) else: email_cc = addr if email_cc: self.logger.debug('set_reply_fields: %s' %email_cc) ticket['cc'] = self.email_to_unicode(email_cc) ########## DEBUG functions ########################################################### def debug_body(self, message_body, temp_file): """ """ self.logger.debug('function debug_body:') body_file = "%s.body" %(temp_file) fx = open(body_file, 'wb') if self.parameters.dry_run: self.logger.info('DRY-RUN: not saving body to %s' %(body_file)) return self.logger.debug('writing body to %s' %(body_file)) if not message_body: message_body = '(None)' message_body = message_body.encode('utf-8') fx.write(message_body) fx.close() try: os.chmod(body_file,S_IRWXU|S_IRWXG|S_IRWXO) except OSError: pass def debug_attachments(self, message_parts, temp_file): """ """ self.logger.debug('function debug_attachments') n = 0 for item in message_parts: ## Skip inline text parts # if not isinstance(item, tuple): continue (original, filename, part) = item self.logger.debug('\t part%d: Content-Type: %s' % (n, part.get_content_type()) ) dummy_filename, ext = os.path.splitext(filename) n = n + 1 part_name = 'part%d%s' %(n, ext) part_file = "%s.%s" %(temp_file, part_name) s = 'writing %s: filename: %s' %(part_file, filename) self.print_unicode(s) ## Forbidden chars, just write part files instead of names # #filename = filename.replace('\\', '_') #filename = filename.replace('/', '_') #filename = filename + '.att_email2trac' # part_file = os.path.join(self.parameters.tmpdir, filename) #part_file = util.text.unicode_quote(part_file) #self.print_unicode(part_file) if self.parameters.dry_run: self.logger.info('DRY_RUN: NOT saving attachments') continue fx = open(part_file, 'wb') text = part.get_payload(decode=1) if not text: text = '(None)' fx.write(text) fx.close() try: os.chmod(part_file,S_IRWXU|S_IRWXG|S_IRWXO) except OSError: pass def save_email_for_debug(self, message, project_name, create_tempfile=False): if self.parameters.dry_run: self.logger.debug('DRY_RUN: NOT saving email message') return if create_tempfile: (fd, tmp_file) = tempfile.mkstemp('.%s.email2trac' %project_name) fx = os.fdopen(fd, 'wb') else: tmp_file = os.path.join(self.parameters.tmpdir, 'msg.%s.email2trac' %project_name) fx = open(tmp_file, 'wb') self.logger.debug('saving email to %s' %(tmp_file)) fx.write('%s' % message) fx.close() try: os.chmod(tmp_file, S_IRWXU|S_IRWXG|S_IRWXO) except OSError: pass message_parts = self.get_message_parts(message) message_parts = self.unique_attachment_names(message_parts) body_text = self.get_body_text(message_parts) self.debug_body(body_text, tmp_file) self.debug_attachments(message_parts, tmp_file) ########## Conversion functions ########################################################### def email_to_unicode(self, message_str): """ Email has 7 bit ASCII code, convert it to unicode with the charset that is encoded in 7-bit ASCII code and encode it as utf-8 so Trac understands it. """ self.logger.debug("function email_to_unicode") results = email.Header.decode_header(message_str) s = None for text,format in results: if format: try: temp = unicode(text, format) except UnicodeError, detail: # This always works # msg = 'ERROR: Could not find charset: %s, please install' %format self.logger.error(msg) temp = unicode(text, 'iso-8859-15') except LookupError, detail: msg = 'ERROR: Could not find charset: %s, please install' %format self.logger.error(msg) #temp = unicode(text, 'iso-8859-15') temp = message_str else: temp = string.strip(text) temp = unicode(text, 'iso-8859-15') if s: s = '%s %s' %(s, temp) else: s = '%s' %temp return s def str_to_dict(self, s): """ Transfrom a string of the form [=]+ to dict[] = """ self.logger.debug("function str_to_dict") fields = string.split(s, self.parameters.subject_field_separator) result = dict() for field in fields: try: index, value = string.split(field, '=') # We can not change the description of a ticket via the subject # line. The description is the body of the email # if index.lower() in ['description']: continue if value: result[index.lower()] = value except ValueError: pass return result def print_unicode(self,s): """ This function prints unicode strings if possible else it will quote it """ try: self.logger.debug(s) except UnicodeEncodeError, detail: self.logger.debug(util.text.unicode_quote(s)) def html_2_txt(self, data): """ Various routines to convert html syntax to valid trac wiki syntax """ self.logger.debug('function html_2_txt') ## This routine make an safe html that can be include # in trac, but no further text processing can be done # # try: # from lxml.html.clean import Cleaner # tags_rm = list() # tags_rm.append('body') # # cleaner = Cleaner(remove_tags=tags_rm ) # parsed_data = cleaner.clean_html(data) # parsed_data = '\n{{{\n#!html\n' + parsed_data + '\n}}}\n' # # return parsed_data # # except ImportError:: # pass parsed_data = None if self.parameters.html2text_cmd: (fd, tmp_file) = tempfile.mkstemp('email2trac.html') f = os.fdopen(fd, 'w') cmd = '%s %s' %(self.parameters.html2text_cmd, tmp_file) self.logger.debug('\t html2text conversion %s'%(cmd)) if self.parameters.dry_run: self.logger.info('DRY_RUN: html2text conversion command: %s\n' %(cmd)) else: f.write(data) f.close() lines = os.popen(cmd).readlines() parsed_data = ''.join(lines) os.unlink(tmp_file) else: self.logger.debug('\t No html2text conversion tool specified in email2trac.conf') return parsed_data def check_filename_length(self, name): """ To bypass a bug in Trac check if the filename lenght is not larger then OS limit. yes : return truncated filename no : return unmodified filename """ self.logger.debug('function check_filename_length: ') if not name: return 'None' dummy_filename, ext = os.path.splitext(name) ## Trac uses this format # quote_format = util.text.unicode_quote(dummy_filename) ## Determine max filename lenght # filemax_length = os.pathconf('/', os.pathconf_names['PC_NAME_MAX']) if len(quote_format) <= filemax_length: return name else: ## Truncate file to filemax_length and reserve room for extension # We must break on a boundry # length = filemax_length - 6 for i in range(0,10): truncated = quote_format[ : (length - i)] try: unqoute_truncated = util.text.unicode_unquote(truncated) unqoute_truncated = unqoute_truncated + ext self.print_unicode('\t ' + unqoute_truncated) break except UnicodeDecodeError, detail: continue return unqoute_truncated ########## TRAC ticket functions ########################################################### def mail_workflow(self, tkt): """ """ self.logger.debug('function mail_workflow: ') req = Mock(authname=self.author, perm=MockPerm(), args={}) ticket_system = TicketSystem(self.env) try: workflow = self.parameters['workflow_%s' %tkt['status'].lower()] except KeyError: ## fallback for compability (Will be deprecated) # workflow can be none. # workflow = None if tkt['status'] in ['closed']: workflow = self.parameters.workflow if workflow: ## process all workflow implementations # tkt_module = TicketModule(self.env) field_changes, problems = tkt_module.get_ticket_changes(req, tkt, workflow) for field in field_changes.keys(): ## We have already processed these fields # if not field in ['summary', 'description']: s = 'workflow : %s, field %s : %s, by %s' \ %(workflow, field, field_changes[field]['new'],field_changes[field]['by'] ) self.logger.debug(s) tkt[field] = field_changes[field]['new'] return True else: return False def check_permission_participants(self, tkt, action): """ Check if the mailer is allowed to update the ticket """ self.logger.debug('function check_permission_participants %s') if tkt['reporter'].lower() in [self.author.lower(), self.email_addr.lower()]: self.logger.debug('ALLOW, %s is the ticket reporter' %(self.email_addr)) return True perm = PermissionSystem(self.env) if perm.check_permission(action, self.author): self.logger.debug('ALLOW, %s has trac permission to update the ticket' %(self.author)) return True # Is the updater in the CC? try: cc_list = tkt['cc'].split(',') for cc in cc_list: if self.email_addr.lower() in cc.lower.strip(): self.logger.debug('ALLOW, %s is in the CC' %(self.email_addr)) return True except KeyError: pass return False def check_permission(self, tkt, action): """ check if the reporter has the right permission for the action: - TICKET_CREATE - TICKET_MODIFY - TICKET_APPEND - TICKET_CHGPROP There are three models: - None : no checking at all - trac : check the permission via trac permission model - email2trac: .... """ self.logger.debug("function check_permission: %s" %(action)) if self.parameters.ticket_permission_system in ['trac']: perm = PermissionCache(self.env, self.author) if perm.has_permission(action): return True else: return False elif self.parameters.ticket_permission_system in ['update_restricted_to_participants']: return (self.check_permission_participants(tkt, action)) ## Default is to allow everybody ticket updates and ticket creation # else: return True def update_ticket_fields(self, ticket, user_dict, new=None): """ This will update the ticket fields. It will check if the given fields are known and if the right values are specified It will only update the ticket field value: - If the field is known - If the value supplied is valid for the ticket field. If not then there are two options: 1) Skip the value (new=None) 2) Set default value for field (new=1) """ self.logger.debug("function update_ticket_fields") ## Check only permission model on ticket updates # if not new: if self.parameters.ticket_permission_system: if not self.check_permission(ticket, 'TICKET_CHGPROP'): self.logger.info('Reporter: %s has no permission to change ticket properties' %self.author) return False ## Build a system dictionary from the ticket fields # with field as index and option as value # sys_dict = dict() for field in ticket.fields: try: sys_dict[field['name']] = field['options'] except KeyError: sys_dict[field['name']] = None pass ## Check user supplied fields an compare them with the # system one's # for field,value in user_dict.items(): s = 'user_field\t %s = %s' %(field,value) self.print_unicode(s) if not field in sys_dict.keys(): self.logger.debug('%s is not a valid field for tickets' %(field)) continue ## To prevent mail loop # if field == 'cc': cc_list = user_dict['cc'].split(',') if self.trac_smtp_from in cc_list: self.logger.debug('MAIL LOOP: %s is not allowed as CC address' %(self.trac_smtp_from)) cc_list.remove(self.trac_smtp_from) value = ','.join(cc_list) ## Check if every value is allowed for this field # if sys_dict[field]: if value in sys_dict[field]: ticket[field] = value else: ## Must we set a default if value is not allowed # if new: value = self.get_config('ticket', 'default_%s' %(field) ) else: ticket[field] = value s = 'ticket_field\t %s = %s' %(field, ticket[field]) self.print_unicode(s) def ticket_update(self, m, id, spam): """ If the current email is a reply to an existing ticket, this function will append the contents of this email to that ticket, instead of creating a new one. """ self.logger.debug("function ticket_update") if not self.parameters.ticket_update: self.logger.debug("ticket_update disabled") return False ## Must we update ticket fields # update_fields = dict() try: id, keywords = string.split(id, '?') update_fields = self.str_to_dict(keywords) ## Strip '#' # self.id = int(id[1:]) except ValueError: ## Strip '#' # self.id = int(id[1:]) self.logger.debug("ticket_update id %s" %id) ## When is the change committed # if self.VERSION < 0.11: when = int(time.time()) else: when = datetime.now(util.datefmt.utc) try: tkt = Ticket(self.env, self.id, self.db) except util.TracError, detail: ## Not a valid ticket # self.id = None return False ## Check the permission of the reporter # if self.parameters.ticket_permission_system: if not self.check_permission(tkt, 'TICKET_APPEND'): self.logger.info('Reporter: %s has no permission to add comments or attachments to tickets' %self.author) return False ## How many changes has this ticket # grouped = TicketModule(self.env).grouped_changelog_entries(tkt, self.db) cnum = sum(1 for e in grouped) + 1 ## reopen the ticket if it is was closed # We must use the ticket workflow framework # if self.parameters.email_triggers_workflow and (self.VERSION >= 0.11): if not self.mail_workflow(tkt): if tkt['status'] in ['closed']: tkt['status'] = 'reopened' tkt['resolution'] = '' ## Old pre 0.11 situation # elif self.parameters.email_triggers_workflow: self.logger.debug('email triggers workflow pre trac 0.11') if tkt['status'] in ['closed']: tkt['status'] = 'reopened' tkt['resolution'] = '' else: self.logger.debug('email triggers workflow disabled') ## Must we update some ticket fields properties via subject line # if update_fields: self.update_ticket_fields(tkt, update_fields) message_parts = self.get_message_parts(m) message_parts = self.unique_attachment_names(message_parts) ## Must we update some ticket fields properties via body_text # if self.properties: self.update_ticket_fields(tkt, self.properties) if self.parameters.email_header: message_parts.insert(0, self.email_header_txt(m)) body_text = self.get_body_text(message_parts) error_with_attachments = self.attach_attachments(message_parts) if body_text.strip() or update_fields or self.properties: if self.parameters.dry_run: s = 'DRY_RUN: tkt.save_changes(self.author, body_text, ticket_change_number) %s %s' %(self.author, cnum) self.logger.info(s) else: if error_with_attachments: body_text = '%s\\%s' %(error_with_attachments, body_text) self.logger.debug('tkt.save_changes(%s, %d)' %(self.author, cnum)) tkt.save_changes(self.author, body_text, when, None, str(cnum)) if not spam: self.notify(tkt, False, when) return True def set_ticket_fields(self, ticket): """ set the ticket fields to value specified - /etc/email2trac.conf with _ - trac default values, trac.ini """ self.logger.debug('function set_ticket_fields') user_dict = dict() for field in ticket.fields: name = field['name'] ## default trac value # if not field.get('custom'): value = self.get_config('ticket', 'default_%s' %(name) ) if (name in ['resolution']) and (value in ['fixed']): value = None else: ## Else get the default value for reporter # value = field.get('value') options = field.get('options') if value and options and (value not in options): value = options[int(value)] s = 'trac[%s] = %s' %(name, value) self.print_unicode(s) ## email2trac.conf settings # prefix = self.parameters.ticket_prefix try: value = self.parameters['%s_%s' %(prefix, name)] s = 'email2trac[%s] = %s ' %(name, value) self.print_unicode(s) except KeyError, detail: pass if value: user_dict[name] = value s = 'used %s = %s' %(name, value) self.print_unicode(s) self.update_ticket_fields(ticket, user_dict, new=1) if 'status' not in user_dict.keys(): ticket['status'] = 'new' def ticket_update_by_subject(self, subject): """ This list of Re: prefixes is probably incomplete. Taken from wikipedia. Here is how the subject is matched - Re: - Re: (:)+ So we must have the last column """ self.logger.debug('function ticket_update_by_subject') found_id = None if self.parameters.ticket_update and self.parameters.ticket_update_by_subject: SUBJECT_RE = re.compile(r'^(?:(?:RE|AW|VS|SV|FW|FWD):\s*)+(.*)', re.IGNORECASE) result = SUBJECT_RE.search(subject) if result: ## This is a reply # orig_subject = result.group(1) self.logger.debug('subject search string: %s' %(orig_subject)) cursor = self.db.cursor() summaries = [orig_subject, '%%: %s' % orig_subject] ## Time resolution is in micoseconds # search_date = datetime.now(util.datefmt.utc) - timedelta(days=self.parameters.ticket_update_by_subject_lookback) if self.VERSION < 0.12: lookback = util.datefmt.to_timestamp(search_date) else: lookback = util.datefmt.to_utimestamp(search_date) for summary in summaries: self.logger.debug('Looking for summary matching: "%s"' % summary) sql = """SELECT id, reporter FROM ticket WHERE changetime >= %s AND summary LIKE %s ORDER BY changetime DESC""" cursor.execute(sql, [lookback, summary.strip()]) for row in cursor: (matched_id, sql_reporter) = row ## Save first entry. # if not found_id: found_id = matched_id ## If subject and reporter are the same. The we certainly have found the right ticket # if sql_reporter == self.author: self.logger.debug('Found matching reporter: %s with ticket id: %d' %(sql_reporter, matched_id)) found_id = matched_id break if found_id: self.logger.debug('Found matching ticket id: %d' % found_id) found_id = '#%d' % found_id return (found_id, orig_subject) # obsolete !?? 12 Aug 2011 #subject = orig_subject return (found_id, subject) def new_ticket(self, msg, subject, spam, set_fields = None): """ Create a new ticket """ self.logger.debug('function new_ticket') tkt = Ticket(self.env) self.set_reply_fields(tkt, msg) self.set_ticket_fields(tkt) ## Check the permission of the reporter # if self.parameters.ticket_permission_system: if not self.check_permission(tkt, 'TICKET_CREATE'): self.logger.info('Reporter: %s has no permission to create tickets' %self.author) return False ## Old style setting for component, will be removed # if spam: tkt['component'] = 'Spam' elif self.parameters.has_key('component'): tkt['component'] = self.parameters['component'] if not msg['Subject']: tkt['summary'] = u'(No subject)' else: tkt['summary'] = subject if set_fields: rest, keywords = string.split(set_fields, '?') if keywords: update_fields = self.str_to_dict(keywords) self.update_ticket_fields(tkt, update_fields) message_parts = self.get_message_parts(msg) ## Must we update some ticket fields properties via body_text # if self.properties: self.update_ticket_fields(tkt, self.properties) message_parts = self.unique_attachment_names(message_parts) ## produce e-mail like header # head = '' if self.parameters.email_header: head = self.email_header_txt(msg) message_parts.insert(0, head) body_text = self.get_body_text(message_parts) tkt['description'] = body_text ## When is the change committed # if self.VERSION < 0.11: when = int(time.time()) else: when = datetime.now(util.datefmt.utc) if self.parameters.dry_run: self.logger.info('DRY_RUN: tkt.insert()') else: self.id = tkt.insert() changed = False comment = '' ## some routines in trac are dependend on ticket id # like alternate notify template # if self.parameters.alternate_notify_template: tkt['id'] = self.id changed = True ## Rewrite the description if we have mailto enabled # if self.parameters.mailto_link: changed = True comment = u'\nadded mailto line\n' #mailto = self.html_mailto_link( m['Subject']) mailto = self.html_mailto_link(subject) tkt['description'] = u'%s\r\n%s%s\r\n' \ %(head, mailto, body_text) ## Save the attachments to the ticket # error_with_attachments = self.attach_attachments(message_parts) if error_with_attachments: changed = True comment = '%s\n%s\n' %(comment, error_with_attachments) if self.parameters.email_triggers_workflow and (self.VERSION >= 0.11): if self.mail_workflow(tkt): changed = True if changed: if self.parameters.dry_run: s = 'DRY_RUN: tkt.save_changes(%s, comment) real reporter = %s' %( tkt['reporter'], self.author) self.logger.info(s) else: tkt.save_changes(tkt['reporter'], comment) if not spam: self.notify(tkt, True) def attach_attachments(self, message_parts, update=False): ''' save any attachments as files in the ticket's directory ''' self.logger.debug('function attach_attachments()') if self.parameters.dry_run: self.logger.debug("DRY_RUN: no attachments attached to tickets") return '' count = 0 ## Get Maxium attachment size # max_size = int(self.get_config('attachment', 'max_size')) status = None for item in message_parts: ## Skip body parts # if not isinstance(item, tuple): continue (original, filename, part) = item ## We have to determine the size so we use this temporary solution. # path, fd = util.create_unique_file(os.path.join(self.parameters.tmpdir, 'email2trac_tmp.att')) text = part.get_payload(decode=1) if not text: text = '(None)' fd.write(text) fd.close() ## get the file_size # stats = os.lstat(path) file_size = stats[ST_SIZE] ## Check if the attachment size is allowed # if (max_size != -1) and (file_size > max_size): status = '%s\nFile %s is larger then allowed attachment size (%d > %d)\n\n' \ %(status, original, file_size, max_size) os.unlink(path) continue else: count = count + 1 ## Insert the attachment # fd = open(path, 'rb') if self.system == 'discussion': att = attachment.Attachment(self.env, 'discussion', 'topic/%s' % (self.id,)) else: s = 'Attach %s to ticket %d' %(filename, self.id) self.print_unicode(s) att = attachment.Attachment(self.env, 'ticket', self.id) ## This will break the ticket_update system, the body_text is vaporized # ;-( # if not update: att.author = self.author att.description = self.email_to_unicode('Added by email2trac') try: self.logger.debug('Insert atachment') att.insert(filename, fd, file_size) except OSError, detail: self.logger.info('%s\nFilename %s could not be saved, problem: %s' %(status, filename, detail)) status = '%s\nFilename %s could not be saved, problem: %s' %(status, filename, detail) ## Remove the created temporary filename # fd.close() os.unlink(path) ## return error # return status ########## Fullblog functions ################################################# def blog(self, msg, subject, id): """ The blog create/update function """ ## import the modules # from tracfullblog.core import FullBlogCore from tracfullblog.model import BlogPost, BlogComment ## instantiate blog core # blog = FullBlogCore(self.env) req = Mock(authname='anonymous', perm=MockPerm(), args={}) if id: ## update blog # comment = BlogComment(self.env, id) comment.author = self.author message_parts = self.get_message_parts(msg) comment.comment = self.get_body_text(message_parts) if self.parameters.dry_run: self.logger.info('DRY-RUN: not adding comment for blog entry "%s"' % id) return blog.create_comment(req, comment) else: ## create blog # import time post = BlogPost(self.env, 'blog_'+time.strftime("%Y%m%d%H%M%S", time.gmtime())) #post = BlogPost(self.env, blog._get_default_postname(self.env)) post.author = self.author post.title = subject.strip() message_parts = self.get_message_parts(msg) post.body = self.get_body_text(message_parts) if self.parameters.dry_run: self.logger.info('DRY-RUN: not creating blog entry "%s"' % post.title) return blog.create_post(req, post, self.author, u'Created by email2trac', False) ########## Discussion functions ############################################## def discussion_topic(self, content, subject): ## Import modules. # from tracdiscussion.api import DiscussionApi from trac.util.datefmt import to_timestamp, utc self.logger.debug('Creating a new topic in forum:', self.id) ## Get dissussion API component. # api = self.env[DiscussionApi] context = self._create_context(content, subject) ## Get forum for new topic. # forum = api.get_forum(context, self.id) if not forum: self.logger.error("ERROR: Replied forum doesn't exist") ## Prepare topic. # topic = {'forum' : forum['id'], 'subject' : context.subject, 'time': to_timestamp(datetime.now(utc)), 'author' : self.author, 'subscribers' : [self.email_addr], 'body' : self.get_body_text(context.content_parts)} ## Add topic to DB and commit it. # self._add_topic(api, context, topic) self.db.commit() def discussion_topic_reply(self, content, subject): ## Import modules. # from tracdiscussion.api import DiscussionApi from trac.util.datefmt import to_timestamp, utc self.logger.debug('Replying to discussion topic', self.id) ## Get dissussion API component. # api = self.env[DiscussionApi] context = self._create_context(content, subject) ## Get replied topic. # topic = api.get_topic(context, self.id) if not topic: self.logger.error("ERROR: Replied topic doesn't exist") ## Prepare message. # message = {'forum' : topic['forum'], 'topic' : topic['id'], 'replyto' : -1, 'time' : to_timestamp(datetime.now(utc)), 'author' : self.author, 'body' : self.get_body_text(context.content_parts)} ## Add message to DB and commit it. # self._add_message(api, context, message) self.db.commit() def discussion_message_reply(self, content, subject): ## Import modules. # from tracdiscussion.api import DiscussionApi from trac.util.datefmt import to_timestamp, utc self.logger.debug('Replying to discussion message', self.id) ## Get dissussion API component. # api = self.env[DiscussionApi] context = self._create_context(content, subject) ## Get replied message. # message = api.get_message(context, self.id) if not message: self.logger.error("ERROR: Replied message doesn't exist") ## Prepare message. # message = {'forum' : message['forum'], 'topic' : message['topic'], 'replyto' : message['id'], 'time' : to_timestamp(datetime.now(utc)), 'author' : self.author, 'body' : self.get_body_text(context.content_parts)} ## Add message to DB and commit it. # self._add_message(api, context, message) self.db.commit() def _create_context(self, content, subject): ## Import modules. # from trac.mimeview import Context from trac.web.api import Request from trac.perm import PermissionCache ## TODO: Read server base URL from config. # Create request object to mockup context creation. # environ = {'SERVER_PORT' : 80, 'SERVER_NAME' : 'test', 'REQUEST_METHOD' : 'POST', 'wsgi.url_scheme' : 'http', 'wsgi.input' : sys.stdin} chrome = {'links': {}, 'scripts': [], 'ctxtnav': [], 'warnings': [], 'notices': []} if self.env.base_url_for_redirect: environ['trac.base_url'] = self.env.base_url req = Request(environ, None) req.chrome = chrome req.tz = 'missing' req.authname = self.author req.perm = PermissionCache(self.env, self.author) req.locale = None ## Create and return context. # context = Context.from_request(req) context.realm = 'discussion-email2trac' context.cursor = self.db.cursor() context.content = content context.subject = subject ## Read content parts from content. # context.content_parts = self.get_message_parts(content) context.content_parts = self.unique_attachment_names( context.content_parts) return context def _add_topic(self, api, context, topic): context.req.perm.assert_permission('DISCUSSION_APPEND') ## Filter topic. # for discussion_filter in api.discussion_filters: accept, topic_or_error = discussion_filter.filter_topic( context, topic) if accept: topic = topic_or_error else: raise TracError(topic_or_error) ## Add a new topic. # api.add_topic(context, topic) ## Get inserted topic with new ID. # topic = api.get_topic_by_time(context, topic['time']) ## Attach attachments. # self.id = topic['id'] self.attach_attachments(context.content_parts, True) ## Notify change listeners. # for listener in api.topic_change_listeners: listener.topic_created(context, topic) def _add_message(self, api, context, message): context.req.perm.assert_permission('DISCUSSION_APPEND') ## Filter message. # for discussion_filter in api.discussion_filters: accept, message_or_error = discussion_filter.filter_message( context, message) if accept: message = message_or_error else: raise TracError(message_or_error) ## Add message. # api.add_message(context, message) ## Get inserted message with new ID. # message = api.get_message_by_time(context, message['time']) ## Attach attachments. # self.attach_attachments(context.content_parts, True) ## Notify change listeners. # for listener in api.message_change_listeners: listener.message_created(context, message) ########## MAIN function ###################################################### def parse(self, fp): """ """ self.logger.debug('Main function parse') global m m = email.message_from_file(fp) if not m: self.logger.debug('This is not a valid email message format') return ## Work around lack of header folding in Python; see http://bugs.python.org/issue4696 # try: m.replace_header('Subject', m['Subject'].replace('\r', '').replace('\n', '')) except AttributeError, detail: pass if self.parameters.debug: # save the entire e-mail message text self.save_email_for_debug(m, self.parameters.project_name, True) self.db = self.env.get_db_cnx() self.get_sender_info(m) if not self.email_header_acl('white_list', self.email_addr, True): self.logger.info('Message rejected : %s not in white list' %(self.email_addr)) return False if self.email_header_acl('black_list', self.email_addr, False): self.logger.info('Message rejected : %s in black list' %(self.email_addr)) return False if not self.email_header_acl('recipient_list', self.email_to_addrs, True): self.logger.info('Message rejected : %s not in recipient list' %(self.email_to_addrs)) return False ## If spam drop the message # if self.spam(m) == 'drop': return False elif self.spam(m) == 'spam': spam_msg = True else: spam_msg = False if not m['Subject']: subject = 'No Subject' else: subject = self.email_to_unicode(m['Subject']) ## Bug in python logging module <2.6 # self.logger.info('subject: %s' %repr(subject)) ## [hic] #1529: Re: LRZ # [hic] #1529?owner=bas,priority=medium: Re: LRZ # ticket_regex = r''' (?P[#][?].*) |(?P(?P[#][\d]+)(?P\?.*)?:) ''' ## Check if FullBlogPlugin is installed # blog_enabled = None blog_regex = '' if self.get_config('components', 'tracfullblog.*') in ['enabled']: self.logger.debug('Trac BLOG support enabled') blog_enabled = True blog_regex = '''|(?Pblog:(?P\w*))''' ## Check if DiscussionPlugin is installed # discussion_enabled = None discussion_regex = '' if self.get_config('components', 'tracdiscussion.api.discussionapi') in ['enabled']: self.logger.debug('Trac Discussion support enabled') discussion_enabled = True discussion_regex = r''' |(?PForum[ ][#](?P\d+)[ ]-[ ]?) |(?PTopic[ ][#](?P\d+)[ ]-[ ]?) |(?PMessage[ ][#](?P\d+)[ ]-[ ]?) ''' regex_str = ticket_regex + blog_regex + discussion_regex SYSTEM_RE = re.compile(regex_str, re.VERBOSE) ## Find out if this is a ticket, a blog or a discussion # result = SYSTEM_RE.search(subject) if result: ## update ticket + fields # if result.group('reply'): self.system = 'ticket' ## Skip the last ':' character # if not self.ticket_update(m, result.group('reply')[:-1], spam_msg): self.new_ticket(m, subject, spam_msg) ## New ticket + fields # elif result.group('new_fields'): self.system = 'ticket' self.new_ticket(m, subject[:result.start('new_fields')], spam_msg, result.group('new_fields')) if blog_enabled: if result.group('blog'): self.system = 'blog' self.blog(m, subject[result.end('blog'):], result.group('blog_id')) if discussion_enabled: ## New topic. # if result.group('forum'): self.system = 'discussion' self.id = int(result.group('forum_id')) self.discussion_topic(m, subject[result.end('forum'):]) ## Reply to topic. # elif result.group('topic'): self.system = 'discussion' self.id = int(result.group('topic_id')) self.discussion_topic_reply(m, subject[result.end('topic'):]) ## Reply to topic message. # elif result.group('message'): self.system = 'discussion' self.id = int(result.group('message_id')) self.discussion_message_reply(m, subject[result.end('message'):]) else: self.system = 'ticket' (matched_id, subject) = self.ticket_update_by_subject(subject) if matched_id: if not self.ticket_update(m, matched_id, spam_msg): self.new_ticket(m, subject, spam_msg) else: ## No update by subject, so just create a new ticket # self.new_ticket(m, subject, spam_msg) ########## BODY TEXT functions ########################################################### def strip_signature(self, text): """ Strip signature from message, inspired by Mailman software """ self.logger.debug('function strip_signature') body = [] for line in text.splitlines(): if line == '-- ': break body.append(line) return ('\n'.join(body)) def reflow(self, text, delsp = 0): """ Reflow the message based on the format="flowed" specification (RFC 3676) """ flowedlines = [] quotelevel = 0 prevflowed = 0 for line in text.splitlines(): from re import match ## Figure out the quote level and the content of the current line # m = match('(>*)( ?)(.*)', line) linequotelevel = len(m.group(1)) line = m.group(3) ## Determine whether this line is flowed # if line and line != '-- ' and line[-1] == ' ': flowed = 1 else: flowed = 0 if flowed and delsp and line and line[-1] == ' ': line = line[:-1] ## If the previous line is flowed, append this line to it # if prevflowed and line != '-- ' and linequotelevel == quotelevel: flowedlines[-1] += line ## Otherwise, start a new line # else: flowedlines.append('>' * linequotelevel + line) prevflowed = flowed return '\n'.join(flowedlines) def strip_quotes(self, text): """ Strip quotes from message by Nicolas Mendoza """ self.logger.debug('function strip_quotes') body = [] for line in text.splitlines(): try: if line.startswith(self.parameters.email_quote): continue except UnicodeDecodeError: tmp_line = self.email_to_unicode(line) if tmp_line.startswith(self.parameters.email_quote): continue body.append(line) return ('\n'.join(body)) def inline_properties(self, text): """ Parse text if we use inline keywords to set ticket fields """ self.logger.debug('function inline_properties') properties = dict() body = list() INLINE_EXP = re.compile('\s*[@]\s*(\w+)\s*:(.*)$') for line in text.splitlines(): match = INLINE_EXP.match(line) if match: keyword, value = match.groups() if self.parameters.inline_properties_first_wins: if keyword in self.properties.keys(): continue self.properties[keyword] = value.strip() self.logger.debug('\tinline properties: %s : %s' %(keyword,value)) else: body.append(line) return '\n'.join(body) def wrap_text(self, text, replace_whitespace = False): """ Will break a lines longer then given length into several small lines of size given length """ import textwrap LINESEPARATOR = '\n' reformat = '' for s in text.split(LINESEPARATOR): tmp = textwrap.fill(s, self.parameters.use_textwrap) if tmp: reformat = '%s\n%s' %(reformat,tmp) else: reformat = '%s\n' %reformat return reformat # Python2.4 and higher # #return LINESEPARATOR.join(textwrap.fill(s,width) for s in str.split(LINESEPARATOR)) # ########## EMAIL attachements functions ########################################################### def inline_part(self, part): """ """ self.logger.debug('function inline_part()') return part.get_param('inline', None, 'Content-Disposition') == '' or not part.has_key('Content-Disposition') def get_message_parts(self, msg): """ parses the email message and returns a list of body parts and attachments body parts are returned as strings, attachments are returned as tuples of (filename, Message object) """ self.logger.debug('function get_message_parts()') message_parts = list() ALTERNATIVE_MULTIPART = False for part in msg.walk(): content_maintype = part.get_content_maintype() content_type = part.get_content_type() self.logger.debug('\t Message part: Main-Type: %s' % content_maintype) self.logger.debug('\t Message part: Content-Type: %s' % content_type) ## Check content type # if content_type in self.STRIP_CONTENT_TYPES: self.logger.debug("\t A %s attachment named '%s' was skipped" %(content_type, part.get_filename())) continue ## Catch some mulitpart execptions # if content_type == 'multipart/alternative': ALTERNATIVE_MULTIPART = True continue ## Skip multipart containers # if content_maintype == 'multipart': self.logger.debug("\t Skipping multipart container") continue ## Check if this is an inline part. It's inline if there is co Cont-Disp header, # or if there is one and it says "inline" # inline = self.inline_part(part) ## Drop HTML message # if ALTERNATIVE_MULTIPART and self.parameters.drop_alternative_html_version: if content_type == 'text/html': self.logger.debug('\t Skipping alternative HTML message') ALTERNATIVE_MULTIPART = False continue filename = part.get_filename() s = '\t unicode filename: %s' %(filename) self.print_unicode(s) self.logger.debug('\t raw filename: %s' %repr(filename)) filename = self.check_filename_length(filename) ## Save all non plain text message as attachment # if not content_type in ['text/plain']: message_parts.append( (filename, part) ) ## We only convert html messages # if not content_type == 'text/html': self.logger.debug('\t Appending %s (%s)' %(repr(filename), content_type)) continue ## We have an text or html message # if not inline: self.logger.debug('\t Appending %s (%s), not an inline messsage part' %(repr(filename), content_type)) message_parts.append( (filename, part) ) continue ## Try to decode message part. We have a html or plain text messafe # body_text = part.get_payload(decode=1) if not body_text: body_text = part.get_payload(decode=0) ## Try to convert html message # if content_type == 'text/html': body_text = self.html_2_txt(body_text) if not body_text: continue format = email.Utils.collapse_rfc2231_value(part.get_param('Format', 'fixed')).lower() delsp = email.Utils.collapse_rfc2231_value(part.get_param('DelSp', 'no')).lower() if self.parameters.reflow and not self.parameters.verbatim_format and format == 'flowed': body_text = self.reflow(body_text, delsp == 'yes') if self.parameters.strip_signature: body_text = self.strip_signature(body_text) if self.parameters.strip_quotes: body_text = self.strip_quotes(body_text) if self.parameters.inline_properties: body_text = self.inline_properties(body_text) if self.parameters.use_textwrap: body_text = self.wrap_text(body_text) ## Get contents charset (iso-8859-15 if not defined in mail headers) # charset = part.get_content_charset() if not charset: charset = 'iso-8859-15' try: ubody_text = unicode(body_text, charset) except UnicodeError, detail: ubody_text = unicode(body_text, 'iso-8859-15') except LookupError, detail: ubody_text = 'ERROR: Could not find charset: %s, please install' %(charset) if self.parameters.verbatim_format: message_parts.append('{{{\r\n%s\r\n}}}' %ubody_text) else: message_parts.append('%s' %ubody_text) return message_parts def unique_attachment_names(self, message_parts): """ Make sure we have unique names attachments: - check if it contains illegal characters - Rename "None" filenames to "untitled-part" """ self.logger.debug('function unique_attachment_names()') renamed_parts = [] attachment_names = set() for item in message_parts: ## If not an attachment, leave it alone # if not isinstance(item, tuple): renamed_parts.append(item) continue (filename, part) = item ## If filename = None, use a default one # if filename in [ 'None']: filename = 'untitled-part' self.logger.info('\t Rename filename "None" to: %s' %filename) ## Guess the extension from the content type, use non strict mode # some additional non-standard but commonly used MIME types # are also recognized # ext = mimetypes.guess_extension(part.get_content_type(), False) if not ext: ext = '.bin' filename = '%s%s' % (filename, ext) ## Discard relative paths for windows/unix in attachment names # filename = filename.replace('\\', '_') filename = filename.replace('/', '_') ## remove linefeed char # for forbidden_char in ['\r', '\n']: filename = filename.replace(forbidden_char,'') ## We try to normalize the filename to utf-8 NFC if we can. # Files uploaded from OS X might be in NFD. # Check python version and then try it # #if sys.version_info[0] > 2 or (sys.version_info[0] == 2 and sys.version_info[1] >= 3): # try: # filename = unicodedata.normalize('NFC', unicode(filename, 'utf-8')).encode('utf-8') # except TypeError: # pass ## Make the filename unique for this ticket # num = 0 unique_filename = filename dummy_filename, ext = os.path.splitext(filename) while (unique_filename in attachment_names) or self.attachment_exists(unique_filename): num += 1 unique_filename = "%s-%s%s" % (dummy_filename, num, ext) s = '\t Attachment with filename %s will be saved as %s' % (filename, unique_filename) self.print_unicode(s) attachment_names.add(unique_filename) renamed_parts.append((filename, unique_filename, part)) return renamed_parts def attachment_exists(self, filename): self.logger.debug("function attachment_exists") s = '\t check if attachment already exists: Id : %s, Filename : %s' %(self.id, filename) self.print_unicode(s) ## Do we have a valid ticket id # if not self.id: return False try: if self.system == 'discussion': att = attachment.Attachment(self.env, 'discussion', 'ticket/%s' % (self.id,), filename) else: att = attachment.Attachment(self.env, 'ticket', self.id, filename) return True except attachment.ResourceNotFound: return False ########## TRAC Ticket Text ########################################################### def get_body_text(self, message_parts): """ """ self.logger.debug('function get_body_text()') body_text = [] for part in message_parts: ## Plain text part, append it # if not isinstance(part, tuple): body_text.extend(part.strip().splitlines()) body_text.append("") continue (original, filename, part) = part inline = self.inline_part(part) ## Skip generation of attachment link if html is converted to text # if part.get_content_type() == 'text/html' and self.parameters.html2text_cmd and inline: s = 'Skipping attachment link for html part: %s' %(filename) self.print_unicode(s) continue if part.get_content_maintype() == 'image' and inline: if self.system != 'discussion': s = 'wiki image link for: %s' %(filename) self.print_unicode(s) body_text.append('[[Image(%s)]]' % filename) body_text.append("") else: if self.system != 'discussion': s = 'wiki attachment link for: %s' %(filename) self.print_unicode(s) body_text.append('[attachment:"%s"]' % filename) body_text.append("") ## Convert list body_texts to string # body_text = '\r\n'.join(body_text) return body_text def html_mailto_link(self, subject): """ This function returns a HTML mailto tag with the ticket id and author email address """ self.logger.debug("function html_mailto_link") if not self.author: author = self.email_addr else: author = self.author if not self.parameters.mailto_cc: self.parameters.mailto_cc = '' ## Bug in urllib.quote function # if isinstance(subject, unicode): subject = subject.encode('utf-8') ## use urllib to escape the chars # s = '%s?Subject=%s&cc=%s' %( urllib.quote(self.email_addr), urllib.quote('Re: #%s: %s' %(self.id, subject)), urllib.quote(self.parameters.mailto_cc) ) if self.VERSION in [ 0.10 ]: s = '\r\n{{{\r\n#!html\r\nReply to: %s\r\n\r\n}}}\r\n' %(s, author) else: s = '[mailto:"%s" Reply to: %s]' %(s, author) self.logger.debug("\tmailto link %s" %s) return s ########## TRAC notify section ########################################################### def notify(self, tkt, new=True, modtime=0): """ A wrapper for the TRAC notify function. So we can use templates """ self.logger.debug('function notify()') if self.parameters.notify_reporter: self.logger.debug('\t Notify reporter set') global sender_email sender_email = self.email_addr self.logger.debug('\t Using Email2TracNotification function AlwaysNotifyReporter') import trac.notification as Email2TracNotification Email2TracNotification.Notify.notify = AlwaysNotifyReporter if self.parameters.dry_run : self.logger.info('DRY_RUN: self.notify(tkt, True) reporter = %s' %tkt['reporter']) return try: #from trac.ticket.notification import TicketNotificationSystem #tn_sys = TicketNotificationSystem(self.env) #print tn_sys #print tn_sys.__dict__ #sys.exit(0) ## create false {abs_}href properties, to trick Notify() # if self.VERSION in [0.10]: self.env.abs_href = Href(self.get_config('project', 'url')) self.env.href = Href(self.get_config('project', 'url')) tn = TicketNotifyEmail(self.env) if self.parameters.alternate_notify_template: if self.VERSION >= 0.11: from trac.web.chrome import Chrome if self.parameters.alternate_notify_template_update and not new: tn.template_name = self.parameters.alternate_notify_template_update else: tn.template_name = self.parameters.alternate_notify_template tn.template = Chrome(tn.env).load_template(tn.template_name, method='text') else: tn.template_name = self.parameters.alternate_notify_template tn.notify(tkt, new, modtime) except Exception, e: self.logger.error('Failure sending notification on creation of ticket #%s: %s' %(self.id, e)) ########## END Class Definition ######################################################## ########## Global Notificaition Function ################################################ def AlwaysNotifyReporter(self, resid): """ Copy of def notify() to manipulate recipents to always include reporter for the notification. """ #print sender_email, resid (torcpts, ccrcpts) = self.get_recipients(resid) #print "get_recipients finished" if not tktparser.email_header_acl('notify_reporter_black_list', sender_email, False): ## additionally append sender (regardeless of settings in trac.ini) # if not sender_email in torcpts: torcpts.append(sender_email) self.begin_send() self.send(torcpts, ccrcpts) self.finish_send() ########## Parse Config File ########################################################### def ReadConfig(file, name): """ Parse the config file """ if not os.path.isfile(file): print 'File %s does not exist' %file sys.exit(1) config = trac_config.Configuration(file) parentdir = config.get('DEFAULT', 'parentdir') sections = config.sections() ## use some trac internals to get the defaults # tmp = config.parser.defaults() project = SaraDict() for option, value in tmp.items(): try: project[option] = int(value) except ValueError: project[option] = value if name: if name in sections: project = SaraDict() for option, value in config.options(name): try: project[option] = int(value) except ValueError: project[option] = value elif not parentdir: print "Not a valid project name: %s, valid names are: %s" %(name, sections) print "or set parentdir in the [DEFAULT] section" sys.exit(1) ## If parentdir then set project dir to parentdir + name # if not project.has_key('project'): if not parentdir: print "You must set project or parentdir in your configuration file" sys.exit(1) elif not name: print "You must configure a project section in your configuration file" else: project['project'] = os.path.join(parentdir, name) ## # Save the project name # project['project_name'] = os.path.basename(project['project']) return project ########## Setup Logging ############################################################### def setup_log(parameters, project_name, interactive=None): """ Setup logging Note for log format the usage of `$(...)s` instead of `%(...)s` as the latter form would be interpreted by the ConfigParser itself. """ logger = logging.getLogger('email2trac %s' %project_name) if interactive: parameters.log_type = 'stderr' if not parameters.log_type: if sys.platform in ['win32', 'cygwin']: parameters.log_type = 'eventlog' else: parameters.log_type = 'syslog' if parameters.log_type == 'file': if not parameters.log_file: parameters.log_file = 'email2trac.log' if not os.path.isabs(parameters.log_file): parameters.log_file = os.path.join(tempfile.gettempdir(), parameters.log_file) log_handler = logging.FileHandler(parameters.log_file) elif parameters.log_type in ('winlog', 'eventlog', 'nteventlog'): ## Requires win32 extensions # logid = "email2trac" log_handler = logging.handlers.NTEventLogHandler(logid, logtype='Application') elif parameters.log_type in ('syslog', 'unix'): log_handler = logging.handlers.SysLogHandler('/dev/log') elif parameters.log_type in ('stderr'): log_handler = logging.StreamHandler(sys.stderr) else: log_handler = logging.handlers.BufferingHandler(0) if parameters.log_format: parameters.log_format = parameters.log_format.replace('$(', '%(') else: parameters.log_format = '%(name)s: %(message)s' if parameters.log_type in ('file', 'stderr'): parameters.log_format = '%(asctime)s ' + parameters.log_format log_formatter = logging.Formatter(parameters.log_format) log_handler.setFormatter(log_formatter) logger.addHandler(log_handler) if (parameters.log_level in ['DEBUG', 'ALL']) or (parameters.debug > 0): logger.setLevel(logging.DEBUG) parameters.debug = 1 elif parameters.log_level in ['INFO'] or parameters.verbose: logger.setLevel(logging.INFO) elif parameters.log_level in ['WARNING']: logger.setLevel(logging.WARNING) elif parameters.log_level in ['ERROR']: logger.setLevel(logging.ERROR) elif parameters.log_level in ['CRITICAL']: logger.setLevel(logging.CRITICAL) else: logger.setLevel(logging.INFO) return logger if __name__ == '__main__': ## Default config file # configfile = '@email2trac_conf@' project = '' component = '' ticket_prefix = 'default' dry_run = None verbose = None debug_interactive = None SHORT_OPT = 'cdhf:np:t:v' LONG_OPT = ['component=', 'debug', 'dry-run', 'help', 'file=', 'project=', 'ticket_prefix=', 'verbose'] try: opts, args = getopt.getopt(sys.argv[1:], SHORT_OPT, LONG_OPT) except getopt.error,detail: print __doc__ print detail sys.exit(1) project_name = None for opt,value in opts: if opt in [ '-h', '--help']: print __doc__ sys.exit(0) elif opt in ['-c', '--component']: component = value elif opt in ['-d', '--debug']: debug_interactive = 1 elif opt in ['-f', '--file']: configfile = value elif opt in ['-n', '--dry-run']: dry_run = True elif opt in ['-p', '--project']: project_name = value elif opt in ['-t', '--ticket_prefix']: ticket_prefix = value elif opt in ['-v', '--verbose']: verbose = True settings = ReadConfig(configfile, project_name) ## The default prefix for ticket values in email2trac.conf # settings.ticket_prefix = ticket_prefix settings.dry_run = dry_run settings.verbose = verbose if not settings.debug and debug_interactive: settings.debug = debug_interactive if not settings.project: print __doc__ print 'No Trac project is defined in the email2trac config file.' sys.exit(1) logger = setup_log(settings, os.path.basename(settings.project), debug_interactive) if component: settings['component'] = component ## Determine major trac version used to be in email2trac.conf # Quick hack for 0.12 # version = '0.%s' %(trac_version.split('.')[1]) if version.startswith('0.12'): version = '0.12' elif version.startswith('0.13'): version = '0.13' logger.debug("Found trac version: %s" %(version)) try: if version == '0.10': from trac import attachment from trac.env import Environment from trac.ticket import Ticket from trac.web.href import Href from trac import util from trac.ticket.web_ui import TicketModule # # return util.text.to_unicode(str) # # see http://projects.edgewall.com/trac/changeset/2799 from trac.ticket.notification import TicketNotifyEmail from trac import config as trac_config from trac.core import TracError elif version in ['0.11', '0.12', '0.13']: from trac import attachment from trac import config as trac_config from trac import util from trac.core import TracError from trac.env import Environment from trac.perm import PermissionSystem from trac.perm import PermissionCache from trac.test import Mock, MockPerm from trac.ticket import Ticket from trac.ticket.api import TicketSystem from trac.ticket.web_ui import TicketModule from trac.web.href import Href # # return util.text.to_unicode(str) # # see http://projects.edgewall.com/trac/changeset/2799 from trac.ticket.notification import TicketNotifyEmail else: logger.error('TRAC version %s is not supported' %version) sys.exit(0) ## Must be set before environment is created # if settings.has_key('python_egg_cache'): python_egg_cache = str(settings['python_egg_cache']) os.environ['PYTHON_EGG_CACHE'] = python_egg_cache if settings.debug > 0: logger.debug('Loading environment %s', settings.project) try: env = Environment(settings['project'], create=0) except IOError, detail: logger.error("trac error: %s" %detail) sys.exit(0) tktparser = TicketEmailParser(env, settings, logger, float(version)) tktparser.parse(sys.stdin) ## Catch all errors and use the logging module # except Exception, error: etype, evalue, etb = sys.exc_info() for e in traceback.format_exception(etype, evalue, etb): logger.critical(e) if m: tktparser.save_email_for_debug(m, settings.project_name, True) sys.exit(1) # EOB email2trac-2.4.7/config.h.in0000644000175000017500000000012011647745661013740 0ustar wmbwmb/* Define to 1 if you have the `initgroups' function. */ #undef HAVE_INITGROUPS email2trac-2.4.7/msg.txt0000755000175000017500000000352210434304033013231 0ustar wmbwmbFrom basv@sara.nl Wed Mar 8 15:29:17 2006 Return-Path: X-Original-To: test@subtrac.sara.nl Delivered-To: test@subtrac.sara.nl Received: from surfboard.ka.sara.nl (surfboard.ka.sara.nl [145.100.6.3]) by localhost.localdomain (Postfix) with ESMTP id 506702800682 for ; Wed, 8 Mar 2006 15:29:17 +0100 (CET) Received: from [145.100.6.134] ([145.100.6.134] RDNS failed) by surfboard.ka.sara.nl with Microsoft SMTPSVC(6.0.3790.1830); Wed, 8 Mar 2006 15:29:17 +0100 Message-ID: <440EEA39.6070200@sara.nl> Date: Wed, 08 Mar 2006 15:29:13 +0100 From: Bas van der Vlies User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: test@subtrac.sara.nl Subject: Test123 Content-Type: multipart/mixed; boundary="------------070800080005060203060809" X-OriginalArrivalTime: 08 Mar 2006 14:29:17.0140 (UTC) FILETIME=[AE40B940:01C642BC] This is a multi-part message in MIME format. --------------070800080005060203060809 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Test1234 Test1234 -- -- ******************************************************************** * * * Bas van der Vlies e-mail: basv@sara.nl * * SARA - Academic Computing Services phone: +31 20 592 8012 * * Kruislaan 415 fax: +31 20 6683167 * * 1098 SJ Amsterdam * * * ******************************************************************** --------------070800080005060203060809 Content-Type: text/plain; name="basje.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="basje.txt" test123 test1234 --------------070800080005060203060809-- email2trac-2.4.7/AUTHORS0000644000175000017500000000066411375160170012762 0ustar wmbwmbThe email2trac package is written by: Bas van der Vlies Walter de Jong DiscussionPlugin support: Blackhex regular patch contributor(s): Ben Artin The 0.9 port: Michel Jouvin RPM spec file: Jon Topper Initial setup and ideas from: Daniel Lundin email2trac-2.4.7/README0000644000175000017500000000135411624663567012606 0ustar wmbwmbemail2trac - utilities ---------------------- This is a release of the SARA package email2trac that contains utilities that we use to convert emails to trac tickets. The initial setup was made by Daniel Lundin from Edgewall Software. SARA has extend the initial setup, with the following extensions: - HTML message conversion - Attachments - Tickets can be updated via email - Use command-line options - Configuration file to control the behavior. - Unicode support - SPAM detection - Workflow support - FullBlogPlugin support - DiscussionPlugin support See INSTALL for the how to setup the utilities Comments or Suggestions mail them to: email2trac http://www.sara.nl for more info about SARA. email2trac-2.4.7/email2trac.spec0000644000175000017500000000224111700267424014604 0ustar wmbwmbSummary: Utilities for converting emails to trac tickets Name: email2trac Version: 2.4.7 Release: 1 License: GPL Group: Applications/Internet URL: https://subtrac.sara.nl/oss/email2trac Packager: Jon Topper Source: ftp://ftp.sara.nl/pub/outgoing/email2trac.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: trac %description This is a release of the SARA package email2trac that contains utilities that we use to convert emails to trac tickets. The initial setup was made by Daniel Lundin from Edgewall Software. SARA has extend the initial setup, with the following extensions: * HTML messages * Attachments * Use commandline options * Use config file to change the behaviour of the email2trac.py program * Some unicode support for special characters in the headers of an email message %prep rm -rf $RPM_BUILD_ROOT %setup %configure %build mkdir -p $RPM_BUILD_ROOT make %install make DESTDIR="$RPM_BUILD_ROOT" install %files /usr/bin/delete_spam /usr/bin/email2trac /usr/bin/run_email2trac %config /etc/email2trac.conf %changelog * Thu Aug 03 2006 Jon Topper - 0.7.6-1 - Initial RPM build email2trac-2.4.7/configure0000755000175000017500000040353111647745661013641 0ustar wmbwmb#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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. 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 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" 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 \$(( 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 : # 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. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} 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_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; } # 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" 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="email2trac.py.in" ac_subst_vars='LTLIBOBJS LIBOBJS SYSTEM_EMAIL2TRAC_CONF email2trac_conf DEBUG EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC pkgpyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON install_user mta_user trac_user pyexecdir 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 with_install_user with_trac_user with_mta_user ' 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 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 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 _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-install_user=USER Specify the name of the user that we must use for installation, default=root --with-trac_user=USER Specify the name of the user that trac use, default=www-data --with-mta_user=USER Specify the name of the user that your MTA use, default=nobody 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.67 Copyright (C) 2010 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # 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 || $as_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # 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 "test \"\${$3+set}\"" = set; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func 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.67. 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 ac_config_headers="$ac_config_headers config.h" #DEBUG=0 #AM_PATH_PYTHON if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.4" >&5 $as_echo_n "checking whether $PYTHON version >= 2.4... " >&6; } prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('2.4', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "too old" "$LINENO" 5 fi else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.4" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.4... " >&6; } if test "${am_cv_pathless_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python2.6 python2.5 python.2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 : ; do if test "$am_cv_pathless_PYTHON" = : ; then as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 fi prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('2.4', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$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 ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi am_display_PYTHON=$am_cv_pathless_PYTHON fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if test "${am_cv_python_version+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if test "${am_cv_python_platform+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if test "${am_cv_python_pythondir+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if test "${am_cv_python_pyexecdir+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE 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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_objext+set}" = set; 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 test "${ac_cv_c_compiler_gnu+set}" = set; 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 test "${ac_cv_prog_cc_g+set}" = set; 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 test "${ac_cv_prog_cc_c89+set}" = set; 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 #include #include /* 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 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 test "${ac_cv_prog_CPP+set}" = set; 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 grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; 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" { test -f "$ac_path_GREP" && $as_test_x "$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 test "${ac_cv_path_EGREP+set}" = set; 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" { test -f "$ac_path_EGREP" && $as_test_x "$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" if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if test "${ac_cv_prog_gcc_traditional+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi if test "x$DEBUG" = "x";then DEBUG=0 fi # What user must be used for installation (default: root) # # Check whether --with-install_user was given. if test "${with_install_user+set}" = set; then : withval=$with_install_user; case "${withval}" in *) install_user="${withval}" ;; esac else install_user="root" fi # Now a user can specify the TRAC user # # Check whether --with-trac_user was given. if test "${with_trac_user+set}" = set; then : withval=$with_trac_user; case "${withval}" in *) trac_user="${withval}" ;; esac else trac_user="www-data" fi # Now a user can specify MTA TRAC user # # Check whether --with-mta_user was given. if test "${with_mta_user+set}" = set; then : withval=$with_mta_user; case "${withval}" in *) mta_user="${withval}" ;; esac else mta_user="nobody" fi if test "$sysconfdir" = '${prefix}/etc'; then if test "x$prefix" = xNONE; then email2trac_conf="$ac_default_prefix/etc/email2trac.conf" else email2trac_conf="$prefix/etc/email2trac.conf" fi else email2trac_conf="$sysconfdir/email2trac.conf" fi cat >>confdefs.h <<_ACEOF #define SYSTEM_EMAIL2TRAC_CONF "$email2trac_conf" _ACEOF for ac_func in initgroups do : ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" if test "x$ac_cv_func_initgroups" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INITGROUPS 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile email2trac.py delete_spam.py" 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 test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file 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 : ${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. 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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.67. 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" _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 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.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 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' 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 _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" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "email2trac.py") CONFIG_FILES="$CONFIG_FILES email2trac.py" ;; "delete_spam.py") CONFIG_FILES="$CONFIG_FILES delete_spam.py" ;; *) 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 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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # 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 {' >"$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 >>"\$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 >>"\$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 < "$tmp/subs1.awk" > "$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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; 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 " 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="$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 >"$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 # _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 $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$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' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$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 "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$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 "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$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 "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in "$ac_file" | "$ac_file":* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for "$ac_file"" >`$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'`/stamp-h$_am_stamp_count ;; 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 email2trac-2.4.7/install-sh0000755000175000017500000001124410454235042013710 0ustar wmbwmb#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5. # # 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. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" tranformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # 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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 email2trac-2.4.7/configure.in0000644000175000017500000000424211647745661014237 0ustar wmbwmb# # Author: Bas van der Vlies # Desc. : Simple configure script for email2trac package # SVN INFO: # $Id: configure.in 574 2011-10-20 07:20:17Z bas $ # # AC_INIT(email2trac.py.in) AC_CONFIG_HEADER(config.h) AC_SUBST(prefix) AC_SUBST(exec_prefix) AC_SUBST(pyexecdir) AC_SUBST(trac_user) AC_SUBST(mta_user) AC_SUBST(install_user) AC_SUBST(sysconfdir) #DEBUG=0 #AM_PATH_PYTHON AM_PATH_PYTHON(2.4) AC_PROG_GCC_TRADITIONAL if test "x$DEBUG" = "x";then DEBUG=0 fi AC_SUBST(DEBUG) # What user must be used for installation (default: root) # AC_ARG_WITH(install_user, [ --with-install_user=USER Specify the name of the user that we must use for installation, default=root], [case "${withval}" in *) install_user="${withval}" ;; esac], [install_user="root"] )dnl # Now a user can specify the TRAC user # AC_ARG_WITH(trac_user, [ --with-trac_user=USER Specify the name of the user that trac use, default=www-data], [case "${withval}" in *) trac_user="${withval}" ;; esac], [trac_user="www-data"] )dnl # Now a user can specify MTA TRAC user # AC_ARG_WITH(mta_user, [ --with-mta_user=USER Specify the name of the user that your MTA use, default=nobody], [case "${withval}" in *) mta_user="${withval}" ;; esac], [mta_user="nobody"] )dnl dnl ##### Path to email2trac.conf dnl This ugly kludge to get the sysconfdir path is needed because dnl autoconf doesn't actually set the prefix variable until later. if test "$sysconfdir" = '${prefix}/etc'; then if test "x$prefix" = xNONE; then email2trac_conf="$ac_default_prefix/etc/email2trac.conf" else email2trac_conf="$prefix/etc/email2trac.conf" fi else email2trac_conf="$sysconfdir/email2trac.conf" fi AC_DEFINE_UNQUOTED(SYSTEM_EMAIL2TRAC_CONF, "$email2trac_conf", [Full path for the system-wide email2trac.conf file.]) AC_SUBST(email2trac_conf) AC_SUBST(SYSTEM_EMAIL2TRAC_CONF) dnl ##### Check for presence of initgroups() function AC_CHECK_FUNCS([initgroups]) AC_OUTPUT( Makefile email2trac.py delete_spam.py ) email2trac-2.4.7/ChangeLog0000644000175000017500000012744611700267424013476 0ustar wmbwmb2.4.7 * Some blog improvements. Removes 'blog:' from subject line and honors the -n/--dry-run flag, closes #235 Author: Thomas Moschny Applied by: Bas van der Vlies * Added Astaro firewall spam handling. Check X-Spam-Flag and X-Spam-Result message header flags. see: * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644916 Author: W. Martin Borgert" Applied by: Bas van der Vlies * mailto link contained the wrong encoded subject line, charset was not stripped. Reported by: Walter Lioen (SARA) Fixed by: Bas van der Vlies 2.4.5 * Allow regular expressions for recipient_list (multiple to-addresses), white_list and black_list. Each address is checked againt this regular expression, closes #272 examples: * recipient_list : sara.nl (to-address contains sara.nl) * recipient_list : ^basv@sara.nl$ (to-address equals basv@sara.nl) Reported by: anonymous Fixed by: Bas van der Vlies * Enhanced run_email2trac to support supplementary groups (initgroups). configure will check if the OS support initgroups function call, closes #274 Author: Dennis McRitchie Applied by: Bas van der Vlies * Fixed an error in parsing the From address. Email address was wrong if email name contained a charset definition. There error was triggered if 'mailto_link: 1' is set. Resulting in an unicode error. Author: Bas van der Vlies 2.4.2 * Fixed an error for text/plain attachments that are not specified as inline. These attachments were not attached to the ticket and were skipped, closes #270 Reported by: hju add jochenkuhl dot de Fixed by: Bas van der Vlies * Use all 'to-field' addresses in message for recipient_list instead of only one, closes #268 Reported by: anonymous Fixed by: Bas van der Vlies 2.4.0 * Fixed an error in ticket_update_fields. Always check if given ticket field is a valid ticket field for trac. The error could be triggered by: * ticket_update_by_subject * inline_properties Reported by: Maarten van Ingen (SARA) Fixed by: Bas van der Vlies * Fixed a typo in logging an error: email_to_unicode Fixed by: Bas van der Vlies * Closed tickets for trac version >= 0,12 where not re-opened if there was no workflow defined in email2trac.conf, see #247 Reported by: Sergey V.Levin Fixed by: Bas van der Vlies & Sergey V.Levin * enhanced save_email_for_debug(). Store also the project name in the filename and easily see the difference between the raw message and the body/attachments files. Author: Bas van der Vlies * Ticket update by subject did not work for trac version below 0.12 Reported by: naumann add tu-berlin dot de Fixed by: Bas van der Vlies * Fixed an error in the logging environment for Windows oses, closes #251 Reported by: kofal002 add umn dot edu Fixed by: Bas van der Vlies * Ticket_update_by_subject enhancement. If multiple tickets are found with the same subject then we try a author/reporter match. If fails use most recent ticket entry, closes #253 Reported by: kofal002 att umn dot edu Fixed by: Bas van der Vlies * Log trac error if opening of trac project environment failse, closes #256 Reported by: edward dot b dot matheson at nasa.gov Fixed by: Bas van der Vlies * If a status is using upper case character(s) (i.e waitingExternal) email2trac does not find the appropiate workflow entry in the email2trac.conf, closes #264 Author: hju add jochenkuhl dot de Applied by: Bas van der Vlies * Process all workflows not only the default trac workflow. Workflow is now enabled for new tickets and ticket updates. eg: AdvancedTicketWorkflowPlugin, closes #226,#252 Suggestion by: Holger Jürgs Reported by: Frédéric DUARTE kofal002 att umn dot edu Fixed by: Bas van der Vlies * permission check fails when PrivateTicketsPlugin is installed, closes #262 Reported by: glenn Fixed by: Bas van der Vlies * Added support for trac version 0.13, closes #250 Reported by: simeonov add gmail dot com Fixed by: Bas van der Vlies * Problem with long attachment's filenames on native language. This is a trac bug, see: * http://trac.edgewall.org/ticket/10313, The email2trac solution is to truncate the filename if it is longer then the allow NAME_MAX for the os (usually 255), closes #247. Reported by: Sergey V.Levin Fixed by: Bas van der Vlies & Sergey V.Levin * Replaced printing of subject line to repr() instead of unicode string. Some versions if python logging module could crash, closes #267 Reported by: hju add jochenkuhl dot de Fixed by: Bas van der Vlies 2.1.0 (2011-6-6) * Convert all email addresses and author names to lower case in compare functions. closes #242. Author: Dennis McRitchie Applied by: Bas van der Vlies * Added timestamp when log_file stderr or file is used. Move log level of reporting subject line to info instead of debug, closes #236 Author: Dennis McRitchie Applied by: Bas van der Vlies * Small fix in mailto link. Uses 'cc' instead of 'Cc' Author: Sil Westerveld (SARA) Applied by: Bas van der Vlies * The time format for subject mapping was wrong (ticket_update_by_subject). So all tickets matched. Converted it to use microseconds instead of seconds. Reported by: Walter Lioen (SARA) Author: Bas van der Vlies & Dennis Stam * Fixed an error in the setup the logging environment for Windows oses. Reported by: Mike Henke Author: Bas van der Vlies 2.0.2 (2011-02-13) * Use tempfile.mkstemp instead of tempfile.mktemp Reported by: Dennis Stam (SARA) Author: Bas van der Vlies 2.0.1 (2011-02-12) * An email address can match multiple trac accounts, closes #218 Author: Konstantin Ryabitsev * Added check to detect valid users when smtp_default_domain in trac.ini is set, closes #219 Author: sto add iti dot upv dot es Applied by: Bas van der Vlies with some minor changes * Support for parentdir. Can be used to avoid sections for each project or if all projects have a common parent directory, you can leave out the project directory setting for each project, eg: * parentdir: /data/trac/oss/projects If an section defines a project directory then this can NOT be overridden by the parendir declaration. This closes #217 Author: sto add iti dot upv dot es Applied by: Bas van der Vlies with some minor changes * email2trac: Used the wrong code to check number of ticket changes, closes #223. Author: stas dot agarkov add gmail dot com Applied by: Bas van der Vlies * email2trac: An enhancement to "update-by-subject", closes #188 Features: - Does a better job parsing out all the permutations of "Re: FW: Re: AW: Subject" - Modifies the subject to drop the prefixes Author: Konstantin Ryabitsev Applied by: Bas van der Vlies * When platform is Windows and log_type is not set, use 'eventlog' as default log_type instead of 'syslog', closes #225 Reported by: jkreider add clarkinc dot biz Author: Bas van der Vlies * Applied a patch so we allow more ticket fields to be used for inline properties, eg: - @custom_reports: vu closes #227 Author: thomas dot moschny add gmx dot de Applied by: Bas van der Vlies * Fixed some bugs in function update_ticket_fields: - Can not clear values, reported by thomas dot moschny add gmx dot de closes #228 - Values were updated regardless if there are not allowed for the ticket field. Author: Bas van der Vlies * Attachments without a name where named 'None' instead of 'untitled-part', closes #230 Reported by: hju add jochenkuhl dot de Author: Bas van der Vlies * Fixed some errors in Discussion plugin support, closes #231 Author: Dennis (dmcrxi add Princeton dot EDU) Applied by: Bas van der Vlies * Added html conversion via external command: eg email2trac.conf - html2text_cmd: /usr/bin/html2text -nobs - html2text_cmd: /usr/bin/w3m -dump - html2text_cmd: /usr/bin/lynx -dump - html2text_cmd: /usr/bin/links -dump closes #218 Author: Bas van der Vlies Applied by: Bas van der Vlies * Fixed mailto link for trac 0.11 and 0.12. Use the mailto tag in stead of an html tag. The html tag does not work for trac 0.12 Reported by: Wim Rijks Author: Bas van der Vlies * Added a notification function that always send an email to the reporter if the ticket is updated via email. This independent of trac.ini setting , closes: #178, #229 - notify_reporter: 1 (default: 0) - notify_reporter_black_list : basv@sara.nl (default: 0) Author: hju add jochenkuhl dot de Applied by: Bas van der Vlies * Added a new parameter for processing inline properties: (closes #216) - inline_properties_first_wins: 1 (default: 0) When an email has two of the same inline entries: {{{ @status: closed @status: accepted }}} Only the first one is used '@status: closed' Author: Konstantin Ryabitsev Applied by: Bas van der Vlies 1.6.0 (2010-8-10) * Fixed an Unicode error in strip_quotes Author: Bas van der Vlies * The attachment filename may not contain '\n' and '\r' characters. Reported by: Jean-Paul Duyx Fixed by; Bas van der Vlies * Applied a patch to support workflow for all transitions. It will also honour the permission model if set, closes #198 an example how to use it: email2trac.conf: [project] workflow_closed: reopen xworkflow_infoneeded: provideinfo trac.ini: [ticket-workflow] reopen = closed -> reopened reopen.permissions = TICKET_CREATE reopen.operations = del_resolution provideinfo = infoneeded -> moreinfo provideinfo.permissions = TICKET_CREATE provideinfo.name = info provided Authors: kroseneg add schmidham dot net and Bas van der Vlies * The trac default value for resolution is fixed. The trac.ini value for this is skipped and this resolution settings is only allowed in email2trac.conf, closes #84 Reported by: hju add jochenkuhl dot de Fixed by: Bas van der Vlies * Honor the trac permission model if set, Use TICKET_APPEND and TICKET_CHGPROP instead of TICKET_MODIFY. closes #214 Reported by: Konstantin Ryabitsev Fixed by: Bas van der Vlies 2010-07-23 * logging of spam message was wrong. Fixed it, - set.logger.info must be self.logger.info Author: Bas van der Vlies * logging of notification error was wrong. Fixed it, closes #212 - set.logger.error must be self.logger.error Reported by: adam dot lucke at srd-berlin dot de Author: Bas van der Vlies * Mail was lost when 'ticket_update' was disabled and a ticket reply was detected. Author: Bas van der Vlies * Removed a lot of obsolete code due to using UserDict Author: Bas van der Vlies 2010-07-21 * added a new option 'ticket_permission_system'. Can be set to: - trac: Then it will check if the report has the right trac permission to create or modify a ticket. closes #202 - update_restricted_to_participants: A ticket update is allowed only if: 1) the updater is the reporter, 2) the updater is in the CC 3) the updater has trac permission to update the ticket. If the update is denied, a new ticket will be generated instead as to not loose the issue . closes #203 Authors: kris add tsampa dot org & Bas van der Vlies * Switch for logging to the python logging module and add some new options to control the behaviour inspired by the trac logging module: - log_type, default syslog - log_level, default info - log_format, email2trac - log_file, none Can be set to the same values as trac logging Author: Bas van der Vlies * removed trac 0.9 support 2010-07-12 * Do not check if notification is enabled, let Trac determine if a notfication is enabled and which interface/plugin is used, eg: announcerplugin Author: Bas van der Vlies 2010-07-06 * Fixed several errors in ticket update: - Changed the regex expression. It must end with ':'. - The email was lost if the ticket id was unknown. If ticket id is unknown a new ticket will be created. Reported by: SARA grid team Fixed by: Bas van der Vlies 2010-06-28 * Ticket update for version 0.12 did not work, closes #209 Author: mark underscore kids add yahoo dot com Applied by: Bas van der Vlies * enabled workflow and notification for trac version 0.12 Author: Bas van der Vlies 2010-06-23 * A better fix for attachments with special characters, closes #206 Reported by: karsten dot rohrbach add wibas dot de Fixed by: Bas van der Vlies 2010-06-22 * When debug is enabled email2trac chokes on non-ascii (utf8) characters in ticket fields, closes #205 Reported by: eirik dot schwenke add nsd dot uib dot no Fixed by: Bas van der Vlies * Email2trac crashes when attachment filename contains non-ascii characters, closes #206 Reported by: karsten dot rohrbach add wibas dot de Fixed by: Bas van der Vlies 2010-06-09 * Support added for trac version 0.12, closes #201 Reported by: mark_kids add yahoo dot com Fixed by: Bas van der Vlies 2010-05-25 * delete_spam still used the trac_version in email2trac.comf Fixed by: Bas van der Vlies * email2trac crashed when ticket_update_by_subject was enabled. Fixed by: Bas van der Vlies 2010-05-20 * email2trac crashed if there are '/' and '\' characters in a filename. These characters are now being replace by '_', closes #196 Reported by: jcuppen add hethooghuis dot nl Fixed by: Bas van der Vlies * Problems with attachments were not reported for ticket updates Fixed by: Bas van der Vlies * delete_spam changes: - only support trac version greater then 0.10 - added -n/--dry-run option - added -v/--verbose option Author: Bas van der Vlies * Enhancement for ticket prefixes (email2trac.conf). The ticket fields status and resolution are not forbidden any more. closes #195 Author: Konstantin Ryabitsev Applied by: Bas van der Vlies * Added a new option. It is all in the name: * ticket_update_by_subject, default value is off * ticket_update_by_subject_lookback, default 30 days When this option is enabled and there is no ticket number found in a reply mail. It will try to find a ticket summary that matches the mail subject line. If found then append the mail to this ticket, closes #188 Author: Konstantin Ryabitsev & Bas van der Vlies Applied by: Bas van der Vlies * Added DiscussionPlugin support, closes 197. For description see: - https://trac-hacks.org/wiki/DiscussionPlugin Author: ibarton add fit dot vutbr dot cz (alias Blackhex) Applied by with some modification: Bas van der Vlies * Trac version is now automatically determined. No need anymore for trac_version in /etc/email2trac.conf Author: Bas van der Vlies 2010-03-20 * Fixed a bug reporter was always set to the default value specified in trac.ini. Reported by: Jean-Paul Duyx Fixed by: Bas van der Vlies * If reported field is overriden then use it for all trac functions including notification, closes #187 Reported by: shildebrand at venturebeat dot com Fixed by: Bas van der Vlies 2010-03-24 * Added configure option '--with-install_user=', default user is 'root'. The specified user is used for installation so we can install the package as non-root user, closes #182. Reported by: shildebrand at venturebeat dot com Fixed by: Bas van der Vlies * Re-arranged some code so that we can override ticket fields in email2trac.conf, eg: - default_reporter : email2trac Will set the reporter ticket field to email2trac for all mail, closes #182 Reported by: shildebrand at venturebeat dot com Fixed by: Bas van der Vlies * Fixed a bug when there is no subject field in the message, closes #179 The fix in the 1.2.0 version did not work. Reported by: xurizaemon and John Donners (SARA) Fixed by: Bas van der Vlies * We do not write any files when dry run mode is enabled. Fixed by: Bas van der Vlies * Fixed several issues when DEBUG is enabled with printing non-ascii characters, see #184 Reported by: hju add jochenkuhl dot de Fixed by: Bas van der Vlies 2010-02-24 * Added an option to run_email2trac to set the PYTHON_EGG_CACHE environment variable (-e|--eggcache), closes #174 Author: pepl at cpan dot org Applied by: Bas van der Vlies * Ticket fields can be set inline an email: closes #171, #88 - controlled by parameter 'inline_properties', default behaviour off - see https://subtrac.sara.nl/oss/email2trac/wiki/Email2tracParse#Updateticketfields Author: samuel at hoffstaetter dot com Applied by: Bas van der Vlies * Fixed a bug when there is no subject field in the message, closes #179 Reported by: xurizaemon Fixed by: Bas van der Vlies * Added unicode support attachment filenames, closes #177 Reported by: obwandner add concertare dot de Fixed by: Bas van der Vlies * Email to blog did not work at all. It works but it can not handle attachments. see #175. Reported by: oland dot wells add gmail.com Patches : Bas van der Vlies * Show errors when we can not include attachments in the ticket, see #165 Requested by: hju add jochenkuhl dot de and dereks add cool-st dot com Fixed by: Bas van der Vlies * Added a new option 'email_triggers_workflow'. When a ticket is closed and an update is received via email. The ticket will be reopened or triggers a ticket workflow. This action can be skipped if we set the email_triggers_workflow option to 0. The default value is 1, closes #180 Author: zac add sprackettd dot com Applied by: Bas van der Vlies 2010-01-11 * Workflow option did not work, closes #157 Reported by: thomas dot moschny at gmx dot de Fixed by: Bas van der Vlies & Thomas Moschny * When a ticket is updated via email. We must set a changelog id, closes #156 Reported by: Chris dot Nelson at SIXNET dot com Fixed by: Bas van der Vlies * Changed all 'str =' assignments to 's =' to solve conflicts with the builtin str function Fixed by: Bas van der Vlies * Python egg cache enviroment setting was ignored by email2trac. closes #163 Author: Dennis McRitchie ( dmcr at Princeton dot EDU ) Applied by: Bas van der Vlies * Disabled code so the following line will not be displayed anymore as comment in a ticket: - This message has x attachment(s) Suggested by: dereks at realloc dot net, closes ticket #165 Fixed by : Bas van der Vlies * Added a new parameter strip_content_types. So we can strip attachments based on content type, eg: - strip_content_types: application/pgp-signature, application/mac-binhex40 Will strip attachments that has these content_types. Authors: otto at bergerdata dot de and Bas van der Vlies * FIxed an error when files where added with characters that needed to be escaped. Both email2trac and trac escaped the filenames. We removed the code from email2trac an let trac handle the escaping, closes #149 Reported by: hju att jochenkuhl dot de Fixed by: Bas van der Vlies * Added a new parameter: - subject_field_separator, default value is & This is used to set tickets fields via the subject line. It used to be , .For backwards compatibility we introduced this parameter. closes #166 Suggested by: Dennis McRitchie ( dmcr at Princeton dot EDU ) Fixed by : Bas van der Vlies * Prevent mail loop. We could set the CC ticket field to the ticket email address. - For a new ticket and reply_all is set. - If the ticket CC field is updated via the subject line. Also prevent setting the reporter address to the ticket email address. closes #172 Reported by: otto at bergerdata dot de Fixed vy : Bas van der Vlies 2009-09-02 * Implemented a new feature to drop the HTML version of multipart/alternative message part. Such a message part contains the same info. The info is sent in different formats and the client can decide which version to use. closes #30 to enable in email2trac.conf: - drop_alternative_html_version: 1 Implemented by: Bas van der Vlies 2009-08-20 * updated aclocal.m4 to support python versions 2.5 and 2.6, closes #137 * use the email addres in the reporter field, closes #136 * Fixed an error in blog update function All Fixes by: Bas van der Vlies * if alternate notify template is set then also set ticket id. It will show up as ticket change, closes #142 Reported by: hju att jochenkuhl dot de Fixed by: Bas van der Vlies * Error in urllib.quote(filename) could not handle unicode filenames, closes #138 Reported by: debacle at debian dot org Applied by: Bas van der Vlies * Fixed an error when debug is on and the body message contains unicode strings, closes #144 Reported by: trumbitta at gmail dot com Applied by: Bas van der Vlies * default trac version for email2trac is now updated to 0.11 2009-04-09 * Fixed in parsing the reflow parameter, closes #123 Reported by: tomasz dot sterna at sensisoft dot com Fixed by: Bas van der Vlies * implemented workflow for tickets that are reopend, closes #70 Reported by: hju att jochenkuhl dot de Author by: Bas van der Vlies * added FullBlogPlugin support. So we can update/create the blogs via email, #116 mail with subject line: will create/update a blog entry. Authors: Bas van der Vlies & lucas dot eisenzimmer at t-systems-mms dot com * email2trac require at least python version 2.4, closes #131 Reported by: otto at bergerdata dot de Fixed by: Bas van der Vlies * We can now set ticket fields for a new ticket via the 'subject' line: - Subject: #?[,]* closes #130 Requested by: Steve Implemented by: Bas van der Vlies 2009-01-30 * applied patch exit with non-zero return code on failure, closes #117 Author: admin-egon at ikw dot uos dot de Applied by : Bas van der Vlies * Ticket update with attachments did not work, closes #120 Reported by: Alexander Verkooijen (alexander at sara dot nl) Fixed by: Bas van der Vlies * Removed obsolete code Author : Bas van der Vlies * When email address is known then the author name and email address is used from the preference tab. The match is case insensitive, closes #118 Reported by: Pusateri, Matthew (default: 0) mail_quote: (default: "> ") Author: nicolasm @ opera dot com Implemented by: Bas van der Vlies * Added patch to make notify email work with trac 0.11 dev. Author: tbaschak add ktc dot mb dot ca Author: andrei2102 add gmail dot com Implemented by: Bas van der Vlies * greedy matching in Subject line, We must stop after the first ':' else we get wrong values for ticket fields when we update a ticket via mail, closes ticket #37 Reported by: dmaziuk at bmrb dot wisc dot edu Fixed by: Bas van der Vlies * added IGNORECASE flag to regular expression for black list. This is a quick fix, still want to implement this as configuration option, closed bug #39 Reported By: jodok at lovelysystems dot com Fixed by : Bas van der Vlies * When a known user mails a ticket. We will set the Reporter to its login name, closes bug #33, #41 Also add configuration option: ignore_trac_user_settings : 0 (default value) This option will skip the email address to trac user login name mapping. Reported by: anonymous Fixed by : Bas van der Vlies * SPAM detection was only for new mails not for ticket updates, closed ticket #44 Reported by: Bas van der Vlies Fixed by : Bas van der Vlies 2007-07-18 * Implemented python_egg_cache environment variable. Some trac installations may depend on it, closes ticket #10, eg: python_egg_cache : /var/cache/eggcache Reported By: Anonymous Fixed by : Bas van der Vlies * Implemented update ticket fields via email subject line, eg: Re: [email2trac] #7?owner=bas,priority=minor: Error in parsing - Sets the owner of the ticket to: bas - Sets the priority of the ticket to: minor For some ticket fields there are only a limited number of allowed values. The supplied value will be checked against this list. If it is not vaild value the field update will be ignored. Requested by : trac at yadan dotnet, Jan Parchmann, see ticket #7 Implemented by: Bas van der Vlies * Dropped support for version trac version 0.8. Removed all 0.8 specific code. Fixed by: Bas van der Vlies * Added a new config parameter: tmpdir: /var/tmp, default is '/tmp' All functions now use this new parameter and use OS independent path functions. Implemented by: Bas van der Vlies * fixed and a creating directory problem email2trac.spec file Fixed by: artrus at netzero dot net * set_owner function is obsolete. When component is set the trac code will set the owner to the component owner. Fixed by : Bas van der Vlies * Also show email headers in a ticket update. Requested by: Ramon Bastiaans Fixed by : Bas van der Vlies * A date patch so it works with trac version 0.11 for ticket updates. Also applied for other trac versions. Thanks to: tbaschak at ktc dot mb dot ca 2007-04-27 * Added check to catch an error when attachment size is too large, bug #1153 Author: Bas van der Vlies * Wrap long line into user given length, use_textwrap: 72. Wraps lines greater then 72 chars, #1123 Author: Bas van der Vlies & Rainer Sokoll (r.sokoll at intershop dot de) * Fixed a dutch spelling, #1295 Author: Rainer Sokoll (r.sokoll at intershop dot de) * email2trac.py : blacklist (don't create ticket) mail from MAILER-DAEMON to avoid loops Author: Michel Jouvin * msg.bad.txt : add an example of message from MAILER-DAEMON Author: Michel Jouvin 2006-12-08 * email2trac.py: - Added verbatim_format option default is: 1 Added by : Bas van der Vlies - Added strip_signature option default is: 0 Added by : Bas van der Vlies - Fixed some unicode errors, thanks to japanes SPAM. If we can not unicode email message then display which charset must be installed in ticket description. Else we trac crashed with unicode errors ;-( Fixed by: Bas van der Vlies - Fixed statements: str + unicode, raises an exception if non-ascii value in unicode object. - Forgot to unicode the author. So we got an error if we use the mailto_link option in email2trac.conf. Fixed by: Bas van der Vlies * delete_spam.py: - Now works for version 0.10 with new API-functions Fixed by: Bas van der Vlies * Makefile.in - Added install-conf. Install email2trac.conf if there is none installed. Fixed by: Bas van der Vlies 2006-10-27 * run_email2trac.c. - Setgid() must be called before setuid(). Reported by: Anonymous Fixed by: Bas van der Vlies * email2trac.py, - Fixed an error in Ticket Update. When ticket does not exists, proceed as if it is a new ticket Fixed by: Bas van der Vlies - Fixed a strang bug in 0.9 version, if ticket update is enabled and email has attachment(s). We are not allowed to set the description and author field of the attachment else the comment text is lost ;-( Fixed by: Bas van der Vlies - Fixed an error if enable_syslog and drop_spam is set. We get an exception in the syslog if we use sys.exit(0), replaced by return. Fixed by: Bas van der Vlies * delete_spam.py. - Trac version 0.10 made it easier to delete tickets. Fixed by: Bas van der Vlies 2006-10-10 * Fixed race conditions in delete_spam.py and added some debug code. Fixed by : Bas van der Vlies * Added author and description field when attachment is added to ticket. This is for trac version greater than 0.8. Fixed by : Bas van der Vlies Thanks to Matthew Good for the hint * Added drop_spam option, default = 0. If set then mail marked as Spam is not accepted. Added by : Bas van der Vlies * Do not send notification if message is marked as Spam and drop_spam is not set. Fixed by : Bas van der Vlies 2006-10-02 * Fixes possible segmentation faults in run_email2trac.c Reported by: bcornec Fixed by : Bas van der Vlies * Can set DEBUG level while configuring package, eg: DEBUG=1 ./configure ( default : 0) Reported by: syd at plug dot ca Fixed By : Bas van der Vlies * delete_spam.py did not delete everything from the SQL tables Reported by: brent at rcfile dot org Fixed by : Bas van der Vlies * Do not send notification when message is marked as Spam Fixed by : Bas van der Vlies 2006-08-28 * fixes an error in the 'reply_all' setting Thanks to and Patch by: ncarlson@ibsys.com * Added RPM spec file Thanks to: Jon Topper 2006-07-14 * Use X11R5 install-sh to install email2trac components to hide native install program differences. Author: Michel Jouvin * Fixed an error in saving attachments for new tickets for trac versions greater then 0.9. Fixed by: Bas van der Vlies * When something went wrong save the offending email for debug purposes. Fixed by: Bas van der Vlies * delete_spam.py - did not clean up the attachment table. So we got nasty new mails with fake attachments. - It works now for versions higher then 0.8 * Finally understand the unicode/encode functions and hopefully fixed the errors. Fixed by: Bas van der Vlies * Remove the temporarly created attachment files. Fixed by: Bas van der Vlies 2006-07-06 * Fixed an error in already added attachments. Do not close the database connection. Fixed by: Walter de Jong en Bas van der Vlies * Added enable_syslog option. If enabled log errors to syslog instead of stderr. If enabled no errors are send back to the user. Implemented by: Bas van der Vlies * Fixed an error with updating tickets with attachments for trac versions 0.9 and 0.10. Field "id" is not known when a existing ticket is fetched (Error = KeyError: 'id') Fixed By: See tickets #258 and #449 on trac-hacks * Fixed and spell error, self.mail_addr must be self.email_addr Fixed by: Bas van der Vlies * Catch a LookupError in unicode/encode conversion in function get_body_text() Fixed by: Bas van der Vlies * Description field was always changed when updating the ticket via the web. Asked the mailing list for a solution and got one ;-) Patch/Suggestion by: Christian Boos Applied by: Bas van der Vlies * Fixed an encoding problem when email_header is set to 1 Fixed by: Bas van der Vlies * Fixed a bug in to_unicode() function. Fixed by: Bas van der Vlies * Fixed an unicodedata.normalize TypeError bug for filenames in the attachment function Fixed by: Bas van der Vlies 2006-06-02 * Added ticketing merging. To enable it there are two options for both options enable 'ticket_update' in email2trac.conf 1 - Configure trac notification, eg: * (ticket address: ticket@test.nl) [notification] smtp_enabled = true smtp_always_cc = test@test.nl smtp_server = localhost smtp_from = ticket@test.nl always_notify_reporter = true 2 - Use the mailto_cc in email2trac.conf if you want to sent an email to the user and the trac ticket email address. With both options you get the right format of the subject line. * Use the short options for the install command. So it works for MacOSx Reported by: Nathaniel Irons. * Updated inline documentation by Nathaniel Irons. 2006-05-16 * Fixed a bug when there was no plain text body. Reported by: Greg Deakyne * Fixed a small bug if default component owner is unknown. Just fill in some bogus info. * Use the short options for the install command. So it works for MacOSx Reported by: Nathaniel Irons * Messages that has X-Virus-found in header are marked as SPAM Implemented by: Walter de Jong * Some modules are changed for version 0.10, Added and made some minor changes: Patch supplied by: Markus Tacker * Ported delete_spam.py to version 0.9 and higher: Reported by: Nathaniel Irons 2006-03-08 - Fixed an bug for 0.9, there was a space in front of the ' ticket' directory. removed it. Reported by: mi-trachacks@moensolutions.com Fixed by: Bas van der Vlies * Fixed an exception error in delete_spam.py when shutil has not enough priveledges to remove the attachments it is reported Fixed by: Bas van der Vlies * email2trac.py: When you include the body tag, some mailers (like Thunderbird) will leave out the signature. Therefore this version leaves out the body tag. Fixed by: Walter de Jong * Added msg.txt for testing Fixed by: Bas van der Vlies 2006-02-01 Bas van der Vlies : * Added Tikcet notification, send email when there is a new ticket. Depends on notification setting in trac.ini. Implemented by: Kilian Cavalotti * Can use different template for ticket notification, eg: alternate_notify_template: "a_tkt.css" Implemented by: Kilian Cavalotti * Added reply_all config parameter. If set put all CC-addresses from orginal mail in ticket CC-field. Suggested by: Kilian Cavalotti * Text in ticket description is also properly UTF-8 encoded Implemented by: Kilian Cavalotti * Removed reply_address from config file. Is not necessary anymore. See Ticket notification. * Added support for known users. If email address is known then use the trac known username instead of the email-address (only for trac version > 0.9) Implemented by: Kilian Cavalotti * Fixed an error in saving attachments for version < 0.9. Sometimes we got bogus attachments. Fixed by: Walter de Jong * Added support to make an debian package Implemented by: Bas van der Vlies 2006-01-21 Bas van der Vlies : * Fixed run_email2trac.c, did not work * Added TRAC_SCRIPT_NAME to Makefile.in to solve run_email2trac problem Both errors reported by: kilian.cavalotti@lip6.fr 2006-01-20 Bas van der Vlies : * A warning error is fixed by kilian.cavalotti@lip6.fr * Several errors in make install ;-(, reported by tacker 2006-01-15 Bas van der Vlies : * Added configure script. 2006-01-10 Bas van der Vlies : * Removed project_root from source and config file * Adjust code so we can use mulitple stanza's in config file, eg: [bas] project: /data/trac/bas spam_level: 3 use option "-p|--project bas" to select the stanza 2006-01-04 Bas van der Vlies : * Fixed getopt for -f option * Added suppport for different TRAC versions (0.8 and 0.9) 2006-01-03 Michel Jouvin * email2trac.py (ReadConfig) : allow project name relative to project root in configuration file * email2trac.py (TicketEmailParser.parse): save entire email for debugging only if debug >= 2 * run_email2trac.c: pass wrapper arguments to Python script, filtering out --file * email2trac.py (TicketEmailParser.debug_attachments): set tmp file created for debugging writable by anybody (to avoid problem if the script is run with a different uid during tests) * email2trac.py (TicketEmailParser.parse): set tmp file created for debugging writable by anybody (to avoid problem if the script is run with a different uid during tests) 2005-12-22 Michel Jouvin * Makefile: add a Makefile to build and install email2trac * email2trac.py: migrate to Trac 0.9 API 2005-12-21 Michel Jouvin * run_email2trac.c: add error messages if DEBUG macro defined * run_email2trac.c: add error testing and specific return values for each error * run_email2trac.c: Move site specific paramaters to run_email2trac.h * run_email2trac.h: include file to define site specific paramaters 0.2.4 01/11/2005 Added email_header option if set then show TO/CC fields in description of the ticket. Fixed an error in the mailto URL. This was an old error that supposed to be fixed but reoccured in this version. 0.2.3 31/10/2005 Fixed a bug with base64 encoded attachments/emails Fixed by: Walter de Jong 0.2.2 10/10/2005 according to RFC 2368 (titled "the mailto URL scheme") the mailto URL can only work with short &body messages. It fails with long messages and the link won't work. Therefore the mail body is no longer copied into the mail reply. 0.2.1 10/07/2005 body of reply email looks better 0.2 10/07/2005 mailto is replaced by a html mailto to line. If you reply to the ticket via this link then an email client is started with some default values: To: Subject: Re: Body: email_comment email2trac.conf: email_comment: # (default: >) email2trac-2.4.7/COPYING0000644000175000017500000004311310356741052012743 0ustar wmbwmb GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. email2trac-2.4.7/INSTALL0000644000175000017500000000016110613656337012744 0ustar wmbwmb= Installation and Configuration of email2trac = See for installation: https://subtrac.sara.nl/oss/email2trac